VideoCAD

Modeling cameras with Fisheye lens

Hide Navigation Pane

Modeling cameras with Fisheye lens

Previous topic Next topic No directory for this topic Expand/collapse all hidden text  

Modeling cameras with Fisheye lens

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

Cameras with Fisheye lens are useful for monitoring small spaces.

The view area of such cameras is a hemisphere. Field of view is projected on the image sensor in the form of a circle.

Therefore, the original image produced by the image sensor is a circle in which the image of the scene subjected to a strong barrel distortion.

Then, in the original image a ''fragments' are cut out, distortion is corrected in the fragments and in result an usual frames are obtained.

 

VideoCAD allows to model:

Full circle with screen resolution.
Full circle with screen resolution with insertion of one fragment with real resolution (PiP).
Fragment with real resolution with insertion of the full circle  (PiP).
Full circle with real resolution. Images of tens of megapixels can be modeled.
Fragment without distortion (dewarped) with real resolution.
Several fragments without distortion (dewarped) with real resolution in one image.
2D projection of the view area and pixel density distribution in the Graphics window.
3D view area and pixel density distribution in the 3D World.

 

See more Fisheye

 

Problem

 

There is a camera AXIS M3007-PV. The camera is mounted on a bracket at 3m height at a distance of 10 meters from a wall of 10 meters height. Camera is pointed down.

It is required to obtain a model of the control area, the distribution of the pixel density and image models from this camera.

 

Camera parameters according to manufacturer's specification, important for modeling:

Number of pixels 2592x1944 (5 MP)

 

Order of work

 

1. Create a camera by clicking the New camera button. In the New camera box, in the Camera icon combobox choose an icon for the new camera with panoramic, for example indoor/panoramic .

 

A special icon is not obligatory. In the future it will be possible to change the icon in the Camera list box.

 

2. Place the camera on the layout. At the distance of 10 meters from the camera create a wall of 10 m height using the Rectangle  tool. Near the wall place several 3D models.

 

3. Open the Camera geometry box and specify number of pixels on horizontal and vertical - 2592*1944.

 

The most important parameter that determines the image resolution of Fisheye cameras, is the number of pixels of the image sensor.

 

Since the image sensor is rectangular in shape and view area of the camera is projected into a circle, not all pixels are involved in image formation.

In VideoCAD the number of physical pixels on the sensor horizontally and vertically are required. The number of pixels involved in the formation of the image will be calculated by VideoCAD.

High precision of specifying the number of pixels is not required. So for a 2-megapixel camera, you can enter 1200 * 900, for 3MP -1600 * 1200, for 5MP -2500 * 2000. Standard aspect ratio should be supported.

 

Lens focal length and Image size at image processing have no affect on the image resolution of Fisheye cameras.

 

4. In the Camera geometry box specify camera installation height of 3 meters.

 

5. Click on the button on the Toolbar open the PTZ or Fisheye panel.

 

 

Check the Fisheye switch.

 

On the Camera position panel specify angles of installation of the Fisheye camera. To point the camera down, choose:

Pan angle = 0 (this value is not important when the camera is pointed down);
Tilt angle=90.

 

A schematic drawing on the panel will display the position of the camera.

 

 

Lens focal length comboboxes in the Graphics window and in the Camera Geometry box will be colored aqua.

 

To limit too big size of the view area projection use the Maximum distance of drawing view area box in the Camera geometry box

 

Click to expand
Click to expand

 

6. Assign to the camera a Pixel density pattern to visualize the pixel density.  For this purpose open the Pixel density box. Clear the Active camera checkbox, then choose the pattern "Home Office Scientific Development Branch 2009 (arbitrary resolutions)" in the Pattern list. Then click Assign to assign the chosen pattern to the active camera.

 

Pattern criterion of pixel density for Fisheye cameras must be based on the pixel density (Pixel per meter (Pixel per foot), Pixel for object), but not on the field of view size. Criterion Field-of-view height, % of Field-of-view for object are not suitable to Fisheye cameras, because of Fisheye cameras have not a stable field of view.

 

7. Enable and adjust the pixel density visualization in the Graphics window.

