SB SDK 1.11
Project

Project management interface. More...

Collaboration diagram for Project:

Data Structures

struct  sb_t_project_info
 Project info structure. More...
 
struct  sb_t_projects_info
 Array of the projects info. More...
 
struct  sb_t_par_model_lut
 Information about mapping between old and new models and levels in the sb_t_par structure. More...
 
struct  sb_t_par_changes_info
 Information on what sb_project_set_par and sb_image_info_apply_par_changes do when they apply the new parameters. More...
 

Enumerations

enum  sb_t_project_type { SB_PROJECT_TYPE_RETINA = 0 , SB_PROJECT_TYPE_SURFACE , SB_PROJECT_TYPE_DEEP_SURFACE , SB_PROJECT_TYPE_DEEP_CORTEX }
 Project types enum. More...
 
enum  sb_t_project_mode { SB_PROJECT_MODE_DETECTION_ONLY = 0 , SB_PROJECT_MODE_DETECTION_AND_SVL }
 Defines the loading or saving mode of a project. More...
 

Functions

const char * sb_project_type_format (sb_t_project_type type)
 Returns the string of the project type. More...
 
sb_t_err sb_project_get_info (SB_HANDLE handle, sb_t_project_info *project_info)
 Gets the project information from the handle. More...
 
sb_t_err sb_project_destroy (SB_HANDLE *phandle)
 Frees all the resources of the project handle. More...
 
sb_t_err sb_project_create (SB_HANDLE *phandle, const char *const project_name, sb_t_project_type project_type)
 Creates a new project of the specifed type. More...
 
sb_t_err sb_project_load (SB_HANDLE *phandle, const char *const solution_file, const char *const project_uuid, sb_t_project_mode mode)
 Loads an existing project from file. More...
 
sb_t_err sb_project_save (SB_HANDLE handle, const char *const solution_file, sb_t_project_mode mode)
 Saves the project to file. More...
 
sb_t_err sb_project_clone (SB_HANDLE src, SB_HANDLE *pdst, sb_t_project_mode mode, int regenerate_uuid)
 Clones the Squeezebrains project. More...
 
sb_t_err sb_project_invalidate (SB_HANDLE handle, const char *const model_name, float scale)
 Eliminates the training of the models. More...
 
sb_t_err sb_project_check_trained (SB_HANDLE handle, const char *const model_name, float scale, int *const is_trained)
 Checks if the project is trained. More...
 
sb_t_err sb_project_get_default_features (SB_HANDLE handle, char *str, int size)
 Get the project default features depending on the project type (Retina or Surface)
 
sb_t_err sb_project_set_sensitivity (SB_HANDLE handle, const char *const model_name, float scale, float sensitivity)
 Sets the sensitivity of the detection in the project handle. More...
 
sb_t_err sb_project_get_sensitivity (SB_HANDLE handle, const char *const model_name, float scale, float *const sensitivity)
 Gets the classification threshold from the project handle. More...
 
sb_t_err sb_project_get_notes (SB_HANDLE handle, char **const note)
 Gets the note from the project handle. More...
 
sb_t_err sb_project_set_notes (SB_HANDLE handle, const char *const note)
 Sets the note into the project handle. More...
 
sb_t_err sb_project_get_name (SB_HANDLE handle, char **const name)
 Gets the name from the project handle. More...
 
sb_t_err sb_project_set_name (SB_HANDLE handle, const char *const name)
 Sets the name into the project handle. More...
 
sb_t_err sb_project_get_custom_par_root (SB_HANDLE handle, SB_HANDLE *node_root)
 Returns the xml root node of your own custom parameters. More...
 
sb_t_err sb_project_get_svl_version (SB_HANDLE handle, sb_t_version *const version, char *const version_str, int size_version_str)
 Returns the version of the SB library when the last SVL was made. More...
 
sb_t_err sb_project_detection (SB_HANDLE handle, const sb_t_image *const img, const sb_t_roi *const roi, const sb_t_roi *const roi_defects, const sb_t_samples *const samples)
 Detection function. More...
 
