Today's topic: Digital Images. Part 1. Introduction to Grayscale.
Okay, first things first. Here is a single number, a scalar: 5
Here is a list of numbers: 5 6 7 8
Here's another list, or alternatively a string of numbers: 3 1 0 0 3
So what if we have a string of strings, or a list with both rows and columns, just like you would find on an Excel Spreadsheet? Well, that would be a matrix.
We'll put some [ brackets ] around them for some neat structure. Here's an example:
Well, guess what?! We can show this matrix as an image!
Black is 0 and white is 255, with shades of gray in between. Alternatively, we can divide this matrix by 255 and have white represented by 1, with gray values being decimals between 0 and 1. Some people prefer this way of doing things. Such a matrix (rounded to four decimal places) would look like this:
And that's all for now, folks! Hope you enjoyed this quick lesson.
Up next: Color images.