Borrar filtros
Borrar filtros

How to implement the laplacian of gaussian edge detector using the Prewitt operator.

2 visualizaciones (últimos 30 días)
Implement the Laplacian of Gaussian (LoG) edge detector explained in class which uses the Prewitt operator to determine if there is sufficient edge evidence. Your function should take as inputs a gray-scale image, the standard deviation (σ) of the LoG mask and the threshold for the Prewitt edge magnitude comparison. The function should output the edge image. Apply your function to the image “cameraman.tif”. The output edge image for σ = 2, σ = 3 and σ = 4. The threshold for all cases should be set to 0.1.
I know that the LoG algorithm goes as follows: 1. Determine the size of the LoG mask 2. Form the LoG mask 3. Convolve the LoG mask with the image 4. Search for the zero crossings in the result of the convolution 5. If there is sufficient edge evidence from a first derivative operator, form the edge image by setting the position of zero crossing to 1 and other positions to 0
But i dont know how to implement For determining the size of the LoG mask i did the following:
masksize = 2 * ceil(3*d) + 1;
For forming the LoG mask i did the following:
for i = 1:masksize
for j = 1:masksize
logMask(i,j) = (-1/(pi*(d^4))) * (1-((i^2)+(j^2))/(2*(d^2))) * exp(-((i^2)+(j^2))/(2*(d^2)))
end
end
Is what i did so far correct?!! and i dont know how to implement the rest of the steps...

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by