02-01-2010 02:40 PM
For one of my second year modules, I am designing a multifunction display for a car, including a simulated GPS unit, as part of a group. I have been tasked with creating an "innovative" method of generating the route for the simulated car to follow.
My proposed method is to threshold an image of a map, and create a logical array (1's corresponding to where the roads are, and 0's everywhere else), which will then be used to calculate a route between various points plotted by the user.
Attached is my first attempting at building a vi to threshold an image.
At a glance, the vi reads the image, then performs a logical thresholding operation based on user defined limits, which results in a logical array of the same size as the original image. The output is the original image multiplied by the logical array, to test the accuracy.
My main questions are:
Would an "In Range and Coerce" (using the logical output) be any more efficient than the And gate and the greater-/less-than arrangement?
Is there anyway to make the whole process more efficient in general?
How can I make the colour selection more accurate?
When replying, please bear in mind that I am quite new to LabVIEW, and currently only have access to version 7.1, and none of the "optional extras", such as VDM.
Image_Threshold_Example Block Diagram
Image_Threshold_Example Front Panel
02-02-2010 11:05 AM
Hi Lucid_Insanity,
I have done some benchmarking tests on the In Range and Coerce and And gate logic.
10 Million Iterations on each:
In Range and Coerce: 1.71882 seconds to complete.
And Gate Logic: 0.750029 seconds to complete.
With a small iteration count there will be negligable delays.
I believe Loughborough University have a site license for the latest version of LabVIEW. Is there any reason you only have access to version 7.1? Can you get hold on the VDM? as this would make everything much easier.
Kind Regards,
02-03-2010 06:33 PM
02-05-2010 07:33 AM