|
Scanbot SDK
|
scanbotsdk_binarization_filter_preset_t enum
Preset of parameters for custom binarization filter.
| typedef struct scanbotsdk_brightness_filter_t scanbotsdk_brightness_filter_t |
scanbotsdk_brightness_filter_t class
Brightness adjustment filter.
scanbotsdk_color_document_filter_t class
Color document filter. This filter is a good starting point for most use cases.
| typedef struct scanbotsdk_color_document_shadow_removal_filter_t scanbotsdk_color_document_shadow_removal_filter_t |
scanbotsdk_color_document_shadow_removal_filter_t class
Color document shadow removal filter. The filter is similar to ColorDocumentFilter tries to remove shadows from the image without damaging colorful elements. As a result of shadow removal, paper is usually whitened.
| typedef struct scanbotsdk_contrast_filter_t scanbotsdk_contrast_filter_t |
scanbotsdk_contrast_filter_t class
Contrast adjustment filter.
scanbotsdk_custom_binarization_filter_t class
Automatic binarization filter. This filter is a good starting point for most use cases.
| typedef struct scanbotsdk_document_cleanup_configuration_t scanbotsdk_document_cleanup_configuration_t |
scanbotsdk_document_cleanup_configuration_t class
The document cleanup configuration.
scanbotsdk_document_cleanup_result_t class
Result of a document cleanup run.
scanbotsdk_document_cleanup_status_t enum
Status of the document cleanup operation.
| typedef struct scanbotsdk_document_cleanup_t scanbotsdk_document_cleanup_t |
scanbotsdk_document_cleanup_t class
API for document cleanup.
Required licence feature(s): ImageProcessing.
scanbotsdk_document_crop_optimization_t enum
Optimizations applied when cropping physical documents from a larger photo.
| typedef struct scanbotsdk_grayscale_filter_t scanbotsdk_grayscale_filter_t |
scanbotsdk_grayscale_filter_t class
Converts color images to grayscale and applies autocontrast.
| typedef struct scanbotsdk_image_processor_t scanbotsdk_image_processor_t |
scanbotsdk_image_processor_t class
API for image processing.
Required licence feature(s): ImageProcessing.
| typedef struct scanbotsdk_legacy_filter_t scanbotsdk_legacy_filter_t |
scanbotsdk_legacy_filter_t class
Deprecated. Returns the input image unchanged.
| typedef enum scanbotsdk_output_mode_t scanbotsdk_output_mode_t |
Output mode of binarization filter.
scanbotsdk_page_binarization_t enum
Binarization behavior to apply when adding a page to a PDF/TIFF.
| typedef struct scanbotsdk_parametric_filter_t scanbotsdk_parametric_filter_t |
scanbotsdk_parametric_filter_t class
Base class for all parametric filters.
scanbotsdk_scanbot_binarization_filter_t class
Automatic binarization filter. This filter is a good starting point for most use cases.
scanbotsdk_white_black_point_filter_t class
Maps image value channel so that all the pixels darker than the black point are set to 0, all the pixels brighter than the white point are set to 255, and the pixels in between are linearly scaled.
scanbotsdk_binarization_filter_preset_t enum
Preset of parameters for custom binarization filter.
scanbotsdk_document_cleanup_status_t enum
Status of the document cleanup operation.
scanbotsdk_document_crop_optimization_t enum
Optimizations applied when cropping physical documents from a larger photo.
Output mode of binarization filter.
scanbotsdk_page_binarization_t enum
Binarization behavior to apply when adding a page to a PDF/TIFF.
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_binarization_filter_preset_t_to_string | ( | scanbotsdk_binarization_filter_preset_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_binarization_filter_preset_t value.
The returned string doesn't need to be freed.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_brightness_filter_as_scanbotsdk_parametric_filter | ( | scanbotsdk_brightness_filter_t * | object, |
| scanbotsdk_parametric_filter_t ** | result ) |
Casts the given instance of scanbotsdk_brightness_filter_t to its parent type scanbotsdk_parametric_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_brightness_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_brightness_filter_create | ( | double | brightness, |
| scanbotsdk_brightness_filter_t ** | result ) |
Creates a new instance of scanbotsdk_brightness_filter 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.
| brightness | Brightness adjustment value in the range from -1 to 1. Negative values will make the image darker, positive values will make it brighter. |
Default is 0.0.
| result | Pointer to a variable that will store the created instance of scanbotsdk_brightness_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_brightness_filter_create_with_defaults | ( | scanbotsdk_brightness_filter_t ** | result | ) |
Creates a new instance of scanbotsdk_brightness_filter_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_brightness_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_brightness_filter_free | ( | scanbotsdk_brightness_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_brightness_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_brightness_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_brightness_filter_get_brightness | ( | scanbotsdk_brightness_filter_t * | self, |
| double * | brightness ) |
Returns value of brightness field of the given object.
Brightness adjustment value in the range from -1 to 1. Negative values will make the image darker, positive values will make it brighter.
Default is 0.0.
| self | Pointer to the instance of scanbotsdk_brightness_filter_t |
| brightness | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_brightness_filter_set_brightness | ( | scanbotsdk_brightness_filter_t * | self, |
| double | brightness ) |
Sets value of brightness field of the given object.
Brightness adjustment value in the range from -1 to 1. Negative values will make the image darker, positive values will make it brighter.
Default is 0.0.
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.
| self | Pointer to the instance of scanbotsdk_brightness_filter_t, the field of which will be set |
| brightness | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_as_scanbotsdk_parametric_filter | ( | scanbotsdk_color_document_filter_t * | object, |
| scanbotsdk_parametric_filter_t ** | result ) |
Casts the given instance of scanbotsdk_color_document_filter_t to its parent type scanbotsdk_parametric_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_color_document_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_create | ( | double | contrast_enhancement, |
| double | color_enhancement, | ||
| double | paper_whitening, | ||
| int | paper_whitening_bias, | ||
| scanbotsdk_color_document_filter_t ** | result ) |
Creates a new instance of scanbotsdk_color_document_filter 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.
| contrast_enhancement | Strength of contrast enhancement. Typical values are between 0 and 1, although higher values are possible. |
Default is 0.5.
| color_enhancement | Strength of color saturation enhancement. Typical values are between 0 and 1, although higher values are possible. |
Default is 0.5.
| paper_whitening | Paper whitening strength balances color enhancement and paper color improvement. Only relevant if colorEnhancement is above 0. Typical values are between 0 and 2. |
Default is 1.
| paper_whitening_bias | Paper whitening bias balances between whitening more of the paper of preserving more of the colors. Negative values will preserve more colors, positive values will whiten more of the paper. Only relevant if colorEnhancement is above 0. Typical values are between -25 and 25. |
Default is 0.
| result | Pointer to a variable that will store the created instance of scanbotsdk_color_document_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_create_with_defaults | ( | scanbotsdk_color_document_filter_t ** | result | ) |
Creates a new instance of scanbotsdk_color_document_filter_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_color_document_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_free | ( | scanbotsdk_color_document_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_color_document_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_color_document_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_get_color_enhancement | ( | scanbotsdk_color_document_filter_t * | self, |
| double * | color_enhancement ) |
Returns value of color_enhancement field of the given object.
Strength of color saturation enhancement. Typical values are between 0 and 1, although higher values are possible.
Default is 0.5.
| self | Pointer to the instance of scanbotsdk_color_document_filter_t |
| color_enhancement | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_get_contrast_enhancement | ( | scanbotsdk_color_document_filter_t * | self, |
| double * | contrast_enhancement ) |
Returns value of contrast_enhancement field of the given object.
Strength of contrast enhancement. Typical values are between 0 and 1, although higher values are possible.
Default is 0.5.
| self | Pointer to the instance of scanbotsdk_color_document_filter_t |
| contrast_enhancement | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_get_paper_whitening | ( | scanbotsdk_color_document_filter_t * | self, |
| double * | paper_whitening ) |
Returns value of paper_whitening field of the given object.
Paper whitening strength balances color enhancement and paper color improvement. Only relevant if colorEnhancement is above 0. Typical values are between 0 and 2.
Default is 1.
| self | Pointer to the instance of scanbotsdk_color_document_filter_t |
| paper_whitening | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_get_paper_whitening_bias | ( | scanbotsdk_color_document_filter_t * | self, |
| int * | paper_whitening_bias ) |
Returns value of paper_whitening_bias field of the given object.
Paper whitening bias balances between whitening more of the paper of preserving more of the colors. Negative values will preserve more colors, positive values will whiten more of the paper. Only relevant if colorEnhancement is above 0. Typical values are between -25 and 25.
Default is 0.
| self | Pointer to the instance of scanbotsdk_color_document_filter_t |
| paper_whitening_bias | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_set_color_enhancement | ( | scanbotsdk_color_document_filter_t * | self, |
| double | color_enhancement ) |
Sets value of color_enhancement field of the given object.
Strength of color saturation enhancement. Typical values are between 0 and 1, although higher values are possible.
Default is 0.5.
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.
| self | Pointer to the instance of scanbotsdk_color_document_filter_t, the field of which will be set |
| color_enhancement | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_set_contrast_enhancement | ( | scanbotsdk_color_document_filter_t * | self, |
| double | contrast_enhancement ) |
Sets value of contrast_enhancement field of the given object.
Strength of contrast enhancement. Typical values are between 0 and 1, although higher values are possible.
Default is 0.5.
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.
| self | Pointer to the instance of scanbotsdk_color_document_filter_t, the field of which will be set |
| contrast_enhancement | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_set_paper_whitening | ( | scanbotsdk_color_document_filter_t * | self, |
| double | paper_whitening ) |
Sets value of paper_whitening field of the given object.
Paper whitening strength balances color enhancement and paper color improvement. Only relevant if colorEnhancement is above 0. Typical values are between 0 and 2.
Default is 1.
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.
| self | Pointer to the instance of scanbotsdk_color_document_filter_t, the field of which will be set |
| paper_whitening | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_set_paper_whitening_bias | ( | scanbotsdk_color_document_filter_t * | self, |
| int | paper_whitening_bias ) |
Sets value of paper_whitening_bias field of the given object.
Paper whitening bias balances between whitening more of the paper of preserving more of the colors. Negative values will preserve more colors, positive values will whiten more of the paper. Only relevant if colorEnhancement is above 0. Typical values are between -25 and 25.
Default is 0.
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.
| self | Pointer to the instance of scanbotsdk_color_document_filter_t, the field of which will be set |
| paper_whitening_bias | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_as_scanbotsdk_parametric_filter | ( | scanbotsdk_color_document_shadow_removal_filter_t * | object, |
| scanbotsdk_parametric_filter_t ** | result ) |
Casts the given instance of scanbotsdk_color_document_shadow_removal_filter_t to its parent type scanbotsdk_parametric_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_color_document_shadow_removal_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_create | ( | double | contrast_enhancement, |
| double | color_enhancement, | ||
| double | paper_saturation, | ||
| double | paper_lightness, | ||
| scanbotsdk_color_document_shadow_removal_filter_t ** | result ) |
Creates a new instance of scanbotsdk_color_document_shadow_removal_filter 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.
| contrast_enhancement | Strength of contrast enhancement. Typical values are between 0 and 1, although higher values are possible. |
Default is 0.5.
| color_enhancement | Strength of color saturation enhancement. Typical values are between 0 and 1, although higher values are possible. |
Default is 0.5.
| paper_saturation | The shadow removal filter balances between whitening paper and enhancing the contrast and colors of the printed parts of a document. This parameter controls the saturation (colorfulness) threshold for distinguishing paper from print. Values must be between 0 and 1. Lower values will cause the filter to prefer whitening to enhancing. Higher values will cause the filter to prefer enhancing to whitening. |
Default is 0.5.
| paper_lightness | The shadow removal filter balances between whitening paper and enhancing the contrast and colors of the printed parts of a document. This parameter controls the lightness threshold for distinguishing paper from print. Values must be between 0 and 1. Lower values will cause the filter to prefer whitening to enhancing. Higher values will cause the filter to prefer enhancing to whitening. |
Default is 0.5.
| result | Pointer to a variable that will store the created instance of scanbotsdk_color_document_shadow_removal_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_create_with_defaults | ( | scanbotsdk_color_document_shadow_removal_filter_t ** | result | ) |
Creates a new instance of scanbotsdk_color_document_shadow_removal_filter_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_color_document_shadow_removal_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_free | ( | scanbotsdk_color_document_shadow_removal_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_color_document_shadow_removal_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_color_document_shadow_removal_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_get_color_enhancement | ( | scanbotsdk_color_document_shadow_removal_filter_t * | self, |
| double * | color_enhancement ) |
Returns value of color_enhancement field of the given object.
Strength of color saturation enhancement. Typical values are between 0 and 1, although higher values are possible.
Default is 0.5.
| self | Pointer to the instance of scanbotsdk_color_document_shadow_removal_filter_t |
| color_enhancement | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_get_contrast_enhancement | ( | scanbotsdk_color_document_shadow_removal_filter_t * | self, |
| double * | contrast_enhancement ) |
Returns value of contrast_enhancement field of the given object.
Strength of contrast enhancement. Typical values are between 0 and 1, although higher values are possible.
Default is 0.5.
| self | Pointer to the instance of scanbotsdk_color_document_shadow_removal_filter_t |
| contrast_enhancement | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_get_paper_lightness | ( | scanbotsdk_color_document_shadow_removal_filter_t * | self, |
| double * | paper_lightness ) |
Returns value of paper_lightness field of the given object.
The shadow removal filter balances between whitening paper and enhancing the contrast and colors of the printed parts of a document. This parameter controls the lightness threshold for distinguishing paper from print. Values must be between 0 and 1. Lower values will cause the filter to prefer whitening to enhancing. Higher values will cause the filter to prefer enhancing to whitening.
Default is 0.5.
| self | Pointer to the instance of scanbotsdk_color_document_shadow_removal_filter_t |
| paper_lightness | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_get_paper_saturation | ( | scanbotsdk_color_document_shadow_removal_filter_t * | self, |
| double * | paper_saturation ) |
Returns value of paper_saturation field of the given object.
The shadow removal filter balances between whitening paper and enhancing the contrast and colors of the printed parts of a document. This parameter controls the saturation (colorfulness) threshold for distinguishing paper from print. Values must be between 0 and 1. Lower values will cause the filter to prefer whitening to enhancing. Higher values will cause the filter to prefer enhancing to whitening.
Default is 0.5.
| self | Pointer to the instance of scanbotsdk_color_document_shadow_removal_filter_t |
| paper_saturation | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_set_color_enhancement | ( | scanbotsdk_color_document_shadow_removal_filter_t * | self, |
| double | color_enhancement ) |
Sets value of color_enhancement field of the given object.
Strength of color saturation enhancement. Typical values are between 0 and 1, although higher values are possible.
Default is 0.5.
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.
| self | Pointer to the instance of scanbotsdk_color_document_shadow_removal_filter_t, the field of which will be set |
| color_enhancement | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_set_contrast_enhancement | ( | scanbotsdk_color_document_shadow_removal_filter_t * | self, |
| double | contrast_enhancement ) |
Sets value of contrast_enhancement field of the given object.
Strength of contrast enhancement. Typical values are between 0 and 1, although higher values are possible.
Default is 0.5.
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.
| self | Pointer to the instance of scanbotsdk_color_document_shadow_removal_filter_t, the field of which will be set |
| contrast_enhancement | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_set_paper_lightness | ( | scanbotsdk_color_document_shadow_removal_filter_t * | self, |
| double | paper_lightness ) |
Sets value of paper_lightness field of the given object.
The shadow removal filter balances between whitening paper and enhancing the contrast and colors of the printed parts of a document. This parameter controls the lightness threshold for distinguishing paper from print. Values must be between 0 and 1. Lower values will cause the filter to prefer whitening to enhancing. Higher values will cause the filter to prefer enhancing to whitening.
Default is 0.5.
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.
| self | Pointer to the instance of scanbotsdk_color_document_shadow_removal_filter_t, the field of which will be set |
| paper_lightness | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_shadow_removal_filter_set_paper_saturation | ( | scanbotsdk_color_document_shadow_removal_filter_t * | self, |
| double | paper_saturation ) |
Sets value of paper_saturation field of the given object.
The shadow removal filter balances between whitening paper and enhancing the contrast and colors of the printed parts of a document. This parameter controls the saturation (colorfulness) threshold for distinguishing paper from print. Values must be between 0 and 1. Lower values will cause the filter to prefer whitening to enhancing. Higher values will cause the filter to prefer enhancing to whitening.
Default is 0.5.
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.
| self | Pointer to the instance of scanbotsdk_color_document_shadow_removal_filter_t, the field of which will be set |
| paper_saturation | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_contrast_filter_as_scanbotsdk_parametric_filter | ( | scanbotsdk_contrast_filter_t * | object, |
| scanbotsdk_parametric_filter_t ** | result ) |
Casts the given instance of scanbotsdk_contrast_filter_t to its parent type scanbotsdk_parametric_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_contrast_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_contrast_filter_create | ( | double | contrast, |
| scanbotsdk_contrast_filter_t ** | result ) |
Creates a new instance of scanbotsdk_contrast_filter 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.
| contrast | Contrast adjustment value in the range from -1 to 254 (inclusively). Negative values will decrease the contrast, positive values will increase it. |
Default is 0.0.
| result | Pointer to a variable that will store the created instance of scanbotsdk_contrast_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_contrast_filter_create_with_defaults | ( | scanbotsdk_contrast_filter_t ** | result | ) |
Creates a new instance of scanbotsdk_contrast_filter_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_contrast_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_contrast_filter_free | ( | scanbotsdk_contrast_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_contrast_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_contrast_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_contrast_filter_get_contrast | ( | scanbotsdk_contrast_filter_t * | self, |
| double * | contrast ) |
Returns value of contrast field of the given object.
Contrast adjustment value in the range from -1 to 254 (inclusively). Negative values will decrease the contrast, positive values will increase it.
Default is 0.0.
| self | Pointer to the instance of scanbotsdk_contrast_filter_t |
| contrast | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_contrast_filter_set_contrast | ( | scanbotsdk_contrast_filter_t * | self, |
| double | contrast ) |
Sets value of contrast field of the given object.
Contrast adjustment value in the range from -1 to 254 (inclusively). Negative values will decrease the contrast, positive values will increase it.
Default is 0.0.
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.
| self | Pointer to the instance of scanbotsdk_contrast_filter_t, the field of which will be set |
| contrast | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_as_scanbotsdk_parametric_filter | ( | scanbotsdk_custom_binarization_filter_t * | object, |
| scanbotsdk_parametric_filter_t ** | result ) |
Casts the given instance of scanbotsdk_custom_binarization_filter_t to its parent type scanbotsdk_parametric_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_custom_binarization_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_create | ( | scanbotsdk_output_mode_t | output_mode, |
| double | stroke_weight, | ||
| double | denoise, | ||
| int | radius, | ||
| scanbotsdk_binarization_filter_preset_t | preset, | ||
| scanbotsdk_custom_binarization_filter_t ** | result ) |
Creates a new instance of scanbotsdk_custom_binarization_filter 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.
| output_mode | Output mode of the filter. BINARY will return a black and white image, ANTIALIASED will return an antialiased grayscale image. |
Default is BINARY.
| stroke_weight | Controls the bias towards thinner or thicker strokes. This bias determines how thin or thick text and lines appear. The valid range is from 0 to 1, where 0 implies a bias towards thinner strokes and 1 implies a bias towards thicker strokes. Thinner strokes look better in poorly lit images, images with heavy shadows, and, more generally, where text is blurry. Thicker strokes look better in well-lit images and, more generally, images with sharp text. The parameter has effect only when outputMode is set to ANTIALIASED. |
Default is 0.5.
| denoise | Value controlling the amount of noise removal. Value between 0 and 1. Too little noise removal may result in a very noisy image, worsening readability. Too much noise removal may result in the degradation of text, again, worsening readability. |
Default is 0.5.
| radius | Filter radius. The bigger the radius, the slower the filter and generally the less noise in the result. The radius is used for both shadows removal and the calculation of local statistics in the main body of the filter. Higher radius usually allows to cope better with regions of light text on dark background. All the values larger than 127 are clamped to 127. |
Default is 32.
| preset | Preset of binarization filter parameters that are found to perform well on different types of documents. |
Default is PRESET_4.
| result | Pointer to a variable that will store the created instance of scanbotsdk_custom_binarization_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_create_with_defaults | ( | scanbotsdk_custom_binarization_filter_t ** | result | ) |
Creates a new instance of scanbotsdk_custom_binarization_filter_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_custom_binarization_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_free | ( | scanbotsdk_custom_binarization_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_custom_binarization_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_custom_binarization_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_get_denoise | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| double * | denoise ) |
Returns value of denoise field of the given object.
Value controlling the amount of noise removal. Value between 0 and 1. Too little noise removal may result in a very noisy image, worsening readability. Too much noise removal may result in the degradation of text, again, worsening readability.
Default is 0.5.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t |
| denoise | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_get_output_mode | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| scanbotsdk_output_mode_t * | output_mode ) |
Returns value of output_mode field of the given object.
Output mode of the filter. BINARY will return a black and white image, ANTIALIASED will return an antialiased grayscale image.
Default is BINARY.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t |
| output_mode | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_get_preset | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| scanbotsdk_binarization_filter_preset_t * | preset ) |
Returns value of preset field of the given object.
Preset of binarization filter parameters that are found to perform well on different types of documents.
Default is PRESET_4.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t |
| preset | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_get_radius | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| int * | radius ) |
Returns value of radius field of the given object.
Filter radius. The bigger the radius, the slower the filter and generally the less noise in the result. The radius is used for both shadows removal and the calculation of local statistics in the main body of the filter. Higher radius usually allows to cope better with regions of light text on dark background. All the values larger than 127 are clamped to 127.
Default is 32.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t |
| radius | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_get_stroke_weight | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| double * | stroke_weight ) |
Returns value of stroke_weight field of the given object.
Controls the bias towards thinner or thicker strokes. This bias determines how thin or thick text and lines appear. The valid range is from 0 to 1, where 0 implies a bias towards thinner strokes and 1 implies a bias towards thicker strokes. Thinner strokes look better in poorly lit images, images with heavy shadows, and, more generally, where text is blurry. Thicker strokes look better in well-lit images and, more generally, images with sharp text. The parameter has effect only when outputMode is set to ANTIALIASED.
Default is 0.5.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t |
| stroke_weight | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_set_denoise | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| double | denoise ) |
Sets value of denoise field of the given object.
Value controlling the amount of noise removal. Value between 0 and 1. Too little noise removal may result in a very noisy image, worsening readability. Too much noise removal may result in the degradation of text, again, worsening readability.
Default is 0.5.
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.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t, the field of which will be set |
| denoise | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_set_output_mode | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| scanbotsdk_output_mode_t | output_mode ) |
Sets value of output_mode field of the given object.
Output mode of the filter. BINARY will return a black and white image, ANTIALIASED will return an antialiased grayscale image.
Default is BINARY.
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.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t, the field of which will be set |
| output_mode | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_set_preset | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| scanbotsdk_binarization_filter_preset_t | preset ) |
Sets value of preset field of the given object.
Preset of binarization filter parameters that are found to perform well on different types of documents.
Default is PRESET_4.
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.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t, the field of which will be set |
| preset | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_set_radius | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| int | radius ) |
Sets value of radius field of the given object.
Filter radius. The bigger the radius, the slower the filter and generally the less noise in the result. The radius is used for both shadows removal and the calculation of local statistics in the main body of the filter. Higher radius usually allows to cope better with regions of light text on dark background. All the values larger than 127 are clamped to 127.
Default is 32.
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.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t, the field of which will be set |
| radius | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_custom_binarization_filter_set_stroke_weight | ( | scanbotsdk_custom_binarization_filter_t * | self, |
| double | stroke_weight ) |
Sets value of stroke_weight field of the given object.
Controls the bias towards thinner or thicker strokes. This bias determines how thin or thick text and lines appear. The valid range is from 0 to 1, where 0 implies a bias towards thinner strokes and 1 implies a bias towards thicker strokes. Thinner strokes look better in poorly lit images, images with heavy shadows, and, more generally, where text is blurry. Thicker strokes look better in well-lit images and, more generally, images with sharp text. The parameter has effect only when outputMode is set to ANTIALIASED.
Default is 0.5.
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.
| self | Pointer to the instance of scanbotsdk_custom_binarization_filter_t, the field of which will be set |
| stroke_weight | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_can_redo | ( | scanbotsdk_document_cleanup_t * | self, |
| bool * | result ) |
Returns whether a redo operation is currently available. This is true when at least one undo operation has been performed and not yet overwritten by a new cleanup.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_t method to be called on |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_cleanup_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_can_undo | ( | scanbotsdk_document_cleanup_t * | self, |
| bool * | result ) |
Returns whether an undo operation is currently available. This is true when at least one cleanup operation has been performed and not yet fully undone.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_t method to be called on |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_cleanup_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_create | ( | bool | keep_text, |
| int | max_undo_redo_stack_size, | ||
| int | max_cleanup_resolution, | ||
| int | max_mask_bounding_box_area, | ||
| scanbotsdk_document_cleanup_configuration_t ** | result ) |
Creates a new instance of scanbotsdk_document_cleanup_configuration 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.
| keep_text | If true, detected text is preserved. When enabled, text detection is run, which can be time-consuming. For a better user experience, consider constructing the document cleanup asynchronously. |
Default is true.
| max_undo_redo_stack_size | Maximum number of undo/redo operations to keep in memory. Must be non-negative. If 0, undo/redo operations are unavailable. When the number of operations exceeds this limit, the oldest entries can no longer be undone. |
Default is 3.
| max_cleanup_resolution | Maximum area (width × height) of the axis-aligned cleanup-region crop. If the mask's bounding rectangle exceeds this limit, the input image is downscaled before cleanup is applied. The cleaned result is then upscaled and written back into the original-resolution image. Use this option to limit peak memory consumption. Memory consumption depends on both the input image resolution and the cleanup area size. Set to 0 to disable the limit. For example, setting it to 1200000 uses approximately 0.5 GB for a 12 MP input image. Whenever possible, prefer running DocumentCleanup on smaller areas instead of relying on this option, as it reduces cleanup quality. |
Default is 0.
| max_mask_bounding_box_area | Maximum allowed area (width × height, in pixels) of the axis-aligned bounding box enclosing all non-zero pixels of the mask passed to run(). If the mask's bounding box area exceeds this limit, cleanup is not performed: run() returns the current (unchanged) image with status ERROR_MASK_TOO_LARGE and the undo/redo history is left untouched. Use this option as a hard guard against unintentionally large cleanup regions that would take a long time to process. Execution time of a single cleanup call grows roughly with the mask's bounding-box area, so capping it bounds the worst-case latency of run(). Note the difference from maxCleanupResolution: maxCleanupResolution silently reduces quality by internal downscaling to bound peak memory, whereas maxMaskBoundingBoxArea rejects oversized masks outright so the caller can react (e.g. ask the user to select a smaller area). The default of 600000 (approximately 0.6 MP) is a good fit for typical interactive cleanup on a single object or text block. Set to 0 to disable the limit. |
Default is 600000.
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_cleanup_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_create_with_defaults | ( | scanbotsdk_document_cleanup_configuration_t ** | result | ) |
Creates a new instance of scanbotsdk_document_cleanup_configuration_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_cleanup_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_free | ( | scanbotsdk_document_cleanup_configuration_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_document_cleanup_configuration_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_document_cleanup_configuration_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_get_keep_text | ( | scanbotsdk_document_cleanup_configuration_t * | self, |
| bool * | keep_text ) |
Returns value of keep_text field of the given object.
If true, detected text is preserved. When enabled, text detection is run, which can be time-consuming. For a better user experience, consider constructing the document cleanup asynchronously.
Default is true.
| self | Pointer to the instance of scanbotsdk_document_cleanup_configuration_t |
| keep_text | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_get_max_cleanup_resolution | ( | scanbotsdk_document_cleanup_configuration_t * | self, |
| int * | max_cleanup_resolution ) |
Returns value of max_cleanup_resolution field of the given object.
Maximum area (width × height) of the axis-aligned cleanup-region crop. If the mask's bounding rectangle exceeds this limit, the input image is downscaled before cleanup is applied. The cleaned result is then upscaled and written back into the original-resolution image. Use this option to limit peak memory consumption. Memory consumption depends on both the input image resolution and the cleanup area size. Set to 0 to disable the limit. For example, setting it to 1200000 uses approximately 0.5 GB for a 12 MP input image. Whenever possible, prefer running DocumentCleanup on smaller areas instead of relying on this option, as it reduces cleanup quality.
Default is 0.
| self | Pointer to the instance of scanbotsdk_document_cleanup_configuration_t |
| max_cleanup_resolution | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_get_max_mask_bounding_box_area | ( | scanbotsdk_document_cleanup_configuration_t * | self, |
| int * | max_mask_bounding_box_area ) |
Returns value of max_mask_bounding_box_area field of the given object.
Maximum allowed area (width × height, in pixels) of the axis-aligned bounding box enclosing all non-zero pixels of the mask passed to run(). If the mask's bounding box area exceeds this limit, cleanup is not performed: run() returns the current (unchanged) image with status ERROR_MASK_TOO_LARGE and the undo/redo history is left untouched. Use this option as a hard guard against unintentionally large cleanup regions that would take a long time to process. Execution time of a single cleanup call grows roughly with the mask's bounding-box area, so capping it bounds the worst-case latency of run(). Note the difference from maxCleanupResolution: maxCleanupResolution silently reduces quality by internal downscaling to bound peak memory, whereas maxMaskBoundingBoxArea rejects oversized masks outright so the caller can react (e.g. ask the user to select a smaller area). The default of 600000 (approximately 0.6 MP) is a good fit for typical interactive cleanup on a single object or text block. Set to 0 to disable the limit.
Default is 600000.
| self | Pointer to the instance of scanbotsdk_document_cleanup_configuration_t |
| max_mask_bounding_box_area | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_get_max_undo_redo_stack_size | ( | scanbotsdk_document_cleanup_configuration_t * | self, |
| int * | max_undo_redo_stack_size ) |
Returns value of max_undo_redo_stack_size field of the given object.
Maximum number of undo/redo operations to keep in memory. Must be non-negative. If 0, undo/redo operations are unavailable. When the number of operations exceeds this limit, the oldest entries can no longer be undone.
Default is 3.
| self | Pointer to the instance of scanbotsdk_document_cleanup_configuration_t |
| max_undo_redo_stack_size | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_set_keep_text | ( | scanbotsdk_document_cleanup_configuration_t * | self, |
| bool | keep_text ) |
Sets value of keep_text field of the given object.
If true, detected text is preserved. When enabled, text detection is run, which can be time-consuming. For a better user experience, consider constructing the document cleanup asynchronously.
Default is true.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_configuration_t, the field of which will be set |
| keep_text | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_set_max_cleanup_resolution | ( | scanbotsdk_document_cleanup_configuration_t * | self, |
| int | max_cleanup_resolution ) |
Sets value of max_cleanup_resolution field of the given object.
Maximum area (width × height) of the axis-aligned cleanup-region crop. If the mask's bounding rectangle exceeds this limit, the input image is downscaled before cleanup is applied. The cleaned result is then upscaled and written back into the original-resolution image. Use this option to limit peak memory consumption. Memory consumption depends on both the input image resolution and the cleanup area size. Set to 0 to disable the limit. For example, setting it to 1200000 uses approximately 0.5 GB for a 12 MP input image. Whenever possible, prefer running DocumentCleanup on smaller areas instead of relying on this option, as it reduces cleanup quality.
Default is 0.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_configuration_t, the field of which will be set |
| max_cleanup_resolution | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_set_max_mask_bounding_box_area | ( | scanbotsdk_document_cleanup_configuration_t * | self, |
| int | max_mask_bounding_box_area ) |
Sets value of max_mask_bounding_box_area field of the given object.
Maximum allowed area (width × height, in pixels) of the axis-aligned bounding box enclosing all non-zero pixels of the mask passed to run(). If the mask's bounding box area exceeds this limit, cleanup is not performed: run() returns the current (unchanged) image with status ERROR_MASK_TOO_LARGE and the undo/redo history is left untouched. Use this option as a hard guard against unintentionally large cleanup regions that would take a long time to process. Execution time of a single cleanup call grows roughly with the mask's bounding-box area, so capping it bounds the worst-case latency of run(). Note the difference from maxCleanupResolution: maxCleanupResolution silently reduces quality by internal downscaling to bound peak memory, whereas maxMaskBoundingBoxArea rejects oversized masks outright so the caller can react (e.g. ask the user to select a smaller area). The default of 600000 (approximately 0.6 MP) is a good fit for typical interactive cleanup on a single object or text block. Set to 0 to disable the limit.
Default is 600000.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_configuration_t, the field of which will be set |
| max_mask_bounding_box_area | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_configuration_set_max_undo_redo_stack_size | ( | scanbotsdk_document_cleanup_configuration_t * | self, |
| int | max_undo_redo_stack_size ) |
Sets value of max_undo_redo_stack_size field of the given object.
Maximum number of undo/redo operations to keep in memory. Must be non-negative. If 0, undo/redo operations are unavailable. When the number of operations exceeds this limit, the oldest entries can no longer be undone.
Default is 3.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_configuration_t, the field of which will be set |
| max_undo_redo_stack_size | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_create | ( | scanbotsdk_image_t * | image, |
| scanbotsdk_document_cleanup_configuration_t * | configuration, | ||
| scanbotsdk_document_cleanup_t ** | result ) |
Creates a new instance of scanbotsdk_document_cleanup 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.
| image | The image to process. The value must not be null. |
| configuration | The document cleanup configuration. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_cleanup_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_free | ( | scanbotsdk_document_cleanup_t * | self | ) |
Frees the memory allocated for the instance of scanbotsdk_document_cleanup_t. If null is passed, the function does nothing.
| self | Pointer to the instance of scanbotsdk_document_cleanup_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_redo | ( | scanbotsdk_document_cleanup_t * | self, |
| scanbotsdk_image_t ** | result ) |
Re-applies the last undone cleanup operation. If no operations are available to redo, returns the current image unchanged. Performing a new cleanup operation after undo will clear the redo history.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_t method to be called on |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_cleanup_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_reset | ( | scanbotsdk_document_cleanup_t * | self, |
| scanbotsdk_image_t ** | result ) |
Restores the original image, and clears the undo/redo history. After reset, both canUndo and canRedo return false.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_t method to be called on |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_cleanup_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_result_free | ( | scanbotsdk_document_cleanup_result_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_document_cleanup_result_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_document_cleanup_result_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_result_get_image | ( | scanbotsdk_document_cleanup_result_t * | self, |
| scanbotsdk_image_t ** | image ) |
Returns value of image field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Cleaned up image.
| self | Pointer to the instance of scanbotsdk_document_cleanup_result_t |
| image | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_result_get_status | ( | scanbotsdk_document_cleanup_result_t * | self, |
| scanbotsdk_document_cleanup_status_t * | status ) |
Returns value of status field of the given object.
Status of the cleanup operation.
Default is OK.
| self | Pointer to the instance of scanbotsdk_document_cleanup_result_t |
| status | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_run | ( | scanbotsdk_document_cleanup_t * | self, |
| scanbotsdk_image_t * | mask, | ||
| scanbotsdk_document_cleanup_result_t ** | result ) |
cleans the masked areas up.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_t method to be called on |
| mask | Specifies the regions to clean up. Non-zero pixels indicate the region to be cleaned up. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_cleanup_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_status_t_to_string | ( | scanbotsdk_document_cleanup_status_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_document_cleanup_status_t value.
The returned string doesn't need to be freed.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_cleanup_undo | ( | scanbotsdk_document_cleanup_t * | self, |
| scanbotsdk_image_t ** | result ) |
Reverts the last cleanup operation. If no operations are available to undo, returns the current image unchanged. The number of available undo operations is limited by maxUndoRedoStackSize. When the operation limit is exceeded, the oldest operations cannot be undone.
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.
| self | Pointer to the instance of scanbotsdk_document_cleanup_t method to be called on |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_cleanup_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_crop_optimization_t_to_string | ( | scanbotsdk_document_crop_optimization_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_document_crop_optimization_t value.
The returned string doesn't need to be freed.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_as_scanbotsdk_parametric_filter | ( | scanbotsdk_grayscale_filter_t * | object, |
| scanbotsdk_parametric_filter_t ** | result ) |
Casts the given instance of scanbotsdk_grayscale_filter_t to its parent type scanbotsdk_parametric_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_grayscale_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_create | ( | double | border_width_fraction, |
| double | black_outliers_fraction, | ||
| double | white_outliers_fraction, | ||
| scanbotsdk_grayscale_filter_t ** | result ) |
Creates a new instance of scanbotsdk_grayscale_filter 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.
| border_width_fraction | Ignore this fraction of pixels at the edge of the image when calculating statistics. Pixels at the edge of the image typically have poor statistics. Ignoring them and using only the inner pixels when calculating certain statistics can substantially improve the quality of the result. The value must be less than 0.5 but usually good values are between 0 and 0.15. |
Default is 0.06.
| black_outliers_fraction | Clip this fraction of the darkest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;. |
Default is 0.0.
| white_outliers_fraction | Clip this fraction of the brightest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;. |
Default is 0.02.
| result | Pointer to a variable that will store the created instance of scanbotsdk_grayscale_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_create_with_defaults | ( | scanbotsdk_grayscale_filter_t ** | result | ) |
Creates a new instance of scanbotsdk_grayscale_filter_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_grayscale_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_free | ( | scanbotsdk_grayscale_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_grayscale_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_grayscale_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_get_black_outliers_fraction | ( | scanbotsdk_grayscale_filter_t * | self, |
| double * | black_outliers_fraction ) |
Returns value of black_outliers_fraction field of the given object.
Clip this fraction of the darkest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.
Default is 0.0.
| self | Pointer to the instance of scanbotsdk_grayscale_filter_t |
| black_outliers_fraction | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_get_border_width_fraction | ( | scanbotsdk_grayscale_filter_t * | self, |
| double * | border_width_fraction ) |
Returns value of border_width_fraction field of the given object.
Ignore this fraction of pixels at the edge of the image when calculating statistics. Pixels at the edge of the image typically have poor statistics. Ignoring them and using only the inner pixels when calculating certain statistics can substantially improve the quality of the result. The value must be less than 0.5 but usually good values are between 0 and 0.15.
Default is 0.06.
| self | Pointer to the instance of scanbotsdk_grayscale_filter_t |
| border_width_fraction | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_get_white_outliers_fraction | ( | scanbotsdk_grayscale_filter_t * | self, |
| double * | white_outliers_fraction ) |
Returns value of white_outliers_fraction field of the given object.
Clip this fraction of the brightest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.
Default is 0.02.
| self | Pointer to the instance of scanbotsdk_grayscale_filter_t |
| white_outliers_fraction | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_set_black_outliers_fraction | ( | scanbotsdk_grayscale_filter_t * | self, |
| double | black_outliers_fraction ) |
Sets value of black_outliers_fraction field of the given object.
Clip this fraction of the darkest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.
Default is 0.0.
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.
| self | Pointer to the instance of scanbotsdk_grayscale_filter_t, the field of which will be set |
| black_outliers_fraction | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_set_border_width_fraction | ( | scanbotsdk_grayscale_filter_t * | self, |
| double | border_width_fraction ) |
Sets value of border_width_fraction field of the given object.
Ignore this fraction of pixels at the edge of the image when calculating statistics. Pixels at the edge of the image typically have poor statistics. Ignoring them and using only the inner pixels when calculating certain statistics can substantially improve the quality of the result. The value must be less than 0.5 but usually good values are between 0 and 0.15.
Default is 0.06.
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.
| self | Pointer to the instance of scanbotsdk_grayscale_filter_t, the field of which will be set |
| border_width_fraction | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_grayscale_filter_set_white_outliers_fraction | ( | scanbotsdk_grayscale_filter_t * | self, |
| double | white_outliers_fraction ) |
Sets value of white_outliers_fraction field of the given object.
Clip this fraction of the brightest pixels in operations such as autocontrast. Increasing the range of middle gray levels at the expense of the brightest and darkest levels may improve the overall contrast and quality of the result. Sum of blackOutliersFraction and whiteOutliersFraction must be less than 1 but usually good values for the parameters do not exceed 0.05;.
Default is 0.02.
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.
| self | Pointer to the instance of scanbotsdk_grayscale_filter_t, the field of which will be set |
| white_outliers_fraction | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_processor_apply_filter | ( | scanbotsdk_image_processor_t * | self, |
| scanbotsdk_image_t * | image, | ||
| scanbotsdk_parametric_filter_t * | filter, | ||
| scanbotsdk_image_t ** | result ) |
Applies given filter to the given 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.
| self | Pointer to the instance of scanbotsdk_image_processor_t method to be called on |
| image | The image to apply filter on. The value must not be null. |
| filter | Filter to be applied. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_processor_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_processor_create | ( | scanbotsdk_image_processor_t ** | result | ) |
Creates a new instance of scanbotsdk_image_processor 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_processor_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_processor_crop | ( | scanbotsdk_image_processor_t * | self, |
| scanbotsdk_image_t * | image, | ||
| scanbotsdk_pointf_t * | quad, | ||
| size_t | quad_size, | ||
| scanbotsdk_document_crop_optimization_t | document_crop_optimization, | ||
| scanbotsdk_image_t ** | result ) |
Crops the given image to the given quadrilateral.
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.
| self | Pointer to the instance of scanbotsdk_image_processor_t method to be called on |
| image | The image to crop. The value must not be null. |
| quad | The quadrilateral of normalized points to crop. |
| quad_size | Size of the array quad |
| document_crop_optimization | The optimization to apply when cropping a document. The method doesn't actually check if the input is a document photo, so it relies entirely on the caller's intent. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_processor_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_processor_free | ( | scanbotsdk_image_processor_t * | self | ) |
Frees the memory allocated for the instance of scanbotsdk_image_processor_t. If null is passed, the function does nothing.
| self | Pointer to the instance of scanbotsdk_image_processor_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_processor_resize | ( | scanbotsdk_image_processor_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.
| self | Pointer to the instance of scanbotsdk_image_processor_t method to be called on |
| image | The image to resize. The value must not be null. |
| size | Size of the longer side of the image. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_processor_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_image_processor_rotate | ( | scanbotsdk_image_processor_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.
| self | Pointer to the instance of scanbotsdk_image_processor_t method to be called on |
| image | The image to rotate. The value must not be null. |
| rotation | Rotation to be applied. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_image_processor_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_legacy_filter_as_scanbotsdk_parametric_filter | ( | scanbotsdk_legacy_filter_t * | object, |
| scanbotsdk_parametric_filter_t ** | result ) |
Casts the given instance of scanbotsdk_legacy_filter_t to its parent type scanbotsdk_parametric_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_legacy_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_legacy_filter_create | ( | int | filter_type, |
| scanbotsdk_legacy_filter_t ** | result ) |
Creates a new instance of scanbotsdk_legacy_filter 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.
| filter_type | Ignored. |
Default is 0.
| result | Pointer to a variable that will store the created instance of scanbotsdk_legacy_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_legacy_filter_create_with_defaults | ( | scanbotsdk_legacy_filter_t ** | result | ) |
Creates a new instance of scanbotsdk_legacy_filter_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_legacy_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_legacy_filter_free | ( | scanbotsdk_legacy_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_legacy_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_legacy_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_legacy_filter_get_filter_type | ( | scanbotsdk_legacy_filter_t * | self, |
| int * | filter_type ) |
Returns value of filter_type field of the given object.
Ignored.
Default is 0.
| self | Pointer to the instance of scanbotsdk_legacy_filter_t |
| filter_type | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_legacy_filter_set_filter_type | ( | scanbotsdk_legacy_filter_t * | self, |
| int | filter_type ) |
Sets value of filter_type field of the given object.
Ignored.
Default is 0.
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.
| self | Pointer to the instance of scanbotsdk_legacy_filter_t, the field of which will be set |
| filter_type | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_output_mode_t_to_string | ( | scanbotsdk_output_mode_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_output_mode_t value.
The returned string doesn't need to be freed.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_page_binarization_t_to_string | ( | scanbotsdk_page_binarization_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_page_binarization_t value.
The returned string doesn't need to be freed.
| value | The value to be converted to string. |
| result | Pointer to a variable that will store the string representation of the value. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_as_scanbotsdk_brightness_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| scanbotsdk_brightness_filter_t ** | result ) |
Casts the given instance of scanbotsdk_parametric_filter_t to its subtype scanbotsdk_brightness_filter_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_brightness_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_as_scanbotsdk_color_document_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| scanbotsdk_color_document_filter_t ** | result ) |
Casts the given instance of scanbotsdk_parametric_filter_t to its subtype scanbotsdk_color_document_filter_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_color_document_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_as_scanbotsdk_color_document_shadow_removal_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| scanbotsdk_color_document_shadow_removal_filter_t ** | result ) |
Casts the given instance of scanbotsdk_parametric_filter_t to its subtype scanbotsdk_color_document_shadow_removal_filter_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_color_document_shadow_removal_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_as_scanbotsdk_contrast_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| scanbotsdk_contrast_filter_t ** | result ) |
Casts the given instance of scanbotsdk_parametric_filter_t to its subtype scanbotsdk_contrast_filter_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_contrast_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_as_scanbotsdk_custom_binarization_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| scanbotsdk_custom_binarization_filter_t ** | result ) |
Casts the given instance of scanbotsdk_parametric_filter_t to its subtype scanbotsdk_custom_binarization_filter_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_custom_binarization_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_as_scanbotsdk_grayscale_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| scanbotsdk_grayscale_filter_t ** | result ) |
Casts the given instance of scanbotsdk_parametric_filter_t to its subtype scanbotsdk_grayscale_filter_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_grayscale_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_as_scanbotsdk_legacy_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| scanbotsdk_legacy_filter_t ** | result ) |
Casts the given instance of scanbotsdk_parametric_filter_t to its subtype scanbotsdk_legacy_filter_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_legacy_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_as_scanbotsdk_scanbot_binarization_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| scanbotsdk_scanbot_binarization_filter_t ** | result ) |
Casts the given instance of scanbotsdk_parametric_filter_t to its subtype scanbotsdk_scanbot_binarization_filter_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_scanbot_binarization_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_as_scanbotsdk_white_black_point_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| scanbotsdk_white_black_point_filter_t ** | result ) |
Casts the given instance of scanbotsdk_parametric_filter_t to its subtype scanbotsdk_white_black_point_filter_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_white_black_point_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_free | ( | scanbotsdk_parametric_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_parametric_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_is_scanbotsdk_brightness_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_parametric_filter_t is an instance of its subtype scanbotsdk_brightness_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_is_scanbotsdk_color_document_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_parametric_filter_t is an instance of its subtype scanbotsdk_color_document_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_is_scanbotsdk_color_document_shadow_removal_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_parametric_filter_t is an instance of its subtype scanbotsdk_color_document_shadow_removal_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_is_scanbotsdk_contrast_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_parametric_filter_t is an instance of its subtype scanbotsdk_contrast_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_is_scanbotsdk_custom_binarization_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_parametric_filter_t is an instance of its subtype scanbotsdk_custom_binarization_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_is_scanbotsdk_grayscale_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_parametric_filter_t is an instance of its subtype scanbotsdk_grayscale_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_is_scanbotsdk_legacy_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_parametric_filter_t is an instance of its subtype scanbotsdk_legacy_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_is_scanbotsdk_scanbot_binarization_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_parametric_filter_t is an instance of its subtype scanbotsdk_scanbot_binarization_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_parametric_filter_is_scanbotsdk_white_black_point_filter | ( | scanbotsdk_parametric_filter_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_parametric_filter_t is an instance of its subtype scanbotsdk_white_black_point_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_scanbot_binarization_filter_as_scanbotsdk_parametric_filter | ( | scanbotsdk_scanbot_binarization_filter_t * | object, |
| scanbotsdk_parametric_filter_t ** | result ) |
Casts the given instance of scanbotsdk_scanbot_binarization_filter_t to its parent type scanbotsdk_parametric_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_scanbot_binarization_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_scanbot_binarization_filter_create | ( | scanbotsdk_output_mode_t | output_mode, |
| scanbotsdk_scanbot_binarization_filter_t ** | result ) |
Creates a new instance of scanbotsdk_scanbot_binarization_filter 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.
| output_mode | Output mode of the filter. BINARY will return a black and white image, ANTIALIASED will return an antialiased grayscale image. |
Default is BINARY.
| result | Pointer to a variable that will store the created instance of scanbotsdk_scanbot_binarization_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_scanbot_binarization_filter_create_with_defaults | ( | scanbotsdk_scanbot_binarization_filter_t ** | result | ) |
Creates a new instance of scanbotsdk_scanbot_binarization_filter_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_scanbot_binarization_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_scanbot_binarization_filter_free | ( | scanbotsdk_scanbot_binarization_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_scanbot_binarization_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_scanbot_binarization_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_scanbot_binarization_filter_get_output_mode | ( | scanbotsdk_scanbot_binarization_filter_t * | self, |
| scanbotsdk_output_mode_t * | output_mode ) |
Returns value of output_mode field of the given object.
Output mode of the filter. BINARY will return a black and white image, ANTIALIASED will return an antialiased grayscale image.
Default is BINARY.
| self | Pointer to the instance of scanbotsdk_scanbot_binarization_filter_t |
| output_mode | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_scanbot_binarization_filter_set_output_mode | ( | scanbotsdk_scanbot_binarization_filter_t * | self, |
| scanbotsdk_output_mode_t | output_mode ) |
Sets value of output_mode field of the given object.
Output mode of the filter. BINARY will return a black and white image, ANTIALIASED will return an antialiased grayscale image.
Default is BINARY.
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.
| self | Pointer to the instance of scanbotsdk_scanbot_binarization_filter_t, the field of which will be set |
| output_mode | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_white_black_point_filter_as_scanbotsdk_parametric_filter | ( | scanbotsdk_white_black_point_filter_t * | object, |
| scanbotsdk_parametric_filter_t ** | result ) |
Casts the given instance of scanbotsdk_white_black_point_filter_t to its parent type scanbotsdk_parametric_filter_t.
| object | Pointer to the instance of scanbotsdk_parametric_filter_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_white_black_point_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_white_black_point_filter_create | ( | double | black_point, |
| double | white_point, | ||
| scanbotsdk_white_black_point_filter_t ** | result ) |
Creates a new instance of scanbotsdk_white_black_point_filter 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.
| black_point | Fraction of the value channel range that is set to 0. The value should be in the range from 0 to 1. |
Default is 0.0.
| white_point | Fraction of the value channel range that is not set to 255. The value should be in the range from 0 to 1. |
Default is 1.0.
| result | Pointer to a variable that will store the created instance of scanbotsdk_white_black_point_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_white_black_point_filter_create_with_defaults | ( | scanbotsdk_white_black_point_filter_t ** | result | ) |
Creates a new instance of scanbotsdk_white_black_point_filter_t with given required 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.
| result | Pointer to a variable that will store the created instance of scanbotsdk_white_black_point_filter_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_white_black_point_filter_free | ( | scanbotsdk_white_black_point_filter_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_white_black_point_filter_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_white_black_point_filter_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_white_black_point_filter_get_black_point | ( | scanbotsdk_white_black_point_filter_t * | self, |
| double * | black_point ) |
Returns value of black_point field of the given object.
Fraction of the value channel range that is set to 0. The value should be in the range from 0 to 1.
Default is 0.0.
| self | Pointer to the instance of scanbotsdk_white_black_point_filter_t |
| black_point | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_white_black_point_filter_get_white_point | ( | scanbotsdk_white_black_point_filter_t * | self, |
| double * | white_point ) |
Returns value of white_point field of the given object.
Fraction of the value channel range that is not set to 255. The value should be in the range from 0 to 1.
Default is 1.0.
| self | Pointer to the instance of scanbotsdk_white_black_point_filter_t |
| white_point | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_white_black_point_filter_set_black_point | ( | scanbotsdk_white_black_point_filter_t * | self, |
| double | black_point ) |
Sets value of black_point field of the given object.
Fraction of the value channel range that is set to 0. The value should be in the range from 0 to 1.
Default is 0.0.
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.
| self | Pointer to the instance of scanbotsdk_white_black_point_filter_t, the field of which will be set |
| black_point | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_white_black_point_filter_set_white_point | ( | scanbotsdk_white_black_point_filter_t * | self, |
| double | white_point ) |
Sets value of white_point field of the given object.
Fraction of the value channel range that is not set to 255. The value should be in the range from 0 to 1.
Default is 1.0.
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.
| self | Pointer to the instance of scanbotsdk_white_black_point_filter_t, the field of which will be set |
| white_point | The value to be set. |