Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

To find the local maxima , minima for finding keypoints in SIFT algorithm

Solved!
Go to solution

Hello ,

 

I have to find the local maxima and minima in a image , not jus 8 neighbourhood.There a three images of same size but difference of differntly blurred images (Difference of gaussian).I have to find the local maxima and minima in the image checking all the 26 neighbour hood (8 from the same image 9 +9 from the corresponding point in the other images).

 

any ideas ?? 

 

with best regards and thanks in advance 

0 Kudos
Message 1 of 6
(6,780 Views)
Solution
Accepted by bunty1

I assume you are talking about a 3D image that you have several layers of, and you need the 3x3x3 local minima and maxima.

 

The simplest could be to use Grayscale Dilate or Erode to get the 3x3 local maxima and minima for each image.  Then you could use a couple of IMAQ compares to replace if less/greater, finally ending up with an image that has the 3D local maxima or minima.  With a little image management, this would work well for a stack of images where you need the local 3D extremes for each image.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 6
(6,773 Views)

Hi,

 

Your best approch to find the local maxima and minima is to use the gray scale image reconstraction algorithm.

It is exactly what you need.

If you have imaq vision for LabVIEW 2011 then you have in the examples:

 

LabVIEW\examples\Vision\2. Functions\Grayscale Processing\Gray Morphological Reconstruction H-Dome Example.vi

 

Look in any morphological image processing book on H-Dome transform.

 

Thanks - Amit Shachaf

 

Amit Shachaf
0 Kudos
Message 3 of 6
(6,763 Views)

Couldn't find the example even in NI site listing or example search ? I am using imaq vision 2011 .could you please attach the example vi ?

 

With regards

0 Kudos
Message 4 of 6
(6,760 Views)

Hi,

 

I attach the example (it doesn't show in the  example finder for some reason).

Alogarithm steps you need:

1. Load image

2. Subtract constant value from the whole image (h). H should be a small number. Try different values.

3. Use the subtracted image as marker and do gray level morphological reconstruction under the original image.

4. Subtract the reconstructed image from the original image. That is your domes (local maxima)

5. Threshold the dome image to find the local maxima. Overlay them on the original image to see the result (not done in the example).

6. To control the precision of the maxima found you need to modify the value h. Then find the centroied of the dome (not in the example).

7. To find minima simply invert the image and use the same technicians.

 

 

 

Amit Shachaf
0 Kudos
Message 5 of 6
(6,756 Views)

Hi,

 

If you zoom on the original image after the algorithm you will notice that the example does mark the maxima points.

You need to reverse the image and do the same algorithm for the minima.

 

THanks - Amit,

Amit Shachaf
0 Kudos
Message 6 of 6
(6,754 Views)