SqueezeBrains SDK 1.18
|
Tutorial 7 - Retina - How to use more than one project to detect objects. More...
#include "../common/common.h"
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
Tutorial 7 - Retina - How to use more than one project to detect objects.
There are many cases in which you have to find objects and then analyze some parts inside the objects, for example to check the presence / absence of parts, or to the search for the defects.
To do this in a reliable and fast way it is necessary to use more than one retina project, the first one to detect the object regardless of how it is done, and the second one to analyze the object inside.
In the code, for each retina project, there will be a call of the function sb_project_detection .
Practically the first project only serves to set the ROI for the second project.
The first project works in a fixed ROI and for each occurrences of the object sets a ROI for the second project.
In order to reduce the computation time the models of the objects in the first project should be as small as possibile, keeping in mind that you can use the scale to fit the object dimension, instead the dimension of the models in the second project should be great enought to allow you to find the parts or the defects.
So we will be able to reduce the computation time and to not loose reliability because the first project works in a big fixed ROI with small models, instead the second project works in small dinamic ROI with great models.
In this tutorial the problem is to find the slices of gruyere and the holes inside them.
We have created 4 synthetic images each of them contains one or more slices of gruyere cheese.
You will find the images in the installation folder C:/SqueezeBrains/1.13/sb_tutorials/C++/tutorial_07_retina_multi_project/dataset .
2 projects have been created with "SB GUI" inside the solution tutorial_7_retina_multi_project.rprj.
You will find the solution in the folder C:/SqueezeBrains/1.13/sb_tutorials/C++/tutorial_07_retina_multi_project/solution
In the following section there is a description of the steps.
It is worth noting that in the case there are more that one slice, to reduce the computation time, each slice is elaborated separately, which means that you have to call sb_project_detection for each slice. For more information on the ROI see ROI management .
Definition in file retina_multi_project.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
In the following the list of the program steps.
Definition at line 84 of file retina_multi_project.c.