|
Scanbot SDK
|
Enumerations | |
| enum | scanbotsdk_document_quality_t { SCANBOTSDK_DOCUMENT_QUALITY_VERY_POOR = 0 , SCANBOTSDK_DOCUMENT_QUALITY_POOR = 1 , SCANBOTSDK_DOCUMENT_QUALITY_REASONABLE = 2 , SCANBOTSDK_DOCUMENT_QUALITY_GOOD = 3 , SCANBOTSDK_DOCUMENT_QUALITY_EXCELLENT = 4 } |
| scanbotsdk_document_quality_t enum More... | |
| typedef struct scanbotsdk_document_quality_analyzer_configuration_t scanbotsdk_document_quality_analyzer_configuration_t |
scanbotsdk_document_quality_analyzer_configuration_t class
Document Quality Analyzer configuration.
| typedef struct scanbotsdk_document_quality_analyzer_result_t scanbotsdk_document_quality_analyzer_result_t |
scanbotsdk_document_quality_analyzer_result_t class
Result of document quality analysis. It can be used to determine, e.g., if a document is good enough to be used for OCR processing.
scanbotsdk_document_quality_analyzer_t class
API for analyzing document quality.
Required licence feature(s): ImageProcessing.
scanbotsdk_document_quality_t enum
Result of document quality analysis.
scanbotsdk_document_quality_threshold_t class
Point in the quality-number of symbols space to separate quality levels.
scanbotsdk_document_quality_t enum
Result of document quality analysis.
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_create | ( | scanbotsdk_document_quality_threshold_t ** | quality_thresholds, |
| size_t | quality_thresholds_size, | ||
| scanbotsdk_document_quality_t * | quality_indices, | ||
| size_t | quality_indices_size, | ||
| bool | detect_orientation, | ||
| bool | inspect_small_text, | ||
| int | max_image_size, | ||
| int | min_estimated_number_of_symbols_for_document, | ||
| double | min_processed_fraction, | ||
| double | max_processed_fraction, | ||
| int | min_number_of_required_symbols, | ||
| double | min_required_orientation_confidence, | ||
| int | tile_size, | ||
| bool | return_quality_heatmap, | ||
| scanbotsdk_document_quality_analyzer_configuration_t ** | result ) |
Creates a new instance of scanbotsdk_document_quality_analyzer_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.
| quality_thresholds | Quality thresholds to separate quality levels. Entries of the array must not be null. |
| quality_thresholds_size | Size of the array quality_thresholds |
| quality_indices | quality levels. |
| quality_indices_size | Size of the array quality_indices |
| detect_orientation | Enable orientation detection. Document orientation will be returned in DocumentQualityAnalyzerResult.orientation. |
Default is false
| inspect_small_text | Inspect small text (typically less than 12 pixels height) when analyzing the document quality. If true, processing will be slower, but when the quality issue with a document is the low resolution of the text, then the issue will be caught. |
Default is false
| max_image_size | Maximum image size in pixels, if image is bigger, it will be resized. |
Default is 2000
| min_estimated_number_of_symbols_for_document | If estimated number of symbols is less than this value, return that document is not found. |
Default is 20
| min_processed_fraction | At least this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed. |
Default is 1
| max_processed_fraction | At most this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed. |
Default is 1
| min_number_of_required_symbols | If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops. |
Default is 100
| min_required_orientation_confidence | If detectOrientation is True, minNumberOfRequiredSymbols is found, and orientationConfidence is bigger than this threshold, the processing stops. If the maxProcessedFraction part of the image is processed and orientationConfidence is lower than the threshold, the returned orientation will be 0. |
Default is 0
| tile_size | Image will be processed in tiles of this size; will be ignored if image is small. |
Default is 300
| return_quality_heatmap | If true, will return the quality heatmap as a part of the result. In this case, the entire image will be processed and the minProcessedFraction will be ignored. Useful for debugging situations where the returned quality doesn't appear to match the perceived quality. |
Default is false
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_quality_analyzer_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_create_with_defaults | ( | scanbotsdk_document_quality_analyzer_configuration_t ** | result | ) |
Creates a new instance of scanbotsdk_document_quality_analyzer_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_quality_analyzer_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_free | ( | scanbotsdk_document_quality_analyzer_configuration_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_document_quality_analyzer_configuration_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_detect_orientation | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| bool * | detect_orientation ) |
Returns value of detect_orientation field of the given object.
Enable orientation detection. Document orientation will be returned in DocumentQualityAnalyzerResult.orientation.
Default is false
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| detect_orientation | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_inspect_small_text | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| bool * | inspect_small_text ) |
Returns value of inspect_small_text field of the given object.
Inspect small text (typically less than 12 pixels height) when analyzing the document quality. If true, processing will be slower, but when the quality issue with a document is the low resolution of the text, then the issue will be caught.
Default is false
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| inspect_small_text | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_max_image_size | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| int * | max_image_size ) |
Returns value of max_image_size field of the given object.
Maximum image size in pixels, if image is bigger, it will be resized.
Default is 2000
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| max_image_size | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_max_processed_fraction | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double * | max_processed_fraction ) |
Returns value of max_processed_fraction field of the given object.
At most this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed.
Default is 1
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| max_processed_fraction | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_min_estimated_number_of_symbols_for_document | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| int * | min_estimated_number_of_symbols_for_document ) |
Returns value of min_estimated_number_of_symbols_for_document field of the given object.
If estimated number of symbols is less than this value, return that document is not found.
Default is 20
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| min_estimated_number_of_symbols_for_document | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_min_number_of_required_symbols | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| int * | min_number_of_required_symbols ) |
Returns value of min_number_of_required_symbols field of the given object.
If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops.
Default is 100
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| min_number_of_required_symbols | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_min_processed_fraction | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double * | min_processed_fraction ) |
Returns value of min_processed_fraction field of the given object.
At least this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed.
Default is 1
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| min_processed_fraction | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_min_required_orientation_confidence | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double * | min_required_orientation_confidence ) |
Returns value of min_required_orientation_confidence field of the given object.
If detectOrientation is True, minNumberOfRequiredSymbols is found, and orientationConfidence is bigger than this threshold, the processing stops. If the maxProcessedFraction part of the image is processed and orientationConfidence is lower than the threshold, the returned orientation will be 0.
Default is 0
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| min_required_orientation_confidence | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_quality_indices | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_t ** | quality_indices ) |
Returns value of quality_indices field of the given object. The returned value is direct view into memory, no pre-allocations needed.
quality levels.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| quality_indices | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_quality_indices_size | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| size_t * | size ) |
Returns size of quality_indices array.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_quality_thresholds | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_threshold_t ** | quality_thresholds, | ||
| size_t | size ) |
Returns value of quality_thresholds field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Quality thresholds to separate quality levels.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| quality_thresholds | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_quality_thresholds_size | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| size_t * | size ) |
Returns size of quality_thresholds array.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_return_quality_heatmap | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| bool * | return_quality_heatmap ) |
Returns value of return_quality_heatmap field of the given object.
If true, will return the quality heatmap as a part of the result. In this case, the entire image will be processed and the minProcessedFraction will be ignored. Useful for debugging situations where the returned quality doesn't appear to match the perceived quality.
Default is false
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| return_quality_heatmap | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_tile_size | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| int * | tile_size ) |
Returns value of tile_size field of the given object.
Image will be processed in tiles of this size; will be ignored if image is small.
Default is 300
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| tile_size | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_detect_orientation | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| bool | detect_orientation ) |
Sets value of detect_orientation field of the given object.
Enable orientation detection. Document orientation will be returned in DocumentQualityAnalyzerResult.orientation.
Default is 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_quality_analyzer_configuration_t, the field of which will be set |
| detect_orientation | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_inspect_small_text | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| bool | inspect_small_text ) |
Sets value of inspect_small_text field of the given object.
Inspect small text (typically less than 12 pixels height) when analyzing the document quality. If true, processing will be slower, but when the quality issue with a document is the low resolution of the text, then the issue will be caught.
Default is 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_quality_analyzer_configuration_t, the field of which will be set |
| inspect_small_text | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_max_image_size | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| int | max_image_size ) |
Sets value of max_image_size field of the given object.
Maximum image size in pixels, if image is bigger, it will be resized.
Default is 2000
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_quality_analyzer_configuration_t, the field of which will be set |
| max_image_size | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_max_processed_fraction | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double | max_processed_fraction ) |
Sets value of max_processed_fraction field of the given object.
At most this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed.
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_document_quality_analyzer_configuration_t, the field of which will be set |
| max_processed_fraction | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_min_estimated_number_of_symbols_for_document | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| int | min_estimated_number_of_symbols_for_document ) |
Sets value of min_estimated_number_of_symbols_for_document field of the given object.
If estimated number of symbols is less than this value, return that document is not found.
Default is 20
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_quality_analyzer_configuration_t, the field of which will be set |
| min_estimated_number_of_symbols_for_document | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_min_number_of_required_symbols | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| int | min_number_of_required_symbols ) |
Sets value of min_number_of_required_symbols field of the given object.
If this number of symbols is found and minProcessedFraction of the image is processed, the processing stops.
Default is 100
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_quality_analyzer_configuration_t, the field of which will be set |
| min_number_of_required_symbols | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_min_processed_fraction | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double | min_processed_fraction ) |
Sets value of min_processed_fraction field of the given object.
At least this fraction of the image will be processed, range is from 0 to 1. Decreasing this value below 1.0 can lead to faster processing but may result in less accurate prediction, as only a subset of the image tiles will be analyzed.
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_document_quality_analyzer_configuration_t, the field of which will be set |
| min_processed_fraction | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_min_required_orientation_confidence | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double | min_required_orientation_confidence ) |
Sets value of min_required_orientation_confidence field of the given object.
If detectOrientation is True, minNumberOfRequiredSymbols is found, and orientationConfidence is bigger than this threshold, the processing stops. If the maxProcessedFraction part of the image is processed and orientationConfidence is lower than the threshold, the returned orientation will be 0.
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_quality_analyzer_configuration_t, the field of which will be set |
| min_required_orientation_confidence | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_quality_indices | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_t * | quality_indices, | ||
| size_t | quality_indices_size ) |
Sets value of quality_indices field of the given object.
quality levels.
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_quality_analyzer_configuration_t, the field of which will be set |
| quality_indices | The value to be set. |
| quality_indices_size | Size of the array. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_quality_thresholds | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_threshold_t ** | quality_thresholds, | ||
| size_t | quality_thresholds_size ) |
Sets value of quality_thresholds field of the given object.
Quality thresholds to separate quality levels.
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_quality_analyzer_configuration_t, the field of which will be set |
| quality_thresholds | The value to be set. |
| quality_thresholds_size | Size of the array. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_return_quality_heatmap | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| bool | return_quality_heatmap ) |
Sets value of return_quality_heatmap field of the given object.
If true, will return the quality heatmap as a part of the result. In this case, the entire image will be processed and the minProcessedFraction will be ignored. Useful for debugging situations where the returned quality doesn't appear to match the perceived quality.
Default is 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_quality_analyzer_configuration_t, the field of which will be set |
| return_quality_heatmap | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_tile_size | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| int | tile_size ) |
Sets value of tile_size field of the given object.
Image will be processed in tiles of this size; will be ignored if image is small.
Default is 300
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_quality_analyzer_configuration_t, the field of which will be set |
| tile_size | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_create | ( | scanbotsdk_document_quality_analyzer_configuration_t * | configuration, |
| scanbotsdk_document_quality_analyzer_t ** | result ) |
Creates a new instance of scanbotsdk_document_quality_analyzer 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.
| configuration | The configuration to use for the document quality analyzer. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_quality_analyzer_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_free | ( | scanbotsdk_document_quality_analyzer_t * | self | ) |
Frees the memory allocated for the instance of scanbotsdk_document_quality_analyzer_t. If null is passed, the function does nothing.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_free | ( | scanbotsdk_document_quality_analyzer_result_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_document_quality_analyzer_result_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_cumulative_contrast_histogram | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| int ** | cumulative_contrast_histogram ) |
Returns value of cumulative_contrast_histogram field of the given object. The returned value is direct view into memory, no pre-allocations needed.
Cumulative histogram where every entry is equal to the number of symbols with contrast equal or lower than N percent, where N is the index of the entry in the array.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| cumulative_contrast_histogram | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_cumulative_contrast_histogram_size | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| size_t * | size ) |
Returns size of cumulative_contrast_histogram array.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_cumulative_quality_histogram | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| int ** | cumulative_quality_histogram ) |
Returns value of cumulative_quality_histogram field of the given object. The returned value is direct view into memory, no pre-allocations needed.
Cumulative histogram where every entry is equal to the number of symbols with quality equal or lower than N percent, where N is the index of the entry in the array.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| cumulative_quality_histogram | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_cumulative_quality_histogram_size | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| size_t * | size ) |
Returns size of cumulative_quality_histogram array.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_cumulative_text_size_histogram | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| int ** | cumulative_text_size_histogram ) |
Returns value of cumulative_text_size_histogram field of the given object. The returned value is direct view into memory, no pre-allocations needed.
Cumulative histogram where every entry is equal to the number of symbols with text size equal or lower than N percent, where N is the index of the entry in the array.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| cumulative_text_size_histogram | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_cumulative_text_size_histogram_size | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| size_t * | size ) |
Returns size of cumulative_text_size_histogram array.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_document_found | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| bool * | document_found ) |
Returns value of document_found field of the given object.
True if a document was found.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| document_found | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_orientation | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| double ** | orientation ) |
Returns value of orientation field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Dominant orientation of the document, if found and if orientation detection is enabled. The value is in degrees counter-clockwise, where 0 corresponds to the document being straight, and the value is in the range of [-180, 180]. To rotate the document to be straight, rotate the image clockwise by this value.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| orientation | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_orientation_confidence | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| double ** | orientation_confidence ) |
Returns value of orientation_confidence field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Confidence that the reported orientation of the document is correct. Returned if orientation detection is enabled. The value is in the range of [0, 1]. Possible reasons for low confidence are:
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| orientation_confidence | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_quality | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| scanbotsdk_document_quality_t ** | quality ) |
Returns value of quality field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Quality of the document, if found.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| quality | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_result_get_quality_heatmap | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| scanbotsdk_image_t ** | quality_heatmap ) |
Returns value of quality_heatmap field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Quality heatmap. Black marks areas of no detected text. Colors represent the quality of detected text, with red meaning the lowest quality and yellow and green meaning progressively higher quality.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| quality_heatmap | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_run | ( | scanbotsdk_document_quality_analyzer_t * | self, |
| scanbotsdk_image_t * | image, | ||
| scanbotsdk_document_quality_analyzer_result_t ** | result ) |
analyze document quality of 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_document_quality_analyzer_t method to be called on |
| image | The image to analyze. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_quality_analyzer_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_t_to_string | ( | scanbotsdk_document_quality_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_document_quality_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_quality_threshold_create | ( | double | symbol_quality, |
| double | symbol_ratio, | ||
| scanbotsdk_document_quality_threshold_t ** | result ) |
Creates a new instance of scanbotsdk_document_quality_threshold 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.
| symbol_quality | Symbol quality. |
| symbol_ratio | Symbol ratio. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_quality_threshold_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_threshold_free | ( | scanbotsdk_document_quality_threshold_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_document_quality_threshold_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_document_quality_threshold_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_threshold_get_symbol_quality | ( | scanbotsdk_document_quality_threshold_t * | self, |
| double * | symbol_quality ) |
Returns value of symbol_quality field of the given object.
Symbol quality.
| self | Pointer to the instance of scanbotsdk_document_quality_threshold_t |
| symbol_quality | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_threshold_get_symbol_ratio | ( | scanbotsdk_document_quality_threshold_t * | self, |
| double * | symbol_ratio ) |
Returns value of symbol_ratio field of the given object.
Symbol ratio.
| self | Pointer to the instance of scanbotsdk_document_quality_threshold_t |
| symbol_ratio | Pointer to a variable that will store the value of the field. |