LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel LineI Distance IMAQ Image

Hello,

 

I want to obtain the distance between two parallel lines. Is there a easy way on this issue.

The specific steps are,
1. Draw a straight line,
2. Move the mouse and the parallel line of the first line will appear. The point where the mouse is located is on the parallel line.

3. Display the distance between the two lines.

 

Thank you

Henry

 

0 Kudos
Message 1 of 4
(570 Views)

Why would you use vision to solve this?

 

You know exactly where the line was drawn, and where the parallel line is drawn. Do the math on the coordinates!

 

If you want to use vision (e.g. for learning?), IIRC the the caliper tool does this OoTB... 

 

IMAQ Caliper Tool VI - LabView NI Vision Documentation

0 Kudos
Message 2 of 4
(557 Views)

Hello wiebe

 

Thanks for your reply.

 

I want to manually draw a line on image, then move the mouse and set the parallel line position. Like thrown on the attached picture.

I can do the math to get the start point and final point of the parallel line, but this is time-consuming.😂 So just to see if anyone has done this before.

0 Kudos
Message 3 of 4
(539 Views)

@henry_2020 wrote:

I can do the math to get the start point and final point of the parallel line, but this is time-consuming.😂 So just to see if anyone has done this before.


You have to do the math anyway if you get coordinates from a vision algorithm..

 

I can promise you that getting the coordinates of the lines you drew with vision will take orders of magnitude longer (like 1M times) than using the coordinates you've used to draw those lines.

 

I think there's a mismatch between you goal and my understanding of it...

 

Perhaps you can explain it like you would to someone who doesn't know at all what you're trying to do (like us)?

 

Even "manually draw a line on image" can mean a lot of thinks.

0 Kudos
Message 4 of 4
(523 Views)