SqueezeBrains SDK 1.18
Surface

Surface interface. More...

Collaboration diagram for Surface:

Functions

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. More...
 

Detailed Description

Surface interface.

See also
section_how_sb_works

Function Documentation

◆ sb_surface_model_to_gl()

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.

The gray levels depend on the index of the model in the array sb_t_par_models::model.
Below is the table of values based on the model index:

model index gl gl_opt
0 255 (1111 1111) 127 (0111 1111)
1 254 (1111 1110) 126 (0111 1110)
2 253 (1111 1101) 125 (0111 1101)
... ... ...
125 130 (1000 0010) 002 (0000 0010)
126 129 (1000 0001) 001 (0000 0001)

The value of the optional for all models is equal to SB_SURFACE_OPTIONAL_GRAY_LEVEL .

Parameters
[in]parPointer to the parameters structure.
[in]model_nameModel name.
[out]glPointer to the gray level value for required defects.
[out]gl_optPointer to the gray level value for optional defects.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
See also
sb_project_load
SB_SURFACE_OPTIONAL_GRAY_LEVEL