Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Assignment: Use |Baboon image images from the assignment

Assignment: Use |Baboon image images from the assignment

Computer Science

Assignment:

Use |Baboon image images from the assignment. 1. Read the image, convert it from 256 gray levels to 2-gray levels, and write the 2-gray level image as a pgma image. Note that this is equivalent to uniform quantization. To clarify for this part and to assist in the next part): Encoder - Divide the region [0-255] into two regions Ro = [0 - 127], and R, = [128 - 255]. Let p(i, j) be a pixel with gray level g in the original image (baboon.pema), check whether g E Ro or g ER1. If g E Ro then assign the value 0 to the pixel p(i, j) in your output image (say baboon2-levels.pgma). Otherwise assign 1 to the pixel p(i.)) in your output image. Note that the maximum value you can get is 1. So, this must be the max used in the header of the output image that you generate. Decoder - When you reconstruct the image (say into a second image Baboon2-Levels- R.pgma), you should assign the value 63 to each pixel with a value of '0' in baboon2- levels.pgma and the value 191 to each pixel with a value '1' in baboon2-levels.pgma. This time the maximum value you can get is 191. So, this must be the max used in the header of the output image that you generate. 2. Read the image, convert it from 256 gray levels to 15-gray levels, and write the 15-gray level image as a pgma image. Note that this is equivalent to uniform quantization. In specific: a. Emulate the encoder and produce a pema image where the value of pixel p,, in the encoded image is the quantized value of the pixel payin the original image. b. Generate the decoder output; that is the reconstructed image (in pgma format); where pixel pay of the reconstructed image assumes the reconstructed value that corresponds to the original pixel vale. C. Calculate the distortion introduced and find the rate. i. The distortion is the mean square error. That is, the average of the pixel-wise square differences between the original image and the reconstructed image. d. Produce the error image - the error image is obtained by the pixel-wise absolute difference between the original image (i.e., the set of pixels p; ) and the reconstructed image (i.e., the set of pixels pay ). That is, pixel (i.)) of the error image (say en,) is the absolute difference between pixel pay (from the original image) and pixel py (from the reconstructed image). Please note that the pgma error image must include the actual maximum gray level of image pixels in the header.

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE