Thursday, October 11, 2012

Basics of Digital Image

The blog had been quiet for a long time, I am restarting it again with a different perspective. This time around I would be learning from basics and will try to explain the stuff as I understand from the basics. If I have misunderstood any concept, I will be pleased to learn from anyone.

I will be using Gonzalez and Woods 3rd Ed. for this. I will try to give minimal explanation on Matlab code but stress more on the concepts around as Matlab Help is extensively available at www.mathworks.com.

Without wasting much time lets begin....

Few terms to begin with

Bare Basics:

Grayscale Image: A frame of 2 D distribution of intensities.
Coordinates - x,y
Any image is a product component of intensity-i(x,y) and reflectance-r(x,y)
Intensity: 0 to inf (Yes, infinity and that's how you write in Matlab).
Reflectance: 0 to 1
(Think, what would be reflectance of a 1. black screen? 2.white screen? 3. transparent plastic sheet?)

How to see in Matlab:

in = imread('rice.png');
whos in;
size(in)

The second line here whos gives variable name, size of image read into, bytes in storage, datatype per element. If you just give whos, you end up getting the details about all the variables in workspace.


This means in black and white movies you have 3 dimensions (x, y, time).

Color Image: A triplet frame of 2 D distribution of intensities. (I will explore more in color models later.)
Coordinates - x, y, z
How to see in Matlab:


in = imread('color.jpg'); %make sure there is a color image of %same name in the folder
whos in;
size(in)

This means in color movies in a basic sense you have 4 dimensions (x, y, z, time).

Image Sampling and Quantization:

Analog image to Digital image conversion uses this.
Discretization in time domain is image sampling and digitization of amplitudes after discretization is quantization. End result "A digital image".

Sampling intervals in x-axis gives your length resolution and y-axis gives you the height resolution of a picture.
More the resolution, better defined is the image for visual perception, but more is the size for storage..

Vector images that are used in Photoshop are handled differently (as to what I know the images there are defined by mathematical equations, so can be extrapolated/expanded without loss of resolution/chequer-boarding). A good read on this is in Wikipedia here...

Hope I have started off well, please post questions so that I can get different perspectives...

No comments:

Post a Comment