sb_t_err sb_project_get_par_changes_info (SB_HANDLE handle, const sb_t_par *const par, sb_t_par_changes_info **const par_changes_info)
 Returns the information on what sb_project_set_par and sb_image_info_apply_par_changes do when they apply the new parameters. More...
 
sb_t_err sb_project_destroy_par_changes_info (sb_t_par_changes_info **const par_changes_info)
 Destroys the structure. More...
 
sb_t_err sb_project_change_type (const char *const solution_file, const char *const project_uuid, sb_t_project_type project_type)
 Change the project type. More...
 
sb_t_err sb_project_get_par (SB_HANDLE handle, sb_t_par *const par)
 Retrieves the project parameters structure. More...
 
sb_t_err sb_project_set_par (SB_HANDLE handle, const sb_t_par *const par)
 Sets the parameters structure into the project handle. More...
 
sb_t_err sb_project_get_res (SB_HANDLE handle, sb_t_res **const res, int details)
 Retrieves the results of the last elaborated image. More...
 
sb_t_err sb_project_reset_stat (SB_HANDLE handle)
 Resets the internal statistics of the elaborations. More...
 
sb_t_err sb_project_get_stat (SB_HANDLE handle, sb_t_stat **const stat)
 Gets the statistics from the handle. More...
 

Detailed Description

Project management interface.

See Solution and projects management for more information.

Enumeration Type Documentation

◆ sb_t_project_mode

Defines the loading or saving mode of a project.

The values are 32 bits both for 32 and 64 bits library version.

Enumerator
SB_PROJECT_MODE_DETECTION_ONLY 

Load/save the minimum module information to allow detection.

SB_PROJECT_MODE_DETECTION_AND_SVL 

Load/save all the module information.

Definition at line 8259 of file sb.h.

◆ sb_t_project_type

Project types enum.

The values are 32 bits both for 32 and 64 bits library version.

Enumerator
SB_PROJECT_TYPE_RETINA 

Project Retina.

SB_PROJECT_TYPE_SURFACE 

Project Surface.

SB_PROJECT_TYPE_DEEP_SURFACE 

Project Deep Surface.

SB_PROJECT_TYPE_DEEP_CORTEX 

Project Deep Cortex.

Definition at line 8108 of file sb.h.

Function Documentation

◆ sb_project_change_type()

sb_t_err sb_project_change_type ( const char *const  solution_file,
const char *const  project_uuid,
sb_t_project_type  project_type 
)

Change the project type.

The function changes the project type in the solution file.
It also updates the project type in all rtn files associated with images in sb_t_svl_par::project_path.
The function returns SB_ERR_DIR_NOT_EXIST if sb_t_svl_par::project_path is not an existing folder, and SB_ERR_STRING_EMPTY if it is an empty string.
When the project type is changed the training and all the analysis results will be lost, moreover some data is initializzed, others are kept.
Regarding the parameters of the project the models number, their name and sb_t_par. collaborations "collaboration matrix" are always kept.
While, for image data, ROI analysis and labeling can be retained or lost.
The following table shows what happens when you change the project type.

Source project type Destination project type ROI analysis Samples ROI defects Model size Network
Retina Surface full image / empty / /
Deep Surface full image / empty / initialized if necessary
Deep Cortex / / / / initialized if necessary
Surface Retina full image none / initialized /
Deep Surface kept / kept / initialized if necessary
Deep Cortex / / / / initialized if necessary
Deep Surface Retina full image none / initialized if necessary /
Surface kept / kept / /
Deep Cortex / / / / initialized
Deep Cortex Retina full image none / initialized if necessary /
Surface full image / empty / /
Deep Surface full image / empty / initialized
Parameters
[in]solution_fileSolution file name.
[in]project_uuidUUID of the project.
[in]project_typeNew project type.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.

◆ sb_project_check_trained()

sb_t_err sb_project_check_trained ( SB_HANDLE  handle,
const char *const  model_name,
float  scale,
int *const  is_trained 
)

