Converting from an analog to a digital image.



1. Sampleing image into pixels----> "picture element"

2. Quantize the pixel value to make discrete or finite

Digital imageing is the process of sampleing and quantizing the analog image (can store in computer)

SAMPLEING

1. fit a set grid of pts over the image

pixel location = (R,C)

Get value of pixel

V(R,C) =(R,G,B)

RED = SS(red(x,y) dxdy)

E= red values of pts. in pixel area

Pixel(r,c)= (red, green, blue)

= color value in RGB at pixel location (r,c)

Image size = (rows)*(colomns)

Resolution = size of image = #pixels

HOW DO YOU SELECT A RESOLUTION?




QUANTIZATION

continuous value ---> discrete value

Z = decision level (Z1, Z2, Z3)

Qk = quantization level (Q0, Q1, Q2)

The rule to convert

If Z k-1 <= pixel (r,c) <= Zk

then new pixel (r,c) = Qk




How do we choose the Q's and Z's

The goal is to choose Q's & Z's to minimize error produced from quantization, E

where

E = Expected value{(pixel- newpixel)*(pixel-newpixel )}

= mean squared error

Note:

square error= (pixel value - new value)

expected value = a type of average or mean


If we try to minimize this error this leads to the following equation

Qk= (Zk+1+Zk) / 2


So, Steps to follow are:

  1. choose Zk

  2. calculate Q's via above equation



How Do We Choose Z's?

Basically, it is function of image content
You want more levels (Z values) in greyvalue or color ranges in which much of te image pixels fall.


Bits and Bytes... Some Computer Terms

Bit =0 or 1 = it is hte smallest memory storage unit in a computer

Byte = 8 bits grouped together ---> 256 possibilities (2^8 means 2 to the power of 8)= values from 0 to 255

Thus, if we have N bits per pixel ==> there are 2^N or 2 to the Nth power possible values




Types of Images: bits/pixel

Greyscale Image= 8 bits/pixel = 0 - 255 levels

Full colorimage = 24 bits/pixel = 16.7 million colors




Serial Transmission of an Image

baud rate = bits per second that can be transfered

Time to transfer (in seconds) = [(#of pixels)*(bits per pixel)]/ baud rate



What do you loose in making a Digital Image?

1. Loss from sampleing?

Over-Sampling = when you have more samples than you need

Under-Sampling = not enough samples are used


How many samples do you need?
You need 2 times the Nyquest rate.
Nyquest rate= function of highest frequency in the image
highest frequency in image = function of fastest varying spatial patter in the image = f(how fast things change)




2. Loss from Quantization?

There is always loss from process of quantization