SqueezeBrains SDK 1.18
retina_set_roi.c File Reference

Tutorial 8 - Retina - How to set a ROI in the "rtn" file associated to an image. More...

#include "../common/common.h"
Include dependency graph for retina_set_roi.c:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Tutorial 8 - Retina - How to set a ROI in the "rtn" file associated to an image.

Sometimes it is necessary to set the ROI analysis in many images and doing this work manually could take a long time.
So, it is better create a program to do it automatically for all the images.
You can set a fixed ROI or a dynamic ROI associated with the position of an object.
In the second case it possibile to set a ROI for each object in the image.
This example shows the latter case where the objects are slices of gruyere.
To find the objects position the Retina project "slice" of the solution "slice.rprj" is used.
The images must be in a folder and, as a result of the tutorial, in the same folder, for each image, an "rtn" file will be created.
Then, when you import the images with the SB GUI, it imports the images and all the "rtn" files associated to the images.
In the folder "dataset" you will find the images.
In the folder "solution" you will find the solution with the Retina project to find the objects.

See also
sb_init
sb_release
sb_get_info
sb_license_get_info
sb_folder_load
sb_folder_destroy
sb_solution_get_info
sb_solution_destroy_info
sb_project_load
sb_project_destroy
sb_project_detection
sb_project_get_res
sb_res_destroy
sb_image_load
sb_image_destroy
sb_image_info_load
sb_image_info_destroy
sb_image_info_save
sb_image_info_set_roi
sb_roi_create
sb_roi_destroy
sb_roi_reset
sb_roi_set_rect

Definition in file retina_set_roi.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

In the following the list of the program steps.

  1. Initialization of the SqueezeBrains library.
  2. Wait until the license is active.
  3. Get the solution information.
  4. Load the Retina project from solution file
  5. Scan the images in the dataset folder and for each image create the "rtn" file
  6. Release the handles and the library
  7. Release the library.

Definition at line 45 of file retina_set_roi.c.

Here is the call graph for this function: