# Create a simple "image" (2D array) image = np.random.randint(0, 256, (100, 100)) # 100x100 grayscale # Basic operations bright_image = image + 50 # Brighten dark_image = image * 0.5 # Darken threshold = image > 128 # Binary threshold # Image statistics print(f"Average brightness: {np.mean(image):.1f}") print(f"Bright pixels: {np.sum(image > 200)}")