Using File Cameras

Starting from EnsensoSDK 2.1, NxView can simulate hardware cameras from saved images.

Saving Image Data

File cameras can read image sets from folders or zip files. A folder can contain any number of datasets saved from a hardware camera in NxView using:

  • NxView’s Save Raw Images function

  • The recording dialog within NxView

Note

File cameras currently only work with png and tiff image formats.

Creating a File Camera

../_images/nxview_create_file_camera.png

After you saved the necessary data sets into a folder you can open NxView and click Create...File Camera.

In the following dialog you can select the folder with your data sets and enter a serial number for the file camera. After clicking Ok the camera will be created and is now available in your camera list. If you saved the images to a zip file you can also drag the zip file onto the camera selection dialog to automatically open the file camera.

Note

Make sure to choose a unique serial number for your file camera which does not collide with attached hardware cameras.

Using File Cameras in the NxLib

File cameras can be opened just like normal cameras in NxView and via the NxLib API. To create a file camera from existing data, you can use the CreateCamera command. Use DeleteCamera to remove it again.

There are a few things to note when working with file cameras:

Saving Image Files

You can also create file cameras from your application. Save all files to a single folder. Each image set consists of (usually) three files with the same base name.

  • The camera calibration file must end in _calib.json and contains a copy of the whole camera node as JSON.

  • The image files end in _left.png and _right.png for the left and right images respectively. Flex View images additionally contain a two-digit index before this ending (e.g. _00_left.png and _15_right.png). Use the SaveImage command to save the camera’s raw images to these files.

The image sets within a folder will be sorted alphabetically by their file names. You can include the image timestamp in the filename to sort them by their capture time.

Note

Only signed images can be used in a file camera without requiring an additional license. Please use the SaveImage command to save file camera images from your application. Otherwise the images will not be signed and cannot be displayed in NxView. Images are signed if they are from a hardware camera and got saved in one of the following ways:

  • Using the Save Raw Images functionality in NxView.

  • Using the NxView record dialog, if the option Buffer in RAM is disabled.

  • Using the SaveImage command.