@@ -55,30 +55,30 @@ but that each pixel can have a different colour from its neighbors.
55
55
Viewed from a distance,
56
56
these pixels seem to blend together to form the image we see.
57
57
58
- ## Working with Pixels
59
-
60
- As noted, in practice,
61
- real world images will typically be made up of a vast number of pixels,
62
- and each of these pixels will be one of potentially millions of colours.
63
- While we will deal with pictures of such complexity shortly,
64
- let's start our exploration with 15 pixels in a 5 X 3 matrix with 2 colours and
65
- work our way up to that complexity.
66
-
67
58
::::::::::::::::::::::::::::::::::::::::: callout
68
59
69
60
## Matrices, arrays, images and pixels
70
61
71
- The ** matrix** is mathematical concept - numbers evenly arranged in a rectangle. This can be a two dimensional rectangle,
72
- like the shape of the screen you're looking at now. Or it could be a three dimensional equivalent, a cuboid, or have
73
- even more dimensions, but always keeping the evenly spaced arrangement of numbers. In computing, ** array** refers
74
- to a structure in the computer's memory where data is stored in evenly- spaced ** elements** . This is strongly analogous
62
+ A ** matrix** is a mathematical concept - numbers evenly arranged in a rectangle. This can be a two- dimensional rectangle,
63
+ like the shape of the screen you're looking at now. Or it could be a three- dimensional equivalent, a cuboid, or have
64
+ even more dimensions, but always keeping the evenly spaced arrangement of numbers. In computing, an ** array** refers
65
+ to a structure in the computer's memory where data is stored in evenly spaced ** elements** . This is strongly analogous
75
66
to a matrix. A NumPy array is a ** type** of variable (a simpler example of a type is an integer). For our purposes,
76
67
the distinction between matrices and arrays is not important, we don't really care how the computer arranges our data
77
68
in its memory. The important thing is that the computer stores values describing the pixels in images, as arrays. And
78
- the terms matrix and array can be used interchangeably.
69
+ the terms matrix and array will be used interchangeably.
79
70
80
71
::::::::::::::::::::::::::::::::::::::::::::::::::
81
72
73
+ ## Working with Pixels
74
+
75
+ As noted, in practice,
76
+ real-world images will typically be made up of a vast number of pixels,
77
+ and each of these pixels will be one of potentially millions of colours.
78
+ While we will deal with pictures of such complexity shortly,
79
+ let's start our exploration with 15 pixels in a 5 X 3 matrix with 2 colours and
80
+ work our way up to that complexity.
81
+
82
82
First, the necessary imports:
83
83
84
84
``` python
0 commit comments