Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;
- lena = imread('lena.tiff');
- lena_gray = rgb2gray(lena);
- lena_gray_normalized = double(lena_gray) / 255;
- imshow(lena_gray);
- title('Original Lena Gray');
- h1 = (1/6)*ones(1,6);
- h2 = h1';
- h3 = [-1 1];
- lena_gray_convolved_h1 = conv2(lena_gray_normalized, h1);
- lena_gray_convolved_h2 = conv2(lena_gray_normalized, h2);
- lena_gray_convolved_h3 = conv2(lena_gray_normalized, h3);
- figure
- imshow(lena_gray_convolved_h1);
- title('Lena Gray Convolved with h1');
- figure;
- imshow(lena_gray_convolved_h2);
- title('Lena Gray Convolved with h2');
- figure;
- imshow(lena_gray_convolved_h3);
- title('Lena Gray Convolved with h3');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement