Hi all, I took calibration photos using a 9x6 standard checkerboard pattern with a Sony A6000 camera with an attached lens. I’ve attached an example of the .JPG photo here.
When I ran the photos through findChessboardCorners(), it fails to find them and just kind of “hangs” at that step until I stop it. I let it run for about 15 mins before I stopped it.
The odd thing is, when I take the same photo and screenshot it (which turns it into a .png file), and use that photo, it works perfectly. I tried simply converting the .JPG to .png, but that also didn’t work.
Is there something inherent to a photo from an external camera that is toxic to OpenCV? Thank you.
you need to pick that exact data out of your program’s execution and work with it.
don’t use JPEG. that’s lossy compression.
saving and loading an image, if losslessly, has ABSOLUTE ZERO effect on any computer vision.
if the findChessboardCorners()
function has trouble finding corners, that might be because of unfavorable contrasts in the picture.
assuming you’ll find the corners… that target is way too far away. calibration will have serious trouble estimating focal length given that this is almost an orthogonal projection (very narrow field of view, exhibiting no perspective)
Cool. I’m using a 100-400mm lens to try to see if I can get a solvePnP solution at around 11 feet for a project I’m working on. Is there a rule of thumb for maximum distance in solvePnp or a rule of thumb for focal length? Maybe I’m going about this the wrong way?
you might have to give calibrateCamera()
guesses for various intrinsics values… and nail them down.
for focal length, you find a ruler and a yard stick, shoot the ruler, measure the distance of it from the camera, measure the ruler in pixels, and calculate the focal length.
I don’t even know what you want to do with what you just described. I’d better not hypothesize.