05-12-2010 10:52 AM
Hello,
Currently I'm trying to automate the MTF graph of an image using Labview and the Vision module. I have a test chart of varying spatial frequencies (line pairs/mm) which I then analyze using LineProfile and calculate the Fourier Transform then obtain the amplitudes which are then normalized for the MTF graph.
So far my program can obtain an image, manually obtain line profile using the Image Viewer and then convert this into a fourier magnitude graph and obtain the amplitude at the required frequency.
My goal is to automate this so that the program will obtain an image, read the test sheet (using geometric pattern matching) and output the MTF graph. My current idea for the test chart is to have two points that can obtain real world measurements for each pixel so that the frequencies are in real word measurements. Then use Optical Character Recognition to obtain the frequency of each test and then use points that provide the co-ordinates for the line profile.
My issue is that I don't know how to connect a certain ocr frequency with a pair of co-ordinates so that it only uses these two points for a frequency. Secondly, I don't know how to iterate through each frequency so that I can upload the amplitude values into an array for the MTF graph. Any help with this is appreciated.
I've uploaded my test chart and my current program. (Mind you, I've only used Labview for a few days so my programming may be ugly!)
Thanks!
05-13-2010 02:03 PM
Hi, thanks for posting.
Can you provide an example of what you mean when you say "connect a certain ocr frequency with a pair of co-ordinates"?
sounds like there is some array manipulation you can do here, but i'm not quite what frequency you want to match up with what co-ordinates? I'm guessing that the co-ordinates you are referring to are the end points of whatever line you draw?
05-14-2010 07:22 AM
Hello Tejinder,
I've decided to change my idea of using OCR and just calibrate the the test sheet to a set of real world measurements (Using geometric pattern recognition) and calculate line profiles for each frequency using the measurements. I'll add a reference distance to do two point calibration. The only issue is that there may be some distortion because of my camera. How should I solve this? Also, should I use Vision assistant to calculate my frequencies?
If so, how do I choose which outputs I can use for the vi that is created. Does VA output line profile data?
Last question,
For calculating line profiles in VA, does VA use pixels or real-world measurements? This is because I'll be taking pictures of my MTF chart from varying distances and if it uses pixels, then it will grab the wrong set of data.
Thanks for replying,
Ronak
05-24-2010 09:48 AM
Hi Ronak,
I am not sure what you mean by distortion, can you be a little more specific? Perhaps a screenshot?
You can build your script in Vision Assistant, but can always create the corresponding LabVIEW VI if you plan on using this data in LabVIEW. You can do this by selecting Tools>Create LabVIEW VI.
In Vision Assistant, the line profiles are shown with respect to the number of pixels that make up the line, but this can be scales to the real-world measurement, as long as you know how many pixels make up a real-world measurement.
I hope this helps!
05-27-2010 03:30 PM