-- Dec 6 In-Class Exercise Thread
For second image,
For k=3, 9 (all) pixel values are zero
For k=1, only 1 pixel value is one
For k=2, 8 pixel values are one
So, mean X_ = (0 + 1 + 8)/(3*3*3) = 1/3
Now, Let’s calculate, ∑i=1 to r ∑ j=1 to c (Xi,j,k − X_) for k = 1, 2, 3
For k = 3, this value is 9 * (1/3)^2 = 1
For k = 2, this value is 8 * (1/3)^2 + (2/3)^2 = 12/9
For k = 1, this value is 8 * (2/3)^2 + (1/3)^2 = 33/9
Adding these:= 54/9 = 6
Putting this in the formula, we get
Contrast = sqrt(6/27)
Similarly, for first image,
For k=3, only 3 pixel values are one
For k=1, only 3 pixel values are one
For k=2, only 3 pixel values are one
So, mean X_ = (3 + 3 + 3)/(3*3*3) = 1/3
Now, Let’s calculate, ∑i=1 to r ∑ j=1 to c (Xi,j,k − X_) for k = 1, 2, 3
For k = 3, this value is 6 * (1/3)^2 + 3 * (2/3)^2 = 18/9
For k = 2, this value is 6 * (1/3)^2 + 3 * (2/3)^2 = 18/9
For k = 1, this value is 6 * (1/3)^2 + 3 * (2/3)^2 = 18/9
Adding these:= 54/9 = 6
Putting this in the formula, we get
Contrast = sqrt(6/27)
So, for both images contrast value is '''sqrt(6/27)'''
<nowiki>For second image,
For k=3, 9 (all) pixel values are zero
For k=1, only 1 pixel value is one
For k=2, 8 pixel values are one
So, mean X_ = (0 + 1 + 8)/(3*3*3) = 1/3
Now, Let’s calculate, ∑i=1 to r ∑ j=1 to c (Xi,j,k − X_) for k = 1, 2, 3
For k = 3, this value is 9 * (1/3)^2 = 1
For k = 2, this value is 8 * (1/3)^2 + (2/3)^2 = 12/9
For k = 1, this value is 8 * (2/3)^2 + (1/3)^2 = 33/9
Adding these:= 54/9 = 6
Putting this in the formula, we get
Contrast = sqrt(6/27)
Similarly, for first image,
For k=3, only 3 pixel values are one
For k=1, only 3 pixel values are one
For k=2, only 3 pixel values are one
So, mean X_ = (3 + 3 + 3)/(3*3*3) = 1/3
Now, Let’s calculate, ∑i=1 to r ∑ j=1 to c (Xi,j,k − X_) for k = 1, 2, 3
For k = 3, this value is 6 * (1/3)^2 + 3 * (2/3)^2 = 18/9
For k = 2, this value is 6 * (1/3)^2 + 3 * (2/3)^2 = 18/9
For k = 1, this value is 6 * (1/3)^2 + 3 * (2/3)^2 = 18/9
Adding these:= 54/9 = 6
Putting this in the formula, we get
Contrast = sqrt(6/27)
So, for both images contrast value is '''sqrt(6/27)'''
</nowiki>