LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Bisecting Lines Parallel Lines Failure

In one of my VIs I use bisecting line.  When the functions runs on a particular image the output it gives is incorrect though no error is generated.  The input lines are:
Line1
Point1
X=1124.83, Y=1181
Point2
X=1124.82, Y=1321
 
Line2
Point1
X=1117.8, Y=1181
Point2
X=1117.81, Y=1321
 
The output line
Point1
X=1117.71, Y=126859
Point2
X=1127.71, Y=126859
 
As will be noted the input lines are parallel, this is not always the case with the inputs of this function but is a possibility that I need to be handled correctly.  As a last resort I will replace the bisecting lines function with one I will generate myself.
 
Thank you
0 Kudos
Message 1 of 6
(2,920 Views)
Would you happen to have a VI and an image that can reproduce the errror that you can post?  Also, what versions of LabVIEW and Vision software are you using?
S. Arves S.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(2,900 Views)
I have attached a simple vi that demonstrates the problem.  The output I get when I run the VI is P1X: 1124.91 Y: 100684.68 and P2X:1114.91 Y:100684.68.
 
I am using the latest build of Labview 8.0, and the newest build of the IMAQ software.  Also I mispoke in my earlier message, they are not parallel lines, only very close.
 
Casey Taylor
0 Kudos
Message 3 of 6
(2,893 Views)
Thanks for bringing this to our attention and for the VI.  I've done some testing with it and have been able to reproduce the same error reliably so I've passed the information on to our R&D team.  It generally takes some turn around time for bug fixes such as this to get released, so notifying our R&D department will not work as an immediate fix for you. 

However, in my testing I found that the error only occurs when there is a variation in the slope that is around .01 to .03 pixels.  Larger variations generally do not cause this error to occur.  Since the IMAQ Bisecting Line VI is used primarily for machine vision functions it is possible that the algorithm does not work well with sub-pixel accuracies down to 1/100 of a pixel.  That being said, is it possible in your application to round the values up to the nearest tenth of a pixel?  The algorithm works well at this level and for most machine vision use cases sub pixel accuracy down to 1 tenth of a pixel should be sufficient.  If that is not sufficient for your use case I would recommend adjusting the physical parameters of your system (such as the lens) to increase the resolution of your image, or some similar work around until we can release a fixed version of the IMAQ Visecting Line VI.  I'm sorry for any inconvenience this has caused you.

Regards,
S. Arves S.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 6
(2,887 Views)

I have already rewritten the Bisecting Line VI for my purposes.  I appreciate you looking into the problem.  I will check with my employer if I can post a working version of the function for others to use.

0 Kudos
Message 5 of 6
(2,881 Views)
No problem,  Let me know if there is anything I can do to help.
S. Arves S.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 6
(2,873 Views)