SB SDK 1.11
sb.h
Go to the documentation of this file.
1//Created on : 22 Jan 2016
2//This software is based on pugixml library (http://pugixml.org). pugixml is Copyright (C) 2006-2015 Arseny Kapoulkine.
3
4//Il define rende non modificabili dall'utente questi parametri.
5//Se si modificano i seguenti parametri la funzione sb_project_set_par da errore.
6//sb_t_par.svl.dl.perturbations.inpainter_path
7//sb_t_par.svl.dl.perturbations.mode
8//sb_t_par.svl.dl.perturbations.type
9//sb_t_par.svl.dl.perturbations.delta_scale
10//sb_t_par.svl.dl.pre_trained
11//sb_t_par.svl.dl.learning_rate
12//sb_t_par.svl.dl.network.n_channels
13//sb_t_par.svl.dl.network.input_size
14//sb_t_par.svl.dl.network.image_format
15//#define SB_ENABLE_DL_RESERVED_PAR
16
17#ifdef SB_ENABLE_DL_RESERVED_PAR
18// SB_ENABLE_TENSORFLOW abilita il valore SB_PROJECT_MODE_NO_DETECTION nell enum sb_t_project_mode
19// Serve solo alla GUI con tensorflow per essere piu' veloci nella clonazione del progetto quando si entra e si esce dai setting
20// commenti al parametro SB_PROJECT_MODE_NO_DETECTION nelle funzioni che lo utilizzano
21// sb_project_load
22//- @ref SB_PROJECT_MODE_NO_DETECTION if it is not necessary to do the @ref sb_project_detection "detection" but only other operations such as
23// @ref sb_project_clone "cloning", @ref sb_project_get_par "reading parameters" etc.
24// With @ref SB_PROJECT_TYPE_DEEP_CORTEX "Deep Cortex" and @ref SB_PROJECT_TYPE_DEEP_SURFACE "Deep Surface" projects,
25// this mode avoids loading the weights into the network as it can be very slow.
26// sb_project_save
27// -@ref SB_PROJECT_MODE_NO_DETECTION if it is not necessary to do the detection but only other operations such as cloning, reading parameters etc.This avoids loading the architecture as it can be very slow..
28// sb_project_clone
29// -@ref SB_PROJECT_MODE_NO_DETECTION if it is not necessary to do the detection but only other operations such as cloning, reading parameters etc.
30// This avoids loading the architecture as it can be very slow.
31#define SB_ENABLE_TENSORFLOW
32#endif
33
4855#ifndef INCLUDE_SB_H_
4856#define INCLUDE_SB_H_
4857
4858#include <time.h>
4859#include <stdio.h>
4860
4861#ifdef __cplusplus
4862# define SB_EXTERN_C extern "C"
4863#else
4864# define SB_EXTERN_C extern
4865#endif
4866
4867#if defined _MSC_VER
4868# define SB_CDECL __cdecl
4869#else
4870# define SB_CDECL
4871#endif
4872
4873#ifndef SB_DL_DLL //sb_lib
4874# ifdef _MSC_VER
4875# ifdef SB_API_EXPORTS
4876# define SB_EXPORTS __declspec(dllexport)
4877# define SB_DL_EXPORTS __declspec(dllimport)
4878# else
4879# define SB_EXPORTS __declspec(dllimport)
4880# endif
4881# else
4882# ifdef SB_API_EXPORTS
4883# define SB_EXPORTS __attribute__ ((visibility ("default")))
4884# define SB_DL_EXPORTS __attribute__ ((visibility ("default")))
4885# else
4886# define SB_EXPORTS
4887# endif
4888# endif
4889# define SB_PUBLIC(return_type) SB_EXTERN_C SB_EXPORTS return_type SB_CDECL
4890# define SB_DL_PUBLIC(return_type) SB_EXTERN_C SB_DL_EXPORTS return_type SB_CDECL
4891#else //sb_dl_lib
4892# ifdef _MSC_VER
4893# ifdef SB_DL_API_EXPORTS
4894# define SB_DL_EXPORTS __declspec(dllexport)
4895# else
4896# define SB_DL_EXPORTS __declspec(dllimport)
4897# endif
4898# else
4899# ifdef SB_DL_API_EXPORTS
4900# define SB_DL_EXPORTS __attribute__ ((visibility ("default")))
4901# else
4902# define SB_DL_EXPORTS
4903# endif
4904# endif
4905# define SB_PUBLIC(return_type) SB_EXTERN_C return_type SB_CDECL
4906# define SB_DL_PUBLIC(return_type) SB_EXTERN_C SB_DL_EXPORTS return_type SB_CDECL
4907#endif //SB_DL_DLL
4908
4909#if defined __cplusplus
4910# define SB_INLINE inline
4911#else
4912# define SB_INLINE static __inline
4913#endif
4914
4948#define NEW_VERSION_SVL_LEVELS_AUTO // Gestione automatica calcolo livelli
4949
4954typedef enum
4955{
4959 SB_ERR_CLS = 30000,
5036 SB_ERR_MALLOC = 140000,
5057 SB_ERR_ROI = 230000,
5073 SB_ERR_SOCKET = 250000,
5089 //N.B. Fino a 251999 i codici di errore sono riservati ai socket SB_ERR_SOCKET_xxxxx
5090 // Se si cambia modificare anche la funzione sb_err_socket
5101 SB_ERR_THREAD = 280000,
5102 SB_ERR_UUID = 290000,
5107 SB_ERR_XML = 330000,
5109}sb_t_err;
5110
5117typedef void(*sb_fp_trace_callback)(const char * const msg);
5118
5149SB_PUBLIC(sb_t_err) sb_trace(int trace_enable, int date_time_enable, int line_enable, int trace_win_enable, const char* const filename, sb_fp_trace_callback trace_callback);
5150
5156SB_PUBLIC(const char*) sb_err_format(sb_t_err code); // group_error
5158
5167typedef struct
5168{
5169 int x;
5170 int y;
5171}sb_t_point;
5172
5176typedef struct
5177{
5178 int width;
5180}sb_t_size;
5181
5185typedef struct
5186{
5187 float width;
5188 float height;
5190
5194typedef struct
5195{
5196 int min;
5197 int max;
5198}sb_t_range;
5199
5203typedef struct
5204{
5205 float min;
5206 float max;
5208
5212typedef struct
5213{
5214 int x;
5215 int y;
5216 int width;
5218}sb_t_rect;
5219
5226SB_INLINE sb_t_point sb_point(int x, int y)
5227{
5228 sb_t_point p;
5229 p.x = x;
5230 p.y = y;
5231 return(p);
5232}
5233
5240SB_INLINE sb_t_size sb_size(int width, int height)
5241{
5242 sb_t_size sz;
5243 sz.width = width;
5244 sz.height = height;
5245 return(sz);
5246}
5247
5254SB_INLINE sb_t_size_flt sb_size_flt(float width, float height)
5255{
5256 sb_t_size_flt sz;
5257 sz.width = width;
5258 sz.height = height;
5259 return(sz);
5260}
5261
5268SB_INLINE sb_t_range sb_range(int min, int max)
5269{
5270 sb_t_range r;
5271 r.min = min;
5272 r.max = max;
5273 return(r);
5274}
5275
5282SB_INLINE sb_t_range_flt sb_range_flt(float min, float max)
5283{
5285 r.min = min;
5286 r.max = max;
5287 return(r);
5288}
5289
5298SB_INLINE sb_t_rect sb_rect(int x, int y, int width, int height)
5299{
5300 sb_t_rect r;
5301
5302 r.x = x;
5303 r.y = y;
5304 r.width = width;
5305 r.height = height;
5306
5307 return r;
5308}
5309 // group_geometric
5311
5321#define SB_INIT_ONLY_HW_LICENSE_KEY "ONLY_HW_KEY"
5322
5327#define SB_INIT_ONLY_SB_LICENSE_KEY "ONLY_SB_KEY"
5328
5333#define SB_INIT_NO_LICENSE_KEY "NO_KEY"
5334
5340#define SB_DELIMITER ";"
5341
5369SB_PUBLIC(sb_t_err) sb_init(const char* const license_file);
5370
5394SB_PUBLIC(sb_t_err) sb_init_dl(const char* const search_path);
5395
5406SB_PUBLIC(sb_t_err) sb_release(void);
5407
5411typedef void * SB_HANDLE;
5412
5417typedef struct
5418{
5419 int major;
5420 int minor;
5424
5433SB_INLINE sb_t_version sb_version(int major, int minor, int vminor, int build_major)
5434{
5435 sb_t_version version;
5436 version.major = major;
5437 version.minor = minor;
5438 version.vminor = vminor;
5439 version.build_major = build_major;
5440 return(version);
5441}
5442
5455SB_PUBLIC(int) sb_version_check(sb_t_version version1, sb_t_version version2);
5456
5460typedef struct
5461{
5462 signed long long proc_virtual_used;
5463 signed long long proc_virtual_used_max;
5464 signed long long proc_virtual_max;
5465 signed long long proc_physical_used;
5466 signed long long proc_physical_used_max;
5467 signed long long system_total;
5468 signed long long system_used;
5469 signed long long system_free;
5471
5475typedef enum
5476{
5479 //SB_DEVICE_TPU,
5481
5486typedef struct
5487{
5492
5496 char name[128];
5497
5504 char compute_capability[8];
5505
5513 int id;
5514
5519
5526
5527
5531typedef struct
5532{
5538
5542 int size;
5544
5548typedef struct
5549{
5551 char version_str[16];
5552 char compile_date[32];
5553 char compile_time[32];
5554 signed long long malloc_size;
5555 signed long long malloc_size_max;
5558}sb_t_info;
5559
5563typedef struct
5564{
5565 unsigned char b;
5566 unsigned char g;
5567 unsigned char r;
5572 unsigned char a;
5573}sb_t_bgra;
5574
5583SB_INLINE sb_t_bgra sb_bgra(unsigned char b, unsigned char g, unsigned char r, unsigned char a)
5584{
5585 sb_t_bgra bgra;
5586 bgra.b = b;
5587 bgra.g = g;
5588 bgra.r = r;
5589 bgra.a = a;
5590 return(bgra);
5591}
5592
5596typedef struct
5597{
5598 unsigned char r;
5599 unsigned char g;
5600 unsigned char b;
5605 unsigned char a;
5606}sb_t_rgba;
5607
5616SB_INLINE sb_t_rgba sb_rgba(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
5617{
5618 sb_t_rgba rgba;
5619 rgba.r = r;
5620 rgba.g = g;
5621 rgba.b = b;
5622 rgba.a = a;
5623 return(rgba);
5624}
5625
5630#define SB_VALUE_NOT_SET 1000000.0f
5631#define SB_PAR_MODELS_NUM 64
5632#define SB_PAR_PERTURBATIONS_NUM 16
5633#define SB_PAR_STRING_LEN 64
5634#define SB_PAR_LEVELS_NUM 32
5635#define SB_PAR_LEVEL_SCALE_GRANULARITY 0.50f
5636#define SB_PAR_LEVEL_SCALE_MIN 1.0f
5637#define SB_PAR_LEVEL_SCALE_MAX 16.0f
5638#define SB_PAR_RETINA_OBJ_SIZE_MIN 24
5639#define SB_PAR_RETINA_OBJ_SIZE_MAX 1024
5640#define SB_PAR_RETINA_OBJ_STRIDE_COARSE_MIN 4
5641#define SB_PAR_RETINA_OBJ_STRIDE_COARSE_MAX 32
5642#define SB_PAR_RETINA_OBJ_STRIDE_FINE_MIN 1
5643#define SB_PAR_RETINA_OBJ_STRIDE_FINE_MAX 8
5644#define SB_PAR_RETINA_OBJ_DISTANCE_MIN 4
5645#define SB_PAR_RETINA_NUM_OCCURRENCES_MIN -1
5646
5647#define SB_SAMPLE_SCALE_GRANULARITY 0.25f
5648#define SB_SAMPLE_SCALE_MIN 1.0f
5649#define SB_SAMPLE_SCALE_MAX 32.0f
5650
5651#define SB_SVL_DL_BATCH_SIZE_MIN 4
5652#define SB_SVL_DL_BATCH_SIZE_MAX 512
5653
5654#define SB_SVL_DL_VALIDATION_PERCENTAGE_MIN 0.0f
5655#define SB_SVL_DL_VALIDATION_PERCENTAGE_MAX 0.5f
5656
5657#define SB_SVL_DL_LEARNING_RATE_MIN 0.000001f
5658#define SB_SVL_DL_LEARNING_RATE_MAX 0.01f
5659#define SB_SVL_DL_LEARNING_RATE_DEFAULT 0.001f
5660
5661#define SB_SVL_DL_TILE_FACTOR_MIN 1
5662#define SB_SVL_DL_TILE_FACTOR_MAX 8
5663
5664#define SB_SVL_DL_PERTURBATION_SHIFT_MIN 0.0f
5665#define SB_SVL_DL_PERTURBATION_SHIFT_MAX 0.5f
5666
5667#define SB_SVL_DL_PERTURBATION_STRETCH_CONTRAST_MIN 0.0f
5668#define SB_SVL_DL_PERTURBATION_STRETCH_CONTRAST_MAX 0.5f
5669
5670#define SB_SVL_DL_PERTURBATION_DELTA_BRIGHTNESS_MIN 0.0f
5671#define SB_SVL_DL_PERTURBATION_DELTA_BRIGHTNESS_MAX 0.5f
5672
5679#define SB_SURFACE_OPTIONAL_GRAY_LEVEL 128
5680
5690SB_PUBLIC(sb_t_err) sb_get_info(sb_t_info** const info, int gpu_info);
5691
5698SB_PUBLIC(sb_t_err) sb_destroy_info(sb_t_info** const info);
5699
5708SB_PUBLIC(sb_t_err) sb_format_info(const sb_t_info* const info, char* const str, int str_size);
5709
5718SB_PUBLIC(sb_t_err) sb_get_uuid(char* const str, size_t size);
5719
5729SB_PUBLIC(sb_t_err) sb_get_file_version(sb_t_version* const ver, const char* const file);
5730
5737typedef enum
5738{
5742
5747typedef enum
5748{
5752 // group_generic
5754
5770SB_PUBLIC(SB_HANDLE) sb_xml_node_get(SB_HANDLE parent, const char* const name);
5771
5780
5790
5800
5812SB_PUBLIC(SB_HANDLE) sb_xml_node_add(SB_HANDLE parent, const char* const name, const char* const content);
5813
5824SB_PUBLIC(sb_t_err) sb_xml_node_set(SB_HANDLE parent, const char* const name, const char* const content);
5825
5834SB_PUBLIC(sb_t_err) sb_xml_node_get_name(SB_HANDLE node, char* const str, size_t str_size);
5835
5844SB_PUBLIC(sb_t_err) sb_xml_node_set_attribute(SB_HANDLE node, const char* const attribute_name, const char* const content);
5845
5855SB_PUBLIC(sb_t_err) sb_xml_node_get_attribute(SB_HANDLE node, const char* const attribute_name, char* const str, size_t str_size);
5856
5864SB_PUBLIC(sb_t_err) sb_xml_node_set_itself(SB_HANDLE node, const char* const content);
5865
5874SB_PUBLIC(sb_t_err) sb_xml_node_count(SB_HANDLE parent, const char* const name, int* const cnt);
5875
5885SB_PUBLIC(sb_t_err) sb_xml_node_get_string(SB_HANDLE parent, const char* const name, char* const str, size_t str_size);
5886
5898SB_PUBLIC(sb_t_err) sb_xml_node_get_string_malloc(SB_HANDLE parent, const char* const name, char** const str);
5899
5907SB_PUBLIC(sb_t_err) sb_xml_node_remove(SB_HANDLE parent, const char* const name);
5908
5915SB_PUBLIC(sb_t_err) sb_xml_node_remove_itself(SB_HANDLE node); // group_xml
5917
5926typedef struct
5927{
5928 char name[256];
5929 char *fname;
5930}sb_t_file;
5931
5935typedef struct
5936{
5938 int n;
5941
5954SB_PUBLIC(sb_t_err) sb_folder_load(sb_t_folder** const f, const char* const path, const char* const ext, int sort, int verbosity);
5955
5961
5968SB_PUBLIC(sb_t_err) sb_folder_erase(sb_t_folder *folder, int index);
5969
5975SB_PUBLIC(sb_t_err) sb_folder_create(const char* const path);
5976
5982SB_PUBLIC(sb_t_err) sb_folder_remove(const char* const path);
5983
5990SB_PUBLIC(sb_t_err) sb_folder_exist(const char* const path, int* const exist);
5991
6000SB_PUBLIC(sb_t_err) sb_file_extract_name(const char* const full, int with_ext, char* const name, int name_size);
6001
6009SB_PUBLIC(sb_t_err) sb_file_extract_folder(const char* const full, char* const folderpath, int folderpath_size);
6010 // group_folder
6012
6032SB_PUBLIC(void) sb_free(void* ptr);
6033
6051SB_PUBLIC(void*) sb_malloc(size_t size);
6052
6071SB_PUBLIC(void*) sb_calloc(size_t count, size_t size);
6072
6089SB_PUBLIC(void*) sb_realloc(void* ptr, size_t size);
6090
6097typedef enum
6098{
6102
6113
6123 // group_memory
6125
6136typedef enum
6137{
6143
6148typedef enum
6149{
6156
6161typedef enum
6162{
6172
6177typedef enum
6178{
6190
6197typedef struct
6198{
6206
6213
6222
6230
6235typedef struct
6236{
6241
6246
6252
6257
6262 signed long long time_start;
6263
6268 signed long long time_end;
6269
6273 signed long long remain;
6274
6280
6286
6291 char sn[32];
6293
6294#define SB_LICENSE_VENDOR_CODE_SIZE 32
6295
6299typedef struct
6300{
6301 char address[256];
6302 char company[128];
6303 char company_role[128];
6304 char mail[128];
6305 char name[128];
6306 char operating_system[128];
6307 char phone[32];
6308 char surname[128];
6309 char sector_of_interest[1024];
6310 char vat[32];
6311 char vendor_code[SB_LICENSE_VENDOR_CODE_SIZE + 4];
6312 char machine_id[36];
6321 signed long long time_create;
6326 signed long long time_modify;
6331 signed long long time_save;
6333
6344SB_PUBLIC(sb_t_err) sb_license_get_hw_info(char** const str);
6345
6361SB_PUBLIC(sb_t_err) sb_license_check(SB_HANDLE module, char** const msg);
6362
6381SB_PUBLIC(sb_t_err) sb_license_configuration_check(SB_HANDLE module, sb_t_license_configuration_id configuration_id, char** const msg);
6382
6409
6418SB_PUBLIC(sb_t_err) sb_license_format_info(const sb_t_license* const info, char* const str, int str_size);
6419
6428
6437
6445SB_PUBLIC(const char*) sb_license_format_type(sb_t_license_type type);
6446
6455
6470SB_PUBLIC(sb_t_err) sb_license_apply_v2c(const char* const v2c, char** const msg_err, int verbosity);
6471 // group_license
6473
6484#define SB_LUT_POINT_NOT_EXIST 0xFFFF
6485
6490typedef struct
6491{
6492 unsigned short x;
6493 unsigned short y;
6495
6507SB_PUBLIC(sb_t_err) sb_lut_create(SB_HANDLE* phandle, int width, int height);
6508
6516SB_PUBLIC(sb_t_err) sb_lut_destroy(SB_HANDLE* phandle);
6517
6530SB_PUBLIC(sb_t_err) sb_lut_get_ptr(SB_HANDLE phandle, sb_t_lut_point** const ptr);
6531
6540SB_PUBLIC(sb_t_err) sb_lut_get_size(SB_HANDLE phandle, int* const width, int* const height);
6541
6550SB_PUBLIC(sb_t_err) sb_lut_save(SB_HANDLE phandle, const char* const file_path);
6551
6563SB_PUBLIC(sb_t_err) sb_lut_load(SB_HANDLE* phandle, const char* const file_path);
6564
6579SB_PUBLIC(sb_t_err) sb_lut_warp_point(SB_HANDLE phandle, const sb_t_point* const src, sb_t_point* const dst);
6580 // group_lut
6582
6592#define SB_IMAGE_FILE_EXTENSIONS "pgm" SB_DELIMITER \
6593 "ppm" SB_DELIMITER \
6594 "bmp" SB_DELIMITER \
6595 "png" SB_DELIMITER \
6596 "tif" SB_DELIMITER \
6597 "tiff" SB_DELIMITER \
6598 "jpeg" SB_DELIMITER \
6599 "jpg"
6600
6605typedef enum
6606{
6612
6620SB_PUBLIC(const char*) sb_image_format(sb_t_image_format format);
6621
6626typedef enum
6627{
6633
6637typedef struct
6638{
6639 unsigned int value;
6640 int x;
6641 int y;
6645
6649typedef struct
6650{
6652 int size;
6653}sb_t_rle;
6654
6658typedef struct
6659{
6660 unsigned char* data;
6661 unsigned char* free_data;
6663 int width;
6666 int size;
6678
6681
6682#ifdef SB_PUBLIC_INTERNAL_ENABLE
6683#ifdef SB_USE_OPENCV
6684 IplImage *cvi;
6685#else
6686 void* cvi;
6687#endif
6688#endif
6689}sb_t_image;
6690
6702SB_PUBLIC(sb_t_err) sb_image_create(sb_t_image** const pimg, int width, int height, sb_t_image_format format);
6703
6719SB_PUBLIC(sb_t_err) sb_image_create_header(sb_t_image** const pimg, int width, int height, int width_step, sb_t_image_format format);
6720
6730SB_PUBLIC(sb_t_err) sb_image_destroy(sb_t_image** const pimg);
6731
6738typedef enum
6739{
6742
6767SB_PUBLIC(sb_t_err) sb_image_compress(sb_t_image** const dst, sb_t_image* const src, sb_t_image_compress_type compression, const void* const params);
6768
6778SB_PUBLIC(sb_t_err) sb_image_decompress(sb_t_image** const dst, sb_t_image* const src);
6779
6790SB_PUBLIC(sb_t_err) sb_image_set_clip_blend(sb_t_image * const img, int x, int y, const sb_t_rgba * const color);
6791
6802SB_PUBLIC(sb_t_err) sb_image_get_pixel(sb_t_image * const img, int x, int y, sb_t_rgba * const color);
6803
6813SB_PUBLIC(sb_t_err) sb_image_set_data(sb_t_image* const img, unsigned char* const data);
6814
6823SB_PUBLIC(sb_t_err) sb_image_clone(sb_t_image** const dst, const sb_t_image* const src);
6824
6832SB_PUBLIC(sb_t_err) sb_image_copy(const sb_t_image* const src, sb_t_image* const dst);
6833
6846SB_PUBLIC(sb_t_err) sb_image_copy_rect(const sb_t_image* const src, sb_t_rect rect, sb_t_image** const dst);
6847
6853SB_PUBLIC(sb_t_err) sb_image_clean(sb_t_image* const img);
6854
6888SB_PUBLIC(sb_t_err) sb_image_save(const sb_t_image* const img, const char* const file, const int* const params);
6889
6905SB_PUBLIC(sb_t_err) sb_image_load(sb_t_image** const img, const char* const file);
6906
6922SB_PUBLIC(sb_t_err) sb_image_convert(sb_t_image** const dst, sb_t_image* const src, sb_t_image_format format);
6923
6928typedef enum
6929{
6934
6946SB_PUBLIC(sb_t_err) sb_image_flip(const sb_t_image* const src, sb_t_image* const dst, sb_t_image_flip_mode mode);
6947
6960SB_PUBLIC(sb_t_err) sb_image_shift(const sb_t_image* const src, sb_t_image* const dst, int x_shift, int y_shift);
6961
6978SB_PUBLIC(sb_t_err) sb_image_rotate(const sb_t_image* const src, sb_t_point centre, double angle, sb_t_interpolation_mode interpolation_mode, sb_t_image* const dst);
6979
6998SB_PUBLIC(sb_t_err) sb_image_resize(const sb_t_image* const src, sb_t_rect rect, float scale, sb_t_interpolation_mode interpolation_mode, sb_t_image* const dst);
6999
7014SB_PUBLIC(sb_t_err) sb_image_get_sample(const sb_t_image* const src, sb_t_point centre, double angle_rad, float scale, sb_t_image* const dst);
7015
7024SB_PUBLIC(sb_t_err) sb_image_change_brightness(const sb_t_image* const src, sb_t_image* const dst, float delta_brightness);
7025
7035SB_PUBLIC(sb_t_err) sb_image_change_contrast(const sb_t_image* const src, sb_t_image* const dst, float delta_contrast); // group_image
7037
7048typedef struct
7049{
7052 unsigned char lut[256];
7054}sb_t_roi;
7055
7067SB_PUBLIC(sb_t_err) sb_roi_create(sb_t_roi** const roi, int width, int height);
7068
7083SB_PUBLIC(sb_t_err) sb_roi_create_header(sb_t_roi** const roi, int width, int height, int width_step);
7084
7093SB_PUBLIC(sb_t_err) sb_roi_destroy(sb_t_roi** const roi);
7094
7105SB_PUBLIC(sb_t_err) sb_roi_reset(sb_t_roi* const roi);
7106
7118
7126SB_PUBLIC(sb_t_err) sb_roi_set_data(sb_t_roi* const roi, unsigned char* const data);
7127
7145SB_PUBLIC(sb_t_err) sb_roi_set_rect(sb_t_roi* const roi, unsigned char gl, sb_t_rect rect, int reset_roi);
7146
7166SB_PUBLIC(sb_t_err) sb_roi_set_circle(sb_t_roi* const roi, unsigned char gl, int center_x, int center_y, int radius, int reset_roi);
7167
7168
7191SB_PUBLIC(sb_t_err) sb_roi_set_circular_crown(sb_t_roi* const roi, unsigned char gl, int center_x, int center_y, int radius_min, int radius_max, int start_angle, int end_angle, int reset_roi);
7192
7213SB_PUBLIC(sb_t_err) sb_roi_set_ellipse(sb_t_roi* const roi, unsigned char gl, int center_x, int center_y, int radius_x, int radius_y, int reset_roi);
7214
7223SB_PUBLIC(sb_t_err) sb_roi_clone(sb_t_roi** const dst, const sb_t_roi* const src);
7224
7234SB_PUBLIC(sb_t_err) sb_roi_compress(sb_t_roi* const roi);
7235
7244SB_PUBLIC(sb_t_err) sb_roi_decompress(sb_t_roi* const roi);
7245
7255SB_PUBLIC(sb_t_err) sb_roi_plot(sb_t_image* const image, const sb_t_roi* const roi, const unsigned char* lut, sb_t_rgba color);
7256
7277SB_PUBLIC(sb_t_err) sb_roi_apply_lut(sb_t_roi* const roi, unsigned char *lut);
7278 // group_roi
7280
7290typedef enum
7291{
7295
7302typedef enum
7303{
7308
7314
7326
7332
7338
7344
7350
7357
7363
7369typedef enum
7370{
7371
7376
7385
7421typedef struct
7422{
7424 float max;
7425 float min;
7427
7437typedef struct
7438{
7439 char uuid[36];
7440 char image_name[SB_PAR_STRING_LEN];
7441
7447
7469
7481 sb_t_point vertex[4];
7482
7506 sb_t_point vertex_warp[4];
7507
7511 char model_name[SB_PAR_STRING_LEN];
7512
7524 float scale;
7525
7530
7543 float weight;
7544
7559
7566
7605
7615
7647 float IoU;
7648
7653} sb_t_sample;
7654
7662SB_PUBLIC(const char*) sb_format_truth(sb_t_truth truth);
7663
7671SB_PUBLIC(sb_t_err) sb_sample_clone(const sb_t_sample* const src, sb_t_sample* const dst);
7672
7679SB_PUBLIC(sb_t_err) sb_sample_destroy(sb_t_sample* const sample);
7680
7690SB_PUBLIC(sb_t_err) sb_sample_weights_image_overlay(sb_t_image* const image, const sb_t_sample* const s);
7691
7696typedef struct
7697{
7699 int size;
7701
7712SB_PUBLIC(sb_t_err) sb_samples_create(sb_t_samples** const samples);
7713
7722SB_PUBLIC(sb_t_err) sb_samples_destroy(sb_t_samples** const samples);
7723
7737SB_PUBLIC(sb_t_err) sb_samples_clone(sb_t_samples** const dst, const sb_t_samples* const src);
7738
7753SB_PUBLIC(sb_t_err) sb_samples_insert(sb_t_samples* const samples, const sb_t_sample* const sample, int sample_index);
7754
7767SB_PUBLIC(sb_t_err) sb_samples_remove(sb_t_samples* const samples, int sample_index);
7768
7779SB_PUBLIC(sb_t_err) sb_sample_get_vertex(sb_t_point centre, float scale, sb_t_size obj_size, sb_t_point* const ul, sb_t_point* const br, sb_t_size* const size);
7780
7788SB_PUBLIC(sb_t_err) sb_sample_get_model_index(const sb_t_sample* const s, SB_HANDLE handle, int* const model_index);
7789
7797SB_PUBLIC(sb_t_err) sb_sample_get_level_index(const sb_t_sample* const s, SB_HANDLE handle, int* const level_index);
7798
7809SB_PUBLIC(sb_t_err) sb_samples_distance(SB_HANDLE project, const sb_t_sample* const sample1, const sb_t_sample* const sample2, float* const distance, int* const are_near); // group_samples
7811
7812
7822typedef enum
7823{
7832
7843
7847typedef struct
7848{
7858 unsigned char lut[256];
7885
7889typedef struct
7890{
7891 long long time_rle;
7892 long long time_blob;
7893 long long time_contour;
7894 long long time_merge;
7895 long long time_sort;
7896 long long time_export;
7897 long long time_total;
7910
7915typedef enum
7916{
7922
7926typedef struct
7927{
7928 float bar_x;
7929 float bar_y;
7930 int area;
7931 int od;
7932 int lut;
7956 char model_name[SB_PAR_STRING_LEN];
7957}sb_t_blob;
7958
7962typedef struct
7963{
7964 int size;
7968}sb_t_blobs;
7969
7975SB_PUBLIC(sb_t_err) sb_blobs_create(sb_t_blobs** const blobs);
7976
7983
7993SB_PUBLIC(sb_t_err) sb_blob_format_par(const sb_t_blob_par* const par, char* const str, int str_size);
7994
8006SB_PUBLIC(sb_t_err) sb_blobs_detection(sb_t_blobs** const blobs, const sb_t_image* const image, const sb_t_roi* const roi, const sb_t_blob_par* const par);
8007
8017SB_PUBLIC(sb_t_err) sb_blob_intersect(const sb_t_blob* const blob1, const sb_t_blob* const blob2, int extract_blob_seg, sb_t_blob** const res);
8018
8028SB_PUBLIC(sb_t_err) sb_blobs_plot_roi(const sb_t_blobs* const blobs, sb_t_roi* const roi, unsigned char gl);
8029
8039SB_PUBLIC(sb_t_err) sb_blob_plot_roi(const sb_t_blob* const blob, sb_t_roi* const roi, unsigned char gl);
8040
8048SB_PUBLIC(sb_t_err) sb_blobs_clone(sb_t_blobs** const dst, const sb_t_blobs* const src);
8049
8056SB_PUBLIC(sb_t_err) sb_blobs_destroy(sb_t_blobs** const blobs);
8057
8064SB_PUBLIC(sb_t_err) sb_blob_destroy(sb_t_blob* const blob);
8065
8073SB_PUBLIC(sb_t_err) sb_blob_copy(sb_t_blob* const dst, const sb_t_blob* const src);
8074 // group_blob
8076
8094SB_PUBLIC(sb_t_err) sb_roi_set_blob(sb_t_roi* const roi, unsigned char gl, const sb_t_image* const src, const sb_t_blob_par* const par, const sb_t_point* const start_point, int fill_holes, sb_t_range hole_area, const sb_t_rect* analysis_rect);
8095 // group_roi
8097
8108typedef enum
8109{
8115
8123SB_PUBLIC(const char*) sb_project_type_format(sb_t_project_type type);
8124
8125#define SB_PROJECTS_NUM 32
8126#define SB_PROJECT_UUID_LEN 36
8127
8133typedef struct
8134{
8136 char uuid[SB_PROJECT_UUID_LEN];
8139
8144typedef struct
8145{
8147 int size;
8148}sb_t_projects_info; // group_project 1
8150
8160#define SB_SOLUTION_EXT "rprj"
8161
8165typedef struct
8166{
8171
8183SB_PUBLIC(sb_t_err) sb_solution_get_info(const char* const solution_file, sb_t_solution_info** const solution);
8184
8193
8202SB_PUBLIC(sb_t_err) sb_solution_set_current_project(const char* const solution_file, const char* const project_uuid);
8203
8214SB_PUBLIC(sb_t_err) sb_solution_remove_project(const char* const solution_file, const char* const project_uuid);
8215
8226SB_PUBLIC(sb_t_err) sb_solution_get_version(const char* const solution_file, sb_t_version* version, char* const version_str, int size_version_str);
8227 // group_solution
8229
8230
8243
8254
8259typedef enum
8260{
8263#ifdef SB_ENABLE_TENSORFLOW
8264 SB_PROJECT_MODE_NO_DETECTION
8266#endif
8268
8280SB_PUBLIC(sb_t_err) sb_project_create(SB_HANDLE* phandle, const char* const project_name, sb_t_project_type project_type);
8281
8300SB_PUBLIC(sb_t_err) sb_project_load(SB_HANDLE* phandle, const char* const solution_file, const char* const project_uuid, sb_t_project_mode mode);
8301
8318SB_PUBLIC(sb_t_err) sb_project_save(SB_HANDLE handle, const char* const solution_file, sb_t_project_mode mode);
8319
8334SB_PUBLIC(sb_t_err) sb_project_clone(SB_HANDLE src, SB_HANDLE* pdst, sb_t_project_mode mode, int regenerate_uuid);
8335
8345SB_PUBLIC(sb_t_err) sb_project_invalidate(SB_HANDLE handle, const char* const model_name, float scale);
8346
8404SB_PUBLIC(sb_t_err) sb_project_check_trained(SB_HANDLE handle, const char* const model_name, float scale, int* const is_trained);
8405
8409SB_PUBLIC(sb_t_err) sb_project_get_default_features(SB_HANDLE handle, char* str, int size);
8410
8424SB_PUBLIC(sb_t_err) sb_project_set_sensitivity(SB_HANDLE handle, const char* const model_name, float scale, float sensitivity);
8425
8435SB_PUBLIC(sb_t_err) sb_project_get_sensitivity(SB_HANDLE handle, const char* const model_name, float scale, float* const sensitivity);
8436
8446SB_PUBLIC(sb_t_err) sb_project_get_notes(SB_HANDLE handle, char** const note);
8447
8455SB_PUBLIC(sb_t_err) sb_project_set_notes(SB_HANDLE handle, const char* const note);
8456
8466SB_PUBLIC(sb_t_err) sb_project_get_name(SB_HANDLE handle, char** const name);
8467
8475SB_PUBLIC(sb_t_err) sb_project_set_name(SB_HANDLE handle, const char* const name);
8476
8501
8512SB_PUBLIC(sb_t_err) sb_project_get_svl_version(SB_HANDLE handle, sb_t_version* const version, char* const version_str, int size_version_str);
8513
8552SB_PUBLIC(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);
8553 // group_project 2
8555
8563#define SB_PAR_FEATURES_NAMES_LEN 256
8564
8565typedef struct sb_t_svl_res sb_t_svl_res;
8566
8571typedef struct
8572{
8581
8589
8594
8603typedef enum
8604{
8628
8636SB_PUBLIC(const char*) sb_svl_command_format(sb_t_svl_command command);
8637
8646typedef enum
8647{
8670
8679
8690typedef sb_t_err(*sb_fp_svl_pre_elaboration)(const SB_HANDLE image_info, void* const user_data, const char* const image_file, int image_index, sb_t_svl_pre_elaboration* const pre_elaboration);
8691
8702typedef sb_t_err(*sb_fp_svl_progress)(void* const user_data, sb_t_svl_res* res, int force);
8703
8715typedef sb_t_err(*sb_fp_svl_command)(void* const user_data, sb_t_svl_res* res, sb_t_svl_command* const command, const char* const msg);
8716
8720typedef enum
8721{
8722 SB_NETWORK_TYPE_NONE = 0,
8753
8754 //Must be the last
8755 SB_NETWORK_TYPE_END
8757
8765SB_PUBLIC(const char*) sb_network_type_format(sb_t_network_type type);
8766
8771typedef struct
8772{
8793
8801
8810
8819
8824typedef enum
8825{
8831
8837
8843
8852
8857typedef enum
8858{
8867
8873
8882
8887typedef struct
8888{
8894 char inpainter_path[512];
8895
8902
8909
8918
8927
8935
8943
8951
8960
8968
8976
8980#define SB_DL_WEIGHTS_EXT "weights"
8981
8986typedef struct
8987{
8995 char network_path[512];
8996
9002
9011
9017
9028
9034
9044
9063
9071
9093
9098typedef struct
9099{
9139
9153
9158#define SB_DEVICES_MAX_NUMBER 4
9159
9164typedef struct
9165{
9170
9180
9187typedef struct {
9193
9199
9205
9211
9215 char project_path[512];
9216
9223 char image_ext[64];
9224
9231
9240
9256
9266
9272
9279 // group_svl
9281
9291typedef struct
9292{
9298
9306
9314
9322
9330
9337typedef struct
9338{
9343
9347 int size;
9349
9355typedef struct
9356{
9368 float scale;
9370
9376typedef struct
9377{
9383
9387 int size;
9389
9394typedef struct
9395{
9401
9471
9487
9499
9505
9513
9521
9548
9563
9577
9599
9611
9623
9627typedef struct
9628{
9634
9639 int size;
9641
9645typedef struct
9646{
9671
9688
9693typedef struct
9694{
9696
9702
9735 unsigned char collaborations[SB_PAR_MODELS_NUM][SB_PAR_MODELS_NUM];
9736
9745
9751
9758
9765
9776
9784
9794
9800
9806}sb_t_par;
9807
9814SB_PUBLIC(sb_t_err) sb_par_init(sb_t_par* const par, sb_t_project_type project_type);
9815
9823SB_PUBLIC(sb_t_err) sb_par_add_model(sb_t_par* const par, const char* const model_name);
9824
9832SB_PUBLIC(sb_t_err) sb_par_remove_model(sb_t_par* const par, const char* const model_name);
9833
9843SB_PUBLIC(sb_t_err) sb_par_add_level(sb_t_par* const par, const char* const model_name, float scale);
9844
9854SB_PUBLIC(sb_t_err) sb_par_remove_level(sb_t_par* const par, const char* const model_name, float scale);
9855
9866SB_PUBLIC(sb_t_err) sb_par_set_collaboration(sb_t_par *par, const char* const model_name_1, const char* const model_name_2, int value);
9867
9878SB_PUBLIC(sb_t_err) sb_par_get_collaboration(sb_t_par *par, const char* const model_name_1, const char* const model_name_2, int* const value);
9879
9889SB_PUBLIC(sb_t_err) sb_par_format(const sb_t_par* const par, char* const str, int str_size);
9890
9899
9908
9916SB_PUBLIC(const char*) sb_device_type_format(sb_t_device_type type);
9917 // group_parameters
9919
9930typedef enum
9931{
9953
9954
9960typedef struct
9961{
9966 char* string;
9967 int words;
9968 int lines;
9970
9978typedef struct
9979{
9981
9990
10004
10023
10024
10033
10040
10063typedef struct
10064{
10071 int tp;
10072
10079 int tn;
10080
10087 int fp;
10088
10095 int fn;
10096
10103 int op;
10104
10111 int on;
10112
10120
10128
10136
10141typedef struct
10142{
10144 int size;
10146
10147//TODO TABELLA DEI PUNTATORI NEI RISULTATI
10192typedef struct
10193{
10201
10207
10214
10220
10228
10234
10241
10245 long long time_us;
10246
10251
10257}sb_t_res;
10258
10267SB_PUBLIC(sb_t_err) sb_res_destroy(sb_t_res** const res);
10268
10276SB_PUBLIC(sb_t_err) sb_res_clone(sb_t_res** const dst, const sb_t_res* const src);
10277
10284SB_PUBLIC(sb_t_err) sb_res_compress(sb_t_res* const res);
10285
10291SB_PUBLIC(sb_t_err) sb_res_decompress(sb_t_res* const res);
10292 // group_res
10294
10306typedef struct
10307{
10316 int tp;
10317
10327 int tn;
10328
10337 int fp;
10338
10347 int fn;
10348
10357 int op;
10358
10366 int on;
10367
10376
10391
10397
10402 float recall;
10403
10409
10415
10422 float score;
10424
10429typedef struct
10430{
10436
10440 int size;
10442
10451typedef struct
10452{
10461
10468
10475 int good;
10476
10483
10490
10497
10503 float recall;
10504
10511
10518
10519 long long time_us;
10521 long long time_blob_us;
10524}sb_t_stat;
10525
10535SB_PUBLIC(sb_t_err) sb_stat_format(const sb_t_stat* const stat, char* const str, int str_size);
10536
10543SB_PUBLIC(sb_t_err) sb_stat_destroy(sb_t_stat** const stat);
10544
10553SB_PUBLIC(sb_t_err) sb_stat_reset(sb_t_stat* const stat, const sb_t_par* const par);
10554
10567SB_PUBLIC(sb_t_err) sb_stat_from_res(sb_t_stat* const stat, const sb_t_res* const res);
10568 // group_stat
10570
10579typedef struct
10580{
10581 int index;
10582 int lut_level[SB_PAR_LEVELS_NUM];
10584
10591typedef struct
10592{
10597 char* models;
10608
10612
10625SB_PUBLIC(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);
10626
10635
10667SB_PUBLIC(sb_t_err) sb_project_change_type(const char* const solution_file, const char* const project_uuid, sb_t_project_type project_type);
10668
10680SB_PUBLIC(sb_t_err) sb_project_get_par(SB_HANDLE handle, sb_t_par* const par);
10681
10751SB_PUBLIC(sb_t_err) sb_project_set_par(SB_HANDLE handle, const sb_t_par* const par);
10752
10771SB_PUBLIC(sb_t_err) sb_project_get_res(SB_HANDLE handle, sb_t_res** const res, int details);
10772
10780
10793SB_PUBLIC(sb_t_err) sb_project_get_stat(SB_HANDLE handle, sb_t_stat** const stat);
10794 // group_project 3
10796
10808#define SB_IMAGE_INFO_EXT "rtn"
10809
10817typedef enum
10818{
10824
10828typedef struct
10829{
10833
10837typedef struct
10838{
10840 int size;
10842
10852SB_PUBLIC(sb_t_err) sb_image_info_get_version(const char* const image_file, sb_t_version* version, char* const version_str, int size_version_str);
10853
10862SB_PUBLIC(sb_t_err) sb_image_info_get_details(const char* const image_file, sb_t_image_info_details** details);
10863
10872
10881SB_PUBLIC(sb_t_err) sb_image_info_change_project(const char* const image_file, const sb_t_project_info* const project_info_old, SB_HANDLE module_handle_new);
10882
10892SB_PUBLIC(sb_t_err) sb_image_info_remove_project(const char* const image_file, const char* const project_uuid);
10893
10912SB_PUBLIC(sb_t_err) sb_image_info_load(SB_HANDLE* image_info, const char* const image_file, SB_HANDLE module_handle);
10913
10922
10931
10942SB_PUBLIC(sb_t_err) sb_image_info_clone(SB_HANDLE src, SB_HANDLE* pdst, SB_HANDLE module_handle);
10943
10944
10961SB_PUBLIC(sb_t_err) sb_image_info_copy_labeling(SB_HANDLE dst, const char* const image_file, const sb_t_project_info* src_prj, int roi, int ground_truth, int* copied);
10962
10963
10971SB_PUBLIC(sb_t_err) sb_image_info_add_sample(SB_HANDLE image_info, const sb_t_sample* const sample);
10972
10981SB_PUBLIC(sb_t_err) sb_image_info_set_samples(SB_HANDLE image_info, const sb_t_samples* const samples);
10982
10995SB_PUBLIC(sb_t_err) sb_image_info_get_samples(SB_HANDLE image_info, sb_t_samples** const samples);
10996
11005
11020
11033SB_PUBLIC(sb_t_err) sb_image_info_get_type(SB_HANDLE image_info, const char* const model_name, sb_t_image_info_type* const type);
11034
11043SB_PUBLIC(sb_t_err) sb_image_info_set_notes(SB_HANDLE image_info, const char* const str);
11044
11055SB_PUBLIC(sb_t_err) sb_image_info_get_notes(SB_HANDLE image_info, char** const str);
11056
11065SB_PUBLIC(sb_t_err) sb_image_info_get_name(SB_HANDLE image_info, char* const str, int str_size);
11066
11076SB_PUBLIC(sb_t_err) sb_image_info_set_results(SB_HANDLE image_info, const sb_t_res* const res);
11077
11088SB_PUBLIC(sb_t_err) sb_image_info_get_results(SB_HANDLE image_info, sb_t_res** const res, int compressed);
11089
11098SB_PUBLIC(sb_t_err) sb_image_info_set_project_name(SB_HANDLE image_info, const char* const project_name);
11099
11110
11120SB_PUBLIC(sb_t_err) sb_image_info_set_roi(SB_HANDLE image_info, const sb_t_roi* const roi);
11121
11137SB_PUBLIC(sb_t_err) sb_image_info_get_roi(SB_HANDLE image_info, sb_t_roi** const roi, int width, int height, int compressed);
11138
11149SB_PUBLIC(sb_t_err) sb_image_info_set_roi_defects(SB_HANDLE image_info, const sb_t_roi* const defects);
11150
11166SB_PUBLIC(sb_t_err) sb_image_info_get_roi_defects(SB_HANDLE image_info, sb_t_roi** const defects, int width, int height, int compressed);
11167
11193 // group_image_info
11195
11196
11211SB_PUBLIC(sb_t_err) sb_folder_filter_images(sb_t_folder* const folder, SB_HANDLE module, sb_t_image_info_type image_info_type);
11212 // group_folder_2
11214
11215
11227typedef enum
11228{
11233
11243
11248
11253
11270
11290
11311
11318typedef struct
11319{
11321 char file_name[512];
11323 char model_name[2][SB_PAR_STRING_LEN];
11324 int sample_index[2];
11325 sb_t_point centre[2];
11326 float dist;
11327 float min_dist;
11329
11330#define SB_CLS_0 "cls0"
11331#define SB_CLS_1 "cls1"
11332
11337#define SB_FEATURE_0A "0A"
11338#define SB_FEATURE_0B "0B"
11339#define SB_FEATURE_0A_RI "0A_RI"
11340#define SB_FEATURE_0B_RI "0B_RI"
11341#define SB_FEATURE_2A "2A"
11342#define SB_FEATURE_2B "2B"
11343#define SB_FEATURE_2C "2C"
11344#define SB_FEATURE_2D "2D"
11345#define SB_FEATURE_2A_R "2A.R"
11346#define SB_FEATURE_2AA_R "2AA.R"
11347#define SB_FEATURE_2B_R "2B.R"
11348#define SB_FEATURE_2C_R "2C.R"
11349#define SB_FEATURE_2D_R "2D.R"
11350#define SB_FEATURE_2A_G "2A.G"
11351#define SB_FEATURE_2AA_G "2AA.G"
11352#define SB_FEATURE_2B_G "2B.G"
11353#define SB_FEATURE_2C_G "2C.G"
11354#define SB_FEATURE_2D_G "2D.G"
11355#define SB_FEATURE_2A_B "2A.B"
11356#define SB_FEATURE_2AA_B "2AA.B"
11357#define SB_FEATURE_2B_B "2B.B"
11358#define SB_FEATURE_2C_B "2C.B"
11359#define SB_FEATURE_2D_B "2D.B"
11360#define SB_FEATURE_2A_RI "2A_RI"
11361#define SB_FEATURE_2B_RI "2B_RI"
11362#define SB_FEATURE_2C_RI "2C_RI"
11363#define SB_FEATURE_2A_RI_R "2A_RI.R"
11364#define SB_FEATURE_2AA_RI_R "2AA_RI.R"
11365#define SB_FEATURE_2B_RI_R "2B_RI.R"
11366#define SB_FEATURE_2C_RI_R "2C_RI.R"
11367#define SB_FEATURE_2A_RI_G "2A_RI.G"
11368#define SB_FEATURE_2AA_RI_G "2AA_RI.G"
11369#define SB_FEATURE_2B_RI_G "2B_RI.G"
11370#define SB_FEATURE_2C_RI_G "2C_RI.G"
11371#define SB_FEATURE_2A_RI_B "2A_RI.B"
11372#define SB_FEATURE_2AA_RI_B "2AA_RI.B"
11373#define SB_FEATURE_2B_RI_B "2B_RI.B"
11374#define SB_FEATURE_2C_RI_B "2C_RI.B"
11375#define SB_FEATURE_3A "3A"
11376#define SB_FEATURE_3B "3B"
11377#define SB_FEATURE_3C "3C"
11378#define SB_FEATURE_3D "3D"
11379#define SB_FEATURE_3E "3E"
11380#define SB_FEATURE_4A "4A" //group_features
11382
11384#define SB_FEATURES SB_FEATURE_0A SB_DELIMITER \
11385 SB_FEATURE_0B SB_DELIMITER \
11386 SB_FEATURE_0A_RI SB_DELIMITER \
11387 SB_FEATURE_0B_RI SB_DELIMITER \
11388 SB_FEATURE_2A SB_DELIMITER \
11389 SB_FEATURE_2A_R SB_DELIMITER \
11390 SB_FEATURE_2A_G SB_DELIMITER \
11391 SB_FEATURE_2A_B SB_DELIMITER \
11392 SB_FEATURE_2AA_R SB_DELIMITER \
11393 SB_FEATURE_2AA_G SB_DELIMITER \
11394 SB_FEATURE_2AA_B SB_DELIMITER \
11395 SB_FEATURE_2B SB_DELIMITER \
11396 SB_FEATURE_2B_R SB_DELIMITER \
11397 SB_FEATURE_2B_G SB_DELIMITER \
11398 SB_FEATURE_2B_B SB_DELIMITER \
11399 SB_FEATURE_2C SB_DELIMITER \
11400 SB_FEATURE_2C_R SB_DELIMITER \
11401 SB_FEATURE_2C_G SB_DELIMITER \
11402 SB_FEATURE_2C_B SB_DELIMITER \
11403 SB_FEATURE_2D SB_DELIMITER \
11404 SB_FEATURE_2D_R SB_DELIMITER \
11405 SB_FEATURE_2D_G SB_DELIMITER \
11406 SB_FEATURE_2D_B SB_DELIMITER \
11407 SB_FEATURE_2A_RI SB_DELIMITER \
11408 SB_FEATURE_2A_RI_R SB_DELIMITER \
11409 SB_FEATURE_2A_RI_G SB_DELIMITER \
11410 SB_FEATURE_2A_RI_B SB_DELIMITER \
11411 SB_FEATURE_2AA_RI_R SB_DELIMITER \
11412 SB_FEATURE_2AA_RI_G SB_DELIMITER \
11413 SB_FEATURE_2AA_RI_B SB_DELIMITER \
11414 SB_FEATURE_2B_RI SB_DELIMITER \
11415 SB_FEATURE_2B_RI_R SB_DELIMITER \
11416 SB_FEATURE_2B_RI_G SB_DELIMITER \
11417 SB_FEATURE_2B_RI_B SB_DELIMITER \
11418 SB_FEATURE_2C_RI SB_DELIMITER \
11419 SB_FEATURE_2C_RI_R SB_DELIMITER \
11420 SB_FEATURE_2C_RI_G SB_DELIMITER \
11421 SB_FEATURE_2C_RI_B SB_DELIMITER \
11422 SB_FEATURE_3A SB_DELIMITER \
11423 SB_FEATURE_3B SB_DELIMITER \
11424 SB_FEATURE_3C SB_DELIMITER \
11425 SB_FEATURE_3D SB_DELIMITER \
11426 SB_FEATURE_3E SB_DELIMITER \
11427 SB_FEATURE_4A
11428
11442SB_PUBLIC(const char*) sb_feature_description(const char* const feature);
11443
11447typedef struct
11448{
11449 char image_name[SB_PAR_STRING_LEN];
11452
11456typedef struct
11457{
11459 int size;
11461
11466typedef struct
11467{
11475 float loss;
11512
11516typedef struct
11517{
11519 int size;
11521
11537typedef struct
11538{
11558 float score;
11563 int tp;
11568 int fp;
11573 int tn;
11578 int fn;
11583 int op;
11588 int on;
11627 char classificator[32];
11639 char features_available[SB_PAR_FEATURES_NAMES_LEN];
11643 char* warning;
11650
11655typedef struct
11656{
11658 int size;
11660
11664typedef struct
11665{
11677
11681typedef struct
11682{
11691 int size;
11693
11694#define SB_SVL_STEP_INITIALIZATION "initializing data for svl"
11695#define SB_SVL_STEP_SEARCHING_RECIPE "choosing recipe"
11696#define SB_SVL_STEP_TRAINING_RECIPE "training recipe"
11697#define SB_SVL_STEP_FINALIZATION "finalization of svl"
11698#define SB_SVL_STEP_FINISHED "svl has finished"
11699
11723
11749 char running_step[256];
11815 long long time_ms;
11826 long long time_left_ms;
11835};
11836
11874SB_PUBLIC(sb_t_err) sb_svl_run(SB_HANDLE handle);
11875
11884
11892
11903SB_PUBLIC(sb_t_err) sb_svl_get_res(SB_HANDLE handle, sb_t_svl_res** const res);
11904
11912
11920SB_PUBLIC(sb_t_err) sb_svl_clone_res(sb_t_svl_res** const dst, const sb_t_svl_res* const src);
11921 // group_svl
11923
11952SB_PUBLIC(sb_t_err) sb_surface_model_to_gl(const sb_t_par * const par, const char* const model_name, unsigned char* const gl, unsigned char* const gl_opt);
11953
11954 // group_surface // group_cpp
11957#endif
sb_t_err sb_blobs_plot_roi(const sb_t_blobs *const blobs, sb_t_roi *const roi, unsigned char gl)
Prints the blobs on the roi.
sb_t_err sb_blob_format_par(const sb_t_blob_par *const par, char *const str, int str_size)
Formats the blob analysis parameters structure.
sb_t_blob_deleted
Defines the deleted blob.
Definition: sb.h:7916
sb_t_err sb_blob_plot_roi(const sb_t_blob *const blob, sb_t_roi *const roi, unsigned char gl)
Prints the blob on the roi.
sb_t_pixel_connection
Defines the pixel connection.
Definition: sb.h:7823
sb_t_err sb_blobs_destroy(sb_t_blobs **const blobs)
Destroys the blobs structure.
sb_t_err sb_blob_copy(sb_t_blob *const dst, const sb_t_blob *const src)
Blob copy.
sb_t_err sb_blob_init_par(sb_t_blob_par *const par)
Initializes the fields of the structure.
sb_t_err sb_blobs_clone(sb_t_blobs **const dst, const sb_t_blobs *const src)
Blobs structure clone.
sb_t_err sb_blob_destroy(sb_t_blob *const blob)
Destroys the blob.
sb_t_err sb_blob_intersect(const sb_t_blob *const blob1, const sb_t_blob *const blob2, int extract_blob_seg, sb_t_blob **const res)
Blob intersection.
sb_t_err sb_blobs_create(sb_t_blobs **const blobs)
Creates the blobs structure.
sb_t_err sb_blobs_detection(sb_t_blobs **const blobs, const sb_t_image *const image, const sb_t_roi *const roi, const sb_t_blob_par *const par)
Blob analysis.
@ SB_BLOB_OK
Blob is not deleted.
Definition: sb.h:7917
@ SB_BLOB_DELETED_CIRCULAR
Blob is deleted because of circular images.
Definition: sb.h:7920
@ SB_BLOB_DELETED_AFTER_MERGE
Blob is deleted after merge.
Definition: sb.h:7919
@ SB_BLOB_DELETED_BEFORE_MERGE
Blob is deleted before merge.
Definition: sb.h:7918
@ SB_PIXEL_CONNECTION_8
8 connection. 8-connected pixels are neighbors to every pixel that touches one of their edges or corn...
Definition: sb.h:7841
@ SB_PIXEL_CONNECTION_4
4 connection.
Definition: sb.h:7831
sb_t_err
Errors code enum.
Definition: sb.h:4955
const char * sb_err_format(sb_t_err code)
Returns the error message.
sb_t_err sb_trace(int trace_enable, int date_time_enable, int line_enable, int trace_win_enable, const char *const filename, sb_fp_trace_callback trace_callback)
Sets the options for the messages trace.
void(* sb_fp_trace_callback)(const char *const msg)
Definition of the callback for message trace.
Definition: sb.h:5117
@ SB_ERR_SVL_VALIDATION_DATASET
The SVL images dataset is too small to extract a validation dataset.
Definition: sb.h:5100
@ SB_ERR_IMAGE_CREATE
An error occurred creating the image.
Definition: sb.h:4996
@ SB_ERR_FILE_READ
An error occurred reading the file.
Definition: sb.h:4988
@ SB_ERR_MACHINE_ID
Machine id has a wrong format.
Definition: sb.h:5035
@ SB_ERR_LICENSE_MACHINE_ID_MATCH
Machine id doesn't match.
Definition: sb.h:5024
@ SB_ERR_IMAGE_WARP
Image warp function returns an error.
Definition: sb.h:5006
@ SB_ERR_FILE_WRITE
An error occurred writing the file.
Definition: sb.h:4993
@ SB_ERR_PATH_SIZE
the path name exceeds the maximum size
Definition: sb.h:5052
@ SB_ERR_SOCKET_CREATE
An error occurred creating the socket.
Definition: sb.h:5078
@ SB_ERR_IMAGE_FORMAT
The image format is wrong.
Definition: sb.h:5000
@ SB_ERR_MODEL_NOT_TRAINED
The model is not trained.
Definition: sb.h:5041
@ SB_ERR_LICENSE_NOT_FOUND
License key not found.
Definition: sb.h:5028
@ SB_ERR_IMAGE_DEPTH
The image has a wrong bit depth.
Definition: sb.h:4998
@ SB_ERR_FILE_COPY
Error copying a file.
Definition: sb.h:4981
@ SB_ERR_DL_INPAINTER_NOT_ASSIGNED
Deep Learning inpainter network path is not assigned.
Definition: sb.h:4971
@ SB_ERR_VERSION
Unmanaged version.
Definition: sb.h:5103
@ SB_ERR_MODEL_DISABLED
A model is disabled.
Definition: sb.h:5038
@ SB_ERR_SAMPLE_NOT_FOUND
No sample found.
Definition: sb.h:5061
@ SB_ERR_IMAGE_RESIZE
Image resize function returns an error.
Definition: sb.h:5002
@ SB_ERR_MODEL_NAME
There are two models with the same name.
Definition: sb.h:5039
@ SB_ERR_LICENSE_VERSION
License is incompatible with the library version.
Definition: sb.h:5032
@ SB_ERR_IMAGE_DECODE
An error occurred decoding image.
Definition: sb.h:4997
@ SB_ERR_SVL_CHOOSE_FEATURES_FAST
Choose features failed to find a common combination for fast.
Definition: sb.h:5099
@ SB_ERR_MODEL_NOT_FOUND
The model of the sample is unknown or not assigned.
Definition: sb.h:5040
@ SB_ERR_IMAGE_CHANNELS
The image has a wrong number of channels.
Definition: sb.h:4994
@ SB_ERR_SAMPLE_BACKGROUND
Too few background samples to execute the training. Increase the analysis ROI or reduce the scale.
Definition: sb.h:5060
@ SB_ERR_SOCKET_INVALID_IP
IP address is invalid.
Definition: sb.h:5079
@ SB_ERR_FILE_REMOVE
Error removing a file.
Definition: sb.h:4989
@ SB_ERR_SOCKET_INVALID_PORT
Port isn't a valid number.
Definition: sb.h:5080
@ SB_ERR_FILE_VERSION
The file has no version.
Definition: sb.h:4992
@ SB_ERR_LIBRARY_DEPENDENCIES
Library dependencies not satisfied to execute the requested operation.
Definition: sb.h:5014
@ SB_ERR_SOCKET_LISTEN
Socket listen function has returned an error.
Definition: sb.h:5082
@ SB_ERR_SAMPLE_DISTANCE
There are two samples closer than the minimum distance set.
Definition: sb.h:5065
@ SB_ERR_ENCRYPT
An error occurred encrypting data.
Definition: sb.h:4980
@ SB_ERR_DIR_REMOVE
An error occurred removing the folder.
Definition: sb.h:4968
@ SB_ERR_DL_NETWORK_FILE_NOT_FOUND
Deep Learning Network file not found.
Definition: sb.h:4974
@ SB_ERR_LICENSE_EXPIRED
License is expired.
Definition: sb.h:5021
@ SB_ERR_SOCKET_SELECT
Socket select function has returned an error.
Definition: sb.h:5085
@ SB_ERR_SOCKET_SEND
Socket send function has returned an error.
Definition: sb.h:5086
@ SB_ERR_DECRYPT
An error occurred decrypting data.
Definition: sb.h:4964
@ SB_ERR_SVL_WAS_NOT_DONE
The SVL wasn't done.
Definition: sb.h:5096
@ SB_ERR_DIR_NOT_EXIST
The directory doesn't exist.
Definition: sb.h:4967
@ SB_ERR_SOCKET_SET_PARAMETER
Set socket parameter has returned an error.
Definition: sb.h:5087
@ SB_ERR_LICENSE_MODELS_NUMBER
Number of models is greater than the maximum allowed for the current license configuration.
Definition: sb.h:5027
@ SB_ERR_FILE_NAME_EMPTY
File name is empty.
Definition: sb.h:4985
@ SB_ERR_SOCKET_CONNECT
An error occurred connecting the socket.
Definition: sb.h:5076
@ SB_ERR_BUFFER_SIZE
The buffer has an insufficient size.
Definition: sb.h:4958
@ SB_ERR_LICENSE_SAME_MACHINE_ID
Two licences have the same machine id.
Definition: sb.h:5029
@ SB_ERR_IMAGE_LOAD
An error occurred loading the image.
Definition: sb.h:5001
@ SB_ERR_INTERNAL
Internal error.
Definition: sb.h:5010
@ SB_ERR_IMAGE_RESOLUTION
The image has a wrong resolution.
Definition: sb.h:5003
@ SB_ERR_DL_INTERNAL
Internal Deep Learning error.
Definition: sb.h:4973
@ SB_ERR_FILE_FORMAT
Wrong data file format.
Definition: sb.h:4983
@ SB_ERR_PROJECT_LOAD_MODE
The project was loaded with the wrong load parameter.
Definition: sb.h:5053
@ SB_ERR_SOCKET
A socket function has returned an error.
Definition: sb.h:5073
@ SB_ERR_INVALID_MAIL_ADDRESS
Mail address has a wrong format.
Definition: sb.h:5011
@ SB_ERR_NO_FILE_FOUND
No file found in the folder.
Definition: sb.h:5048
@ SB_ERR_SVL_PERTURBATION
A perturbation has not been defined properly.
Definition: sb.h:5095
@ SB_ERR_SOCKET_BIND
An error occurred binding the socket.
Definition: sb.h:5075
@ SB_ERR_SENTINEL_TOO_MANY_KEYS
Too many keys connected to the pc.
Definition: sb.h:5071
@ SB_ERR_LICENSE_DISABLED
License is disabled.
Definition: sb.h:5020
@ SB_ERR_MODELS_ENABLED
There are no models enabled.
Definition: sb.h:5042
@ SB_ERR_LICENSE_CORRUPTED
License file is corrupted.
Definition: sb.h:5019
@ SB_ERR_SENTINEL
Sentinel key returns an error.
Definition: sb.h:5069
@ SB_ERR_PROJECT_NOT_FOUND
Project not found.
Definition: sb.h:5054
@ SB_ERR_FILE_NAME
Wrong file name: too long or unknown extension.
Definition: sb.h:4984
@ SB_ERR_LIBRARY_FUNCTION_ADDRESS
Could not locate the function.
Definition: sb.h:5015
@ SB_ERR_LEVELS_NUMBER
There aren't levels, or the number of the levels isn't the expected one, or exceeded the maximum leve...
Definition: sb.h:5013
@ SB_ERR_FILE_EXTENSION
Wrong file extension.
Definition: sb.h:4982
@ SB_ERR_XML
Error parsing xml file.
Definition: sb.h:5107
@ SB_ERR_FILE_OPEN
An error occurred opening the file.
Definition: sb.h:4990
@ SB_ERR_SAMPLES_GT_TOO_MANY
Too many ground truth samples.
Definition: sb.h:5067
@ SB_ERR_IMAGE_SIZE
Image has a wrong data size.
Definition: sb.h:5004
@ SB_ERR_IMAGE_WIDTH_STEP
Image has a wrong width_step value.
Definition: sb.h:5007
@ SB_ERR_FILE_NAME_LENGHT
File name too long.
Definition: sb.h:4986
@ SB_ERR_CLS_CREATE
The function for the creation of the classifier has returned an error.
Definition: sb.h:4960
@ SB_ERR_STRUCT_HEADER_WRONG_VERSION
The version of the structure sb_t_struct_header is wrong.
Definition: sb.h:5094
@ SB_ERR_SAMPLE_WRONG
The sample has wrong data.
Definition: sb.h:5064
@ SB_ERR_DIR_EXIST
Checking the existence of the folder gave error.
Definition: sb.h:4966
@ SB_ERR_IMAGE_COMPRESSION
The image compression type is wrong.
Definition: sb.h:4995
@ SB_ERR_NO_POINT_FOUND
Point isn't found.
Definition: sb.h:5049
@ SB_ERR_IMAGE_TYPE
Unknown image type, should be a sb_t_image_info_type enum value.
Definition: sb.h:5005
@ SB_ERR_STRING_EMPTY
String empty.
Definition: sb.h:5091
@ SB_ERR_NO_FEATURES_AVAILABLE
No features available for the data set.
Definition: sb.h:5046
@ SB_ERR_PROJECT_TYPE
Wrong project type.
Definition: sb.h:5055
@ SB_ERR_LICENSE_WAIT_SERVER
Waiting to contact the license server.
Definition: sb.h:5034
@ SB_ERR_SVL_CHOOSE_FEATURES
Choose features failed to find a good combination.
Definition: sb.h:5098
@ SB_ERR_CLS
The function of a classifier has returned an error.
Definition: sb.h:4959
@ SB_ERR_INITIALIZE
You must call the initialize function.
Definition: sb.h:5008
@ SB_ERR_ROI
The ROI is wrong.
Definition: sb.h:5057
@ SB_ERR_LICENSE_FEATURES_NUMBER
Number of features is greater than the maximum allowed for the current license configuration.
Definition: sb.h:5022
@ SB_ERR_LIBRARY_OPEN
Could not load the dynamic library or the shared object.
Definition: sb.h:5016
@ SB_ERR_WARP_POINT_NOT_FOUND
Point isn't found in the lut.
Definition: sb.h:5105
@ SB_ERR_FILE_SAVE
An error occurred saving the file.
Definition: sb.h:4991
@ SB_ERR_SENTINEL_MASTER_KEY
Sentinel LDK Master key not present.
Definition: sb.h:5070
@ SB_ERR_MALLOC
The function that allocates memory gave error
Definition: sb.h:5036
@ SB_ERR_BASE64_SIZE
The dimension of the base64 buffer isn't 4 bytes aligned.
Definition: sb.h:4957
@ SB_ERR_THREAD
Thread management error.
Definition: sb.h:5101
@ SB_ERR_MEMORY_LEAK
There is a memory leak.
Definition: sb.h:5037
@ SB_ERR_DL_TRAINING_DATA_MISSING
Deep Learning training data missing.
Definition: sb.h:4979
@ SB_ERR_INSUFFICIENT_FREE_MEMORY
Insufficient free memory to complete the svl.
Definition: sb.h:5009
@ SB_ERR_UUID
The generation of UUID has returned an error or invalid UUID.
Definition: sb.h:5102
@ SB_ERR_XML_NODE_NOT_FOUND
An xml node was not found.
Definition: sb.h:5108
@ SB_ERR_NONE
No errors.
Definition: sb.h:4956
@ SB_ERR_NULL_POINTER
Function has been called with a NULL pointer.
Definition: sb.h:5044
@ SB_ERR_LICENSE_TYPE
The license type is unknown.
Definition: sb.h:5031
@ SB_ERR_DL_ROI_NOT_SET
Not enough ROI analysis area in SVL or validation image dataset. Increase the analysis ROI or the til...
Definition: sb.h:4978
@ SB_ERR_LICENSE
The license isn't valid.
Definition: sb.h:5017
@ SB_ERR_STRUCT_HEADER_WRONG_SIZE
The dimension of the structure sb_t_struct_header is wrong.
Definition: sb.h:5093
@ SB_ERR_CLS_TRAINING
The training function has returned an error.
Definition: sb.h:4963
@ SB_ERR_LICENSE_CODE
Code of the TCP/IP license protocol is wrong.
Definition: sb.h:5018
@ SB_ERR_DL_INPAINTER_NOT_FOUND
Deep Learning inpainter network file not found.
Definition: sb.h:4972
@ SB_ERR_STRUCT_HEADER_WRONG_CODE
The code of the structure sb_t_struct_header is wrong.
Definition: sb.h:5092
@ SB_ERR_WRONG_PARAMETER
The function has been called with a parameter with a wrong value.
Definition: sb.h:5106
@ SB_ERR_LICENSE_FILE
License file error (not exist, not readable, wrong format, wrong mail address)
Definition: sb.h:5023
@ SB_ERR_DIR_CREATE
An error occurred creating the folder.
Definition: sb.h:4965
@ SB_ERR_NVIDIA_NVML
Nvidia NVML returns an error getting gpu information.
Definition: sb.h:5051
@ SB_ERR_LICENSE_VM
License isn't allowed on Virtual Machine.
Definition: sb.h:5033
@ SB_ERR_SVL_WRONG
SVL is wrong.
Definition: sb.h:5097
@ SB_ERR_NO_LEVELS_AVAILABLE
No levels available to be processed.
Definition: sb.h:5047
@ SB_ERR_IMAGE_ENCODE
An error occurred encoding image.
Definition: sb.h:4999
@ SB_ERR_SOCKET_IOCTL
Socket ioctl function has returned an error.
Definition: sb.h:5081
@ SB_ERR_ROI_DEFECTS
The defects ROI is wrong.
Definition: sb.h:5059
@ SB_ERR_LICENSE_TRAINING
License error: training is disabled.
Definition: sb.h:5030
@ SB_ERR_SOCKET_TIMEOUT
Timeout sending or receiving data on socket.
Definition: sb.h:5088
@ SB_ERR_VERSION_FORMAT
Version is not formatted properly.
Definition: sb.h:5104
@ SB_ERR_DL_PRE_TRAINED_FILE_NOT_FOUND
Deep Learning pre-trained file not found.
Definition: sb.h:4976
@ SB_ERR_DL_NOT_SUPPORTED
Deep Learning modules are not supported.
Definition: sb.h:4975
@ SB_ERR_DL_CUDA_OUT_OF_MEMORY
CUDA Out Of Memory (OOM). Insufficient free GPU memory to execute the operation. Try reducing the bat...
Definition: sb.h:4969
@ SB_ERR_RPF_NAME_EMPTY
The name of solution file is empty.
Definition: sb.h:5056
@ SB_ERR_SOCKET_RECEIVE
Socket receive function has returned an error.
Definition: sb.h:5084
@ SB_ERR_NO_CLASSIFIED_IMAGE
There aren't classified images.
Definition: sb.h:5045
@ SB_ERR_CLS_PREDICT
The predict function has returned an error.
Definition: sb.h:4962
@ SB_ERR_SCALE_NOT_FOUND
The scale is not found.
Definition: sb.h:5068
@ SB_ERR_LICENSE_MAIL_ADDRESS
Mail address in the license file is wrong.
Definition: sb.h:5025
@ SB_ERR_ROI_BOUNDING_BOX
Wrong roi bounding box.
Definition: sb.h:5058
@ SB_ERR_FILE_NOT_EXIST
The file doesn't exist.
Definition: sb.h:4987
@ SB_ERR_SENTINEL_RUN_TIME
Sentinel_LDK_Run-time is not running.
Definition: sb.h:5072
@ SB_ERR_SAMPLE_SCALE
The sample scale is wrong.
Definition: sb.h:5066
@ SB_ERR_SAMPLE_OUT_OF_IMAGE
The sample is out of image.
Definition: sb.h:5063
@ SB_ERR_MODELS_NUMBER
There aren't models, or the number of the models isn't the expected one, or exceeded the maximum mode...
Definition: sb.h:5043
@ SB_ERR_SOCKET_CLOSED
Socket is closed.
Definition: sb.h:5077
@ SB_ERR_SOCKET_MAC
Error while looking for a valid MAC address.
Definition: sb.h:5083
@ SB_ERR_CLS_NOT_TRAINED
The training wasn't done.
Definition: sb.h:4961
@ SB_ERR_LEVELS_ENABLED
There are no levels enabled.
Definition: sb.h:5012
@ SB_ERR_DL_FRAMEWORK
Impossible to execute the requested operation: Deep Learning Framework not installed or corrupted.
Definition: sb.h:4970
@ SB_ERR_NOT_IMPLEMENTED
The function isn't implemented.
Definition: sb.h:5050
@ SB_ERR_LICENSE_MARKER
Marker of the TCP/IP license protocol is wrong.
Definition: sb.h:5026
@ SB_ERR_SAMPLE_NUMBER
Too few samples to execute the training.
Definition: sb.h:5062
@ SB_ERR_SOCKET_ACCEPT
Socket accept has returned an error.
Definition: sb.h:5074
@ SB_ERR_DL_PRE_TRAINED_FILE_NOT_VALID
Deep Learning pre-trained file is not valid.
Definition: sb.h:4977
sb_t_err sb_file_extract_folder(const char *const full, char *const folderpath, int folderpath_size)
Extracts the folder path from the full file path.
sb_t_err sb_file_extract_name(const char *const full, int with_ext, char *const name, int name_size)
Extracts the file name from the full file path.
sb_t_err sb_folder_create(const char *const path)
Creates the folder with the specified path.
sb_t_err sb_folder_destroy(sb_t_folder **folder)
Frees all the resources of the sb_t_folder structure.
sb_t_err sb_folder_filter_images(sb_t_folder *const folder, SB_HANDLE module, sb_t_image_info_type image_info_type)
Filters images by project and type.
sb_t_err sb_folder_erase(sb_t_folder *folder, int index)
Removes the file with the specified index from the list.
sb_t_err sb_folder_remove(const char *const path)
Deletes a folder and all the files and subfolder contained.
sb_t_err sb_folder_exist(const char *const path, int *const exist)
Checks if the folder with the specified path exists.
sb_t_err sb_folder_load(sb_t_folder **const f, const char *const path, const char *const ext, int sort, int verbosity)
Creates the list of the name of the files in a specified folder.
#define SB_PAR_MODELS_NUM
Maximum number of models.
Definition: sb.h:5631
#define SB_PAR_PERTURBATIONS_NUM
Maximum number of perturbation of a sample.
Definition: sb.h:5632
sb_t_err sb_destroy_info(sb_t_info **const info)
Destroys the structure.
sb_t_err sb_init_dl(const char *const search_path)
Initialize the Deep Learning library.
sb_t_err sb_release(void)
Releases all the resources allocates in the library.
sb_t_floating_point_op_type
Enumerates the floating point precision types to perform operations.
Definition: sb.h:5748
sb_t_err sb_init(const char *const license_file)
Initializes the SB library.
SB_INLINE sb_t_bgra sb_bgra(unsigned char b, unsigned char g, unsigned char r, unsigned char a)
Inline constructor of structure sb_t_bgra.
Definition: sb.h:5583
#define SB_PAR_LEVELS_NUM
Maximum scales levels number to be used for Surface.
Definition: sb.h:5634
sb_t_device_type
Defines computing device types.
Definition: sb.h:5476
sb_t_err sb_format_info(const sb_t_info *const info, char *const str, int str_size)
Formats the sb library information structure.
SB_INLINE sb_t_version sb_version(int major, int minor, int vminor, int build_major)
Inline constructor of structure sb_t_version.
Definition: sb.h:5433
void * SB_HANDLE
HANDLE definition.
Definition: sb.h:5411
sb_t_interpolation_mode
Enumerates the interpolation modes.
Definition: sb.h:5738
#define SB_PAR_STRING_LEN
Maximum length, in byte, of the string.
Definition: sb.h:5633
int sb_version_check(sb_t_version version1, sb_t_version version2)
Compares two version.
sb_t_err sb_get_info(sb_t_info **const info, int gpu_info)
The function gets informations about the sb library and the available computational devices.
SB_INLINE sb_t_rgba sb_rgba(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Inline constructor of structure sb_t_rgba.
Definition: sb.h:5616
sb_t_err sb_get_file_version(sb_t_version *const ver, const char *const file)
Get the version of a file.
sb_t_err sb_get_uuid(char *const str, size_t size)
Creates a new uuid.
@ SB_FLOATING_POINT_OPS_TYPE_SINGLE_PRECISION
Single Precision (FP32).
Definition: sb.h:5749
@ SB_FLOATING_POINT_OPS_TYPE_HALF_PRECISION
Half Precision (FP16).
Definition: sb.h:5750
@ SB_DEVICE_GPU
GPU device.
Definition: sb.h:5478
@ SB_DEVICE_CPU
CPU device.
Definition: sb.h:5477
@ SB_INTERPOLATION_MODE_NN
Nearest Neighbor pixel interpolation.
Definition: sb.h:5740
@ SB_INTERPOLATION_MODE_BILINEAR
Bilinear interpolation.
Definition: sb.h:5739
SB_INLINE sb_t_range sb_range(int min, int max)
Inline constructor of structure sb_t_range.
Definition: sb.h:5268
SB_INLINE sb_t_range_flt sb_range_flt(float min, float max)
Inline constructor of structure sb_t_range_flt.
Definition: sb.h:5282
SB_INLINE sb_t_point sb_point(int x, int y)
Inline constructor of structure sb_t_point.
Definition: sb.h:5226
SB_INLINE sb_t_size sb_size(int width, int height)
Inline constructor of structure sb_t_size.
Definition: sb.h:5240
SB_INLINE sb_t_rect sb_rect(int x, int y, int width, int height)
Inline constructor of structure sb_t_rect.
Definition: sb.h:5298
SB_INLINE sb_t_size_flt sb_size_flt(float width, float height)
Inline constructor of structure sb_t_size_flt.
Definition: sb.h:5254
sb_t_err sb_image_info_get_version(const char *const image_file, sb_t_version *version, char *const version_str, int size_version_str)
Gets the version of the image information file.
sb_t_err sb_image_info_set_roi(SB_HANDLE image_info, const sb_t_roi *const roi)
Sets the ROI in a Squeezebrains image info handle.
sb_t_err sb_image_info_get_results(SB_HANDLE image_info, sb_t_res **const res, int compressed)
Get the results of the detection from the image info handle.
sb_t_err sb_image_info_get_notes(SB_HANDLE image_info, char **const str)
Gets the note from the Squeezebrains image info handle.
sb_t_err sb_image_info_get_samples(SB_HANDLE image_info, sb_t_samples **const samples)
Get the samples of an image from the corresponding Squeezebrains image info handle.
sb_t_image_info_type
Defines the type of the image.
Definition: sb.h:10818
sb_t_err sb_image_info_destroy_details(sb_t_image_info_details **const details)
Destroys the array of the images info details.
sb_t_err sb_image_info_set_type(SB_HANDLE image_info, sb_t_image_info_type type)
Sets the type of the Squeezebrains image info.
sb_t_err sb_image_info_set_notes(SB_HANDLE image_info, const char *const str)
Set a note into Squeezebrains image info handle.
sb_t_err sb_image_info_get_type(SB_HANDLE image_info, const char *const model_name, sb_t_image_info_type *const type)
Retrieves the Squeezebrains image info handle type.
sb_t_err sb_image_info_change_project(const char *const image_file, const sb_t_project_info *const project_info_old, SB_HANDLE module_handle_new)
Change the project to the data associated to the image.
sb_t_err sb_image_info_set_results(SB_HANDLE image_info, const sb_t_res *const res)
Set the results of the detection in the image info handle.
sb_t_err sb_image_info_get_name(SB_HANDLE image_info, char *const str, int str_size)
Retrieves the name of the image.
sb_t_err sb_image_info_add_sample(SB_HANDLE image_info, const sb_t_sample *const sample)
Adds a sample into the Squeezebrains image info handle.
sb_t_err sb_image_info_get_roi(SB_HANDLE image_info, sb_t_roi **const roi, int width, int height, int compressed)
Gets the ROI from a Squeezebrains image info handle.
sb_t_err sb_image_info_copy_labeling(SB_HANDLE dst, const char *const image_file, const sb_t_project_info *src_prj, int roi, int ground_truth, int *copied)
Copies the labeling information from the src project into the destination image info.
sb_t_err sb_image_info_clone(SB_HANDLE src, SB_HANDLE *pdst, SB_HANDLE module_handle)
Clones the Squeezebrains image info.
sb_t_err sb_image_info_get_details(const char *const image_file, sb_t_image_info_details **details)
Load the file and get the array of the image info details.
sb_t_err sb_image_info_get_roi_defects(SB_HANDLE image_info, sb_t_roi **const defects, int width, int height, int compressed)
Gets the surface defects ROI from a Squeezebrains image info handle.
sb_t_err sb_image_info_load(SB_HANDLE *image_info, const char *const image_file, SB_HANDLE module_handle)
Creates a Squeezebrains image info handle.
sb_t_err sb_image_info_set_samples(SB_HANDLE image_info, const sb_t_samples *const samples)
Saves the samples in the corresponding Squeezebrains image info handle.
sb_t_err sb_image_info_set_project_name(SB_HANDLE image_info, const char *const project_name)
Set the project name in the image info handle.
sb_t_err sb_image_info_remove_project(const char *const image_file, const char *const project_uuid)
Remove the project with the specified UUID from the data associated to the image.
sb_t_err sb_image_info_apply_par_changes(SB_HANDLE image_info, const sb_t_par_changes_info *info)
Apply the par changes to the Squeezebrains image info handle.
sb_t_err sb_image_info_set_roi_defects(SB_HANDLE image_info, const sb_t_roi *const defects)
Sets the surface defects ROI on a Squeezebrains image info handle.
sb_t_err sb_image_info_get_custom_par_root(SB_HANDLE handle, SB_HANDLE *node_root)
Returns the xml root node of your own custom parameters.
sb_t_err sb_image_info_reset(SB_HANDLE image_info)
Erases all the data from the Squeezebrains image info handle.
sb_t_err sb_image_info_destroy(SB_HANDLE *image_info)
Destroys the Squeezebrains image info handle.
sb_t_err sb_image_info_save(SB_HANDLE image_info)
Saves the Squeezebrains image info handle into the image file.
@ SB_IMAGE_INFO_TYPE_SVL_USED
Read-only value. Image is used for SVL and for training.
Definition: sb.h:10822
@ SB_IMAGE_INFO_TYPE_TEST
Image is used for test.
Definition: sb.h:10820
@ SB_IMAGE_INFO_TYPE_SVL
Image is used for SVL and not used for training.
Definition: sb.h:10821
@ SB_IMAGE_INFO_TYPE_NONE
Image is not used.
Definition: sb.h:10819
sb_t_err sb_image_create(sb_t_image **const pimg, int width, int height, sb_t_image_format format)
Creates an image.
sb_t_err sb_image_change_brightness(const sb_t_image *const src, sb_t_image *const dst, float delta_brightness)
Changes the image brightness by the percentage amount specified.
sb_t_image_flip_mode
Enumeration of the flip mode.
Definition: sb.h:6929
sb_t_err sb_image_convert(sb_t_image **const dst, sb_t_image *const src, sb_t_image_format format)
Convert the source image into the destination image.
const char * sb_image_format(sb_t_image_format format)
Returns the string of the image format.
sb_t_err sb_image_shift(const sb_t_image *const src, sb_t_image *const dst, int x_shift, int y_shift)
Shifts the image.
sb_t_err sb_image_flip(const sb_t_image *const src, sb_t_image *const dst, sb_t_image_flip_mode mode)
Flips the image.
sb_t_image_compress_type
Type of image compression.
Definition: sb.h:6627
sb_t_err sb_image_change_contrast(const sb_t_image *const src, sb_t_image *const dst, float delta_contrast)
Changes the image contrast by the percentage amount specified.
sb_t_err sb_image_set_clip_blend(sb_t_image *const img, int x, int y, const sb_t_rgba *const color)
Set the pixel (x,y) with the color using also alpha blending.
sb_t_err sb_image_get_pixel(sb_t_image *const img, int x, int y, sb_t_rgba *const color)
Get the pixel (x,y).
sb_t_err sb_image_copy(const sb_t_image *const src, sb_t_image *const dst)
Copies the image.
sb_t_err sb_image_get_sample(const sb_t_image *const src, sb_t_point centre, double angle_rad, float scale, sb_t_image *const dst)
Copies, rotates, resizes a rectangular roi of the source image to the destination one.
sb_t_err sb_image_destroy(sb_t_image **const pimg)
Destroys the image.
sb_t_err sb_image_save(const sb_t_image *const img, const char *const file, const int *const params)
Saves the image in a file.
sb_t_err sb_image_rotate(const sb_t_image *const src, sb_t_point centre, double angle, sb_t_interpolation_mode interpolation_mode, sb_t_image *const dst)
Rotates an image.
sb_t_err sb_image_clone(sb_t_image **const dst, const sb_t_image *const src)
Clones the image.
sb_t_err sb_image_set_data(sb_t_image *const img, unsigned char *const data)
Sets the pointer to a block of memory for image data.
sb_t_err sb_image_create_header(sb_t_image **const pimg, int width, int height, int width_step, sb_t_image_format format)
Creates an image but doesn't allocate memory for the data.
sb_t_err sb_image_decompress(sb_t_image **const dst, sb_t_image *const src)
Decompress the image.
sb_t_err sb_image_clean(sb_t_image *const img)
Cleans the image.
sb_t_err sb_image_copy_rect(const sb_t_image *const src, sb_t_rect rect, sb_t_image **const dst)
Copies a rectangular ROI of an image into another one.
sb_t_err sb_image_resize(const sb_t_image *const src, sb_t_rect rect, float scale, sb_t_interpolation_mode interpolation_mode, sb_t_image *const dst)
Resizes the image.
sb_t_err sb_image_load(sb_t_image **const img, const char *const file)
Loads an image from a file.
sb_t_image_compress_par
Definitions of parameters used by the image encoders.
Definition: sb.h:6739
sb_t_err sb_image_compress(sb_t_image **const dst, sb_t_image *const src, sb_t_image_compress_type compression, const void *const params)
Compress the image with the compression method specified.
sb_t_image_format
Format of image pixel.
Definition: sb.h:6606
@ SB_IMAGE_FLIP_VERTICAL
flips the image around vertical axis.
Definition: sb.h:6932
@ SB_IMAGE_FLIP_HORIZONTAL
flips the image around horizontal axis.
Definition: sb.h:6931
@ SB_IMAGE_FLIP_BOTH
flips the image around both horizontal and vertical axises, it is a rotation of 180 degrees.
Definition: sb.h:6930
@ SB_IMAGE_COMPRESS_JPEG
JPEG compression.
Definition: sb.h:6630
@ SB_IMAGE_COMPRESS_NONE
uncompressed or raw images
Definition: sb.h:6628
@ SB_IMAGE_COMPRESS_RLE
RLE (Run Lenght Encoding) lossless compression.
Definition: sb.h:6629
@ SB_IMAGE_COMPRESS_PNG
PNG compression.
Definition: sb.h:6631
@ SB_IMAGE_COMPRESS_PAR_JPEG_QUALITY
Quality of jpeg image.
Definition: sb.h:6740
@ SB_IMAGE_FORMAT_BW8
BW: one channel, 8 bit per channel.
Definition: sb.h:6607
@ SB_IMAGE_FORMAT_BGR888
BGR: three channel, 8 bit per channel.
Definition: sb.h:6608
@ SB_IMAGE_FORMAT_RGB888
RGB: three channel, 8 bit per channel.
Definition: sb.h:6609
@ SB_IMAGE_FORMAT_UI32
unsigned int 32 bit
Definition: sb.h:6610
const char * sb_license_format_type(sb_t_license_type type)
Returns the string of the license type.
sb_t_err sb_license_configuration_check(SB_HANDLE module, sb_t_license_configuration_id configuration_id, char **const msg)
Checks if the project can be used with a license configuration.
sb_t_err sb_license_get_hw_info(char **const str)
Returns the hardware information.
sb_t_err sb_license_check(SB_HANDLE module, char **const msg)
Checks the license status and if the project can be used with the current license configuration.
const char * sb_license_format_configuration(sb_t_license_configuration_id configuration)
Returns the string of the license configuration.
sb_t_err sb_license_apply_v2c(const char *const v2c, char **const msg_err, int verbosity)
Applies the v2c file to the usb dongle key.
sb_t_license_module_status
Enumerations of status of a module of the license.
Definition: sb.h:6137
sb_t_err sb_license_get_info(sb_t_license *const info)
Returns the license information.
sb_t_license_module_id
Enumerations of modules of the SB library.
Definition: sb.h:6178
const char * sb_license_format_module_id(sb_t_license_module_id code)
Returns the string of the module id.
sb_t_err sb_license_format_info(const sb_t_license *const info, char *const str, int str_size)
Formats the license structure.
#define SB_LICENSE_VENDOR_CODE_SIZE
Size, in bytes, of the string of the vendor code.
Definition: sb.h:6294
sb_t_license_configuration_id
Enumerations of the license configurations.
Definition: sb.h:6162
const char * sb_license_format_module_status(sb_t_license_module_status status)
Returns the string of the feature status.
sb_t_license_type
Enumerations of the license types.
Definition: sb.h:6149
@ SB_LICENSE_MODULE_STATUS_ACTIVE
The license is valid and active.
Definition: sb.h:6139
@ SB_LICENSE_MODULE_STATUS_DISABLED
The license is disabled.
Definition: sb.h:6140
@ SB_LICENSE_MODULE_STATUS_ERR
There is an error. See the field sb_t_license_module::err.
Definition: sb.h:6141
@ SB_LICENSE_MODULE_STATUS_NULL
The license status is undefined.
Definition: sb.h:6138
@ SB_LICENSE_MODULE_RETINA
Retina.
Definition: sb.h:6180
@ SB_LICENSE_MODULE_NUMBER
Number of modules.
Definition: sb.h:6188
@ SB_LICENSE_MODULE_NONE
Module type not defined.
Definition: sb.h:6179
@ SB_LICENSE_MODULE_SURFACE
Surface.
Definition: sb.h:6181
@ SB_LICENSE_MODULE_DEEP_CORTEX
Deep Cortex.
Definition: sb.h:6182
@ SB_LICENSE_MODULE_DEEP_SURFACE
Deep Surface.
Definition: sb.h:6183
@ SB_LICENSE_BASIC
Basic configuration.
Definition: sb.h:6165
@ SB_LICENSE_CONFIGURATION_NUMBER
Number of configurations.
Definition: sb.h:6170
@ SB_LICENSE_PREMIUM
Premium configuration.
Definition: sb.h:6163
@ SB_LICENSE_STANDARD
Standard configuration.
Definition: sb.h:6164
@ SB_LICENSE_NOT_PRESENT
License is not present.
Definition: sb.h:6154
@ SB_LICENSE_DISABLED
License is disabled.
Definition: sb.h:6151
@ SB_LICENSE_MASTER
Master license: hasn't an expiry date.
Definition: sb.h:6153
@ SB_LICENSE_NULL
License type isn't defined.
Definition: sb.h:6150
@ SB_LICENSE_DEMO
Demo license: has an expiry date.
Definition: sb.h:6152
sb_t_err sb_lut_destroy(SB_HANDLE *phandle)
Destroys the handle of the lut.
sb_t_err sb_lut_save(SB_HANDLE phandle, const char *const file_path)
Saves the lut in a file.
sb_t_err sb_lut_get_size(SB_HANDLE phandle, int *const width, int *const height)
Retrieves the size of the lut.
sb_t_err sb_lut_create(SB_HANDLE *phandle, int width, int height)
Creates the handle of the lut.
sb_t_err sb_lut_warp_point(SB_HANDLE phandle, const sb_t_point *const src, sb_t_point *const dst)
Warps the point.
sb_t_err sb_lut_load(SB_HANDLE *phandle, const char *const file_path)
Loads the lut from a file.
sb_t_err sb_lut_get_ptr(SB_HANDLE phandle, sb_t_lut_point **const ptr)
Retrieves, in the parameter ptr, the pointer to internal array of the lut.
void * sb_malloc(size_t size)
Allocates a memory block.
void * sb_calloc(size_t count, size_t size)
Allocates and zero-initialize an array.
void * sb_realloc(void *ptr, size_t size)
Reallocates a memory block.
sb_t_malloc_check
Type of counter for the memory leak check.
Definition: sb.h:6098
void sb_free(void *ptr)
Deallocates a memory block.
sb_t_err sb_malloc_check_memory_leak_reset(sb_t_malloc_check check)
Resets the memory leak control.
sb_t_err sb_malloc_check_memory_leak(sb_t_malloc_check check)
Checks if the library has a memory leak.
@ SB_MALLOC_CHECK_MAIN_COUNTER
The main counter.
Definition: sb.h:6099
@ SB_MALLOC_CHECK_SECOND_COUNTER
The second counter.
Definition: sb.h:6100
const char * sb_interpolation_mode_format(sb_t_interpolation_mode mode)
Returns the string of the interpolation mode.
const char * sb_device_type_format(sb_t_device_type type)
Returns the string of the device type.
sb_t_err sb_par_add_level(sb_t_par *const par, const char *const model_name, float scale)
Adds the level to the parameter structure.
sb_t_err sb_par_remove_model(sb_t_par *const par, const char *const model_name)
Removes the model from the structure of the project parameters.
sb_t_err sb_par_format(const sb_t_par *const par, char *const str, int str_size)
Formats the parameters structure.
sb_t_err sb_par_get_collaboration(sb_t_par *par, const char *const model_name_1, const char *const model_name_2, int *const value)
Retreives the collaboration between two models.
sb_t_err sb_par_add_model(sb_t_par *const par, const char *const model_name)
Adds the model to the parameter structure.
sb_t_err sb_par_set_collaboration(sb_t_par *par, const char *const model_name_1, const char *const model_name_2, int value)
Sets collaboration between two models.
sb_t_err sb_par_init(sb_t_par *const par, sb_t_project_type project_type)
Initializes the fields of the structure.
sb_t_err sb_par_remove_level(sb_t_par *const par, const char *const model_name, float scale)
Removes the l-th level from the structure of the project parameters.
const char * sb_floating_point_precision_type_format(sb_t_floating_point_op_type type)
Returns the string of the floating point precision type.
sb_t_err sb_project_set_par(SB_HANDLE handle, const sb_t_par *const par)
Sets the parameters structure into the project handle.
sb_t_err sb_project_set_name(SB_HANDLE handle, const char *const name)
Sets the name into the project handle.
sb_t_err sb_project_get_par(SB_HANDLE handle, sb_t_par *const par)
Retrieves the project parameters structure.
sb_t_project_mode
Defines the loading or saving mode of a project.
Definition: sb.h:8260
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.
sb_t_err sb_project_save(SB_HANDLE handle, const char *const solution_file, sb_t_project_mode mode)
Saves the project to file.
sb_t_err sb_project_set_notes(SB_HANDLE handle, const char *const note)
Sets the note into the project handle.
sb_t_err sb_project_get_info(SB_HANDLE handle, sb_t_project_info *project_info)
Gets the project information from the handle.
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 a...
sb_t_err sb_project_destroy_par_changes_info(sb_t_par_changes_info **const par_changes_info)
Destroys the structure.
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.
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.
sb_t_project_type
Project types enum.
Definition: sb.h:8109
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.
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.
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.
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.
const char * sb_project_type_format(sb_t_project_type type)
Returns the string of the project type.
sb_t_err sb_project_destroy(SB_HANDLE *phandle)
Frees all the resources of the project handle.
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.
sb_t_err sb_project_clone(SB_HANDLE src, SB_HANDLE *pdst, sb_t_project_mode mode, int regenerate_uuid)
Clones the Squeezebrains project.
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.
sb_t_err sb_project_reset_stat(SB_HANDLE handle)
Resets the internal statistics of the elaborations.
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_invalidate(SB_HANDLE handle, const char *const model_name, float scale)
Eliminates the training of the models.
sb_t_err sb_project_get_stat(SB_HANDLE handle, sb_t_stat **const stat)
Gets the statistics from the handle.
sb_t_err sb_project_get_notes(SB_HANDLE handle, char **const note)
Gets the note from the project handle.
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.
sb_t_err sb_project_get_name(SB_HANDLE handle, char **const name)
Gets the name from the project handle.
@ SB_PROJECT_MODE_DETECTION_ONLY
Load/save the minimum module information to allow detection.
Definition: sb.h:8261
@ SB_PROJECT_MODE_DETECTION_AND_SVL
Load/save all the module information.
Definition: sb.h:8262
@ SB_PROJECT_TYPE_RETINA
Project Retina.
Definition: sb.h:8110
@ SB_PROJECT_TYPE_SURFACE
Project Surface.
Definition: sb.h:8111
@ SB_PROJECT_TYPE_DEEP_SURFACE
Project Deep Surface.
Definition: sb.h:8112
@ SB_PROJECT_TYPE_DEEP_CORTEX
Project Deep Cortex.
Definition: sb.h:8113
sb_t_err sb_res_decompress(sb_t_res *const res)
Decompress thre results.
sb_t_surface_image_truth
Defines the surface image truth.
Definition: sb.h:9931
sb_t_err sb_res_compress(sb_t_res *const res)
Compress the results, in particular the Surface plane images.
sb_t_err sb_res_destroy(sb_t_res **const res)
Destroys the module results structure.
sb_t_err sb_res_clone(sb_t_res **const dst, const sb_t_res *const src)
Copies the results of image elaboration.
@ SB_IMAGE_TRUTH_OVERKILL
False defects found.
Definition: sb.h:9947
@ SB_IMAGE_TRUTH_UNDEFINED
Undefined truth.
Definition: sb.h:9935
@ SB_IMAGE_TRUTH_GOOD
No defects.
Definition: sb.h:9939
@ SB_IMAGE_TRUTH_NO_GOOD
Defects found.
Definition: sb.h:9943
@ SB_IMAGE_TRUTH_ESCAPE
Defects not found.
Definition: sb.h:9951
sb_t_err sb_roi_apply_lut(sb_t_roi *const roi, unsigned char *lut)
Applies the gray level lut to the roi image.
sb_t_err sb_roi_set_blob(sb_t_roi *const roi, unsigned char gl, const sb_t_image *const src, const sb_t_blob_par *const par, const sb_t_point *const start_point, int fill_holes, sb_t_range hole_area, const sb_t_rect *analysis_rect)
Sets a ROI from blob analysis.
sb_t_err sb_roi_reset(sb_t_roi *const roi)
Resets the ROI.
sb_t_err sb_roi_set_circle(sb_t_roi *const roi, unsigned char gl, int center_x, int center_y, int radius, int reset_roi)
Sets a circular ROI.
sb_t_err sb_roi_create_header(sb_t_roi **const roi, int width, int height, int width_step)
Creates a ROI but doesn't allocate memory for the data.
sb_t_err sb_roi_evaluate_bounding_box(sb_t_roi *const roi)
Calculates the bounding box of the roi depending by the lut.
sb_t_err sb_roi_set_rect(sb_t_roi *const roi, unsigned char gl, sb_t_rect rect, int reset_roi)
Sets a rectangular ROI.
sb_t_err sb_roi_set_ellipse(sb_t_roi *const roi, unsigned char gl, int center_x, int center_y, int radius_x, int radius_y, int reset_roi)
Sets an elliptical ROI.
sb_t_err sb_roi_clone(sb_t_roi **const dst, const sb_t_roi *const src)
Copies a roi.
sb_t_err sb_roi_compress(sb_t_roi *const roi)
Compresses the ROI and deletes the uncompressed version.
sb_t_err sb_roi_create(sb_t_roi **const roi, int width, int height)
Creates a ROI.
sb_t_err sb_roi_decompress(sb_t_roi *const roi)
Decompresses the ROI and deletes the compressed version.
sb_t_err sb_roi_plot(sb_t_image *const image, const sb_t_roi *const roi, const unsigned char *lut, sb_t_rgba color)
Draws the roi on the image.
sb_t_err sb_roi_set_data(sb_t_roi *const roi, unsigned char *const data)
Sets the pointer of the ROI data into the ROI.
sb_t_err sb_roi_set_circular_crown(sb_t_roi *const roi, unsigned char gl, int center_x, int center_y, int radius_min, int radius_max, int start_angle, int end_angle, int reset_roi)
Sets an angular circular crown ROI.
sb_t_err sb_roi_destroy(sb_t_roi **const roi)
Destroys the ROI.
sb_t_err sb_samples_destroy(sb_t_samples **const samples)
Destroy the samples structure.
sb_t_err sb_samples_clone(sb_t_samples **const dst, const sb_t_samples *const src)
Copies the samples of an image.
sb_t_err sb_sample_weights_image_overlay(sb_t_image *const image, const sb_t_sample *const s)
Draws the image of the weights of the sample on a image.
sb_t_err sb_samples_create(sb_t_samples **const samples)
Creates a samples structure.
sb_t_err sb_sample_clone(const sb_t_sample *const src, sb_t_sample *const dst)
Copies a single sample.
sb_t_err sb_sample_get_vertex(sb_t_point centre, float scale, sb_t_size obj_size, sb_t_point *const ul, sb_t_point *const br, sb_t_size *const size)
Evaluates the vertices of the rectangle of the sample.
sb_t_obj_type
Defines the type of the object.
Definition: sb.h:7291
sb_t_err sb_samples_distance(SB_HANDLE project, const sb_t_sample *const sample1, const sb_t_sample *const sample2, float *const distance, int *const are_near)
Evaluates the distance between two samples.
sb_t_err sb_sample_get_model_index(const sb_t_sample *const s, SB_HANDLE handle, int *const model_index)
Returns the model index of the sample.
sb_t_err sb_sample_get_level_index(const sb_t_sample *const s, SB_HANDLE handle, int *const level_index)
Returns the index of scale level of the sample.
sb_t_sample_classify_mode
Enumeration of the classification modes of a sample.
Definition: sb.h:7370
sb_t_err sb_samples_insert(sb_t_samples *const samples, const sb_t_sample *const sample, int sample_index)
Inserts a sample in the list of the samples of an image.
const char * sb_format_truth(sb_t_truth truth)
Returns the string of the truth of the object.
sb_t_err sb_sample_destroy(sb_t_sample *const sample)
Destroys the content of sample structure.
sb_t_truth
Type of truth of a sample.
Definition: sb.h:7303
sb_t_err sb_samples_remove(sb_t_samples *const samples, int sample_index)
Removes a sample from the list of the samples of an image.
@ SB_OBJ_LEARNING
Object is used for learning.
Definition: sb.h:7293
@ SB_OBJ_TEST
Object is not used for learning.
Definition: sb.h:7292
@ SB_SAMPLE_OPTIONAL
Definition: sb.h:7383
@ SB_SAMPLE_REQUIRED
Definition: sb.h:7375
@ SB_TRUTH_MODEL_DISABLED
A sample of a disabled model.
Definition: sb.h:7361
@ SB_TRUTH_TRUE_NEGATIVE
Truth True Negative.
Definition: sb.h:7325
@ SB_TRUTH_FALSE_NEGATIVE
Truth False Negative.
Definition: sb.h:7337
@ SB_TRUTH_TRUE_POSITIVE
Truth True Positive.
Definition: sb.h:7313
@ SB_TRUTH_UNDEFINED
Truth not defined.
Definition: sb.h:7307
@ SB_TRUTH_OPTIONAL_POSITIVE
Truth Optional Positive.
Definition: sb.h:7343
@ SB_TRUTH_OPTIONAL_NEGATIVE
Truth Optional Negative.
Definition: sb.h:7349
@ SB_TRUTH_FALSE_POSITIVE
Truth False Positive.
Definition: sb.h:7331
@ SB_TRUTH_OUT_OF_ROI
Truth Out Of ROI.
Definition: sb.h:7356
sb_t_err sb_solution_set_current_project(const char *const solution_file, const char *const project_uuid)
Set current project in the solution_file.
sb_t_err sb_solution_get_info(const char *const solution_file, sb_t_solution_info **const solution)
Returns the informations contained in the solution_file.
sb_t_err sb_solution_remove_project(const char *const solution_file, const char *const project_uuid)
Delete the project with the specified uuid from file.
sb_t_err sb_solution_get_version(const char *const solution_file, sb_t_version *version, char *const version_str, int size_version_str)
Gets the version of the solution file.
sb_t_err sb_solution_destroy_info(sb_t_solution_info **const solution)
Destroys the structure of the solution informations.
sb_t_err sb_stat_from_res(sb_t_stat *const stat, const sb_t_res *const res)
Computes the sb_t_stat from sb_t_res.
sb_t_err sb_stat_destroy(sb_t_stat **const stat)
Destroys the sb_t_stat structure.
sb_t_err sb_stat_format(const sb_t_stat *const stat, char *const str, int str_size)
Formats the sb_t_stat structure.
sb_t_err sb_stat_reset(sb_t_stat *const stat, const sb_t_par *const par)
Resets the sb_t_stat structure.
sb_t_err sb_surface_model_to_gl(const sb_t_par *const par, const char *const model_name, unsigned char *const gl, unsigned char *const gl_opt)
Gets the model defects gray level for both required and optional model defects.
#define SB_DEVICES_MAX_NUMBER
Maximum number of computational devices managed by the sb library.
Definition: sb.h:9158
sb_t_svl_command
Enumerates the actions that SVL has to do after a stop.
Definition: sb.h:8604
sb_t_err(* sb_fp_svl_pre_elaboration)(const SB_HANDLE image_info, void *const user_data, const char *const image_file, int image_index, sb_t_svl_pre_elaboration *const pre_elaboration)
Definition of the callback for image pre elaboration.
Definition: sb.h:8690
sb_t_perturbation_mode
Enumerates the mode of the perturbations.
Definition: sb.h:8825
#define SB_PAR_FEATURES_NAMES_LEN
Maximum lenght, in byte, of the features names string.
Definition: sb.h:8563
sb_t_err sb_svl_stop_request(SB_HANDLE handle)
Sends a request to the SVL for stop.
sb_t_err sb_svl_destroy_res(sb_t_svl_res **const res)
Destroys the structure of the results of SVL.
const char * sb_perturbation_mode_format(sb_t_perturbation_mode mode)
Returns the string of the Deep Learning SVL image perturbation mode.
sb_t_svl_par_optimization_mode
Describes the optimization mode of SVL.
Definition: sb.h:8647
sb_t_err(* sb_fp_svl_progress)(void *const user_data, sb_t_svl_res *res, int force)
Definition of the callback for the working progress.
Definition: sb.h:8702
sb_t_perturbation_type
Enumerates the range of application of the perturbations.
Definition: sb.h:8858
const char * sb_perturbation_type_format(sb_t_perturbation_type type)
Returns the string of the Deep Learning SVL image perturbation type.
sb_t_err sb_svl_reset(SB_HANDLE handle)
Resets the history of previous executions of the SVL.
sb_t_err(* sb_fp_svl_command)(void *const user_data, sb_t_svl_res *res, sb_t_svl_command *const command, const char *const msg)
Definition of the callback that the SVL calls when it needs to know how to continue.
Definition: sb.h:8715
const char * sb_feature_description(const char *const feature)
Returns a string with a brief description of a feature.
sb_t_network_type
Deep learning network types.
Definition: sb.h:8721
sb_t_err sb_svl_run(SB_HANDLE handle)
Runs the SVL.
const char * sb_svl_command_format(sb_t_svl_command command)
Returns the string of the SVL command.
const char * sb_network_type_format(sb_t_network_type type)
Returns the string of the network type.
sb_t_err sb_svl_get_res(SB_HANDLE handle, sb_t_svl_res **const res)
Retrieves the results of SVL.
sb_t_err sb_svl_clone_res(sb_t_svl_res **const dst, const sb_t_svl_res *const src)
Copies the structure of the results of SVL.
sb_t_svl_stop_reason
Enumerates the reasons why SVL is terminated or why the callback sb_t_svl_par::fp_command has been ca...
Definition: sb.h:11228
const char * sb_svl_par_optimization_mode_format(sb_t_svl_par_optimization_mode mode)
Returns the string of the SVL optimization mode.
@ SB_SVL_COMMAND_CONTINUE_NO_RESET
The SVL continues without reset.
Definition: sb.h:8622
@ SB_SVL_COMMAND_NEXT_STEP
The SVL go to next step.
Definition: sb.h:8626
@ SB_SVL_COMMAND_STOP
The SVL stops and exits, applying the training to the module.
Definition: sb.h:8609
@ SB_SVL_COMMAND_CONTINUE
The SVL continues and, if necessary, resets the training.
Definition: sb.h:8613
@ SB_SVL_COMMAND_ABORT
The SVL stops and exits, without applying the training reached to the module.
Definition: sb.h:8618
@ SB_PERTURBATION_MODE_OFFLINE
Offline perturbation.
Definition: sb.h:8836
@ SB_PERTURBATION_MODE_ONLINE
Online perturbation.
Definition: sb.h:8830
@ SB_PERTURBATION_MODE_BOTH
Both online and offline perturbations.
Definition: sb.h:8841
@ SB_SVL_PAR_OPTIMIZATION_TIME_SLOW
Definition: sb.h:8653
@ SB_SVL_PAR_OPTIMIZATION_USE_SELECTED
Definition: sb.h:8668
@ SB_SVL_PAR_OPTIMIZATION_TIME_MEDIUM
Definition: sb.h:8658
@ SB_SVL_PAR_OPTIMIZATION_TIME_FAST
Definition: sb.h:8663
@ SB_PERTURBATION_TYPE_IMAGE
The whole image is perturbated.
Definition: sb.h:8862
@ SB_PERTURBATION_TYPE_BOTH
Both image and defects perturbation type.
Definition: sb.h:8871
@ SB_PERTURBATION_TYPE_DEFECTS
Only the defect area is perturbated.
Definition: sb.h:8866
@ SB_NETWORK_TYPE_EFFICIENTNET_B1
Deep Learning EfficientNet b1.
Definition: sb.h:8732
@ SB_NETWORK_TYPE_EFFICIENTNET_B2
Deep Learning EfficientNet b2.
Definition: sb.h:8737
@ SB_NETWORK_TYPE_EFFICIENTNET_B0
Deep Learning EfficientNet b0.
Definition: sb.h:8727
@ SB_NETWORK_TYPE_SDINET0_331
Deep Learning Surface Defects Inspection Network 0 with input size 331x331.
Definition: sb.h:8742
@ SB_NETWORK_TYPE_ICNET0_128
Deep Learning Image Classification Network 0 with input size 128x128.
Definition: sb.h:8752
@ SB_NETWORK_TYPE_ICNET0_64
Deep Learning Image Classification Network 0 with input size 64x64.
Definition: sb.h:8747
@ SB_SVL_STOP_WARNING
Send a warning message.
Definition: sb.h:11309
@ SB_SVL_STOP_RESET_MANDATORY
Request for a mandatory reset of SVL.
Definition: sb.h:11269
@ SB_SVL_STOP_RESET_OPTIONAL
Ask for an optional reset of SVL.
Definition: sb.h:11289
@ SB_SVL_STOP_USER_REQUEST
The user has stopped the SVL.
Definition: sb.h:11247
@ SB_SVL_STOP_CONFLICT
There are errors which can not be eliminated.
Definition: sb.h:11242
@ SB_SVL_STOP_NONE
SVL finishes without errors.
Definition: sb.h:11232
@ SB_SVL_STOP_MEMORY
Insufficient memory to complete the SVL.
Definition: sb.h:11252
sb_t_err sb_xml_node_remove_itself(SB_HANDLE node)
Removes the current node.
sb_t_err sb_xml_node_count(SB_HANDLE parent, const char *const name, int *const cnt)
Gets the number of child nodes with the specified name.
sb_t_err sb_xml_node_set_attribute(SB_HANDLE node, const char *const attribute_name, const char *const content)
Sets the content of the attribute with the specified name.
SB_HANDLE sb_xml_node_add(SB_HANDLE parent, const char *const name, const char *const content)
Adds the node to the parent node.
SB_HANDLE sb_xml_node_get_child(SB_HANDLE parent)
Gets the first child of the node.
sb_t_err sb_xml_node_get_string_malloc(SB_HANDLE parent, const char *const name, char **const str)
Gets the content of the node with the specified name, allocating the string of the needed lenght.
SB_HANDLE sb_xml_node_next(SB_HANDLE node)
Gets the next sibling node.
sb_t_err sb_xml_node_get_attribute(SB_HANDLE node, const char *const attribute_name, char *const str, size_t str_size)
Gets the content of the attribute with the specified name.
sb_t_err sb_xml_node_get_name(SB_HANDLE node, char *const str, size_t str_size)
Gets the name of the current node.
SB_HANDLE sb_xml_node_previous(SB_HANDLE node)
Gets the previous sibling node.
sb_t_err sb_xml_node_remove(SB_HANDLE parent, const char *const name)
Removes the node with the specified name.
sb_t_err sb_xml_node_set_itself(SB_HANDLE node, const char *const content)
Sets the content of the node.
SB_HANDLE sb_xml_node_get(SB_HANDLE parent, const char *const name)
Gets the handle of the xml node with the specified name.
sb_t_err sb_xml_node_get_string(SB_HANDLE parent, const char *const name, char *const str, size_t str_size)
Gets the content of the node with the specified name.
sb_t_err sb_xml_node_set(SB_HANDLE parent, const char *const name, const char *const content)
Sets the content of the node with the specified name. The function checks if the node exists and othe...
Defines the color in the format BGRA.
Definition: sb.h:5564
unsigned char g
green component of color
Definition: sb.h:5566
unsigned char r
red component of color
Definition: sb.h:5567
unsigned char a
trasparency of color
Definition: sb.h:5572
unsigned char b
blue component of color
Definition: sb.h:5565
Defines the parameters for blob analysis.
Definition: sb.h:7848
int verbosity
Verbosity level.
Definition: sb.h:7883
sb_t_range width
Range of weight, value in pixel.
Definition: sb.h:7861
int blob_contour
Set to 1 if you want the contour of each blob.
Definition: sb.h:7872
sb_t_range area
Range of area, value in pixel.
Definition: sb.h:7859
sb_t_range height
Range of height, value in pixel.
Definition: sb.h:7860
int keep_deleted
If different than 0, deleted blobs are kept in the list and marked as deleted.
Definition: sb.h:7882
sb_t_range merge_area
Range of area after merge, value in pixel.
Definition: sb.h:7879
int blob_rle
Set to 1 if you want the rle of each blob.
Definition: sb.h:7867
int merge_distance
Blobs with a distance inferior or equal to the value are merged together.
Definition: sb.h:7878
sb_t_range merge_width
Range of weight after merge, value in pixel.
Definition: sb.h:7881
sb_t_range merge_height
Range of height after merge, value in pixel.
Definition: sb.h:7880
sb_t_pixel_connection connection_type
Pixel connection type.
Definition: sb.h:7862
Defines a blob.
Definition: sb.h:7927
sb_t_truth truth
Truth value of the blob computed by the blob analysis routine, otherwise SB_TRUTH_UNDEFINED.
Definition: sb.h:7947
int contour_size
Number of point of the blob contour, ie the number of elements of the array contour.
Definition: sb.h:7946
sb_t_point * contour
Pointer to the array of the points of the blob contour.
Definition: sb.h:7945
sb_t_rle rle
Pointer to RLE buffer.
Definition: sb.h:7939
float bar_x
Abscissa of the blob baricenter.
Definition: sb.h:7928
sb_t_rect rect
Bounding box of the blob.
Definition: sb.h:7933
int od
Optical density.
Definition: sb.h:7931
int area
Area of the blob, number of the pixel.
Definition: sb.h:7930
sb_t_blob_deleted deleted
Blob is marked as deleted.
Definition: sb.h:7955
int lut
Value of the lut.
Definition: sb.h:7932
float bar_y
Ordinate of the blob baricenter.
Definition: sb.h:7929
Defines the information about the blob analysis.
Definition: sb.h:7890
long long time_export
blobs esporting time, in us.
Definition: sb.h:7896
int deleted_for_area_min
Number of blobs deleted for an area too small, both during analysis and during merging.
Definition: sb.h:7901
int deleted_for_width_max
Number of blobs deleted for a width too big, both during analysis and during merging.
Definition: sb.h:7902
int deleted_for_area_max
Number of blobs deleted for an area too big, both during analysis and during merging.
Definition: sb.h:7900
long long time_blob
time, in us, of the blobs extraction.
Definition: sb.h:7892
int merged
Number of blobs merged with another blob.
Definition: sb.h:7898
int deleted_for_height_min
Number of blobs deleted for an height too small, both during analysis and during merging.
Definition: sb.h:7905
long long time_rle
time, in us, of the rle extraction.
Definition: sb.h:7891
sb_t_range deleted_height
height range of the deleted blobs for a out-of-range height, both during analysis and during merging.
Definition: sb.h:7908
int deleted_for_height_max
Number of blobs deleted for an height too big, both during analysis and during merging.
Definition: sb.h:7904
long long time_sort
blobs sorting time, in us.
Definition: sb.h:7895
sb_t_range deleted_area
area range of the deleted blobs for a out-of-range area, both during analysis and during merging.
Definition: sb.h:7906
int deleted_for_width_min
Number of blobs deleted for a width too small, both during analysis and during merging.
Definition: sb.h:7903
long long time_contour
time, in us, of the blobs contour estraction.
Definition: sb.h:7893
sb_t_range deleted_width
width range of the deleted blobs for a out-of-range width, both during analysis and during merging.
Definition: sb.h:7907
int deleted
Number of blobs deleted, both during analysis and during merging.
Definition: sb.h:7899
long long time_merge
blobs merging time, in us.
Definition: sb.h:7894
long long time_total
total time, in us.
Definition: sb.h:7897
Defines a blobs list.
Definition: sb.h:7963
sb_t_blob * blob
Array of the blobs.
Definition: sb.h:7965
sb_t_blobs_info info
Informations about the blob analysis.
Definition: sb.h:7966
sb_t_blobs_info info_gt
Informations about the blob analysis of the ground truth areas.
Definition: sb.h:7967
int size
Number of blobs, ie number of elements of the array sb_t_blobs::blob .
Definition: sb.h:7964
Informations about a computing device.
Definition: sb.h:5487
sb_t_memory_info memory
Memory information about the device and its process.
Definition: sb.h:5518
int available
Indicates if the device is available on the PC in use.
Definition: sb.h:5524
int id
Identifier of the device.
Definition: sb.h:5513
sb_t_device_type type
Device type.
Definition: sb.h:5491
List of computing devices available on the machine.
Definition: sb.h:5532
int size
Number of available devices.
Definition: sb.h:5542
sb_t_device_info * device
Array of devices.
Definition: sb.h:5537
Property of computational devices.
Definition: sb.h:9165
sb_t_device_type type
Device type.
Definition: sb.h:9169
Defines the single file.
Definition: sb.h:5927
char * fname
Name of file excluded the path.
Definition: sb.h:5929
defines the list of the file in a folder.
Definition: sb.h:5936
int path_length
Number of characters of the path.
Definition: sb.h:5939
sb_t_file * file
Array of files.
Definition: sb.h:5937
int n
Number of elements of the array file.
Definition: sb.h:5938
Image information details structure.
Definition: sb.h:10829
sb_t_image_info_type type
Type of the image.
Definition: sb.h:10831
sb_t_project_info project_info
Project information data.
Definition: sb.h:10830
Array of the image information details structure.
Definition: sb.h:10838
sb_t_image_info_detail * details
Array of sb_t_image_info_detail.
Definition: sb.h:10839
Defines an image.
Definition: sb.h:6659
int bytes_per_pixel
Number of bytes of each pixel.
Definition: sb.h:6677
int width
Width, in pixel, of the image.
Definition: sb.h:6663
unsigned char * data
Pointer to the data.
Definition: sb.h:6660
unsigned char * free_data
Definition: sb.h:6661
sb_t_image_format format
Format of the image pixel.
Definition: sb.h:6669
int height
Height, in pixel, of the image.
Definition: sb.h:6664
sb_t_rle rle
Image rle data (valid in case the image compression type is SB_IMAGE_COMPRESS_RLE)
Definition: sb.h:6680
int size
Dimension, in bytes, of the vector sb_t_image::data .
Definition: sb.h:6666
int width_step
Number of bytes to move the pointer to one row to the next one.
Definition: sb.h:6665
sb_t_image_compress_type compression
Image compression type.
Definition: sb.h:6679
int free_data_size
Definition: sb.h:6667
General information about sb library and computing devices like CPU and GPUs.
Definition: sb.h:5549
sb_t_devices_info devices
List of available computing devices.
Definition: sb.h:5557
sb_t_version version
Version of the sb library.
Definition: sb.h:5550
signed long long malloc_size
Current allocated memory, expressed in bytes, by sb the library.
Definition: sb.h:5554
int dl_modules_enabled
Value is different from 0 if Deep Learning modules are enabled.
Definition: sb.h:5556
signed long long malloc_size_max
Maximum allocated memory, expressed in bytes, by sb the library.
Definition: sb.h:5555
Defines the configurations of the license.
Definition: sb.h:6198
float speed_boost
Maximum detection speed boost allowed with the current license configuration.
Definition: sb.h:6228
int num_features
Maximum number of features allowed with the current license configuration.
Definition: sb.h:6212
int num_models
Maximum number of models allowed with the current license configuration.
Definition: sb.h:6205
sb_t_license_configuration_id id
License configuration identifier.
Definition: sb.h:6199
int num_threads
Maximum number of threads allowed with the current license configuration.
Definition: sb.h:6221
Defines all the attributes and properties of a license module.
Definition: sb.h:6236
int training
Training status.
Definition: sb.h:6251
signed long long time_start
Start date of the license.
Definition: sb.h:6262
sb_t_license_module_status status
The license status.
Definition: sb.h:6279
signed long long time_end
End date of the license.
Definition: sb.h:6268
sb_t_err err
The license error.
Definition: sb.h:6285
signed long long remain
Number of second before expiration.
Definition: sb.h:6273
sb_t_version version
Version of the module when the license was created.
Definition: sb.h:6256
sb_t_license_configuration configuration
License configuration.
Definition: sb.h:6245
sb_t_license_type type
License type of the module.
Definition: sb.h:6240
Defines the license and its properties.
Definition: sb.h:6300
signed long long time_modify
Last modification date.
Definition: sb.h:6326
signed long long time_save
Last save date.
Definition: sb.h:6331
signed long long time_create
Creation date.
Definition: sb.h:6321
Struct that defines the coordinates of a point of a lut.
Definition: sb.h:6491
unsigned short y
ordinate of the point.
Definition: sb.h:6493
unsigned short x
abscissa of the point.
Definition: sb.h:6492
Memory information.
Definition: sb.h:5461
signed long long system_free
system free physical memory, in bytes
Definition: sb.h:5469
signed long long proc_virtual_used
virtual memory used by process, in bytes
Definition: sb.h:5462
signed long long proc_physical_used
physical memory used by the process, in bytes
Definition: sb.h:5465
signed long long system_total
system physical memory, in bytes
Definition: sb.h:5467
signed long long system_used
system used physical memory, in bytes
Definition: sb.h:5468
signed long long proc_virtual_used_max
maximum virtual memory used by the process, in bytes
Definition: sb.h:5463
signed long long proc_virtual_max
maximum virtual memory usable by the process, in bytes
Definition: sb.h:5464
signed long long proc_physical_used_max
maximum physical memory used by the process, in bytes
Definition: sb.h:5466
Results of OCR analysis.
Definition: sb.h:9961
int lines
Number of the lines identified.
Definition: sb.h:9968
char * string
ocr result in string format
Definition: sb.h:9966
int words
Number of the words identified.
Definition: sb.h:9967
Information on what sb_project_set_par and sb_image_info_apply_par_changes do when they apply the new...
Definition: sb.h:10592
char * models
String of the name of the models to be invalidated.
Definition: sb.h:10597
sb_t_par par_cur
The current parameters of the project.
Definition: sb.h:10609
sb_t_par par_new
The new parameters that the user wants to set in the project.
Definition: sb.h:10610
Level parameters.
Definition: sb.h:9356
float scale
Scale factor.
Definition: sb.h:9368
int enabled
Enabling flag of the level.
Definition: sb.h:9363
Levels parameter array.
Definition: sb.h:9377
int size
Number of levels that is number of elements of the array level.
Definition: sb.h:9387
Information about mapping between old and new models and levels in the sb_t_par structure.
Definition: sb.h:10580
int index
Index of the corresponding model, -1 if not present.
Definition: sb.h:10581
Parameters of a model.
Definition: sb.h:9395
sb_t_par_perturbations perturbations
Perturbations of the samples.
Definition: sb.h:9504
sb_t_size obj_size
Model size.
Definition: sb.h:9470
int num_occurrences
Number of occurrences of the model that the function sb_project_get_res should export.
Definition: sb.h:9598
sb_t_size obj_stride_coarse
Coarse search step.
Definition: sb.h:9562
float defect_area_threshold
Threshold weight value for the bad area of the sample.
Definition: sb.h:9621
sb_t_rgba color_opt
Color of the optional defects.
Definition: sb.h:9520
sb_t_rgba color
Color of the defects.
Definition: sb.h:9512
float defect_area_percentage
Threshold percentage bad area of the sample to discard it as an occurrency.
Definition: sb.h:9610
sb_t_size obj_stride_fine
Fine search step.
Definition: sb.h:9576
int enabled
Enabling status of the model.
Definition: sb.h:9486
sb_t_par_levels levels
Array of levels parameters for this model.
Definition: sb.h:9498
sb_t_size obj_min_distance
Minimum distance between two samples.
Definition: sb.h:9547
Array of models parameters.
Definition: sb.h:9628
int size
Number of models that is number of elements of the array model.
Definition: sb.h:9639
Describes the perturbation of a sample.
Definition: sb.h:9292
sb_t_range angle_range
Angular range, in degrees, for random rotation.
Definition: sb.h:9321
int flip_vertical
Flip around x-axis. 3th operation.
Definition: sb.h:9313
int angle
Rotation angle, in degrees, of the sample. 1th operation.
Definition: sb.h:9297
int flip_horizontal
Flip around y-axis. 2th operation.
Definition: sb.h:9305
int num_synthetic_samples
Number of synthetic sample to generated with a random angle in the range sb_t_par_perturbation::angle...
Definition: sb.h:9328
List of the perturbations of a sample.
Definition: sb.h:9338
int size
Number of used elements of the array perturbation.
Definition: sb.h:9347
Shallow Learning modules parameters.
Definition: sb.h:9646
float speed_boost
Detection speed boost.
Definition: sb.h:9670
int detection_out_of_roi
Allow the detection of occurrencies at the extremities or partially outside the analysis roi.
Definition: sb.h:9686
Project parameters.
Definition: sb.h:9694
int surface_blob_analysis
Enables the blob analysis.
Definition: sb.h:9793
sb_t_devices_par devices
Devices used for detection.
Definition: sb.h:9757
sb_t_par_sl sl
Shallow Learning modules parameters.
Definition: sb.h:9799
sb_t_par_models models
Models parameters.
Definition: sb.h:9701
int num_threads
Maximum number of OpenMP threads that detection can use.
Definition: sb.h:9744
sb_t_floating_point_op_type floating_point_precision
Floating Point precision used to run operations.
Definition: sb.h:9775
sb_t_svl_par svl
SVL parameters.
Definition: sb.h:9805
sb_t_project_type project_type
Project type.
Definition: sb.h:9695
sb_t_interpolation_mode resize_mode
Interpolation mode used to resize the images.
Definition: sb.h:9764
sb_t_rgba color_opt
Color of the optional defects for all models.
Definition: sb.h:9783
sb_t_blob_par blob_par
Surface blob analysis parameters.
Definition: sb.h:9750
Represents an ordered pair of integer x and y coordinates that defines a point in a two-dimensional p...
Definition: sb.h:5168
int x
abscissa of the point
Definition: sb.h:5169
int y
ordinate of the point
Definition: sb.h:5170
Project info structure.
Definition: sb.h:8134
sb_t_project_type type
Project type.
Definition: sb.h:8135
Array of the projects info.
Definition: sb.h:8145
sb_t_project_info * info
Array of solution project information.
Definition: sb.h:8146
int size
Number of projects.
Definition: sb.h:8147
Represents an ordered pair of float minimum and maximum values that defines a range.
Definition: sb.h:5204
float max
maximum value
Definition: sb.h:5206
float min
minumum value
Definition: sb.h:5205
Represents an ordered pair of integer minimum and maximum values that defines a range.
Definition: sb.h:5195
int max
maximum value
Definition: sb.h:5197
int min
mininum value
Definition: sb.h:5196
Defines the position and size of a rectangle in a two-dimensional plane.
Definition: sb.h:5213
int y
y coordinate of the upper left corner of the rectangle
Definition: sb.h:5215
int x
x coordinate of the upper left corner of the rectangle
Definition: sb.h:5214
int width
width of the rectangle
Definition: sb.h:5216
int height
height of the rectangle
Definition: sb.h:5217
Defines the results of a model.
Definition: sb.h:10064
sb_t_surface_res * surface
Surface model analysis result.
Definition: sb.h:10134
int out_of_roi
Count of Out Of ROI.
Definition: sb.h:10119
int disabled
Count of samples with model disabled.
Definition: sb.h:10127
int tp
Count of True Positive.
Definition: sb.h:10071
int on
Count of Optional Negative.
Definition: sb.h:10111
int fp
Count of False Positive.
Definition: sb.h:10087
int tn
Count of True Negative.
Definition: sb.h:10079
int op
Count of Optional Positive.
Definition: sb.h:10103
int fn
Count of False Negative.
Definition: sb.h:10095
Defines the results of the models.
Definition: sb.h:10142
int size
Number of element of the array sb_t_res_models::model.
Definition: sb.h:10144
sb_t_res_model * model
Array of the models result.
Definition: sb.h:10143
Results of detection.
Definition: sb.h:10193
int is_valid
It is 1 when the fields of the structure are valid, otherwise it is 0.
Definition: sb.h:10200
sb_t_samples samples
Samples found in the image.
Definition: sb.h:10213
long long time_us
Elaboration time of the image, in us.
Definition: sb.h:10245
sb_t_err err
Error of last image processing with sb_project_detection function .
Definition: sb.h:10256
sb_t_par par
Project parameters.
Definition: sb.h:10206
sb_t_ocr_res ocr
Result of OCR analysis.
Definition: sb.h:10219
sb_t_devices_par devices
The devices used to compute the current results.
Definition: sb.h:10250
sb_t_res_model global
Global results.
Definition: sb.h:10227
int img_width_circular
Original width of the image, before the extension in the x-axis.
Definition: sb.h:10240
sb_t_res_models models
Models results.
Definition: sb.h:10233
Defines the color in the format RGBA.
Definition: sb.h:5597
unsigned char r
red component of color
Definition: sb.h:5598
unsigned char g
green component of color
Definition: sb.h:5599
unsigned char b
blue component of color
Definition: sb.h:5600
unsigned char a
trasparency of color
Definition: sb.h:5605
Define a RLE segment.
Definition: sb.h:6638
int offset
Offset of the segment from the beginning of the uncompressed buffer, in bytes.
Definition: sb.h:6643
int x
x-coordinate of the beginning of the segment
Definition: sb.h:6640
int length
Length of the segment.
Definition: sb.h:6642
unsigned int value
Value of the segment.
Definition: sb.h:6639
int y
y-coordinate of the beginning of the segment
Definition: sb.h:6641
Defines a RLE.
Definition: sb.h:6650
sb_t_rle_seg * seg
Pointer to RLE buffer.
Definition: sb.h:6651
int size
Number of elements of seg array.
Definition: sb.h:6652
Defines a roi.
Definition: sb.h:7049
sb_t_rect bounding_box
Bounding box of the roi (Not used for defects roi)
Definition: sb.h:7050
sb_t_rgba color
Color RGBA of the roi (Not used for defects roi)
Definition: sb.h:7051
sb_t_image * img
8bit BW image.
Definition: sb.h:7053
Image of weights of the sample.
Definition: sb.h:7422
float max
maximum weight corresponding, in the image, the to value 255.
Definition: sb.h:7424
sb_t_image * img
Image of the weights of the sample, format is SB_IMAGE_FORMAT_BW8.
Definition: sb.h:7423
float min
minimum weight corresponding, in the image, the to value 1.
Definition: sb.h:7425
Sample of an image.
Definition: sb.h:7438
float IoU
Definition: sb.h:7647
sb_t_point centre_warp
Coordinates of the centre in the warped image.
Definition: sb.h:7468
sb_t_point centre
Coordinates of the centre of the sample.
Definition: sb.h:7446
void * user_data
Pointer to the user data.
Definition: sb.h:7600
float defect_area_percentage
Definition: sb.h:7652
sb_t_truth truth
Truth of the sample.
Definition: sb.h:7565
int user_data_size
Size, in bytes, of sb_t_sample::user_data buffer.
Definition: sb.h:7604
float scale
Scale factor.
Definition: sb.h:7524
int is_near
FALSE NEGATIVE with some other sample close to it.
Definition: sb.h:7614
sb_t_sample_weights_image weights_image
Image of the weights of the sample.
Definition: sb.h:7558
sb_t_sample_classify_mode classify_mode
Classification mode.
Definition: sb.h:7593
sb_t_obj_type type
Sample type.
Definition: sb.h:7529
float weight
Weight of classification.
Definition: sb.h:7543
Samples of an image.
Definition: sb.h:7697
int size
Number of samples that is number of elements of the array sb_t_samples::sample .
Definition: sb.h:7699
sb_t_sample * sample
Pointer to the array of sample. The number of element is sb_t_samples::size .
Definition: sb.h:7698
Represents an ordered pair of float x and y length that defines a rectangle in a two-dimensional plan...
Definition: sb.h:5186
float height
height
Definition: sb.h:5188
float width
width
Definition: sb.h:5187
Represents an ordered pair of integer x and y length that defines a rectangle in a two-dimensional pl...
Definition: sb.h:5177
int height
height
Definition: sb.h:5179
int width
width
Definition: sb.h:5178
Solution info structure.
Definition: sb.h:8166
sb_t_version version
Version of the solution.
Definition: sb.h:8169
sb_t_projects_info projects
Array of the projects info.
Definition: sb.h:8167
int current_project
Index of the current project in the projects array.
Definition: sb.h:8168
Statistics of a model.
Definition: sb.h:10307
sb_t_range_flt fp_weight
Range of classification weight of the False Positive samples.
Definition: sb.h:10386
int fn
Count of False Negative.
Definition: sb.h:10347
int on
Count of Optional Negative.
Definition: sb.h:10366
float recall
recall
Definition: sb.h:10402
int tp
Count of True Positive.
Definition: sb.h:10316
float specificity
specificity
Definition: sb.h:10414
sb_t_range_flt op_weight
Range of classification weight of the Optional Positive samples.
Definition: sb.h:10388
sb_t_range_flt or_weight
Range of classification weight of the out of the ROI samples.
Definition: sb.h:10390
float score
Level score.
Definition: sb.h:10422
int op
Count of Optional Positive.
Definition: sb.h:10357
int mod_disabled
Count of samples with model disabled.
Definition: sb.h:10383
int fp
Count of False Positive.
Definition: sb.h:10337
sb_t_range_flt tp_weight
Range of classification weight of the True Positive samples.
Definition: sb.h:10384
sb_t_range_flt fn_weight
Range of classification weight of the False Negative samples.
Definition: sb.h:10387
sb_t_range_flt on_weight
Range of classification weight of the Optional Negative samples.
Definition: sb.h:10389
float accuracy
accuracy
Definition: sb.h:10408
sb_t_range_flt tn_weight
Range of classification weight of the True Negative samples.
Definition: sb.h:10385
int out_of_roi
Count of Out Of ROI.
Definition: sb.h:10375
float precision
precision
Definition: sb.h:10396
int tn
Count of True Negative.
Definition: sb.h:10327
Statistics of a model.
Definition: sb.h:10430
int size
Number of models that is number of elements of the array model.
Definition: sb.h:10440
Statistics of the elaborations done with the function sb_project_detection .
Definition: sb.h:10452
float specificity
Specificity.
Definition: sb.h:10517
int good
Counter of "Good" images.
Definition: sb.h:10475
long long time_us
Total analysis time in microsecond.
Definition: sb.h:10519
long long time_blob_us
Total blob analysis time in microsecond. This time is included in the time_us.
Definition: sb.h:10521
float accuracy
Accuracy.
Definition: sb.h:10510
float recall
Recall.
Definition: sb.h:10503
int no_good
Counter of "No Good" images.
Definition: sb.h:10467
long long time_us_average
Average analyis time in microsecond.
Definition: sb.h:10520
int elaborated
Count of the elaborated images.
Definition: sb.h:10523
sb_t_stat_model global
Global statistics.
Definition: sb.h:10460
int overkill
Counter of "Overkill" images.
Definition: sb.h:10482
sb_t_stat_models models
Array of the statistics of the models.
Definition: sb.h:10459
int escape
Counter of "Escape" images.
Definition: sb.h:10489
sb_t_par par
Project parameters.
Definition: sb.h:10458
float precision
Precision.
Definition: sb.h:10496
long long time_blob_us_average
Average blob analyis time in microsecond.
Definition: sb.h:10522
Defines the result of the Surface analysis.
Definition: sb.h:9979
sb_t_point ul
Coordinates of the upper left corner.
Definition: sb.h:9980
sb_t_image * model
Model plane image.
Definition: sb.h:9989
sb_t_blobs * blobs
Defects blobs extracted.
Definition: sb.h:10032
sb_t_image * truth
Truth plane image.
Definition: sb.h:10003
sb_t_image * weight
Image of the voting plan.
Definition: sb.h:10022
sb_t_surface_image_truth image_truth
Truth of the image.
Definition: sb.h:10038
Deep Learning modules parameters.
Definition: sb.h:8772
sb_t_image_format image_format
Network input image format.
Definition: sb.h:8809
int n_channels
Deep Learning Network input channels.
Definition: sb.h:8817
sb_t_size input_size
Network input size.
Definition: sb.h:8800
sb_t_network_type type
Network type.
Definition: sb.h:8792
Describes the perturbation of the image / defect.
Definition: sb.h:8888
sb_t_range angle_range
Angular range, in degrees, for random rotation.
Definition: sb.h:8950
float shift_horizontal
Maximum shift along x-axis.
Definition: sb.h:8934
sb_t_perturbation_type type
Select the perturbation type.
Definition: sb.h:8908
int flip_horizontal
Flip around y-axis.
Definition: sb.h:8917
float stretch_contrast
Maximum variation for histogram stretching.
Definition: sb.h:8967
float shift_vertical
Maximum shift along y-axis.
Definition: sb.h:8942
sb_t_perturbation_mode mode
Select the perturbation mode.
Definition: sb.h:8901
int flip_vertical
Flip around x-axis.
Definition: sb.h:8926
float delta_scale
Maximum variation for defects scaling.
Definition: sb.h:8974
float delta_brightness
Maximum delta of brightness.
Definition: sb.h:8959
SVL parameters to configure the Deep Learning training.
Definition: sb.h:8987
int batch_size
Size of the batch used during SVL.
Definition: sb.h:9043
int save_best
At the end of the training, the best internal parameters configuration is recovered.
Definition: sb.h:9070
sb_t_size tile_factor
Number of horizontal and vertical tiles used to process the image.
Definition: sb.h:9091
float learning_rate
Learning rate.
Definition: sb.h:9027
int pre_trained
The network is loaded as pre-trained, i.e. network parameters are not randomly initialized before tra...
Definition: sb.h:9010
sb_t_svl_dl_par_network network
Network parameters.
Definition: sb.h:9001
int num_epochs
Number of epochs.
Definition: sb.h:9033
sb_t_svl_dl_par_perturbation perturbations
Perturbations for deep learning training.
Definition: sb.h:9016
float validation_percentage
Validation percentage.
Definition: sb.h:9062
Contains information regarding the error of the SVL.
Definition: sb.h:11319
sb_t_err err
Error code sb_t_err.
Definition: sb.h:11320
float dist
Distance, in pixel, between the samples.
Definition: sb.h:11326
float min_dist
Minimum allowed distance between samples.
Definition: sb.h:11327
int num_samples
Number of samples.
Definition: sb.h:11322
SVL parameters.
Definition: sb.h:9187
sb_fp_svl_progress fp_progress
The SVL calls this callback to notify the user the results of SVL.
Definition: sb.h:9198
int num_threads
Maximum number of OpenMP threads that SVL can use.
Definition: sb.h:9239
sb_t_svl_sl_par sl
Shallow Learning SVL parameters.
Definition: sb.h:9271
sb_fp_svl_pre_elaboration fp_pre_elaboration
Callback to execute an image pre elaboration.
Definition: sb.h:9192
float free_memory_percentage
Percentage of system memory that the svl tries to leave free.
Definition: sb.h:9230
sb_t_devices_par devices
Devices used for SVL/training.
Definition: sb.h:9265
sb_fp_svl_command fp_command
Callback called by SVL to allow the user to decide how to continue when particular situations happen,...
Definition: sb.h:9204
void * user_data
Pointer to data which is passed to the callbacks.
Definition: sb.h:9210
sb_t_svl_dl_par dl
Deep Learning SVL parameters.
Definition: sb.h:9277
int reproducibility
Enable the reproducibility of the training.
Definition: sb.h:9255
Contains the results of the image pre-processing.
Definition: sb.h:8572
sb_t_image * image
Pre processed image, that is the warped image.
Definition: sb.h:8580
SB_HANDLE warped2ori
lut of the samples coordinates from warped image to the original one.
Definition: sb.h:8592
sb_t_roi * roi
Image elaboration ROI.
Definition: sb.h:8590
int img_width_circular
Original width, in pixel, of the image.
Definition: sb.h:8588
sb_t_roi * roi_defects
Image defects ROI.
Definition: sb.h:8591
Results of a training epoch.
Definition: sb.h:11467
float validation_accuracy
SVL validation accuracy metric.
Definition: sb.h:11510
float loss
SVL loss.
Definition: sb.h:11475
float validation_loss
SVL validation loss.
Definition: sb.h:11484
float accuracy
SVL accuracy metric.
Definition: sb.h:11501
Results of the training epochs.
Definition: sb.h:11517
sb_t_svl_res_epoch * epoch
Array of the results of the training epochs.
Definition: sb.h:11518
int size
Number of the elements of the array epoch .
Definition: sb.h:11519
Defines the results of the elaboration of the SVL of an image.
Definition: sb.h:11448
sb_t_image_info_type type
Image type. The possible values are SB_IMAGE_INFO_TYPE_SVL, SB_IMAGE_INFO_TYPE_SVL_USED.
Definition: sb.h:11450
Defines the results of the elaboration of the SVL images.
Definition: sb.h:11457
int size
Number of images that is number of elements of the array sb_t_svl_res_images::image .
Definition: sb.h:11459
sb_t_svl_res_image * image
Pointer to the array of SVL images results. The number of element is sb_t_svl_res_images::size .
Definition: sb.h:11458
Results of the SVL of a level per model.
Definition: sb.h:11538
int num_img_l
Number of images of the training dataset used for learning.
Definition: sb.h:11617
int num_samples_l
Number of samples of the training dataset used for learning.
Definition: sb.h:11608
int out_of_roi
Number of Out Of ROI samples, both optional and required.
Definition: sb.h:11593
int reset
1 if the SVL of the model has been resetted or when the user reset the SVL, 0 otherwise.
Definition: sb.h:11603
int mod_disabled
Number of samples with disabled model, both optional and required.
Definition: sb.h:11598
int op
Number of OPTIONAL POSITIVE samples.
Definition: sb.h:11583
sb_t_svl_par_optimization_mode optimization_mode
Optimization mode.
Definition: sb.h:11622
float accuracy
Accuracy.
Definition: sb.h:11553
sb_t_svl_res_epochs epochs
Results of training of module based on Deep Learning.
Definition: sb.h:11648
float goodness
Goodness of the training.
Definition: sb.h:11543
int fn
Number of FALSE NEGATIVE samples.
Definition: sb.h:11578
int tn
Number of TRUE NEGATIVE samples.
Definition: sb.h:11573
int num_samples_t
Number of samples of the training dataset not used for learning.
Definition: sb.h:11613
int tp
Number of TRUE POSITIVE samples.
Definition: sb.h:11563
int on
Number of OPTIONAL NEGATIVE samples.
Definition: sb.h:11588
int fp
Number of FALSE POSITIVE samples.
Definition: sb.h:11568
char * warning
Warning in string format occurred during the training.
Definition: sb.h:11643
float score
Level score.
Definition: sb.h:11558
Results of the SVL of a levels processed.
Definition: sb.h:11656
int size
Number of the elements of the array level.
Definition: sb.h:11658
Results of the SVL of a specific model.
Definition: sb.h:11665
sb_t_svl_res_levels levels
Specific results for each level.
Definition: sb.h:11671
sb_t_svl_res_level global
Cumulative results of all levels.
Definition: sb.h:11675
Results of the SVL of a models processed.
Definition: sb.h:11682
int size
Number of the elements of the array model.
Definition: sb.h:11691
Defines the results of SVL.
Definition: sb.h:11719
sb_t_svl_res_models models
Results for each model.
Definition: sb.h:11758
sb_t_samples * list_op
List of Optional Positive samples.
Definition: sb.h:11787
int num_img_test
Number of test images of the project.
Definition: sb.h:11811
sb_t_samples * list_out_of_roi
List of samples out of the ROI.
Definition: sb.h:11797
sb_t_samples * list_on
List of Optional Negative samples.
Definition: sb.h:11792
sb_t_svl_res_images * list_img_elab
Results for each images.
Definition: sb.h:11803
sb_t_svl_err err
Error details.
Definition: sb.h:11754
sb_t_svl_res_level global
Cumulative results of all levels of all models.
Definition: sb.h:11762
sb_t_svl_command last_command
Command executed by SVL after a stop that is detailed with the parameter stop_reason.
Definition: sb.h:11722
sb_t_samples * list_tn
List of True Negative samples.
Definition: sb.h:11772
long long time_ms_last_improvement
Time, in ms, when there was the last improvement.
Definition: sb.h:11821
long long time_ms
Execution time, in ms, of SVL.
Definition: sb.h:11815
sb_t_par par
Project parameters.
Definition: sb.h:11720
int num_img_svl
Number of svl images of the project.
Definition: sb.h:11807
int reset_done
The SVL reset has been done or no training has been done yet.
Definition: sb.h:11830
sb_t_samples * list_tp
List of True Positive samples.
Definition: sb.h:11767
sb_t_svl_stop_reason stop_reason
It describes the reason why the SVL is finished.
Definition: sb.h:11721
long long time_left_ms
Estimated time, in ms, left to the end of the SVL.
Definition: sb.h:11826
sb_t_devices_par devices
The devices used to compute the current SVL results.
Definition: sb.h:11834
sb_t_samples * list_fn
List of False Negative samples.
Definition: sb.h:11782
char running_step[256]
Description of the current step of the training.
Definition: sb.h:11749
sb_t_samples * list_fp
List of False Positive samples.
Definition: sb.h:11777
SVL parameters that configure the Shallow Learning training.
Definition: sb.h:9099
int auto_levels
Enable the automatic Surface levels training.
Definition: sb.h:9151
sb_t_svl_par_optimization_mode optimization_mode
Optimization mode.
Definition: sb.h:9138
float goodness_target
Goodness target of the training.
Definition: sb.h:9116
Defines the version.
Definition: sb.h:5418
int vminor
vminor number, changes on internal improvement which doesn't modify the interface
Definition: sb.h:5421
int build_major
build_major number, changes every time the library is built
Definition: sb.h:5422
int minor
minor number, changes when the interface is no longer compatible
Definition: sb.h:5420
int major
major number, changes when there are new features
Definition: sb.h:5419