<< Chapter < Page Chapter >> Page >

You may have noticed when you loaded ycbcr.mat into Matlab that you also loaded a 5 × 5 matrix, h . This is a 5 × 5 Gaussian filter with σ 2 = 2 . 0 . (See the first week of the experiment for more details on this type offilter.) Alter the ycbcr array by filtering only the luminance component, ycbcr(:,:,1) , using the Gaussian filter (use the filter2 function). Convert the result to R G B , and display it using image . Now alter ycbcr by filtering both chrominance components, ycbcr(:,:,2) and ycbcr(:,:,3) , using the Gaussian filter. Convert this result to R G B , and display it using image .

Use subplot(3,1,n) to place the original and two filtered versions of the ycbcr image in the same figure. Place a title on each of the images, and print the figure (in color).Do you see a significant difference between the filtered versions and the original image?This is the reason that Y C b C r is often used for digital video. Since we are not very sensitive to corruption of the chrominance components, wecan afford to lose some information in the encoding process.

Inlab report

  1. Submit the figure containing the components of girl.tif .
  2. Submit the figure containing the components of ycbcr .
  3. Submit your code for the transformation from Y C b C r to R G B .
  4. Submit the figure containing the original and filtered versions of ycbcr . Comment on the result of filtering the luminance and chrominance components of this image. Based on this,what conclusion can you draw about the human visual system?

Halftoning

In this section, we will cover a useful image processing techniquecalled halftoning . The process of halftoning is required in manypresent day electronic applications such as facsimile (FAX), electronic scanning/copying, laser printing, and low bandwidth remote sensing.

Binary images

As was discussed in the first week of this lab, an 8-bitmonochrome image allows 256 distinct gray levels. Such images can be displayedon a computer monitor if the hardware supports the required number intensity levels.However, some output devices print or display images with much fewer gray levels.In the extreme case, the gray scale images must be converted to binary images, where pixels can only be black or white.

The simplest way of converting to a binary image is based on thresholding , i.e. two-level (one-bit) quantization. Let f ( i , j ) be a gray scale image, and b ( i , j ) be the corresponding binary image based on thresholding.For a given threshold T , the binary image is computed as the following:

b ( i , j ) = 255 if f ( i , j ) > T 0 else
(1) Original gray scale image. (2) Binary image produced by simple fixed thresholding.

[link] shows an example of conversion to a binary image via thresholding, using T = 80 .

It can be seen in [link] that the binary image is not “shaded” properly–an artifact known as false contouring . False contouring occurs when quantizing at low bit rates (one bit in this case)because the quantization error is dependent upon the input signal. If one reduces this dependence,the visual quality of the binary image is usually enhanced.

One method of reducing the signal dependence on the quantization error is to add uniformly distributed whitenoise to the input image prior to quantization. To each pixel of the gray scale image f ( i , j ) , a white random number n in the range [ - A , A ] is added, and then the resulting image is quantized by a one-bit quantizer, as in [link] . The result of this method is illustrated in [link] , where the additive noise is uniform over [ - 40 , 40 ] . Notice that even though the resulting binary image is somewhat noisy,the false contouring has been significantly reduced.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask