SqueezeBrains SDK 1.18
retina_svl_custom_elaboration.c File Reference

Tutorial 5 - Retina - How to do training and detection with custom elaboration. More...

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

Go to the source code of this file.

Data Structures

struct  retina_svl_user_data
 

Functions

sb_t_err create_retina_project_file (SB_HANDLE *retina)
 Create a retina project file. More...
 
sb_t_err set_samples (SB_HANDLE retina)
 Set samples. More...
 
sb_t_err execute_svl (void)
 Execute svl. More...
 
sb_t_err detection (void)
 Detection on resized images. More...
 
int main (void)
 

Detailed Description

Tutorial 5 - Retina - How to do training and detection with custom elaboration.

This tutorial shows how to use:

You should follow the following steps:

  1. create a new project with the function sb_project_create
  2. add a model to the project and set its parameters with the functions sb_project_get_par and sb_project_set_par
  3. labeling the image, i.e. set the occurrences of the model in the dataset images
  4. execute the training with the function sb_svl_run
  5. perform a detection with the function sb_project_detection For more informations on the ROI see ROI management.
    See also
    sb_init
    sb_release
    sb_get_info
    sb_license_get_info
    sb_image_load
    sb_image_create
    sb_image_destroy
    sb_image_resize
    sb_roi_create
    sb_roi_destroy
    sb_roi_set_rect
    sb_lut_create
    sb_lut_destroy
    sb_lut_get_prt
    sb_image_info_load
    sb_image_info_destroy
    sb_image_info_save
    sb_image_info_set_notes
    sb_image_info_reset
    sb_image_info_add_sample
    sb_project_create
    sb_solution_get_info
    sb_solution_destroy_info
    sb_project_load
    sb_project_destroy
    sb_project_save
    sb_project_get_par
    sb_project_set_par
    sb_par_add_model
    sb_par_format
    sb_svl_reset
    sb_svl_stop_request
    sb_svl_run
    sb_svl_get_res
    sb_svl_destroy_res

Definition in file retina_svl_custom_elaboration.c.

Function Documentation

◆ create_retina_project_file()

sb_t_err create_retina_project_file ( SB_HANDLE retina)

Create a retina project file.

  1. Create the handle RETINA.
  2. Set parameters of the model of the object.
  3. Save the Retina project file.

Definition at line 215 of file retina_svl_custom_elaboration.c.

Here is the call graph for this function:

◆ detection()

sb_t_err detection ( void  )

Detection on resized images.

  1. Get the solution information.
  2. Load the Retina project from solution file
  3. Load the image.
  4. Create the roi
  5. Elaborate the image.
  6. Get the results.
  7. Destroy the handles.

Definition at line 356 of file retina_svl_custom_elaboration.c.

Here is the call graph for this function:

◆ execute_svl()

sb_t_err execute_svl ( void  )

Execute svl.

  1. Get the solution information.
  2. Load the project.
  3. Reset a previous SVL.
  4. Set SVL parameters and connect the callbacks.
    • Set the allowed images file extensions
    • Set the goodness target
    • Set the pre_elaboration callback to process each image before svl
    • Set the command callback to process user commands
    • Set the progress callback to manage the progress notification
    • Set the user data to store the user data
  5. Run SVL.
  6. Get training results.
  7. Save SVL.
  8. Destroy the handles.

Definition at line 305 of file retina_svl_custom_elaboration.c.

Here is the call graph for this function:

◆ main()

int main ( void  )

In the following the list of the program steps:

  • Initialization
  1. Initialization of the SqueezeBrains library.
  2. Wait until the license is active.
  • SVL with custom image elaboration
  1. Create Retina project file.
  2. Add samples to images.
  3. Execute SVL.
  • Detection with custom image elaboration
  1. Destroy the handle.
  • Release the library.

Definition at line 168 of file retina_svl_custom_elaboration.c.

Here is the call graph for this function:

◆ set_samples()

sb_t_err set_samples ( SB_HANDLE  retina)

Set samples.

  1. Add samples to images.
  2. Destroy the handle.

Definition at line 244 of file retina_svl_custom_elaboration.c.

Here is the call graph for this function: