Read length of lines

i have an image with white background and 2 lines of different color.
Is it possible with processing to read the length of the lines?
If yes, can you point out what i have to read/check to make it?
Thank you

You first need to find the position for the two end points defining the segment.
Definition of Line_Segment
The way you do that depends on the type of image you have, is it raster or vector?
Than you can call the method dist(), which calculates the distance given two distinct points.

Thank you for the reply, raster image.
So it can done using processing, right?

It’s not easy if you want to automate the full process because it involves algorithms for edge detection.
Implementing such algorithm is not an easy task to achieve. :smiling_imp:
Edge detection
I suggest you to import the raster image as background first. By mouse clicking you can click on the end points of the lines to obtain the coordinates. These can be use to calculate the distance.
You still need to account the scale problem.

Hi mT650,
thank you for the reply. I’ll check the edge detection.
Im trying to automate it without using the mouse or any human interaction.
I was thinking to have some static points in the image and the count the distance of the line from the static point and on. Lets say like reading the size of bar charts from an image

I’m glad that the information I gave you was helpful,
and exited to see :face_with_monocle: how you will keep up with the most challenging option of the two. :love_you_gesture:
Setting up some static points on the raster image is a good way to scale it.