Center of fisheye image

22 views
Skip to first unread message

Oleg Vakulenko

unread,
May 20, 2020, 4:11:33 PM5/20/20
to BoofCV
I work with fisheye images. I calibrated camera using a chessboard and obtained the deformation parameters as a result of which I get the correct image in terms of straight lines. I'm interested in the parameter - the center coordinates (cx, cy) in UniOmniStoP_F64 class. I assumed that as a result of the calibration, there will be data on the optical center, regardless of how the circle of the fisheye image is located in the rectangular region of the full image. But if I add a circle with approximate dimensions, I can see that it is clearly different (shifted) from the desired one. 
Accordingly, the question is what exactly do the center parameters mean and is it possible to get the coordinates of the real center I need?
If necessary, I will send the camera calibration parameters and sample photos.

Peter A

unread,
May 21, 2020, 12:43:34 AM5/21/20
to boofcv
Hmm so when you undistort it it looks good, but you think the center is way off. Could you post the image with the bad center and the estimated calibration parameters? One reason the center would be off is that the calibration was bad due to insufficient images or just bad blurred images, but the calibration is good. I bet if you added a few more images you would get a different center. Might not be a better center but it would be different.

Could you also clarify what you mean by "desired" if you image the image center defined by (width/2 , height/2) it should be close-ish to that but not exact.

--
You received this message because you are subscribed to the Google Groups "BoofCV" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boofcv+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/boofcv/23ae2d75-293a-4701-8872-81e0645700c6%40googlegroups.com.


--
"Now, now my good man, this is no time for making enemies."    — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.

Oleg Vakulenko

unread,
May 21, 2020, 7:08:13 AM5/21/20
to BoofCV
I work with dual fisheye camera. 
Earlier, I asked about the calibration and after recalibration, where I used about 60 photos for each of the cameras, I received the following parameters:


Here is the result of drawing a circle with the parameters from the calibration file. It can be seen that the borders on the right are approximately the same, but on the left there is a clear discrepancy. Note that the image area from the camera extends beyond the edges of the image itself.


radius.front.jpg

radius.back.jpg


What data is still needed to understand the situation and to understand whether it is possible to obtain the coordinates of the optical center?

radius.back.jpg
radius.front.jpg

Peter A

unread,
May 31, 2020, 4:10:36 PM5/31/20
to boofcv
Sorry for taking a bit to reply. You're right that it should be the optical center. In practice it tends to "float" a bit depending on images used and calibration parameters. For structure from motion (SFM) it's not the most important parameter for highly accurate 3D reconstruction. For undistorting the image I wouldn't worry too much about it. I'm also not sure if from an optics perspective it makes sense for the circle you drew to line up with the image's circle. That's mostly due to lack of knowledge about all the weirdness in real lenses. Computer vision camera models are just approximations, but from what I understand lens designers do try to design lenses which match those models. Is this just out of curiosity or do you need to have the exact value be accurate and stable?

--
You received this message because you are subscribed to the Google Groups "BoofCV" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boofcv+un...@googlegroups.com.

Oleg Vakulenko

unread,
Jun 1, 2020, 5:10:38 AM6/1/20
to BoofCV
In the most general sense, I am not interested in the absolutely exact value of the center coordinates. I would even like the value with an accuracy of several points (~ 5-10). But after calibrating the camera, I would like to rely on the automatically obtained value for further operations and try to avoid additional manual settings. However, given the fact that the calibration process of the fisheye camera cannot determine the radius of the active region of the image (although this would be a useful feature in my opinion), manual adjustment of the radius of such an area will still be required. As you said, the coordinates of the center, like the other parameters, differ with a different set and number of targets. Provided that I am satisfied with the quality of calibration, what do you advise? To independently develop a mechanism for determining the center and radius of an image, or is it possible to somehow solve this using a framework?

Peter A

unread,
Jun 6, 2020, 4:06:19 PM6/6/20
to boofcv
I think the active region could be found at least approximately by looking at pixels which change in the image. In heavily fisheye images there does appear to be some pixels that are a reflection or some other artifact that change and would be hard to remove using that approach. In the fisheye to equirectangular code there is some automated code where it attempts to figure out which pixels are valid. If I remember correctly it checks to see if the undistort function flows up and if going back and forth works.

My suspicion is that camera manufacturers try to design the hardware so that the active region is approximately in the same location and just calibrate the other parameters on a per camera basis.

You only want the active region to improve undistorting the image right?


On Mon, Jun 1, 2020 at 2:10 AM Oleg Vakulenko <olegva...@gmail.com> wrote:
In the most general sense, I am not interested in the absolutely exact value of the center coordinates. I would even like the value with an accuracy of several points (~ 5-10). But after calibrating the camera, I would like to rely on the automatically obtained value for further operations and try to avoid additional manual settings. However, given the fact that the calibration process of the fisheye camera cannot determine the radius of the active region of the image (although this would be a useful feature in my opinion), manual adjustment of the radius of such an area will still be required. As you said, the coordinates of the center, like the other parameters, differ with a different set and number of targets. Provided that I am satisfied with the quality of calibration, what do you advise? To independently develop a mechanism for determining the center and radius of an image, or is it possible to somehow solve this using a framework?

--
You received this message because you are subscribed to the Google Groups "BoofCV" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boofcv+un...@googlegroups.com.

Oleg Vakulenko

unread,
Jun 10, 2020, 10:58:40 AM6/10/20
to BoofCV
I would like to determine the coordinates of the center in order to work already with the active area of ​​the image. For example, to build a correct histogram without taking into account what did not fall into the active area. And other similar operations.
To determine the active area based on which points are changing, in my opinion, is not the best way, because due to light, the image also changes outside the active area.
And one moment. I remembered another application of the exact center coordinates. I previously asked about a way to compensate for image vignetting. So the definition of the center will also affect this stage of processing and its definition is more than an important task.


Peter A

unread,
Jun 15, 2020, 10:08:35 AM6/15/20
to boofcv
I'm focused right now on scene reconstruction but I'll eventually start working on this again. There's another branch with a new camera model in works but I don't think it will help much. It's primarily being added since it's more common.

You could potentially find the active area by tracking features in the fisheye image using KLT or something like that. I suspect that would give you a circle a little bit smaller than you want.

--
You received this message because you are subscribed to the Google Groups "BoofCV" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boofcv+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages