LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Thresholding in LabVIEW 7.1

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.jpg

 Image_Threshold_Example Front Panel

 

Image_threshold_front.jpg

0 Kudos
Message 1 of 4
(3,281 Views)

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,

Owen.S
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,257 Views)
At the moment, although the computer labs have the latest version, I only have access to v7.1 to install on my home computer. At the moment I don't know wether the lab computers have VDM.
0 Kudos
Message 3 of 4
(3,238 Views)
I have checked, and currently, the labs have version 8.6.1, and do not have VDM (or indeed, any modules) installed. 😕
0 Kudos
Message 4 of 4
(3,211 Views)