NUC API Manual

Introduction to the API

Purpose and Scope

VmbNUC API serves as a tool to calculate the NUC file.

Compatibility

Supported cameras:

  • Goldeye cameras

  • Goldeye Pro cameras

Supported inputs:

  • Frames acquired with VmbC up to 16 bits

  • Images in PGM format

  • NUC generation with up to 100 images

  • Pixel formats: Mono8 up to Mono16

API usage

See also

Use the examples provided in C:\Users\Public\Documents\Allied Vision\Vimba X\Examples\VmbNUC, and also provided as executables in VimbaX/bin.

To use VmbNUC API, perform these steps:

  1. Configure the light source and camera settings for low exposure images.

  2. Wait until the temperature is stable. Use the compiled examples LiveStreamToAverage.exe and ReadImages.exe avalailabe in Vimba X\bin with parameters, or use the sources to compile the examples with CMake.

  3. Use example LiveStreamToAverage and adapt the values of exposure, gain and temperature to your needs. Specify an output directory for low exposure images. For details, use the ‘--help’ parameter or read the comments and strings in the example.

  4. Repeat the steps above with high exposure.

  5. Use example ReadImages with the same values for exposure, gain, and temperature and upload the file to your camera as usual with Vimba FileAccess.

// Example and output directory usage
// Temperature setpoint uses the current camera settings
// Make sure to use consistent parameters

mkdir "C:\Temp\low-exposure"
LiveStreamToAverage.exe --output-directory "C:\Temp\low-exposure" --frames 10 --
pixel-format Mono12 --exposure-time 10000 --gain 1

mkdir "C:\Temp\high-exposure"
LiveStreamToAverage.exe --output-directory "C:\Temp\high-exposure" --frames 10 --
pixel-format Mono12 --exposure-time 10000 --gain 1

ReadImages.exe "C:\Temp\low-exposure" "C:\Temp\high-exposure" --sensor-temp 20.0 --
pixel-format Mono12 --exposure-time 10000 --gain 1 --export-type "GoldeyeG"

Uploading files to the camera

See also

FileAccessControl features are described in the Goldeye and Goldeye Pro Features Reference: https://www.alliedvision.com/en/support/camera-documentation/area-scan-cameras-documentation

Warning

  • Use one of the ‘.._User_..’ file slots to upload your data.

  • All uploaded NUC files must have a unique set of settings: Gain / Temperature / Exposure Time.

To upload the NUC files to the camera, follow these instructions:

Select and check a file

Select and check:
  • Select the NUC file and set FileSelector to the desired value.

  • To do this, use an available NUC_User_XXX file slot.

  • Check the current file status with the FileStatus feature.

  • If the status is not Closed, use FileOperationSelector to select file operation Close and execute the command FileOperationExecute.

Tip

  • After every execution of FileOperationExecute, you can check the status of the operation by reading the value of FileOperationStatus.

  • If a file in the camera contains no data (value of FileSize is 0), you can see the name of the file slot, but you cannot open it for reading. You can open it only for writing.

Open the file

Open the file for write operations:
  • Set FileOperationSelector to Open and execute the command FileOperationExecute.

  • Set FileOpenMode to Write and execute the command FileOperationExecute.

Load and upload the file

  • Load the complete NUC file from the host to an array to load it to the camera.

  • Set FileOperationSelector to Write and execute the command FileOperationExecute.

  • Use the range of the feature FileAccessLength to determine the maximum length of FileAccessBuffer.

  • Loop over the input vector, uploading chunks of data <= max. buffer length:

  • Fill the feature FileAccessBuffer with data.

  • Write the current buffer size into FileAccessLength.

  • Execute the command FileOperationExecute.

  • Get the number of transferred bytes from the camera. To do this, read the value of FileOperationResult.

  • Move to the next vector position using the number of transferred bytes.

  • Set FileOperationSelector to Close and execute the command FileOperationExecute.