10-26-2023 03:41 AM
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
10-26-2023 03:56 AM
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...
10-26-2023 04:31 AM
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.
10-26-2023 06:19 AM
@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.