LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

angle measure image tool

Hello.

 

I'd like to use the "Line" pallete of tools interactively in an image, so that I can measure angles and calculate distances.

If this is possible you could post a. VI so I can use it because I am very new to the subject and to learn.

 

 
I posted an example of what I would like here

 

Thank you

0 Kudos
Message 1 of 13
(4,893 Views)

If you're using the line tool on the side of the image, that creates a ROI (region of interest).  You can use the ROI property of the image control/indicator to get information about the ROI, including it's coordinates.  If you know how to convert these coordinates to real life units you can find distances quite easily.  i.e., if you know 10 pixels is 1 inch, it's simple to find the length of the line.  

 

If you want to automatically find lines in the image I used IMAQ Find Edge.  I expect this would not be useful for finding distances, but can be quite useful for angles.  As I mentioned in the other thread, if you find two edges in the same ROI it is simple enough math to get the angle between the two lines.  

 

Also, please pick a thread and stick to it. (Also brought up here)  

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 2 of 13
(4,878 Views)

Test.png

 

The green rectangle is the ROI I drew.  The red lines are from the first find edge.  I changed the settings a little, and found edges again.  These are the blue lines.  The results from the Find Edge vi's return information about the lines.  This information can be used to find the coordinates of these lines, which can be used to find the angles between them.

 

Edit: apparently IMAQ image constants don't hold their data.  I'm attaching the image I used to find lines.  You'll have to do a IMAQ Create and IMAQ ReadFile to get the image into the program

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 3 of 13
(4,863 Views)

Please,

 

can you give this .VI for me, because i don´t know how can i do this.

 

Thanks very much

0 Kudos
Message 4 of 13
(4,839 Views)

The above image is a snippet.  Since you are using 2011, drop the image on a block diagram and the code will appear.  You may have to save the image first.

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 5 of 13
(4,836 Views)

I'm sorry,

but I can not do what was asked. Well I have not enough knowledge.

If possible please make the file attachment same as described above please.

0 Kudos
Message 6 of 13
(4,825 Views)

I have a real time image (of a similar mesh  as shown in the figure). The mesh has some thickness and IMAQ Find Edge has issues because of two edges found along the line. Is there a simple way to overcome it.

0 Kudos
Message 7 of 13
(4,045 Views)

I'm not sure what you mean.  Please elaborate.  Including images seems like it'd be helpful here.

 

 

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 8 of 13
(4,041 Views)

Sorry.

Capture2 has my block diagram which basically selects a region from a video stream. I need to get angles between the lines as shown in capture1. But if you see capture1 we can see that no edges are detected because of the thick edge (i think). 

Hope it is more clear now.

Download All
0 Kudos
Message 9 of 13
(4,035 Views)

Whatever's generating the yellow dots seems to finding the edge ok. 

 

I can't tell what your angle finding parameters are, but I'm guessing that's the problem.  If you could upload a raw image we could play around with the settings and see what we could figure out.

--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 10 of 13
(4,025 Views)