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:
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:
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.
Fig 3. WebGUI running threshold application
For any further assistance, please contact our application engineer at firstname.lastname@example.org