Question
Generate edge maps of the above two combined gradient maps (10 points). An edge image should be a binary image with 1s as edge points
Generate edge maps of the above two combined gradient maps (10 points). An edge image should be a binary image with 1s as edge points and 0s as non-edge points. You may first generate a histogram of each gradient map, and only keep certain percentage of pixels (e.g. 5% of the pixels with the highest gradient values) as edge pixels (edgels) . Use the percentage to automatically find a threshold for the gradient magnitudes. In your report, please write up the description and probably equations for finding the threshold, and discuss if 5% is a good value. If not what is (5 points) ? You may also consider to use local, adaptive thresholds to different portions of the image so that all major edges will be shown up nicely (5 points). In the end, please try to generate a sketch of an image.
JUst PUT two combined gradient maps AS ( j AND im3)
1)
I1 = imread('mb.png'); I1=rgb2gray(I1); %subplot(1,1,1); subplot(1,2,1); imhist(I1); %now enhancing contrast using histogram equalization
J = histeq(I1,64); subplot(1,2,2); imhist(J);
2)
im = image(I1); im =(0.2989 * double(im(:,:,1)) + 0.5870 * double(im(:,:,2)) + 0.1140 * double(im(:,:,3)))/255 %convert into gray scale edgeImage = sobel_mex(im, 0.6); %normalized image and threshold value im3 = repmat(edgeImage, [1 1 4]); image(im3);
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started