Tutorial 12 - Deep Surface - How to elaborate images.
More...
Go to the source code of this file.
Tutorial 12 - Deep Surface - How to elaborate images.
- Attention
- To execute this tutorial you need:
- to have installed the SB Deep Learning Framework
- to ensure that path to SB Deep Learning Framework is included in the PATH enviroment variable (LD_LIBRARY_PATH in Linux) or in any case to be visible by the program. In Windows it is possible to specify additional paths as argument to the sb_init_dl function.
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 .
In a deep surface project, the function sb_project_detection requires the following arguments at input:
- a SB_HANDLE of the Deep Surface project.
You can load the handle of the deep surface project with the function sb_project_load .
- a sb_t_image, 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:
- 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
- a sb_t_roi, the defects ROI that specifies the region of the image that contains a defect region. This information is not mandatory. If no defects ROI is passed to the function the result of the detection is not compared to the ground truth, and the defects occurrences detected are classified as SB_TRUTH_UNDEFINED .
- See also
- sb_init
-
sb_init_dl
-
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
Definition in file deep_surface_detect.c.
◆ main()
In the following the list of the program steps:
- Initialization of the SqueezeBrains library.
- Initialization of the Squeezebrains deep learning modules.
- Wait until the license is active.
- Get the solution information.
- Load the Deep Surface project from solution file.
- Set parameters
- set blob analysis parameters
- set device for elaboration
- Load the image from file.
- Create the ROI
- Set a rectangular ROI equal to image dimensions.
- Elaborate the image.
- Get the results.
- Destroy the handles.
- Release the library.
Definition at line 58 of file deep_surface_detect.c.