Checks if the project is trained.

Usually, to check if a project is trained and the sb_project_detection function can be called, the function is called with model_name equal to NULL and scale equal to 0.
The function works in a slightly different way depending on the project type.
In case of a Surface project the model_name and scale parameters can be configured in 4 different ways explained below.

model_name scale Condition is_trained
NULL 0
All models are disabled 1
All the enabled models and all their enabled scale levels are trained 1
There is an enabled model with all scale levels disabled 1
There is an enabled model with no scale levels 0
There is an enabled model with an enabled scale level that is no trained 0
The project has no models 0
!=NULL >=1.0
The model is disabled 1
The model is enabled and the scale is disabled 1
the specified combination model_name - scale has been trained 1
the specified combination model_name - scale has not been trained 0
NULL >=1.0
All the enabled models that have the specified scale level are trained 1
There is an enabled model with the specified scale level that is not trained 0
!=NULL 0
The model is disabled 1
The model is enabled and all the enabled scale levels are trained 1
The model is enabled and all the scale levels are disabled 1
The model is enabled and it has no scale levels 0
The model is enabled and there is an enabled scale level that is no trained 0

In case of Retina, Deep Cortex or Deep Surface project type the parameter scale is not used, so the table can be simplified as the one below:

model_name Condition is_trained
NULL
All models are disabled 1
All the enabled models are trained 1
The project has no models 0
!=NULL
The model is disabled 1
The model is enabled and it is trained 1
The model is enabled but it isn't trained 0
Parameters
[in]handleProject Handle.
[in]model_nameName of the model to be checked.
If the model_name is not found the function returns the error SB_ERR_MODEL_NOT_FOUND.
[in]scaleLevel scale to check.
Used only by Surface projects.
The permitted values are 0 and between SB_PAR_LEVEL_SCALE_MIN and SB_PAR_LEVEL_SCALE_MAX with steps of SB_PAR_LEVEL_SCALE_GRANULARITY, i.e. 1, 1.5, 2, 2.5 etc.
If scale has no allowed value, the function returns the error SB_ERR_WRONG_PARAMETER.
If the scale has an allowed value but it is not found the function returns the error SB_ERR_SCALE_NOT_FOUND.
[out]is_trainedIt is set to 1 or 0, see the tables above.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_invalidate

◆ sb_project_clone()

sb_t_err sb_project_clone ( SB_HANDLE  src,
SB_HANDLE pdst,
sb_t_project_mode  mode,
int  regenerate_uuid 
)

Clones the Squeezebrains project.

The function returns the SB_ERR_PROJECT_LOAD_MODE error if the load mode of the source project is lower than the new load mode.

Parameters
[in]srcThe source project handle.
[out]pdstThe pointer to the new project handle.
[in]modeLoading method of the module of a project.
[in]regenerate_uuidIf true it generates a new project uuid for the new project
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_create
sb_project_load
sb_project_destroy

◆ sb_project_create()

sb_t_err sb_project_create ( SB_HANDLE phandle,
const char *const  project_name,
sb_t_project_type  project_type 
)

Creates a new project of the specifed type.

Parameters
[out]phandlePointer to the project handle
[in]project_nameProject Name.
[in]project_typeProject type.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_save
sb_project_destroy
sb_project_clone

◆ sb_project_destroy()

sb_t_err sb_project_destroy ( SB_HANDLE phandle)

Frees all the resources of the project handle.

Parameters
[in,out]phandlePointer to the project handle
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_create
sb_project_load
sb_project_clone

◆ sb_project_destroy_par_changes_info()

sb_t_err sb_project_destroy_par_changes_info ( sb_t_par_changes_info **const  par_changes_info)

Destroys the structure.

Parameters
[in,out]par_changes_infoPointer to the structure. The function sets it to NULL.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_get_par_changes_info

◆ sb_project_detection()

sb_t_err sb_project_detection ( SB_HANDLE  handle,
const sb_t_image *const  img,
const sb_t_roi *const  roi,
const sb_t_roi *const  roi_defects,
const sb_t_samples *const  samples 
)

