Digital Image Processing Lecture (4) PDF

Summary

This document is a lecture on digital image processing, focusing on different algorithms for converting RGB images to grayscale, thresholding for creating binary images, and various zooming methods. It also includes examples on how to use MATLAB for image processing tasks. Specific topics include image acquisition and use of `imaqhwinfo`.

Full Transcript

Lecture (4) Digital Image Processing Three algorithms for RGB to Grayscale Conversion (Cont’d)  The lightness (Desaturation) method averages the most prominent and least prominent colors; A pixel can be desaturate...

Lecture (4) Digital Image Processing Three algorithms for RGB to Grayscale Conversion (Cont’d)  The lightness (Desaturation) method averages the most prominent and least prominent colors; A pixel can be desaturated by finding the midpoint between the maximum of (R, G, B) and the minimum of (R, G, B), like so: Grayscale=(max([R, G, B]) + min([R, G, B])) / 2. Assignment # 1 Desaturation results in a flatter, softer grayscale image. Desaturation looks like the kind of grayscale photo you might take with a cheap point-and-shoot camera. A. H. Seddik 1 Lecture (4) Digital Image Processing Three algorithms for RGB to Grayscale Conversion (Cont’d)  The Weighted or Luminosity method is a more sophisticated version of the average method. It also averages the values, but it forms a weighted average. Grayscale=((0.3 * R) + (0.59 * G) + (0.11 * B)). Assignment # 2 Explanation Because humans do not perceive all colors equally, the “average method” of grayscale conversion is inaccurate. Instead of treating red, green, and blue light equally, a good grayscale conversion will weight each color based on how the human eye perceives it. As you can see here , that the image has now been properly converted to grayscale, and the image is more brighter. A. H. Seddik 2 Computer Science Lecture (4) Digital Image Processing Converting GrayScale Image Into Black and White Image (Thresholding) Thresholding is the simplest method of image segmentation (As will be seen later). It can be used to create binary images from a grayscale image. The simplest thresholding methods replace each pixel in an image with a black pixel if the image intensity ( i ) is less than some fixed constant T (that is, i

Use Quizgecko on...
Browser
Browser