lessthanoptimal / BoofCV

Fast computer vision library for SFM, calibration, fiducials, tracking, image processing, and more.
http://boofcv.org
1.09k stars 260 forks source link

[Feature request] Vignetting calibration & reduction #150

Open olegvakulenko opened 4 years ago

olegvakulenko commented 4 years ago

Hi!

Is it possible to implement a mechanism for determining (calibrating) the camera’s vignetting parameters, by analogy with the method for determining image distortion? In other words, on the basis of images with white fragments, calculate the parameters for reducing the image brightness and calculate the parameters for compensating for this distortion. This will be especially useful for fisheye lenses.

Thanks!

lessthanoptimal commented 4 years ago

I would need to read up on Vignette calibration, but I believe it is typically done by pointing the camera at an object with known properties (all white and uniform brightness) then adjusting. is there any paper you know of that describes how to do that calibration or maybe existing open source software?

olegvakulenko commented 4 years ago

I found the following documents: http://hugin.sourceforge.net/tech/ http://www.fsoft.it/Imaging/Vignetting.htm https://github.com/GUOYI1/Vignetting_corrector

I was interested in this issue precisely in the context of using fisheye lenses, because unlike conventional lenses with a narrow viewing angle, the fisheye does not allow a simple way to cover the entire field of view with white material. So the question is, do you see the way to solve this problem in the same way as the calibration process? Or even use the same set of source images. I mean, the chessboard already has white fragments, and after calibration, we can determine the exact distance from the center and calculate the difference in brightness levels in different parts. However, I may be mistaken that this method is applicable, because for calibration the test image should completely fit into the field of view of the camera and in this case the edges that cause the most questions will not be calculated accurately.

lessthanoptimal commented 4 years ago

I believe it would help. I've been thinking of improving the image stitching in BoofCV in general for a bit too. From these examples, the calibration process might be to simply rotate the camera, stitch the images together, then optimize to fix the vignette. I don't think calibration images are strictly required. All of this is also easier said than done. I've got some other papers on image stitching which might be useful.

olegvakulenko commented 4 years ago

Could you share the materials found.

Bra1nsen commented 5 months ago

Hey @olegvakulenko do you know about a tool to automatically determine center of fisheye projection?

Kind regards, Paul

olegvakulenko commented 5 months ago

Hey @olegvakulenko do you know about a tool to automatically determine center of fisheye projection?

Kind regards, Paul

Hello! The fact is that I haven't dealt with such issues for a long time, so I won't remember quickly. As far as I understand, in order to do anything with the fisheye projection, you need to first calibrate using the checkerboard pattern. The library has these tools specifically for fishing. But I don't remember if it gives the coordinates of the center. More precisely, there is a definition of a certain point (principle point), but I do not know if this is exactly what you are interested in. But you can make a fisheye conversion to a cubic projection and then the center of the frontal image will give you the desired point. Maybe it's complicated, but I don't have a better tip for you right now.