Finding Zero-Crossing Points of Image

I need to locate all the zero-crossing points in a bmp image that has already had Laplacian of Gaussian filter applied to it for edge detection. I have the Image Processing toolbox. How do I accomplish this in MATLAB?

Answers (3)

It appears as though MATLAB will give similar results to a true zero-crossing (if a 0-255 grayscale image is used) by using the EDGE command with 'zerocross' option and selecting a threshold. i.e.: EDGEIMG = edge(LoGIMG,'zerocross',.0215);
Thank you for the lightspeed answers to my late-night question.
The bmp file format does not permit signed pixel values, so there cannot be any zero crossings in a bmp image.
If you look at the documentation for imread you will see that the only supported file format which returns a potentially signed value (as would be needed for a zero crossing) is TIFF in 64 bit CMYK mode.
Assuming you cast your image to single and did some operation on it like conv2 to do the filtering, and ended up with an image that had positive and negative values, where would you say the "zero crossing" is in this small chunk of the image?
3 4 5 9 1 2
1 3 -3 5 9 -1
3 4 5 -6 7 9
Tell me exactly what row and column you want to say the "crossing" is at, because the crossing actually occurs between the pixels. We can easily identify positive pixels and negative pixels, but where do you want the crossings to be? Do you want to interpolate the array so that you can find the exact positions? Or maybe just find the negative regions and draw an outline around them with bwboundaries?

Asked:

on 17 Jul 2011

Community Treasure Hunt

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

Start Hunting!