Software > Software
Get the depth and disparity map
RoenZ:
Hi all.... i want to ask about the depth and disparity map.....
How i can get the depth and disparity map in stereo vision??
I'm using 2 Logitech Quickcam Pro 4000 in my stereo vision project.....
I'm confused about this equation :
Z(depth) = f (focal length) * b (baseline) / disparity ---> i get from stereo triangulation equation
How it can be like that??? As u can see above, the unit of Z (depth) is in cm or mm right?? but if i calculated it the Z was not in cm nor mm...... it was in mm^2/pixel...... example :
focal length = 4 mm
baseline = 100 mm
disparity = 87 pixel
so the Z will be = 4.597 mm^2/pixel ?????
Admin:
So this is how I did it:
http://www.societyofrobots.com/programming_computer_vision_tutorial_pt3.shtml#stereo_vision
Z_actual = (b * focal_length) / (x_camL - x_camR)
RoenZ:
As for the X/Y locations . . . get out a yard stick and measure where the object is, and compare that to the X/Y pixel position that the camera says.
So you might get 5 inches with a camera reading of 2 pixels. So thats 5/2. I usually just fudge this cause I never need it to be accurate.
So if one day your camera says the object is at 8 pixels, then:
5"/2 pixels * 8 pixels = real location of the object in inches.
based on ur reply on the thread "get the object position..." above.....
i need another constanta right, i mean to change the pixel value to cm???
and what about xcamL and xcamR? is it true that the xcamL and xcamR unit in cm??? If true then how to convert it???I'm confused about that???
Thx
Admin:
--- Quote ---i need another constanta right, i mean to change the pixel value to cm???
--- End quote ---
What you need is a transform. Basically an equation that says A pixels = B inches.
The method I mentioned in this post is the simplest method. Unless you need high precision, its good enough.
--- Quote ---and what about xcamL and xcamR? is it true that the xcamL and xcamR unit in cm??? If true then how to convert it???I'm confused about that???
--- End quote ---
It can be in whatever units you want. Just keep them consistent.
RoenZ:
I want to ask.....
Disparity map is the map that show the disparity between the left and right image right??? and depth map show the depth so is the disparity map and depth map have a connection??? or this 2 things are different???
Thx
Navigation
[0] Message Index
[#] Next page
Go to full version