Camera Calibration for underwater lens

asked 2019-03-06 11:42:35 -0600

pcocv gravatar image

I did a lens calibration for my underwater camera/lens and I'm finding the value of the lens focal length to be narrower than advertised, a Nikonos 15mm, is coming in around 20mm. I'm using a Sony Full Frame A7 camera.

I understand the air-water interface for the dome port optic will make objects appear to be 25% closer, but maintain the angle of view.

What is the best way to adjust the OpenCV camera calibration math so that it gives me the right values when taking underwater images? All the math is based on distances and if objects appear 25% closer, then I would just need to throw in a scaling factor for distance. Just need to know where in the code to do that. Thanks.

Thanks.

edit retag flag offensive close merge delete

Comments

1

Did you calibrate the camera underwater, using the dome port and the calibration target underwater? I presume so if a 15mm lens is calibrating with a 20mm focal length. Is this causing a specific problem for you, or is it just that the focal length parameter is not what you expect?

What are you trying to do with the images that uses the lens calibration? If it is just to remove lens distortion, I would think you could calibrate the lens out of the water, and undistort the images with those parameters. This would remove any lens distortion, but not any distortion caused by the dome, water, etc.

I don't know much of anything about underwater photography, but if things at various distances appear 25% closer, I think a focal length change would model that.

swebb_denver gravatar imageswebb_denver ( 2019-03-06 18:48:07 -0600 )edit
1

The Nikonos 15mm is a underwater only lens, not a dry lens behind a dome port. As such, it's not very unusable in air. I'm capturing the images underwater with a submerged checkerboard.

Ideally, I'd like to get the distortion values. They don't calculate correctly.

pcocv gravatar imagepcocv ( 2019-03-06 22:46:50 -0600 )edit

You say it is not usable in air - what happens if you try to take pictures in air? If it is possible, I would attempt to calibrate in air and see what results you get.

A few questions:

  • what distortion model are you using for calibration?
    • how much distortion does the lens have? (can you post a picture of one of your calibration images)
    • what is the re-projection error you are getting from calibrateCamera?
    • how are you determining that the distortion parameters are incorrect?
    • Can you undistort one of your calibration images using the calibration parameters and post the results?
swebb_denver gravatar imageswebb_denver ( 2019-03-07 09:50:39 -0600 )edit
1

I am unable to add photos. Maybe I have to wait another 23 hours? I was using MRPT Camera Calibration, so not sure what distortion model they use...

I did find this: link text and this link text which seem to be what I'm looking for. Just need to delve into the details.

pcocv gravatar imagepcocv ( 2019-03-07 11:59:31 -0600 )edit
1

Admittedly I have no experience with underwater photography, so I don't have a good context for your specific issues, but I do calibrate cameras on a daily basis for dry land use. In looking at the paper you linked, it seems different from what you are doing (they seem to be modeling a normal lens with a planar air/water interface). There may well be good information in the paper, but I'm not sure you could directly apply their process to your situation.

A few things I have learned:

  • Make sure you get calibration points across the whole image as deep into the corners as possible.
    • For high distortion lenses the OpenCV rational (8 parameter) model works well.
    • Make your calibration target as flat as you can.
    • I shoot for 0.5 pixel re-projection error worst case.
swebb_denver gravatar imageswebb_denver ( 2019-03-07 13:31:45 -0600 )edit
1

Thanks for the tips on calibration. I'm curious why you would have to calibrate daily? Are you working with the same camera/lens or does that constantly change?

pcocv gravatar imagepcocv ( 2019-03-09 11:37:09 -0600 )edit