From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring an angle in an image

I'm wondering if anyone knows of a utility (inside LabVIEW or the Vision system or anything else) that could measure the angle between the apparent cross hatch in the following image.

untitled.PNG

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

Hi Tim,

 

If you can manage to threshold the values or if you manually create lines on the image you can use the endpoints of the lines as inputs to the IMAQ get angles VI to measure the angle.  The cross hatch looks pretty weak and it is neighbored but that really dark block, so you may have troubles finding it programmatically.  If you create your own lines the IMAQ get angles should do the trick though.

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
Message 2 of 13
(5,545 Views)

Hello,

 

Could you give an example so that I can do, because I am beginner and I need to measure the angles in a photo with just two line using the  tool "Get Angle"

 

I want a "VI" file.

 

Please.

 

Thanks.

0 Kudos
Message 3 of 13
(5,271 Views)

please i would like to receive a file. "VI" because I need to measure angles in the photos,equal as you need.

0 Kudos
Message 4 of 13
(5,270 Views)

Hi eliel,

 

I assume you have some vision software/modules to go along with LabVIEW. Can you clarify what vision software and version you are using so that I can better assist you? Thanks!

0 Kudos
Message 5 of 13
(5,230 Views)

Hi Joseph,

I'm sorry, i forgot.

but my version is 2011 and I'm using module "development vision"

 

I need to use the "line" to measure angle of an image like this from above.

However I need two lines to form this angle, and I'm not able to put two lines on the image to perform the measurement.

can you help me, please.

Thanks.


I'm sorry for any misspelling, because I don't speak English.

 

Eliel

 

 

0 Kudos
Message 6 of 13
(5,214 Views)

I searched for lines in two separate directions.  i.e. Top to bottom and left to right.  You'll have to play around with these as well as the orientation of the line you're searching for to get anything useful.  Then you can calculate the angles between these lines.  

 

I found it very useful to do some preprocessing on the image to make it easier to find lines.  For example, no lines could be found in the above image, but after I used IMAQ Equalize.vi on it, I could find all sorts of lines.  This particular function may or may not be helpful in your use case.

 

Another thing that helped further is equalizing just a small ROI rather than the whole image at once.  This way any stark differences between regions of the image will be nullified. 

 

I'm no longer at my old company, so I don't have access to the code

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

how can I put two lines in the image with the tool "IMAQ select Line."

 My labview is 2011 and I am using the "Development Vision".

 Thank you

0 Kudos
Message 8 of 13
(5,183 Views)

I was checking tool "IMAQ select line" and now the option to exit "Line" is not appearing.

She just disappeared. Anyone know how I can re-enable output to connect it.??????

 

Please. Help Me.

 

Thanks.

0 Kudos
Message 9 of 13
(5,171 Views)

Hi eliel,

 

Are you using Vision Assistant or are you using LabVIEW.  If you are using LabVIEW, just delete and recreate the line.  This should make the line reappear. 

 

Regards,

Kira T

0 Kudos
Message 10 of 13
(5,140 Views)