LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

edge detection in images within intensity graphs

....here is missing attachment....Don
0 Kudos
Message 11 of 13
(1,108 Views)

Hi

 I'm new to Vision development module. I'm doing an autoFocus. Trying to implement it through Vision Development module functions.

 For AutoFocus tried the Edge Detection  followed by quantify. Took the max STD and mean .But it didnt work out so well.

So tried using FFT function in the Vision Development module. Got the 2D  magnitudes.  

Q1: Should I have to find the RMS of the 2D magnitudes to find the focus ? Is it right ?

Q2:How do I find the RMS value using the NationalInstrument .Analysis.Statistics .RootMeanSquared function  for a 2D array?

    Anyways the function says the type initializer failed . Even tried passing a simple array of double.Didnt work.

Please dont point me to some LabView example. Idont have Labview in my system. I'm using C#. /.NET

I'm totally frustrated with this FFT.

Please reply ASAP.

 

Thank you

Murugan

 

 

 

0 Kudos
Message 12 of 13
(1,007 Views)
Hi Murugan,

Thank you for posting in the NI forums!  In the future, we request that you only post your question in one location, and on a new thread.  We are more than willing to provide you with help regarding LabVIEW functionality, but we do not technically help with algorithm architecture.  Therefore when you post to the forums for advice on your algorithm, we can not guarantee that your question will be answered by an NI Application Engineer. 

When something is in focus, it has sharply defined edges.  If you think of the pixels as values, a sharp edge would look like a step (Heaviside) function.  The Fourier transform of a Heaviside function is an infinite pulse train in the frequency domain, and the closer to an ideal Heaviside the signal gets, the closer to infinite the pulse train becomes.  Therefore to get the sharpest edges, you want to have the least attenuated pulse train.  So you do need to maximize the RMS values of the magnitudes to get the best focus.  The function requires a one dimensional array, so you have to reshape your 2D array.

I hope this answers your question!
Maclean G.
National Instruments
Applications Engineer
0 Kudos
Message 13 of 13
(971 Views)