الله يفضل عليك اخي العزيز .
Given the house.bmp image. Write m-files to obtain
a) Horizontal gradient image
b) Vertical gradient image
using the following approach: For horizontal gradient, smooth the image vertically using a symmetric filter [1 2. 1] and use forward difference operator horizontally. Apply the same method to obtain the vertical gradient image.
Display the horizontal and vertical gradient images. Then, combine the two images to get a gradient image. Display the result. (Note that gradient images take negative values, too. Therefore you need to apply a proper transformation to display these images. Do not use auto scaling of the Matlab display function.)
c) Select a threshold value so that 10% of the pixels in the gradient image are above the threshold. Using this threshold obtain the edge image and display it.
Problem 3.
a) Input the house image (house.bmp) . Obtain the edge map from the zero crossings of Laplacian of Gaussian image. For this purpose use a separable Binomial filter of size 5x5 to approximate Gaussian filter, and the standard Laplacian mask
[0 1 0;1 -4 1;0 1 0] . Display the input image, obtain the LoG (Laplacian of Gaussian) filter impulse response, display its transfer function (using freqz2 command), obtain the LoG filtered image, display LoG filtered image using imshow with autoscaling, imshow(....,[ ] ). Obtain the zero crossings of LoG filtered image to get the edge map. Display the edge map.
(Try not to use any for loops or if statements. Hint: To obtain the zero crossings of LoG filtered image, you may obtain horizontal zero crossings and vertical zero crossings separately, and then "OR" the results of two images. To get horizontal zero crossings you may use the following approach: Shift the image by one pixel horizontally, for example by deleting first (or last) column. Then multiply the two images (of size 256x255) pixel by pixel. Take the "sign" of the product. A "-1" indicates a sign change which means zero crossing. Map "-1"s to 1 and "+1"s to zero. You can obtain the vertical zero crossings in a similar way. )
b) "AND" the edge image obtained in problem 2 with the edge image obtained in part a above to get 1-pixel width edges for the house image.
هذه هي الاسئلة عزيزي وياريت لو اي مبرمج لديه الخبرة يفيدني بالحل الله يبارك فيكم جميعاً