Challenge - 5 Problems
Color Transform Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of brightness adjustment code
What will be the pixel value of the center pixel after applying this brightness increase code on a grayscale image with pixel value 100?
Computer Vision
import numpy as np image = np.full((3,3), 100, dtype=np.uint8) brightness_increase = 50 result = np.clip(image.astype(np.int16) + brightness_increase, 0, 255).astype(np.uint8) center_pixel = result[1,1] print(center_pixel)
Attempts:
2 left
💡 Hint
Adding brightness increases pixel values but caps at 255.
✗ Incorrect
The original pixel value is 100. Adding 50 results in 150, which is within the 0-255 range, so the center pixel becomes 150.
🧠 Conceptual
intermediate1:30remaining
Effect of contrast adjustment on pixel values
If you multiply all pixel values in an image by 1.5 and then clip to 255, what happens to pixels originally at 200?
Attempts:
2 left
💡 Hint
Multiplying 200 by 1.5 gives 300, but pixel values cannot exceed 255.
✗ Incorrect
200 * 1.5 = 300, but pixel values are clipped to 255, so the final value is 255.
❓ Metrics
advanced2:30remaining
Measuring hue shift effect
Which metric best measures the difference in hue between two images after a hue shift?
Attempts:
2 left
💡 Hint
Hue is a circular value best compared with angular similarity.
✗ Incorrect
Cosine similarity on the hue channel in HSV color space captures angular differences in hue effectively.
🔧 Debug
advanced2:00remaining
Bug in contrast adjustment code
What error will this code raise?
import numpy as np
image = np.array([[50, 100], [150, 200]], dtype=np.uint8)
contrast_factor = 1.2
result = image * contrast_factor
print(result)
Attempts:
2 left
💡 Hint
Multiplying a uint8 numpy array by a float returns a float array.
✗ Incorrect
NumPy automatically upcasts the result to float64, so no error occurs but the result is float type.
❓ Model Choice
expert3:00remaining
Choosing model for color transform robustness
Which model architecture is best suited to learn robustness to brightness, contrast, and hue changes in images?
Attempts:
2 left
💡 Hint
Robustness to color changes benefits from convolution and normalization.
✗ Incorrect
CNNs capture spatial features well, batch normalization stabilizes training, and data augmentation with color transforms improves robustness.