Hi and welcome back.
So Intersection will take a look at what exactly are images and how what is stored digitally on a computer.
So let's take a look at the next slide.
This is how a computer actually sees images.
What we're seeing here is basically an array of different numbers and of color coded them specifically
as blue, green and red.
That's the RGV color spectrum and how we represent all colors by combinations of these three colors.
So an image will basically be tree values per pixel, and each pixel is represented.
Like this point here?
This pixel zero zero, this is also pixel zero zero, and this is also pixel zero zero.
And in order to get the actual color of what Pixel zero is, we have to mix different amounts of red,
green and blue.
And you can see if you look carefully, it's a bit hard to see, but there are values here and the values
range from zero to 255.
What that means is that 255 will be the most intense representation of the color red, whereas one or
two will be a very dark red.
Whereas what 255 is the bright red?
So that's how the digital images are stored.
But what exactly are images?
Well, images are basically 2D representations of the visible light spectrum.
And that's basically a part of the electromagnetic spectrum here.
The visible part of this, this small little orange right here.
And there's other electromagnetic spectrums here ultraviolet X-ray, gamma rays, microwave radio,
all of these things we can't see.
Our eyes are only tuned to see this one visible light spectrum.
And as I just showed you before, each pixel like pixel zero here zero zero, the top left one is a
mix of these three colors in the RGV color space.
And when you combine different amounts of them to generate any color we want, and that gives us basically
how an image is formed.
So our images created do well.
This goes into camera photography theory, where you can take a look and see how we have to.
We have to basically focus light from an object that that's been reflected from an object, basically
true a pinhole here that is now focused onto a thumb or photosensitive sensor, and that basically forms
the image.
But however, this is basically a very primitive model.
We need it.
Basically, what modern cameras do?
We need a lens?
And this lens focuses the image here onto the film now in order for it to be focused.
This needs to be at a specific distance to get the focus right where all these areas are concentrated
here.
But basically, by adjusting the lens, we can adjust the width that basically gives us different zooms
as well as different apertures as well.
That's the opening to what the lens here.
So there's a number of different combinations we can use to focus and move this lens to get the image
onto the film so digitally.
As I showed you before, images are basically combinations of red, green and blue in OpenCV.
You'll you'll see a format called BGR.
It's the same as RGV, but it's still within the BGR order for some reason.
Actually, there's a reason, but it's a bit technical to explain.
So as you can see something like the color yellow here, color yellow is represented by mixing red and
green only.
So you can see just 255 T-55 here on red and green will give us the color yellow.
So that's basically how we use the RGV color spectrum to represent images.
So let's take a bit of a deeper look into how it's actually stored on a computer.
So computers have things called variables.
Variables can be integers can be a string string, meaning a piece of text, and then you can have arrays
and arrays of basically a container that store multiple values.
So a one dimensional array can store any amount of values.
Basically, just consider a container in compartments and you can have different values in this compartments
here.
So this is what a one dimensional area looks like a two dimensional early.
We'll just look like this.
You can see it's basically a grid now.
So you can have different reference values going on zero zero zero one one to five to reference the
different points here.
That's what the 2D array looks like.
Now, this is a good example to show you what a tree dimensional area would look like, and that's how
color images will be stored.
So as you can see, for the position zero zero in disarray, we have tree values.
That's what I mentioned several times before.
It's just a way to help you visualize it better.
So that's how an image is actually stored on a computer to basically look up.
When I see a computer, I mean, programming language.
It's actually stored in memory addresses.
I'm not going to go down into that low level.
To and Sophie, to understand how it's stored, but in a programming language like Python, this is
the best way to understand what's going on.
So 2D images are actually different.
They're stored in two dimensional arrays, and they only have one value.
They don't have to be different values, as you see here.
The one value is basically basically a range of green.
So zero will be black effectively and 255 would be white.
And all the numbers in between will be different.
Different shades of grey.
Not 50 shades of grey.
255 shades of grey.
So that's the greyscale representation.
Grayscale could be colloquially called black and white.
So whenever you hear black and white, people don't tend to mean grayscale images.
And lastly, we'll take a look at image file formats so you can have a jpeg, jf png.
We can look at all of these into open KB.
I don't believe we can look TIFF or actually TIFF might work.
Raw may not work or these may not work.
These are Photoshop files.
These are just common image types.
No, these are raster image types I should have specified at before.
These are different.
These are pixel based resolution, fixed dependent images where we have each pixel has a color value
assigned to it.
No vector images are different.
Now we don't deal with vector images in this course, but it's important for you to understand the different
types of images with image formats.
If you're doing computer vision so you can have SVG, which is a very good one.
If Adobe Illustrator PDFs as well are set to be as effective as meaning that they aren't their resolution
independent.
So what are you screwing it up?
It isn't to lose quality like the rest of the image would.
So that's it for this lesson on images.
Now you're ready to start the course.
So let's get started with Google collab and set up this download.
Of course, good in the next section and set up Google Club Environment for Google Cloud, which is
quite simple.
So I'll see you in the next lesson.
Thank you for watching.