Detection function.

The function elaborates the image inside the ROI.
You should use the function sb_project_get_res to get the results.
Remember to call sb_roi_evaluate_bounding_box if the ROI is changed.
In case of Surface and Deep Surface projects the function also executes a blob analysis on the voting plane in order to cluster the defects areas. The funcion does the blob analyis if the parameter roi_defects is valorized or if the sb_t_par.surface_blob_analysis is set.
If you want to reset the statistic you should call the funcion sb_project_reset_stat before to call sb_project_detection .

Note
The function needs that the license be active and valid.
Parameters
[in]handleProject handle.
[in]imgPointer to the image. It is analyzed inside the ROI.
[in]roiPointer of the ROI.
[in]roi_defectsPointer to the defects ROI. Is it used only with Surface and Deep Surface projects. The parameter can be NULL.
In the case roi_defects is valorized, the function executes the blob analysis on the voting plane and does the following operation:
[in]samplesPointer to the samples of the image that is the ground truth or labeling. It is used only with Retina and Deep Cortex projects. The parameter can be NULL.
If samples if valorized, the function works in test mode and can perform the following operation:
  • compare the results with the labeling in order to set the field truth (see sb_t_sample) of the samples in the results (see sb_t_res).
  • evaluates the detection statistics. You should use the function sb_project_get_stat to get them. In case the parameter roi_defects is valorized than the function vote plane extracted in order to cluster the defects areas and compare them with the corresponding areas of the ground truth, thus providing a global statistic.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
How SB works
License configurations
sb_project_load
sb_roi_evaluate_bounding_box
sb_project_get_res
sb_project_get_stat
sb_project_reset_stat

◆ sb_project_get_custom_par_root()

sb_t_err sb_project_get_custom_par_root ( SB_HANDLE  handle,
SB_HANDLE node_root 
)

Returns the xml root node of your own custom parameters.

Attention
The handle returned by the function must not the destroyed.
Parameters
[in]handleProject handle.
[out]node_rootThe variable is filled with the xml root node of your own custom parameters.
The handle returned by the function must not be destroyed.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Manage custom parameters
sb_xml_node_get
sb_xml_node_get_child
sb_xml_node_next
sb_xml_node_add
sb_xml_node_set
sb_xml_node_get_name
sb_xml_node_set_attribute
sb_xml_node_get_attribute
sb_xml_node_set_itself
sb_xml_node_count
sb_xml_node_get_string
sb_xml_node_get_string_malloc
sb_xml_node_remove
sb_xml_node_remove_itself

◆ sb_project_get_info()

sb_t_err sb_project_get_info ( SB_HANDLE  handle,
sb_t_project_info project_info 
)

Gets the project information from the handle.

Parameters
[in]handleThe project handle
[out]project_infoProject information
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_solution_get_info

◆ sb_project_get_name()

sb_t_err sb_project_get_name ( SB_HANDLE  handle,
char **const  name 
)

Gets the name from the project handle.

Parameters
[in]handleProject handle.
[out]namePointer to the name.
On successful return, this parameter will be filled with the pointer to the name.
The pointer should be freed with sb_free.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_set_name

◆ sb_project_get_notes()

sb_t_err sb_project_get_notes ( SB_HANDLE  handle,
char **const  note 
)

Gets the note from the project handle.

Parameters
[in]handleProject handle.
[out]notePointer to the note.
On successful return, this parameter will be filled with the pointer to the note.
The pointer should be freed with sb_free.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_set_notes

◆ sb_project_get_par()

sb_t_err sb_project_get_par ( SB_HANDLE  handle,
sb_t_par *const  par 
)

Retrieves the project parameters structure.

Parameters
[in]handleProject handle.
[out]parPointer to the parameters structure.
On successful return, this parameter will be filled with project parameters structure.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_set_par
sb_project_create
sb_project_load

◆ sb_project_get_par_changes_info()

sb_t_err sb_project_get_par_changes_info ( SB_HANDLE  handle,
const sb_t_par *const  par,
sb_t_par_changes_info **const  par_changes_info 
)

