> Hi, i wish to find the distance from the webcam to different objects in
> an image. can this be done in some way?
> Joseph
>
One way is to use markers that your system would recognize or findalready marked objects (objects with visible distinctive and easy tofind features). You need to calibrate your camera first so as toincorporate all the distortions of the lens in your distancecalculation. Then you use FindExtrinsicCameraParams2 to find thelocation and orientation of your target. The target must consist ofat least 4 distinctive points of known relative location. This wouldbe the input of the function (the relative location of the 4 pointsand their location in the image). Not to mention that it also needsintrinsic_matrix, distortion_coeffs but these you will obtain duringcalibration.I have been using this method with a simple target of four squaresand it works nicely.
Have a look here: http://www.youtube.com/watch?v=4OK8ROW77pc
Message from OpenCV
No comments:
Post a Comment