DIP8 - 'Y.bmp imwrite(YIQ 2'I.bmp imwrite(YIQ 3'Q.bmp...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Katherine Haas UNI: kah2190 3/27/2012 ELEN 4830- Digital Image Processing Homework 8 1. Filtered Image- Image with new colormap- Because this image is being passed through Here the high frequency is showing up as blue a high pass filter you can only see the edges edges. due to high spatial frequency. code: function filtercolor(imgname) %readin bmp file x = imread(imgname); f = double(x); h = [0 -1 0; -1 4 -1; 0 -1 0]/4 filteredImage = conv2(f, h); filteredImage = uint8(filteredImage); imshow(filteredImage); re = [1 0 0; 0 1 0; 0 0 1]; colormap(re); imshow(filteredImage, re); 2.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
YIQ- Back to RGB- The enhanced color image appears to be more bright than the YIQ image due to the Y channel being equalized. Code: Matlab Code: function YIQ(imname) x = imread(imname); YIQ = rgb2ntsc(x); figure; imshow(YIQ); imwrite(YIQ(:, :, 1),
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 'Y.bmp' ); imwrite(YIQ(:, :, 2), 'I.bmp' ); imwrite(YIQ(:, :, 3), 'Q.bmp' ); loadim = imread( 'Y.bmp' ); heqim = histeq(loadim); YIQeq = zeros(256, 256, 3); I = imread( 'I.bmp' ); Q = imread( 'Q.bmp' ); YIQeq(:, :, 1) = heqim; YIQeq(:, :, 2) = I; YIQeq(:, :, 3) = Q; RGB = ntsc2rgb(YIQeq); figure; imshow(RGB); 3. Original Image Quantized Image (R, G, B) Code: function newimg =rgbQuant img = imread( 'lena_color.bmp' ); [indexedimg,colorMap] = rgb2ind(img, 256); r = img(:, :, 1); g = img(:, :, 2); b = img(:, :, 3); R = imgquant(r, 5); G = imgquant(g, 5); B = imgquant(b, 4); newimg = zeros(256, 256, 3); newimg(:, :, 1) = R; newimg(:, :, 2) = G; newimg(:, :, 3) = B; newimg = uint8(newimg); imshow(newimg, colorMap);...
View Full Document

This note was uploaded on 04/02/2012 for the course ELEN 4830 taught by Professor Lhiu during the Spring '12 term at Columbia.

Page1 / 3

DIP8 - 'Y.bmp imwrite(YIQ 2'I.bmp imwrite(YIQ 3'Q.bmp...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online