SqueezeBrains SDK 1.18
|
Warped image management. More...
Data Structures | |
struct | sb_t_lut_point |
Struct that defines the coordinates of a point of a lut. More... | |
Macros | |
#define | SB_LUT_POINT_NOT_EXIST 0xFFFF |
Special value to identify coordinates of not existing points. More... | |
Functions | |
sb_t_err | sb_lut_create (SB_HANDLE *phandle, int width, int height) |
Creates the handle of the lut. More... | |
sb_t_err | sb_lut_destroy (SB_HANDLE *phandle) |
Destroys the handle of the lut. More... | |
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. More... | |
sb_t_err | sb_lut_get_size (SB_HANDLE phandle, int *const width, int *const height) |
Retrieves the size of the lut. More... | |
sb_t_err | sb_lut_save (SB_HANDLE phandle, const char *const file_path) |
Saves the lut in a file. More... | |
sb_t_err | sb_lut_load (SB_HANDLE *phandle, const char *const file_path) |
Loads the lut from a file. More... | |
sb_t_err | sb_lut_warp_point (SB_HANDLE phandle, const sb_t_point *const src, sb_t_point *const dst) |
Warps the point. More... | |
Warped image management.
See Lut for more information.
#define SB_LUT_POINT_NOT_EXIST 0xFFFF |
Special value to identify coordinates of not existing points.
Creates the handle of the lut.
The size of the lut should be set equal to the size of the corresponding image.
[out] | phandle | Pointer to the handle of the lut. On successful return, this parameter will be updated with the pointer of the handle. |
[in] | width | Width, in pixel of the lut. |
[in] | height | Height, in pixel of the lut. |
Destroys the handle of the lut.
[in,out] | phandle | Pointer to the handle. The function sets it to NULL. |
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.
The array has a number of elements equal to the image resolution = width * height, where width and height are the parameters passed to the function sb_lut_create.
The user should fill this array with a lut for each pixels of the image.
[in] | phandle | Handle of the lut. |
[out] | ptr | Pointer to the lut array. |
Retrieves the size of the lut.
[in] | phandle | Handle of the lut. |
[out] | width | The parameter will be filled with the width, in pixel, of the lut. |
[out] | height | The parameter will be filled with the height, in pixel, of the lut. |
Loads the lut from a file.
[in,out] | phandle | Handle of the lut. On successful return, this parameter will be updated with the pointer of the handle. The handle must be destroyed with the function sb_lut_destroy. |
[in] | file_path | String of the file name. |
Saves the lut in a file.
[in] | phandle | Handle of the lut. |
[in] | file_path | String of the file name. |
sb_t_err sb_lut_warp_point | ( | SB_HANDLE | phandle, |
const sb_t_point *const | src, | ||
sb_t_point *const | dst | ||
) |
Warps the point.
Because happens that not all the points of the lut were defined, in order to managed correctly the small holes, the functions search for the source point in the neighborhood of a matrix 5x5. This one usually occurs with lut from warped image to the original one. The error code SB_ERR_WARP_POINT_NOT_FOUND is returned if the function doesn't find the point in the lut.
[in] | phandle | Handle of the lut. |
[in] | src | Pointer to the source point. |
[out] | dst | Pointer to the destination point. |