Returns the information on what sb_project_set_par and sb_image_info_apply_par_changes do when they apply the new parameters.

Parameters
[in]handleProject handle.
[in]parPointer to the new project parameters structure.
[out]par_changes_infoPointer to the structure of information on parameter changes. The structure must be deallocated with sb_project_destroy_par_changes_info .
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_destroy_par_changes_info
sb_project_set_par

◆ sb_project_get_res()

sb_t_err sb_project_get_res ( SB_HANDLE  handle,
sb_t_res **const  res,
int  details 
)

Retrieves the results of the last elaborated image.

For more information see sb_t_res .

Parameters
[in]handleModule handle.
[out]resPointer to the results structure.
On successful return, this parameter will be filled with the pointer to sb_t_res structure.
The structure should be freed using the function sb_res_destroy.
[in]detailsIf 1 the function also exports some additional details.
For Retina project the details are the weight images of each sample, that is the sb_t_sample::weights_image image.
For Surface or Deep Surface project the details are the fields sb_t_res_model::surface in the models array sb_t_res::models.
For Deep Cortex project the details are currently not available.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_detection
sb_res_destroy
sb_t_res
sb_t_par

◆ sb_project_get_sensitivity()

sb_t_err sb_project_get_sensitivity ( SB_HANDLE  handle,
const char *const  model_name,
float  scale,
float *const  sensitivity 
)

Gets the classification threshold from the project handle.

Parameters
[in]handleThe project handle
[in]model_nameModel name.
[in]scaleScale value. Used only by Surface projects.
[out]sensitivityThe variable is filled with the classification sensitivity.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_set_sensitivity

◆ sb_project_get_stat()

sb_t_err sb_project_get_stat ( SB_HANDLE  handle,
sb_t_stat **const  stat 
)

Gets the statistics from the handle.

Parameters
[in]handleModule handle.
[out]statPointer to the statistics structure.
On successful return, this parameter will be filled with the pointer to a sb_t_stat structure.
The structure should be freed using the function sb_stat_destroy.
The field par in the structure sb_t_stat is valorized with the parameters saved when the sb_project_detection function was last called.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_detection
sb_stat_destroy

◆ sb_project_get_svl_version()

sb_t_err sb_project_get_svl_version ( SB_HANDLE  handle,
sb_t_version *const  version,
char *const  version_str,
int  size_version_str 
)

Returns the version of the SB library when the last SVL was made.

Parameters
[in]handleProject handle.
[out]versionPointer of the version structure.
[out]version_strPointer to the string, is filled with the SVL version for example "1.8.0.0". This parameter can be left to NULL if not necessary.
[in]size_version_strSize of the version_str string.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_solution_get_version

◆ sb_project_invalidate()

sb_t_err sb_project_invalidate ( SB_HANDLE  handle,
const char *const  model_name,
float  scale 
)

Eliminates the training of the models.

After calling this function it is necessary to do an SVL before to call again the functions sb_project_detection.

Parameters
[in]handleProject Handle.
[in]model_nameName of the model to be invalidated. If NULL all models will be invalidated.
[in]scaleLevel / Scale to be invalidated. If 0 all levels will be invalidated. Used only by Surface projects.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_check_trained

◆ sb_project_load()

sb_t_err sb_project_load ( SB_HANDLE phandle,
const char *const  solution_file,
const char *const  project_uuid,
sb_t_project_mode  mode 
)

Loads an existing project from file.

The project resides in a solution together with other projects for which it is necessary to specify the UUID of the project that uniquely identifies it.

Parameters
[out]phandlePointer to the project handle
[in]solution_fileFilename of the project to load
[in]project_uuiduuid of the project. To get the project uuid use the function sb_solution_get_info .
[in]modeLoading mode of a project from a solution.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_save
sb_project_create
sb_project_destroy
sb_solution_get_info
sb_project_clone

◆ sb_project_reset_stat()

sb_t_err sb_project_reset_stat ( SB_HANDLE  handle)