In the popup menu of the Shadow button on the Toolbar of the Graphics window choose Within projection.

In the popup menu of the Fill projection button choose Filling

In the popup menu of the Pixel density button choose Discrete color.

 

As a result we will see in the Graphics windows the pixel density distribution of the camera AXIS M3007-PV on the height specified in the Pixel density pattern assigned to the camera.

 

 

Considering the projection can be said, for example, that at a distance of 28 meters from the camera at a height of (2 + 0.5) / 2 = 1.25m the yellow region ends, and hence the pixel density, according to the selected pattern, equals 39 pixels per object of 1,64m height or 39 / 1.64 = 24 pixels/meter.

 

8. Open the 3D World window. In the window we can see the distribution of pixel density in the form of coverage on the surrounding objects.

Using the navigation in the 3D space, we can see pixel density at any point on the surfaces around the camera, as well as we can detect invisible areas shaded by other objects.

 

Close the 3D World window.

 

 

9. Open the 3D Video window.

 

 

Right-click on the 3D Video window to display the Image parameter panel and switch to the Panoramic tab.

 

Choose the switches:

 

Positions> Show> Camera

and Fisheye> Show> Full 360 ​​deg. image

 

The 3D Video window will display the full 360 degree round image.

 

You can rotate the image by the mouse with left button pressed.

 

Enable the Image Processing if it is disabled.

If PiP mode is enabled, you can select areas for viewing in real resolution by clicking on the image by the middle mouse button (wheel).

 

 

_

Click to expand
Click to expand

 

Mark Image> Real frame size in the Main menu of the 3D Video window.

Save the image to a file with the real 5MP resolution by selecting Image> Save As in the Main Menu of the 3D Video.

 

Saving in high resolution takes time, wait until the end of the process.

 

 

Uncheck Image> Real frame size.

 

 

10. Mark the switch Fisheye>Show>Dewarped image fragment (on the Image parameter panel). By directing the camera on points of interest on the scene, we can see with what resolution these regions will be displayed by our camera.

 

Place 3D model of a man on the far border of yellow region, that is, where the pixel density is 24 pixels / meter. And direct the camera on the 3D model.

Let's try to change the lens focal length and make sure that only the size of the field of view is changed. Resolution of the image will remain constant.

 

 

Pan, tilt and rotation of the camera around its own axis, made in the usual way does not affect the position of the Fisheye camera. By rotation the camera in the usual way, you can view images from the Fisheye camera in different directions in the 3D Video. In this case, the view area will be limited at 180 degrees from the main optical axis of the lens. Beyond this limit the image is cut

 

You can change the Lens focal length, thereby changing the field of view size, but the image resolution in the 3D Video will always be maintained equal to the calculated resolution of the  Fisheye camera.

If the calculated resolution is worse, the resolution of the 3D Video will be artificially reduced. If the calculated resolution is better, then the PiP mode will be launched in the 3D Video.

The Image line in the Titles displays a virtual number of pixels for correct simulation of the resolution.

 

Distortion of a Fisheye camera images in the 3D Video is not modeled.

The simulated resolution is exact only at the center of the frame. Towards the edges of the frame the actual resolution is worse than simulated. The smaller the view angle, the more accuracy of simulating resolution on the edges of the frame.

For a more realistic model of the image, turn on modeling of compression and smoothing, or set the actual resolution of the lens (for accurate simulation the lens resolution you also need to specify the correct size of the image sensor).

 

11. Open the Positions of active camera window by button on the Toolbar.

Click , rotate the camera on the layout and click again.  The camera positions at the moment of clicks will be saved as Positions.

 

 

Now go back to the 3D Video window, right-click on the window, open the Image parameter panel, switch to the Panoramic tab, and select the Positions> Show> Cam+positions (show camera and positions). Switch Fisheye> Show> Dewarped image fragment should be marked.

 

You will see the camera positions you set in the screen division mode. In each cell, the image resolution is limited by its own calculated value.

 

 

With the model of Fisheye camera VideoCAD can simulate real camera resolution with PiP, saving image with real camera resolution, motion blur, animated images and modeling camera sensitivity.

 

See also: Fisheye