02-24-2012 11:55 AM
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.
Thank you
02-24-2012 03:10 PM
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)
02-24-2012 03:33 PM - edited 02-24-2012 03:36 PM
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
02-25-2012 12:57 PM
Please,
can you give this .VI for me, because i don´t know how can i do this.
Thanks very much
02-25-2012 01:23 PM
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.
02-26-2012 02:41 PM
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.
08-09-2017 02:54 PM
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.
08-09-2017 03:02 PM
I'm not sure what you mean. Please elaborate. Including images seems like it'd be helpful here.
08-09-2017 03:27 PM
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.
08-09-2017 03:55 PM
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.