Total Pageviews

Translate

September 21, 2015

See How a Pixel looks like !!!

by 4hathacker  |  in Image Processing at  7:20 PM

Hello everyone!!!

We got a quick start about Image Processing in MATLAB. We have seen previously  how to read and write images. Also, we have seen the three original formats of RGB color model.



In the current session, I am going to tell you what a pixel looks like.There are some questions I would like to ask you...

1. Do you ever have seen a pixel in an image?
2. How does a pixel looks like?
3. If we know about pixel, what can we do with that knowledge?
4. Is it important to know about pixel while doing image processing?
5.What is the utility of pixel operations in an image?

Let us see how we can see a pixel in an image using MATLAB...
Step 1 : Open an image in MATLAB using imtool()
Step 2 : Then below File Option, You can find the second icon as Inspect Pixel values. Select the icon.
Step 3 : Like as in image given below, you can easily inspect different pixel values for a given image.



Please observe the left most corner of the image tool window. Its is showing some varying data according to different positions of the cursor. What the heck is it and why it is varying with the movement of the cursor?
This data is representing the location in X and Y plane and also the values of RGB in []. i.e.,
Pixel info: (X,Y) [R G B]
This is the answer to the first two questions.

Now comes the next two questions that are very important. Using the knowledge of the pixel in image we can alter the image specifically playing with the RGB values which results in some cool stuff. Some additional terminology must be known like what is neighborhood, adjacency, etc, and we can perform various operations like filtering, erosion, dilation, etc. to get the required result.
This is why the pixel information is of immense use in an image.

Just go through MATLAB help and try to get pixel information using some more MATLAB functions like 'impixelinfo' and 'impixel'.

Observe that we have used imtool() to show the image pixels and not the imshow(). Try to find out why is that so...

This is enough for today... have fun with image processing in MATLAB.


0 comments:

Like Our Facebook Page

Nitin Sharma's DEV Profile
Proudly Designed by 4hathacker.