3D, Depth perception, Stereo Webcams
Felix from Germany  [1 posts]
11 years
 Hi I allready found one thread dealing with this issue a couple of months back, however im am not sure if it got developed. First off, a nice article on how it works (4/3 down the page): http://www.societyofrobots.com/programming_computer_vision_tutorial_pt3.shtml For robot realm i would see this working after any type of filter/s identifying a point which can be found on both images, of which the distance is to be determined (e.g. movement detection + cog). Now the coordinates of the cog can be used for the following calculations. To find the focal length a bit of guess work / researching ought to be done. Z_actual = (b * focal_length) / (cog_xL - cog-xR) X_actual = cog_xL * Z_actual / focal_length Y_actual = cog_yL * Z_actual / focal_length (as found on the webpage i linked above) this is for parallel cams, it gets a bit more difficult when the cams can pan and tilt seperate from each other (like our eyeballs). As allready mentioned above, i would like to be able to determine the position of at least one object (X,Y,Z). This could be in the form of "finding the green ball" (for both left and right cam) which yields the coordinates (X,Y) of the ball for cam L and R, then finding the distance Z for that position. If possible (i dont know how much processing power is needed for this) id like to get a bw image where the distance (Z) is a direct gradient map (i.e. black = close, grey = medium, white = far distance). This can then be used for all sorts of threshold or advanced wall/abyss detect calculations. hoping to see this plugin soon, Felix
Stereoscopic webcam vision
from Australia  [87 posts]
11 years
 Here is a basic but effective form of stere-webcams. It uses 2 markers, one for each camera. After appropriate filtering, the centre of gravity (x-coordinate) is found for each image. By doing basic subtraction of the two COG_X value, you will get a number that is inversely proportinal to the distance away from the camera. This is true because from basic trigonometry: Target_distance = tan(alpha) * Distance_between_cameras The 'Distance_between_cameras' is constant, so as the 'Target_distance' changes, the 'tan(alpha)' changes. e.g. For 'Distance_between_cameras' ~ 10 cm & 'Target_distance' ~ 40 cm, you can expect the distance resolution of 1 mm. Hope it helps. Nemanya
Stereoscopic webcam vision
from Australia  [87 posts]
11 years
 Also, here's the file for basic stereoscopic webcam vision program.robo
Anonymous 11 years
 Yeah thats exactly it. cheers mate
Anonymous 11 years
 Nicely done! STeven.
Anonymous 11 years
 I have problem run this robo file on Rev 1.7.9.5. It works on Rev 1.7 with two different brand name camera. But it stop working with same camera. Could you please look into it? Thanks, program.robo
Anonymous 11 years
 Did the previous version work with the same brand cameras? It appears to depend largely on the brand of camera you are using. We have not had any confirmed results of same brand camera usage. Perhaps you can confirm if this has ever worked? Thanks, STeven.
Anonymous 11 years
 Hi, Steven I am using Microsoft VX-1000 webcam. For some reason, when I hook up 4 cameras together. The window only show 3 of them. And the RR doesn't work at all. When I hook up two cameras, the Rev 1.7 doesn't work with same brand, but it works with Microsoft and Logitech two camera. The only problem is Logitech Messager flame rate is too low, only 5 flame/s at 640x480. Because I am using Marker, I think it is one camera at a time.  The second camera seems lost their driver sometime. By the way, how can I clean up all old Revisions of RR in my computer? Thanks a lot. Calvenn
Anonymous 11 years
 Calvenn, We made some fixes to better support same brand camera. Can you try and see if the most recent RR version (1.7.11.4) helps with your problem? Note that due to bus and cpu speed your frame rate will reduce with each camera added. This made be more of a hardware limitation than one with the RR program. To clean up previous versions just delete the old RoboRealm folder. Eveything else is just reused by the newer versions. STeven.
Anonymous 11 years
 Thanks, STeven My computer only can handle 2 USB cameras. PR would not start if I plug in more cameras. Calvenn

 This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.