Resets the internal statistics of the elaborations.

Parameters
[in]handleModule handle.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_detection

◆ sb_project_save()

sb_t_err sb_project_save ( SB_HANDLE  handle,
const char *const  solution_file,
sb_t_project_mode  mode 
)

Saves the project to file.

The project is saved in a solution along with other projects.

Parameters
[in]handleThe project handle
[in]solution_fileFilename of the solution where to save the project. If NULL the function uses the parameter solution_file of the function sb_project_load used to create the project.
[in]modeSaving mode of a project into a solution.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_create
sb_project_load
sb_project_destroy

◆ sb_project_set_name()

sb_t_err sb_project_set_name ( SB_HANDLE  handle,
const char *const  name 
)

Sets the name into the project handle.

Parameters
[in,out]handleProject handle.
[in]nameName to be written. The string must be compliant to UTF-8 format.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_name

◆ sb_project_set_notes()

sb_t_err sb_project_set_notes ( SB_HANDLE  handle,
const char *const  note 
)

Sets the note into the project handle.

Parameters
[in,out]handleProject handle.
[in]noteNote to be written. The string must be compliant to UTF-8 format.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_notes

◆ sb_project_set_par()

sb_t_err sb_project_set_par ( SB_HANDLE  handle,
const sb_t_par *const  par 
)

Sets the parameters structure into the project handle.

The function can invalidate the training if some critical parameter is changed.
In the following the list for each project type:

You can call the function sb_project_get_par_changes_info to know which models will be invalidated in a subsequent call of the function sb_project_set_par.
The following table describe all the possible situations in which a model (Retina and Surface) or a level (Surface) or the SVL (Deep Cortex and Deep Surface) will be invalidated or not.

Project type Changes in parameters sb_t_par Model is invalidated Level is invalidated SVL invalidated
Retina The size of the model is changed yes
One of the models it collaborates with is invalidated due to changes in size yes
One of the models it collaborates with is deleted yes
The model's collaborations have been changed yes
The model is deleted yes
The order in the model array has been changed no
One of the models it collaborates with is disabled no
The model is disabled no
Surface One of the models it collaborates with is deleted yes
The model's collaborations have been changed yes
The model is deleted yes
The order in the model array has been changed no
One of the models it collaborates with is disabled no
The model is disabled no
The automatic choice of levels is enabled yes
The level is deleted yes
The level is disabled no
Deep Cortex The network is changed yes
The order in the model array has been changed yes
A model is added yes
A model is deleted yes
The model's collaborations have been changed no
A model is disabled no
Deep Surface The network is changed yes
The tile factor is changed yes
The order in the model array has been changed yes
A model is added yes
A model is deleted yes
The model's collaborations have been changed no
A model is disabled no
Parameters
[in,out]handleProject handle.
[in]parPointer to the parameters structure.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
Solution and projects management
sb_project_get_par
sb_project_create
sb_project_load
sb_project_get_par_changes_info

◆ sb_project_set_sensitivity()

sb_t_err sb_project_set_sensitivity ( SB_HANDLE  handle,
const char *const  model_name,
float  scale,
float  sensitivity 
)

Sets the sensitivity of the detection in the project handle.

The sensitivity affects only the results of the detection and does not affect training in any way.

Parameters
[in]handleThe project handle.
[in]model_nameName of the model to be set. If NULL all models will be set.
[in]scaleLevel / Scale value. If 0 all levels will be set. Used only by Surface projects.
[in]sensitivityNew value of sensitivity to be set.
The range of acceptable values is between -1 and 1 excluded.
If the value is greater than 1 or less than -1, it is rounded to 1 and -1 respectively.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_sensitivity

◆ sb_project_type_format()

const char * sb_project_type_format ( sb_t_project_type  type)

Returns the string of the project type.

Interprets the contents of the code and converts it to a C-string containing a human-readable version of the corresponding value.

Warning
The string must not be freed.
Parameters
[in]typeProject type.
Returns
A C-string containing the project type in a human-readable format.