First Post. An Introduction to Digital Images.

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: 

matrix [0 255]

Well, guess what?! We can show this matrix as an image!

grayscale image of matrix

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:

This produces the same image. The choice of using 0 to 255 versus 0 to 1 is a discussion in its own right. Let's call it preference for now. 

This produces the same image. The choice of using 0 to 255 versus 0 to 1 is a discussion in its own right. Let's call it preference for now. 

And that's all for now, folks! Hope you enjoyed this quick lesson.

Up next: Color images.