1 / 14

CS6825: Digital images

CS6825: Digital images. How are DIGITAL images created. Previous lecture we discussed how ANALOG images are created. Making Digital images. 1. Sampling image into pixels---- "picture element" 2. Quantize the pixel value to make discrete or finite. Sampling – the first step.

linda-downs
Download Presentation

CS6825: Digital images

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS6825: Digital images • How are DIGITAL images created. • Previous lecture we discussed how ANALOG images are created

  2. Making Digital images • 1. Sampling image into pixels---- "picture element" • 2. Quantize the pixel value to make discrete or finite

  3. Sampling – the first step • Model sensor “array” for a 2D camera, as a 2D array as shown on right. • We use rectangles even though the actual shape is not exactly this. • Some researches use more complicated sesnor array models …but, 2D array works adequately for many applications

  4. SAMPLING in more detail 1. fit a grid over the image pixel location (r,c)=(row,column) 2.Get value of pixel Pixel(r,c) =(R,G,B) R =  ∫ ∫  red(x,y) dxdy (over pixel area) red(x,y) = function of red spectral energy at each contiguous point in your sensor

  5. Resolution, Size of Image • Image size = (rows)*(colomns) • Resolution = size of image = #pixels • low resolution ---> # of pixels is small • high resolution ----> # of pixels is big • HOW DO YOU SELECT A RESOLUTION? • if grid is too large you will get jagged edges • This is called Aliasing. No Aliasing Aliasing

  6. Cat image at 24 bits / pixel (over 16 million colors) 8 bits each field – 8 /red, 8/green, 8/blue Cat image at 4 bits / pixel (only 16 colors) QUANTIZATION • Convert continuous values to discretee.g. 1.222 -> 1.0 • Instead of infinite colors we have a finitenumber of colors. • Remember in computers we store things in bits.

  7. How to QUANTIZE • Simple Quantization scheme: The rule to convert If Zk-1 <= pixel (r,c) <= Zk then new pixel (r,c) = Qk • Zi = decision level (i = 0 to N) • Qk = quantization level (k = 0 to M)

  8. More Quantization • We can have more complicated quantization schemes as indicated by the figures here and the quantization boundaries in the red-green space Image with no blue values only red and green The color space above produced by Photoshop Using 16-colors only, shows partitioning of space

  9. More Quantization • We can have more complicated quantization schemes as indicated by the figures here and the quantization boundaries in the red-green space Image with no blue values only red and green The color space above produced by Photoshop Using 16-colors only, shows partitioning of space

  10. With Our Simple Step Function Conversion – how select Q’s & 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: 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: choose Zk calculate Q's via above equation CALLED “ UNIFORM QUANTIZATION” as it splits up the space uniformly (evenly).

  11. So, 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 the image pixels fall.

  12. Loss in making a Digital Image? • Loss from sampling? • Not if choose the correct number of samples. • Over-Sampling = when you have more samples than you need • Under-Sampling = not enough samples are used • Loss from quantization? • Always unless your analog image miraculously happens to only have values at the quantization levels. Ok samples Under sampled 256 levels 8 levels

  13. How to choose the number of samples (pixels) • 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)

  14. Conclusion • Discussed 2 steps involved in creating a digital image from an analog image: Sampling + Quantization. • Discussed schemes for both Sampling and Quantization. • Discussed how to avoid loss of information in Sampling and that you always loose information in the Quantization process.

More Related