I am currently working on a tracking programm for selfmade frame markers. A marker is made of a red middle dot, and in 90° two blue dots on the end, looking like a L
O
|
|
|
O-----------O
Between the dots is a black and white pattern to code about 32 numbers. The goal is to track these markers with a webcam, and submit
the position
the angle
the ID
to another programm.
Currently I tried colortracker and contour (maybe not the best way, but works) to get the red and blue points. So I got x and y coordinates from red and x and y coordinates from blue. (4 IOBoxes)
********************__
Now the problem:
I need to get the blue points that belong to the red one on the marker. This is where the distance is exactly a specified value. I dont know how to calculate this distance and get the according coordinates to calculate the angle.
If this is done i’ll try pipet for the detection of the black/white pattern - but this later on…
Currently the way to handle spreads with VVVV looks weird to me ;)
Thanks for your help!
i dont understand what you are trying to accieve.
is it a triplet of blue-red-blue that has its own identity by means of distance and angle between them ?
Right from the beginning… For my diploma I try to show children basics of video editing with a tangible user interface. Therefore I want to use jigsaw pieces with a projection film in the middle on a glass table. From bottom up, I want to project the parts of a video into this jigsaw pieces. (See file)
Therefore it is necessary to know the position angle and Id from the jigsaw piece. (Fiducials would work great, but because of the projection film in the middle I stuck to a frame marker.)
I wanted to use the red point as centre point of each jigsaw piece, with the according blue points it should be possible to calculate the angle. If I’ve got one of the blue and the red point, cut the distance into 5 points and check the colour. With the black/white code I am able to use 32 IDs (00001,00010,00011,…)
As said before I would use fiducials if they would work for me. It is not necessary to create my own markers, but I couldn’t find another solution.
Hallo, well, since we have X and Y for the Red and the Bleu points, I am sure we can solve this.
edit:this is harder than I thought lol, but still hunting this!!
edit2: If these are actual values from your webcam, we have a small problem, because the bleu points that ‘should’ belong together have a big difference in the distance to their acording red one.
Perhaps you can add a ‘green’ dot in the middle off your marker, so we can say: A blue dot belongs to a red dot if the middle off that line (points2vector) is a green dot?
Once you know what bleu points belong together/form a group, you can use the angle off the BLEU points to see how you rotate it!!
edit2:
The ChangingAngles patch is a demo to show how to get the angles off your markers.
edit3: The Feducial set I got from the reactable website (file:fiducials.pdf) has 90 feducials!! Should be enough to avoid this whole mess. Just be sure you make them big enough, and have a good camera.
West, that is a great solution, Thank you for your help!
I tried to use ConnectAll (see patch) and select just the Points with the right distance between them. I was not happy with the result, because with more markers this would need a lot of resources.
I’ll try to use your solution… Thanks! (this will take some hours)