Why do I see a black "cone" when dewarping my fisheye camera?

When performing fisheye dewarping, sometimes a "black cone" can be seen in parts of the dewarped images. This is normal and this article explains why it can occur.

In the image below, we can see a fisheye image on the left, and its dewarped equivalent on the right.

Dewarping-black-cone.png

In this particular example we have "cloned" the original fisheye image and enabled the "Contours & Tracking" feature. This causes a red outline to be drawn on the original image, indicating the area of the image which is being used for the dewarped image on the right.

In the dewarped image on the right, we can see a semi-circular black shape at the top. In more exaggerated cases this can appear as a more pointed black cone-like shape.

Looking at the original fisheye image on the left, there is a circular "used" part of the image, but the top and bottom of the circle is cropped off. This is the cause of the black cone effect.

As you can see from the top part of the red outline on the left image, the area we want to dewarp requires a part of the image which is cropped off in the original image. Clearly, if that part of the image doesn't exist in the original fisheye image, it cannot be shown in the dewarped image.

If the fisheye video source has the circular "populated" part fully within the rectangular image, then no "black cones" are seen. However most camera manufacturers set up the cameras such that there is usually a minor amount of this clipping. This is usually related to the desire for the most "pixel density". If the circle is squeezed down into the available rectangular area, the resulting dewarped image is of lower quality because there are fewer pixels available for that area in the source image.

This issue can be improved by configuring the camera using the "set geometry" feature. By adjusting the red circle such that it is set to be within the bounds of the image, the view will be limited to that area. The downside is that the dewarping lens correction will be less "correct" than if the red circle is configured to match the edges of the visible image.