04-02-2012 11:24 AM
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
Solved! Go to Solution.
04-03-2012 10:01 PM
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
04-08-2012 11:51 AM
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
04-08-2012 04:33 PM
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
04-08-2012 09:35 PM
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.
04-08-2012 10:30 PM
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,