Scanbot SDK
Loading...
Searching...
No Matches
Scanbot C SDK Image manipulation

Typedefs

typedef struct scanbotsdk_image_manipulator_t scanbotsdk_image_manipulator_t
 scanbotsdk_image_manipulator_t class
 

Functions

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_create (scanbotsdk_image_manipulator_t **result)
 Creates a new instance of scanbotsdk_image_manipulator with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_free (scanbotsdk_image_manipulator_t *self)
 Frees the memory allocated for the instance of scanbotsdk_image_manipulator_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_crop_rect (scanbotsdk_image_manipulator_t *self, scanbotsdk_image_t *image, scanbotsdk_rectf_t rect, scanbotsdk_image_t **result)
 Crops out the given rectangle from the image.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_rotate (scanbotsdk_image_manipulator_t *self, scanbotsdk_image_t *image, scanbotsdk_image_rotation_t rotation, scanbotsdk_image_t **result)
 Rotates the given image by the given angle.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_flip (scanbotsdk_image_manipulator_t *self, scanbotsdk_image_t *image, scanbotsdk_image_origin_t origin, scanbotsdk_image_t **result)
 Flips the given image horizontally or vertically.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_resize (scanbotsdk_image_manipulator_t *self, scanbotsdk_image_t *image, int size, scanbotsdk_image_t **result)
 Resizes the given image to the given size.
 

Detailed Description

Typedef Documentation

◆ scanbotsdk_image_manipulator_t

scanbotsdk_image_manipulator_t class

API for image processing. If applicable on the platform, all the methods return images with the same liveness flag as the input image.

Function Documentation

◆ scanbotsdk_image_manipulator_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_create ( scanbotsdk_image_manipulator_t ** result)

Creates a new instance of scanbotsdk_image_manipulator with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_image_manipulator_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_manipulator_crop_rect()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_crop_rect ( scanbotsdk_image_manipulator_t * self,
scanbotsdk_image_t * image,
scanbotsdk_rectf_t rect,
scanbotsdk_image_t ** result )

Crops out the given rectangle from the image.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_manipulator_t method to be called on
imageThe image to crop. The value must not be null.
rectThe rectangle in normalized coordinates to crop.
resultPointer to a variable that will store the created instance of scanbotsdk_image_manipulator_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_manipulator_flip()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_flip ( scanbotsdk_image_manipulator_t * self,
scanbotsdk_image_t * image,
scanbotsdk_image_origin_t origin,
scanbotsdk_image_t ** result )

Flips the given image horizontally or vertically.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_manipulator_t method to be called on
imageThe image to flip The value must not be null.
originLocation of the image origin in the image coordinate system.
resultPointer to a variable that will store the created instance of scanbotsdk_image_manipulator_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_manipulator_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_free ( scanbotsdk_image_manipulator_t * self)

Frees the memory allocated for the instance of scanbotsdk_image_manipulator_t. If null is passed, the function does nothing.

Parameters
selfPointer to the instance of scanbotsdk_image_manipulator_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_manipulator_resize()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_resize ( scanbotsdk_image_manipulator_t * self,
scanbotsdk_image_t * image,
int size,
scanbotsdk_image_t ** result )

Resizes the given image to the given size.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_manipulator_t method to be called on
imageThe image to resize The value must not be null.
sizeSize of the longer side of the image.
resultPointer to a variable that will store the created instance of scanbotsdk_image_manipulator_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_image_manipulator_rotate()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_manipulator_rotate ( scanbotsdk_image_manipulator_t * self,
scanbotsdk_image_t * image,
scanbotsdk_image_rotation_t rotation,
scanbotsdk_image_t ** result )

Rotates the given image by the given angle.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
selfPointer to the instance of scanbotsdk_image_manipulator_t method to be called on
imageThe image to rotate The value must not be null.
rotationRotation to be applied
resultPointer to a variable that will store the created instance of scanbotsdk_image_manipulator_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered