About depth-sight

asked 2020-11-17 05:55:41 -0600

PaveU gravatar image

Hi.

I am a beginner with this computer vision thing.

I have been using examples and openCV tutorials as I am trying to make a program to get depth from stereo.

Now I have a problem: Focal length. I am using a nikon DSLR and after googling I have had this answer which I also found from this forum that the focal length should be in "focal pixels" when using openCV. Also the coordinates and disparity should be in pixels.

I tried the calculations on paper also, by measuring it manually and doing calculations in millimeters. I had all of the units in millimeters. I printed the pictures.

I can't figure out why I don't get the right depth when doing this manually in millimeters.

Can it be the problem that I am using a nikon DSLR, instead of a camera made for computer vision systems? I don't think that this is an actual problem to make a depth map, but because of the purpose it is made, I can't find the right units to make calculations?

The equation goes: Depth = focal length * stereo baseline / disparity, as I may have understood right...

I'd like to have an explanation for the units and the camera, with a source. Also, If you find my question confusing or I am missing something really important knowledge, you could also note for that.

edit retag flag offensive close merge delete

Comments

I am using a nikon DSLR

just to make sure, you need 2 cameras for stereo disparity, right ? did you do an actual stereo calibration ?

Can it be the problem that I am using a nikon DSLR, instead of a camera made for computer vision systems?

that's unlikely.

the main "real world problem" might be, that you NEVER may touch the focus after a (stereo) calibration, which is hard to avoid using dslr's

berak gravatar imageberak ( 2020-11-17 06:14:44 -0600 )edit

So I also need to solve out how to correct distortion when determining depth of a point...

I am interested more in the math than in how to use openCV at this point.

internet links and books would be a nice source. I need to look for these things myself, if I don't get an answer here fast... :S

PaveU gravatar imagePaveU ( 2020-11-17 07:04:33 -0600 )edit
Eduardo gravatar imageEduardo ( 2020-11-17 17:08:51 -0600 )edit