Smart Camera Documentation

Adding A New Image Processing API

38 views October 15, 2018 soliton-support 2

Adding a new image processing API involves three steps as given below:

Step 1: Open the Image Processing file
Open nuera_project_template in Eclipse IDE and go to file src >> image_processing >>
process_image.cpp . This can be done in the Project Explorer pane as shown below:

NUERA Eclipse IDE Project Explorer

Fig 1. Eclipse IDE Project Explorer

Step 2: Edit the code
In the process_image.cpp file, scroll to the process_image function. The image processing
code should be written in the process_image function as shown below:

NUERA Eclipse IDE Image Processing Code Example

Fig 2. Image Processing Code

The arguments of the process_image function are :

  • ‘ input_image ’ – the input image captured by the NUERA image sensor.
  • ‘ output_image ’ – the processed image, which gets displayed on the WebGUI. Results will be stored in this image.
  • ‘ app_variable ’- a data structure which contains the application variables.

Application variables can be used to configure values . The image above demonstrates addition of a simple image processing code. Grayscale-to-Binary conversion is the image processing function added to process_image(). The OpenCV function used is threshold(), to understand threshold(), refer this .

Step 3: Upload the application to NUERA Smart Camera and see the result
Once you save this file, build the project by right clicking on the Project and then selecting Build Project. After build is completed successfully, you can Upload this project to NUERA (see here how to upload). You can see the corresponding output on the We
GUI. WebGUI will show the result image which was stored in output_img buffer.

NUERA Eclipse IDE Threshold Running on WebGUI

Fig 3. WebGUI running threshold application

Next->

For any further assistance, please contact our application engineer at camera.support@solitontech.com

Was this helpful?