SqueezeBrains SDK 1.13
Results

Collection of functions to manage Detection results. More...

Collaboration diagram for Results:

Data Structures

struct  sb_t_ocr_res
 Results of OCR analysis. More...
 
struct  sb_t_surface_res
 Defines the result of the Surface analysis. More...
 
struct  sb_t_res_model
 Defines the results of a model. More...
 
struct  sb_t_res_models
 Defines the results of the models. More...
 
struct  sb_t_tile
 Defines a tile. More...
 
struct  sb_t_tiles
 Tiles list. More...
 
struct  sb_t_tiles_info
 Information about the tiles used to process the image. More...
 
struct  sb_t_res
 Results of detection. More...
 

Enumerations

enum  sb_t_surface_image_truth {
  SB_IMAGE_TRUTH_UNDEFINED =0 , SB_IMAGE_TRUTH_GOOD , SB_IMAGE_TRUTH_NO_GOOD , SB_IMAGE_TRUTH_OVERKILL ,
  SB_IMAGE_TRUTH_ESCAPE
}
 Defines the surface image truth. More...
 
enum  sb_t_tile_type { SB_TILE_TYPE_NOT_USED = 0 , SB_TILE_TYPE_USED , SB_TILE_TYPE_USED_SVL }
 Enumerates the tile types. More...
 

Functions

const char * sb_tile_type_format (sb_t_tile_type type)
 Returns the string of the tile type. More...
 
sb_t_err sb_tiles_info_clone (sb_t_tiles_info **const pdst, const sb_t_tiles_info *const src)
 Clones the tiles information structure. More...
 
sb_t_err sb_tiles_info_destroy (sb_t_tiles_info **const ptiles)
 Destroy the tiles information. More...
 
sb_t_err sb_tiles_info_no_overlap (sb_t_tiles_info *const tiles, sb_t_size img_size, int offset)
 Rearranges the tiles so that they do not go out of the picture and do not overlap. More...
 
sb_t_err sb_res_destroy (sb_t_res **const res)
 Destroys the module results structure. More...
 
sb_t_err sb_res_clone (sb_t_res **const dst, const sb_t_res *const src)
 Copies the results of image elaboration. More...
 
sb_t_err sb_res_compress (sb_t_res *const res)
 Compress the results, in particular the Surface plane images. More...
 
sb_t_err sb_res_decompress (sb_t_res *const res)
 Decompress thre results. More...
 

Detailed Description

Collection of functions to manage Detection results.

Enumeration Type Documentation

◆ sb_t_surface_image_truth

Defines the surface image truth.

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

Enumerator
SB_IMAGE_TRUTH_UNDEFINED 

Undefined truth.

SB_IMAGE_TRUTH_GOOD 

No defects.

SB_IMAGE_TRUTH_NO_GOOD 

Defects found.

SB_IMAGE_TRUTH_OVERKILL 

False defects found.

SB_IMAGE_TRUTH_ESCAPE 

Defects not found.

Definition at line 10918 of file sb.h.

◆ sb_t_tile_type

Enumerates the tile types.

Enumerator
SB_TILE_TYPE_NOT_USED 

The tile is not used because it has no pixels in the ROI analysis.

SB_TILE_TYPE_USED 

The tile is used.

The tile may be used by the sb_project_detection function or the sb_svl_run function for validation.

SB_TILE_TYPE_USED_SVL 

The tile is used for svl by sb_svl_run function.

Definition at line 11151 of file sb.h.

Function Documentation

◆ sb_res_clone()

sb_t_err sb_res_clone ( sb_t_res **const  dst,
const sb_t_res *const  src 
)

Copies the results of image elaboration.

Parameters
[out]dstPointer to the pointer of the sb_t_res structure destination.
On successful return, this parameter will be updated with the pointer of the structure.
[in]srcPointer to the sb_t_res structure source.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.

◆ sb_res_compress()

sb_t_err sb_res_compress ( sb_t_res *const  res)

Compress the results, in particular the Surface plane images.

Surface weight image is compressed JPEG, while truth and model images are compressed RLE.

Parameters
[in]resPointer to the res to be compressed. The compression works in place.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.

◆ sb_res_decompress()

sb_t_err sb_res_decompress ( sb_t_res *const  res)

Decompress thre results.

Parameters
[in]resPointer to the res to be decompressed. The decompression works in place.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.

◆ sb_res_destroy()

sb_t_err sb_res_destroy ( sb_t_res **const  res)

Destroys the module results structure.

Parameters
[in,out]resPointer to the results structure. It is set to NULL.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_get_res

◆ sb_tile_type_format()

const char * sb_tile_type_format ( sb_t_tile_type  type)

Returns the string of the tile type.

Interprets the contents of the type and converts it to a C - string containing a human - readable version of the corresponding tile type.
The string must not be freed.

Parameters
[in]typeTile type.
Returns
A C - string containing the tile type in a human - readable format.

◆ sb_tiles_info_clone()

sb_t_err sb_tiles_info_clone ( sb_t_tiles_info **const  pdst,
const sb_t_tiles_info *const  src 
)

Clones the tiles information structure.

Parameters
[out]pdstPointer to the pointer of the sb_t_tiles_info structure destination.
On successful return, this parameter will be updated with the pointer of the structure.
[in]srcPointer to the sb_t_tiles_info structure source.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.

◆ sb_tiles_info_destroy()

sb_t_err sb_tiles_info_destroy ( sb_t_tiles_info **const  ptiles)

Destroy the tiles information.

Parameters
[in,out]ptilesPointer to the tiles information structure. It set the pointer to NULL.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.

◆ sb_tiles_info_no_overlap()

sb_t_err sb_tiles_info_no_overlap ( sb_t_tiles_info *const  tiles,
sb_t_size  img_size,
int  offset 
)

Rearranges the tiles so that they do not go out of the picture and do not overlap.

Parameters
[in,out]tilesPointer to the structure.
[in]img_sizeImage dimension
[in]offsetDistance, in pixel, between the tiles.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.