In the 8×8 images, A has 1s only in the middle two columns, and B only in the middle two rows; all other pixels are 0.
Procedure
Plot both images, then calculate the overall mean pixel value and the row and column sums.
Check whether mean brightness alone distinguishes the two images, and choose one additional feature.
Results to retain
2 images, a feature comparison table, and a brief explanation of their representational differences.
Items to record and points to check
Image
Mean brightness
Selected features
Distinguishable
Points to check
Did you check that the two images have different array structures despite the same mean brightness?
2. Shifted Inputs
Starting conditions
Calculate the same features on images A and B shifted 1 position to the right.
Procedure
Use np.roll(A,1,axis=1) and np.roll(B,1,axis=1) to shift each image one position to the right. In this example, the rightmost column wraps around to the left.
Calculate the features chosen in the previous activity, overall mean, row sums, and column sums for the shifted images too. For each image, record feature values before and after the shift side by side.
Distinguish features that remain unchanged from those that change, and explain whether your selected features still distinguish the two images.
Results to retain
Images before and after shifting, and a comparison table of the same features.
Items to record and points to check
Images before and after the shift
Mean
Row and column sums
Selected features and distinguishability
Points to check
Did you calculate the same features before and after the shift?
3. Checking Other Inputs
Starting conditions
Flip one pixel in each of A and B to examine the robustness of the selected features.
Procedure
Select one pixel in each of A and B and change 0 to 1 or 1 to 0. Record the changed row and column Index and the values before and after the change.
Recalculate the features selected earlier, and record their values before and after the change and whether they distinguish the two images. Explain how changing one pixel affected the features.
Results to retain
Changed pixels, features before and after the changes, and whether the images remain distinguishable.
Items to record and points to check
Changed pixel index and value
Features before and after the change
Whether the two images are distinguishable
Reasoning
Points to check
Did you record the positions and values of the changed pixels?