Let's see, one by one.
Let's start with open CV.
Okay.
Let me display that, which is a major underscore.CV And here we go.
This is what we have is a big matrix and we have some values out there.
These values are called pixels.
And remember the image that we have read as an colour image.
So therefore these three together will become one pixel.
The first one will define the blue color and the second one will define the green color and followed
by this will define the blue color.
And Summary Color Image is a chapel of three values, which contains blue, green and red.
That's what we have in the open CV BGR.
Okay.
Let us also show you the map.
Plot, clip, map, plot lib.
As I said, it will read an image in GB and also return in the array.
So which is my image underscore Matt.
Now let's print this.
And here we go.
This is what we have is also a very big matrix.
And just like our open CV, this whole together will become one tuple.Whereas this will represent the red colour.
This represents the green colour and this represents blue colour, which is r, g, b, and you can
also notice that there is some differences there, which is basically if you reverse this and this is
what we happening.
So the information is both the same.The only difference between Mad plot lib and the BG R is the change in the values.
And let us see the PIL, which is my image pill.
This is an object.
So this is what an object what we have here.
We can also convert this object into numpy array using.
If they copy this, you're going to convert that converting.
Hill object.To write.
You can also do that using IMG underscore perl underscore RR.
That's going to be equal to NPE dot array.
Now provide the object of pill which is img underscore pill and execute this and this will convert that
into array.
You can see that.
And here we go.
We got the exactly the same thing.
What we got for the mad plot lib.
You can see this is also the tuple of values which represents the pixel.
This represents the red.
This represents green.
And this represents blue.
So this is how we can read an images using three libraries that is open CV, map, plot, lib and pillow.
In the next lesson we will talk more on this.
Until then, happy learning.