Week 12 • Monday

Block 111: Images as Arrays

Understand how images are represented as NumPy arrays.

Concepts

Code Examples

See exercise below.

Exercise

Load an image, print shape, dtype. Display it in Jupyter correctly (BGR→RGB). Access pixel value at position (100,100). Change it to red.

Homework

Why does OpenCV use BGR instead of RGB? What common mistake does this cause?