|
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_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_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.
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 | ( | int | radius, |
| double | border_width_fraction, | ||
| double | black_outliers_fraction, | ||
| double | white_outliers_fraction, | ||
| 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.
| 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
| 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
| 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_black_outliers_fraction | ( | scanbotsdk_color_document_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_color_document_filter_t |
| black_outliers_fraction | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_get_border_width_fraction | ( | scanbotsdk_color_document_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_color_document_filter_t |
| border_width_fraction | Pointer to a variable that will store the value of the field. |
| 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_get_radius | ( | scanbotsdk_color_document_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_color_document_filter_t |
| radius | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_get_white_outliers_fraction | ( | scanbotsdk_color_document_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_color_document_filter_t |
| white_outliers_fraction | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_set_black_outliers_fraction | ( | scanbotsdk_color_document_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_color_document_filter_t, the field of which will be set |
| black_outliers_fraction | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_set_border_width_fraction | ( | scanbotsdk_color_document_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_color_document_filter_t, the field of which will be set |
| border_width_fraction | The value to be set. |
| 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_filter_set_radius | ( | scanbotsdk_color_document_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_color_document_filter_t, the field of which will be set |
| radius | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_color_document_filter_set_white_outliers_fraction | ( | scanbotsdk_color_document_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_color_document_filter_t, the field of which will be set |
| white_outliers_fraction | 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 | 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, GRAYSCALE will return an antialiased grayscale image. |
Default is BINARY
| 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, GRAYSCALE 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_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, GRAYSCALE 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_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_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 |
| 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_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_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, GRAYSCALE 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, GRAYSCALE 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, GRAYSCALE 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. |