SqueezeBrains SDK 1.13
surface_detect.c File Reference

Tutorial 9 - Surface - How to elaborate images. More...

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

Go to the source code of this file.

Functions

int main (void)
 

Detailed Description

Tutorial 9 - Surface - How to elaborate images.

In this tutorial you can find what do you need to elaborate images in your system with a minimal integration of SB library. To elaborate an image you have to call the function sb_project_detection and get the results with the function sb_project_get_res .
The function sb_project_detection needs 3 things for a Surface project:

  1. a handle of the surface project.
    You can load the handle of the surface project with the function sb_project_load .
  2. a sb_t_image, i.e. the image to be processed.
    To create the image you can choose between two different modes depending if you already have the raw image in the memory or not:
  3. a sb_t_roi, the ROI (Region Of Interest) that specifies the region of the image to be processed.
    To create a roi you have to call the function sb_roi_create and then draw the region using the functions sb_roi_set_rect and sb_roi_set_circle , or draw the ROI manually setting pixel by pixel.
    For more details see ROI management
  4. a sb_t_roi, the defects ROI that specifies the region of the image that contains a surface defect region. This parameter is optional and it is used only if you want to compare the detection results with a ground truth.
    See also
    sb_init
    sb_release
    sb_get_info
    sb_license_get_info
    sb_folder_load
    sb_folder_destroy
    sb_image_load
    sb_image_destroy
    sb_image_create_header
    sb_image_set_data
    sb_roi_create
    sb_roi_destroy
    sb_roi_set_rect
    sb_roi_set_circle
    sb_solution_get_info
    sb_solution_destroy_info
    sb_project_load
    sb_project_destroy
    sb_project_get_par
    sb_project_set_par
    sb_project_detection
    sb_project_get_res
    sb_res_destroy
    sb_surface_blob_analysis

Definition in file surface_detect.c.

Function Documentation

◆ main()

int main ( void  )

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 Surface project from the solution file.
  5. Load the image from file.
  6. Create the roi
  7. Elaborate the image.
  8. Get the results.
  9. Destroy the handles.
  10. Release the library.

Definition at line 53 of file surface_detect.c.

Here is the call graph for this function: