1 / 19

Points Processing

Points Processing. Digital Image Processing. Introduction. Any image-processing operation transforms the gray values of the pixels. Image-processing operations may be divided into three classes: Transforms Neighborhood processing Point operations. Neighborhood processing

gizela
Download Presentation

Points Processing

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. Points Processing Digital Image Processing

  2. Introduction • Any image-processing operation transforms the gray values of the pixels. • Image-processing operations may be divided into three classes: • Transforms • Neighborhood processing • Point operations Neighborhood processing Point operations Ch4-p.65

  3. Arithmetic Operations: Addition & Subtraction Ch4-p.66

  4. Arithmetic Operations: Multiplication & Division

  5. Arithmetic Operations: Complement • The complement of a gray-scale imageis its photographic negative • type double (0.0~1.0) • 1-m • type uint8 (0~255) • 255-m

  6. Histogram • A graph indicating the number of times each gray level occurs in the image

  7. Histogram Stretching • A table of the numbers ni of gray values • We can stretch out the gray levels in the center of the range by applying the piecewise linear function Stretch function Original histogram

  8. Histogram Stretching: imadjust • imadjust is designed to work equally well on images of type double, uint8, or uint16 • the values of a, b, c, and d must be between 0 and 1 • the function automatically converts the image im (if needed) to be of type double • Note that imadjust does not work exactly the same way of the stretching function as shown in previous slide

  9. Histogram Stretching: imadjust • The imadjust function has one other optional parameter: the gamma value >> img = imread('pollen.tif'); >> m_ad= imadjust(img,[],[],2); >> figure, imshow(m_ad);

  10. Histogram Stretching: histpwl >> img = imread('tire.tif'); >> a = [0 .25 .5 .75 1]; >> b = [0 .75 .25 .5 1]; >> pwl = histpwl(img,a,b); >> figure, imshow(pwl); >> figure, plot(img,pwl,'.') Piece-wise linear stretching

  11. Histogram Equalization • An entirely automatic procedure • Suppose our image has L different gray levels, 0, 1, 2, . . . , L − 1, and gray level i occurs nitimes in the image wheren=n0 +n1 +n2 +· · ·+nL−1

  12. Histogram Equalization: Example • Suppose a 4-bit gray-scale image has the histogram shown below, associated with a table of the numbers ni of gray values (L-1)/n

  13. Histogram Equalization: Example >> p = imread('pout.tif'); >> figure, imshow(p), figure, imhist(p), axis tight; >> ph = histeq(p); >> figure, imshow(ph), figure, imhist(ph), axis tight;

  14. Histogram Equalization: Example

  15. Histogram Equalization: Appendix • WHY IT WORKS ? • If we were to treat the image as a continuous function f (x, y)and the histogram as the area between different contours, then we can treat the histogram as a probability density function.

  16. Lookup Table • Point operations can be performed very effectively by using a lookup table, known more simply as an LUT • e.g., the LUTcorresponding to division by 2 looks like >> b = imread('blocks.tif'); >> T = uint8(floor([0:255]/2)); >> >> % blocks image serves as LUT >> % LUT indices must be positive >> % integers or logicals >> b2 = T(b+1); >> figure, imshow(b); >> figure, imshow(b2);

  17. Lookup Table vs. Histogram Stretching • As another example, suppose we wish to apply an LUT to implement the contrast-stretching function t1 = 0.667*[0:96]; t2 = 2*[97:160]-128; t3 = 0.6632*[161:255]+85.8947; T = uint8(floor([t1 t2 t3])); b = imread('pollen.tif'); b2 = T(b+1); figure, imshow(b), figure, imhist(b), axis tight; figure, imshow(b2), figure, imhist(b2), axis tight; figure, plot(T), axis tight;

More Related