10-31-2014 02:08 PM
I have acces to the computer with LabVIEW and the pictures next monday, so I can upload some pictures then. It is the entire bar that rotates, I thought maybe it is possible to measure the position halfway the bar where he is straight, so the results will be almost the same at the different points.
10-31-2014 02:10 PM
(halfway the thick part (thats the important part)) You can't see it on this photo, but the end of the bar deviate if he rotates.
10-31-2014 02:14 PM
So it is more like the needle on a dial? That is much simpler than what you described before.
10-31-2014 02:51 PM
11-03-2014 02:16 AM
This are the pictures of one set, before the treshold.
11-03-2014 02:17 AM
11-03-2014 08:55 AM
I would recommend using the threshold the way you are now. Use IMAQ Particle to find the center of the red object. Subtract the center of rotation (select using mouse) to get the relative position of the center of the object. Use atan2 to get the angle of the needle.
This isn't going to be exact, but it should work pretty well.
11-03-2014 11:02 AM
11-14-2014 05:23 AM
It totally worked!!, many thanks, I did it with the combination edge detection and treshold, see the attached images.
Just one more question, is there an way to add a scale to the picture, so you can visually check the position of the 'needle'?
11-19-2014 02:57 AM