08-26-2014 01:14 PM
I am interested in getting accurate length information for a line drawn with the polyline tool. As an example, say I have five line segments that make up the polyline, with each segment of the polyline line drawn at a different angle. IMAQ ROIProfile will deliver pixel coordinates once the line is ended, but is there a way to get ahold of the individual segment start and end point coordinates? If I could get access to the start and end points of each section, I can calculate line length of each segment based on the number of pixels and angle that the segment was drawn through. Then I could just add the segment lengths together. I am not sure how to use the information coming out of IMAQ ROIProfile to do what I need to here. Perhaps there is another approach that I have not thought of.
08-26-2014 01:46 PM
Don,
If you just unbundle the ROI, you can get the data you want. It will take a little work to figure out the format, but it isn't too difficult. If I remember correctly, the points are listed as alternating X and Y values in an array inside the ROI. If you create a polyline then examine the ROI you should be able to figure it out pretty quickly.
Bruce
08-26-2014 01:46 PM - edited 08-26-2014 01:49 PM
Sorry, duplicate post.