|
Scanbot SDK
|
scanbotsdk_character_level_annotation_t class
Character level annotation, contains information about the quality of a character in the document.
scanbotsdk_character_level_annotations_t class
Character level annotations, contains information about each character in the document.
| typedef struct scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t |
scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t class
Configuration for the compatibility mode of the Document Quality Analyzer. In this mode, the analyzer will return results that are identical to older versions of the SDK.
| typedef enum scanbotsdk_document_quality_analyzer_compatibility_mode_t scanbotsdk_document_quality_analyzer_compatibility_mode_t |
scanbotsdk_document_quality_analyzer_compatibility_mode_t enum
Compatibility mode for the Document Quality Analyzer. In this mode, the analyzer will return results that are identical to older versions of the SDK.
| 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
The document quality analysis of a document can be slow on low end devices. To speed up the analysis, only parts of the the document can be analyzed. This can yield faster results but may result in less accurate predictions. The configuration parameters minProcessedFraction and maxProcessedFraction define a range of the image that will be analyzed. In that range, minNumberOfRequiredSymbols and minRequiredOrientationConfidence define under which conditions the analysis will stop early.
| 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.
| typedef struct scanbotsdk_document_quality_analyzer_training_data_t scanbotsdk_document_quality_analyzer_training_data_t |
scanbotsdk_document_quality_analyzer_training_data_t class
Contains all the data needed to train a Document Quality Analyzer.
scanbotsdk_document_quality_assessment_t enum
Result of document quality analysis.
scanbotsdk_document_quality_t enum
Deprecated, please use DocumentQualityAssessment instead. Result of document quality analysis.
scanbotsdk_document_quality_threshold_t class
Point in the quality-number of symbols space to separate quality levels.
| typedef struct scanbotsdk_process_by_tile_configuration_t scanbotsdk_process_by_tile_configuration_t |
scanbotsdk_process_by_tile_configuration_t class
Configuration for processing image by tiles. This can be used to make the document quality analyzer processing faster with lower memory consumption, but prediction can be less accurate.
scanbotsdk_document_quality_analyzer_compatibility_mode_t enum
Compatibility mode for the Document Quality Analyzer. In this mode, the analyzer will return results that are identical to older versions of the SDK.
| Enumerator | |
|---|---|
| SCANBOTSDK_DOCUMENT_QUALITY_ANALYZER_COMPATIBILITY_MODE_V8 | Compatible with version 8 of the Scanbot SDK. |
scanbotsdk_document_quality_assessment_t enum
Result of document quality analysis.
scanbotsdk_document_quality_t enum
Deprecated, please use DocumentQualityAssessment instead. Result of document quality analysis.
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_free | ( | scanbotsdk_character_level_annotation_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_character_level_annotation_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_character_level_annotation_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_get_contrast | ( | scanbotsdk_character_level_annotation_t * | self, |
| double * | contrast ) |
Returns value of contrast field of the given object.
Estimated contrast of the character, in the range of [0, 1], where 0 means no contrast and 1 means perfect contrast.
| self | Pointer to the instance of scanbotsdk_character_level_annotation_t |
| contrast | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_get_font_size | ( | scanbotsdk_character_level_annotation_t * | self, |
| double * | font_size ) |
Returns value of font_size field of the given object.
Estimated height of the character in pixels.
| self | Pointer to the instance of scanbotsdk_character_level_annotation_t |
| font_size | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_get_ocrability | ( | scanbotsdk_character_level_annotation_t * | self, |
| double * | ocrability ) |
Returns value of ocrability field of the given object.
Estimated OCRability of the character, in the range of [0, 1], where 0 means not readable and 1 means perfect readability.
| self | Pointer to the instance of scanbotsdk_character_level_annotation_t |
| ocrability | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_get_orientation | ( | scanbotsdk_character_level_annotation_t * | self, |
| double * | orientation ) |
Returns value of orientation field of the given object.
Orientation of the character in degrees counter-clockwise, where 0 means straight, and the value is in the range of [-180, 180].
| self | Pointer to the instance of scanbotsdk_character_level_annotation_t |
| orientation | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_get_orientation_deviation | ( | scanbotsdk_character_level_annotation_t * | self, |
| double * | orientation_deviation ) |
Returns value of orientation_deviation field of the given object.
Deviation of the character's normalized orientation from dominant orientation of the line, in degrees.
| self | Pointer to the instance of scanbotsdk_character_level_annotation_t |
| orientation_deviation | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_get_orientation_normalized | ( | scanbotsdk_character_level_annotation_t * | self, |
| double * | orientation_normalized ) |
Returns value of orientation_normalized field of the given object.
Same as orientation, but takes into account surrounding characters to smooth the orientation values of characters in a line.
| self | Pointer to the instance of scanbotsdk_character_level_annotation_t |
| orientation_normalized | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_get_plot_center | ( | scanbotsdk_character_level_annotation_t * | self, |
| scanbotsdk_pointf_t * | plot_center ) |
Returns value of plot_center field of the given object.
Coordinates of the character's center in the image. The coordinates are in pixels, with (0, 0) being the top-left corner of the image. The rectangle described by the plotCenter, plotWidth, and plotHeight fields serve as a rough estimate of the position of the character in the input image, intended for plotting.
| self | Pointer to the instance of scanbotsdk_character_level_annotation_t |
| plot_center | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_get_plot_height | ( | scanbotsdk_character_level_annotation_t * | self, |
| double * | plot_height ) |
Returns value of plot_height field of the given object.
Height of the character in pixels.
| self | Pointer to the instance of scanbotsdk_character_level_annotation_t |
| plot_height | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotation_get_plot_width | ( | scanbotsdk_character_level_annotation_t * | self, |
| double * | plot_width ) |
Returns value of plot_width field of the given object.
Width of the character in pixels.
| self | Pointer to the instance of scanbotsdk_character_level_annotation_t |
| plot_width | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotations_free | ( | scanbotsdk_character_level_annotations_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_character_level_annotations_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_character_level_annotations_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotations_get_annotations | ( | scanbotsdk_character_level_annotations_t * | self, |
| scanbotsdk_character_level_annotation_t ** | annotations, | ||
| size_t | size ) |
Returns value of annotations field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
List of character level annotations.
| self | Pointer to the instance of scanbotsdk_character_level_annotations_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| annotations | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotations_get_annotations_size | ( | scanbotsdk_character_level_annotations_t * | self, |
| size_t * | size ) |
Returns size of annotations array.
| self | Pointer to the instance of scanbotsdk_character_level_annotations_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_character_level_annotations_get_api_version | ( | scanbotsdk_character_level_annotations_t * | self, |
| const char ** | api_version ) |
Returns value of api_version field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Version of the model and code used to generate the annotations.
| self | Pointer to the instance of scanbotsdk_character_level_annotations_t |
| api_version | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_create | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_t | mode, |
| scanbotsdk_document_quality_t | minimum_acceptable_quality, | ||
| scanbotsdk_document_quality_t | minimum_uncertain_quality, | ||
| bool | inspect_small_text, | ||
| scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t ** | result ) |
Creates a new instance of scanbotsdk_document_quality_analyzer_compatibility_mode_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.
| mode | Compatibility mode to use. |
Default is V8
| minimum_acceptable_quality | This setting describes how the Document Quality Analyzer in v8 compatibility mode will behave. Minimum compatibility-mode quality that gets converted to DocumentQualityAssessment.ACCEPTABLE. Compatibility-mode quality levels equal to or higher than minimumAcceptableQuality result in an ACCEPTABLE quality assessment. |
Default is REASONABLE
| minimum_uncertain_quality | Minimum compatibility-mode quality that gets converted to DocumentQualityAssessment.UNCERTAIN. Compatibility-mode quality levels between minimumUncertainQuality (inclusive) and minimumAcceptableQuality (exclusive) result in an UNCERTAIN quality assessment. |
Default is POOR
| 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
| result | Pointer to a variable that will store the created instance of scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_create_with_defaults | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t ** | result | ) |
Creates a new instance of scanbotsdk_document_quality_analyzer_compatibility_mode_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_compatibility_mode_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_free | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_get_inspect_small_text | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_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_compatibility_mode_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_compatibility_mode_configuration_get_minimum_acceptable_quality | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t * | self, |
| scanbotsdk_document_quality_t * | minimum_acceptable_quality ) |
Returns value of minimum_acceptable_quality field of the given object.
This setting describes how the Document Quality Analyzer in v8 compatibility mode will behave. Minimum compatibility-mode quality that gets converted to DocumentQualityAssessment.ACCEPTABLE. Compatibility-mode quality levels equal to or higher than minimumAcceptableQuality result in an ACCEPTABLE quality assessment.
Default is REASONABLE
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t |
| minimum_acceptable_quality | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_get_minimum_uncertain_quality | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t * | self, |
| scanbotsdk_document_quality_t * | minimum_uncertain_quality ) |
Returns value of minimum_uncertain_quality field of the given object.
Minimum compatibility-mode quality that gets converted to DocumentQualityAssessment.UNCERTAIN. Compatibility-mode quality levels between minimumUncertainQuality (inclusive) and minimumAcceptableQuality (exclusive) result in an UNCERTAIN quality assessment.
Default is POOR
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t |
| minimum_uncertain_quality | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_get_mode | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t * | self, |
| scanbotsdk_document_quality_analyzer_compatibility_mode_t * | mode ) |
Returns value of mode field of the given object.
Compatibility mode to use.
Default is V8
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t |
| mode | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_set_inspect_small_text | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_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_compatibility_mode_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_compatibility_mode_configuration_set_minimum_acceptable_quality | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t * | self, |
| scanbotsdk_document_quality_t | minimum_acceptable_quality ) |
Sets value of minimum_acceptable_quality field of the given object.
This setting describes how the Document Quality Analyzer in v8 compatibility mode will behave. Minimum compatibility-mode quality that gets converted to DocumentQualityAssessment.ACCEPTABLE. Compatibility-mode quality levels equal to or higher than minimumAcceptableQuality result in an ACCEPTABLE quality assessment.
Default is REASONABLE
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_compatibility_mode_configuration_t, the field of which will be set |
| minimum_acceptable_quality | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_set_minimum_uncertain_quality | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t * | self, |
| scanbotsdk_document_quality_t | minimum_uncertain_quality ) |
Sets value of minimum_uncertain_quality field of the given object.
Minimum compatibility-mode quality that gets converted to DocumentQualityAssessment.UNCERTAIN. Compatibility-mode quality levels between minimumUncertainQuality (inclusive) and minimumAcceptableQuality (exclusive) result in an UNCERTAIN quality assessment.
Default is POOR
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_compatibility_mode_configuration_t, the field of which will be set |
| minimum_uncertain_quality | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_compatibility_mode_t_to_string | ( | scanbotsdk_document_quality_analyzer_compatibility_mode_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_document_quality_analyzer_compatibility_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_document_quality_analyzer_configuration_create | ( | const char * | quality_analysis_model, |
| double | quality_acceptable_uncertain_threshold, | ||
| double | quality_unacceptable_uncertain_threshold, | ||
| scanbotsdk_document_quality_threshold_t ** | quality_level_thresholds, | ||
| size_t | quality_level_thresholds_size, | ||
| scanbotsdk_document_quality_t * | quality_level_indices, | ||
| size_t | quality_level_indices_size, | ||
| double * | input_scales, | ||
| size_t | input_scales_size, | ||
| double | input_scale_threshold_to_process_entire_image, | ||
| int | max_image_size, | ||
| int | min_estimated_number_of_symbols_for_document, | ||
| scanbotsdk_process_by_tile_configuration_t * | process_by_tile_configuration, | ||
| double | min_required_orientation_confidence, | ||
| bool | return_quality_heatmap, | ||
| scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t * | compatibility_mode, | ||
| 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_analysis_model | Document quality analysis model to use. If empty, the built-in model is used which provides reasonable quality estimates for a wide variety of documents. If the built-in model is not a good fit for your use case, consider creating a model based on your own documents and use case. |
To create a fine-tuned quality analysis model, follow the documentation of our DoQA model configurator tool. You can find it here: https://github.com/doo/scanbot-sdk-doqa-configurator.
Default is "" The value must not be null.
| quality_acceptable_uncertain_threshold | There are documents for which the quality analysis model is uncertain, meaning that the model is not sure if the document is acceptable or not. E.g., the model may report a document quality to be ACCEPTABLE with 60% confidence. Depending on the value of this threshold, the document in this case will be reported as ACCEPTABLE or UNCERTAIN. The default value of 0.5 will typically lead to a good balance between the number of documents reported as ACCEPTABLE and UNCERTAIN. A lower value will lead to fewer UNCERTAIN documents, but unacceptable documents will more often be reported as ACCEPTABLE (false positives). A higher value will lead to more borderline documents being reported as UNCERTAIN, but unacceptable documents will be reported as ACCEPTABLE less often. If 0, no documents with a predicted quality of ACCEPTABLE will be reported as UNCERTAIN, regardless of the model's confidence, unless the document has very few symbols (see minEstimatedNumberOfSymbolsForDocument). If 1, almost all documents with a predicted quality of ACCEPTABLE will be reported as UNCERTAIN. Must be in the range of [0, 1]. |
Default is 0.5
| quality_unacceptable_uncertain_threshold | Same as qualityAcceptableUncertainThreshold, but for documents that are predicted to be UNACCEPTABLE by the model. |
Default is 0.5
| quality_level_thresholds | Deprecated, please use qualityAnalysisModel instead. Quality thresholds to separate quality levels. Entries of the array must not be null. |
| quality_level_thresholds_size | Size of the array quality_level_thresholds |
| quality_level_indices | Deprecated, please use qualityAnalysisModel instead. Quality levels. |
| quality_level_indices_size | Size of the array quality_level_indices |
| input_scales | Runs the Document Quality Analyzer on the listed inputScales. Only the best result will be returned. Typical range of the text height, which model can work with, is 5-40 pixels. 10 pixels height is recommended. Use this option if documents with smaller or bigger texts are expected. For example, if 80 pixels text height is expected, scale should be 1/8. Not compatible with maxImageSize. If not [1] maxImageSize should be less or equal 0. |
| input_scales_size | Size of the array input_scales |
| input_scale_threshold_to_process_entire_image | If inputScale from inputScales is smaller or equal than the threshold minProcessedFraction and maxProcessedFraction will be ignored, and the entire image will be processed. |
Default is 0.25
| max_image_size | Maximum image size in pixels, if image is bigger, it will be resized. If less or equal 0 will be ignored. |
Default is 2000
| min_estimated_number_of_symbols_for_document | If a document's estimated number of symbols is less than this value, document quality will be reported as UNCERTAIN. In that case, the deprecated result fields documentFound andqualityLevel will be set to false and empty, respectively. |
Default is 20
| process_by_tile_configuration | Configuration for processing image by tiles. The value must not be null. |
| 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.9
| 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
| compatibility_mode | Compatibility mode for the Document Quality Analyzer. If set, the analyzer will return results that are identical to older versions of the SDK. The value can be null. |
| 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_compatibility_mode | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t ** | compatibility_mode ) |
Returns value of compatibility_mode field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Compatibility mode for the Document Quality Analyzer. If set, the analyzer will return results that are identical to older versions of the SDK.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| compatibility_mode | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_input_scale_threshold_to_process_entire_image | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double * | input_scale_threshold_to_process_entire_image ) |
Returns value of input_scale_threshold_to_process_entire_image field of the given object.
If inputScale from inputScales is smaller or equal than the threshold minProcessedFraction and maxProcessedFraction will be ignored, and the entire image will be processed.
Default is 0.25
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| input_scale_threshold_to_process_entire_image | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_input_scales | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double ** | input_scales ) |
Returns value of input_scales field of the given object. The returned value is direct view into memory, no pre-allocations needed.
Runs the Document Quality Analyzer on the listed inputScales. Only the best result will be returned. Typical range of the text height, which model can work with, is 5-40 pixels. 10 pixels height is recommended. Use this option if documents with smaller or bigger texts are expected. For example, if 80 pixels text height is expected, scale should be 1/8. Not compatible with maxImageSize. If not [1] maxImageSize should be less or equal 0.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| input_scales | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_get_input_scales_size | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| size_t * | size ) |
Returns size of input_scales 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_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. If less or equal 0 will be ignored.
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_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 a document's estimated number of symbols is less than this value, document quality will be reported as UNCERTAIN. In that case, the deprecated result fields documentFound andqualityLevel will be set to false and empty, respectively.
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_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.9
| 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_process_by_tile_configuration | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_process_by_tile_configuration_t ** | process_by_tile_configuration ) |
Returns value of process_by_tile_configuration field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Configuration for processing image by tiles.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| process_by_tile_configuration | 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_acceptable_uncertain_threshold | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double * | quality_acceptable_uncertain_threshold ) |
Returns value of quality_acceptable_uncertain_threshold field of the given object.
There are documents for which the quality analysis model is uncertain, meaning that the model is not sure if the document is acceptable or not. E.g., the model may report a document quality to be ACCEPTABLE with 60% confidence. Depending on the value of this threshold, the document in this case will be reported as ACCEPTABLE or UNCERTAIN. The default value of 0.5 will typically lead to a good balance between the number of documents reported as ACCEPTABLE and UNCERTAIN. A lower value will lead to fewer UNCERTAIN documents, but unacceptable documents will more often be reported as ACCEPTABLE (false positives). A higher value will lead to more borderline documents being reported as UNCERTAIN, but unacceptable documents will be reported as ACCEPTABLE less often. If 0, no documents with a predicted quality of ACCEPTABLE will be reported as UNCERTAIN, regardless of the model's confidence, unless the document has very few symbols (see minEstimatedNumberOfSymbolsForDocument). If 1, almost all documents with a predicted quality of ACCEPTABLE will be reported as UNCERTAIN. Must be in the range of [0, 1].
Default is 0.5
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| quality_acceptable_uncertain_threshold | 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_analysis_model | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| const char ** | quality_analysis_model ) |
Returns value of quality_analysis_model field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Document quality analysis model to use. If empty, the built-in model is used which provides reasonable quality estimates for a wide variety of documents. If the built-in model is not a good fit for your use case, consider creating a model based on your own documents and use case.
To create a fine-tuned quality analysis model, follow the documentation of our DoQA model configurator tool. You can find it here: https://github.com/doo/scanbot-sdk-doqa-configurator.
Default is ""
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| quality_analysis_model | 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_level_indices | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_t ** | quality_level_indices ) |
Returns value of quality_level_indices field of the given object. The returned value is direct view into memory, no pre-allocations needed.
Deprecated, please use qualityAnalysisModel instead. Quality levels.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| quality_level_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_level_indices_size | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| size_t * | size ) |
Returns size of quality_level_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_level_thresholds | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_threshold_t ** | quality_level_thresholds, | ||
| size_t | size ) |
Returns value of quality_level_thresholds field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Deprecated, please use qualityAnalysisModel instead. 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_level_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_level_thresholds_size | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| size_t * | size ) |
Returns size of quality_level_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_quality_unacceptable_uncertain_threshold | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double * | quality_unacceptable_uncertain_threshold ) |
Returns value of quality_unacceptable_uncertain_threshold field of the given object.
Same as qualityAcceptableUncertainThreshold, but for documents that are predicted to be UNACCEPTABLE by the model.
Default is 0.5
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_configuration_t |
| quality_unacceptable_uncertain_threshold | Pointer to a variable that will store the value of the field. |
| 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_set_compatibility_mode | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_analyzer_compatibility_mode_configuration_t * | compatibility_mode ) |
Sets value of compatibility_mode field of the given object.
Compatibility mode for the Document Quality Analyzer. If set, the analyzer will return results that are identical to older versions of the SDK.
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 |
| compatibility_mode | The value to be set. Can be null. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_input_scale_threshold_to_process_entire_image | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double | input_scale_threshold_to_process_entire_image ) |
Sets value of input_scale_threshold_to_process_entire_image field of the given object.
If inputScale from inputScales is smaller or equal than the threshold minProcessedFraction and maxProcessedFraction will be ignored, and the entire image will be processed.
Default is 0.25
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 |
| input_scale_threshold_to_process_entire_image | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_input_scales | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double * | input_scales, | ||
| size_t | input_scales_size ) |
Sets value of input_scales field of the given object.
Runs the Document Quality Analyzer on the listed inputScales. Only the best result will be returned. Typical range of the text height, which model can work with, is 5-40 pixels. 10 pixels height is recommended. Use this option if documents with smaller or bigger texts are expected. For example, if 80 pixels text height is expected, scale should be 1/8. Not compatible with maxImageSize. If not [1] maxImageSize should be less or equal 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 |
| input_scales | The value to be set. |
| input_scales_size | Size of the array. |
| 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. If less or equal 0 will be ignored.
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_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 a document's estimated number of symbols is less than this value, document quality will be reported as UNCERTAIN. In that case, the deprecated result fields documentFound andqualityLevel will be set to false and empty, respectively.
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_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.9
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_process_by_tile_configuration | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_process_by_tile_configuration_t * | process_by_tile_configuration ) |
Sets value of process_by_tile_configuration field of the given object.
Configuration for processing image by tiles.
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 |
| process_by_tile_configuration | The value to be set. Must not be null. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_quality_acceptable_uncertain_threshold | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double | quality_acceptable_uncertain_threshold ) |
Sets value of quality_acceptable_uncertain_threshold field of the given object.
There are documents for which the quality analysis model is uncertain, meaning that the model is not sure if the document is acceptable or not. E.g., the model may report a document quality to be ACCEPTABLE with 60% confidence. Depending on the value of this threshold, the document in this case will be reported as ACCEPTABLE or UNCERTAIN. The default value of 0.5 will typically lead to a good balance between the number of documents reported as ACCEPTABLE and UNCERTAIN. A lower value will lead to fewer UNCERTAIN documents, but unacceptable documents will more often be reported as ACCEPTABLE (false positives). A higher value will lead to more borderline documents being reported as UNCERTAIN, but unacceptable documents will be reported as ACCEPTABLE less often. If 0, no documents with a predicted quality of ACCEPTABLE will be reported as UNCERTAIN, regardless of the model's confidence, unless the document has very few symbols (see minEstimatedNumberOfSymbolsForDocument). If 1, almost all documents with a predicted quality of ACCEPTABLE will be reported as UNCERTAIN. Must be in the range of [0, 1].
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_document_quality_analyzer_configuration_t, the field of which will be set |
| quality_acceptable_uncertain_threshold | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_quality_analysis_model | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| const char * | quality_analysis_model ) |
Sets value of quality_analysis_model field of the given object.
Document quality analysis model to use. If empty, the built-in model is used which provides reasonable quality estimates for a wide variety of documents. If the built-in model is not a good fit for your use case, consider creating a model based on your own documents and use case.
To create a fine-tuned quality analysis model, follow the documentation of our DoQA model configurator tool. You can find it here: https://github.com/doo/scanbot-sdk-doqa-configurator.
Default is ""
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_analysis_model | The value to be set. Must not be null. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_quality_level_indices | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_t * | quality_level_indices, | ||
| size_t | quality_level_indices_size ) |
Sets value of quality_level_indices field of the given object.
Deprecated, please use qualityAnalysisModel instead. 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_level_indices | The value to be set. |
| quality_level_indices_size | Size of the array. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_quality_level_thresholds | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| scanbotsdk_document_quality_threshold_t ** | quality_level_thresholds, | ||
| size_t | quality_level_thresholds_size ) |
Sets value of quality_level_thresholds field of the given object.
Deprecated, please use qualityAnalysisModel instead. 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_level_thresholds | The value to be set. |
| quality_level_thresholds_size | Size of the array. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_configuration_set_quality_unacceptable_uncertain_threshold | ( | scanbotsdk_document_quality_analyzer_configuration_t * | self, |
| double | quality_unacceptable_uncertain_threshold ) |
Sets value of quality_unacceptable_uncertain_threshold field of the given object.
Same as qualityAcceptableUncertainThreshold, but for documents that are predicted to be UNACCEPTABLE by the model.
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_document_quality_analyzer_configuration_t, the field of which will be set |
| quality_unacceptable_uncertain_threshold | The value to be set. |
| 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_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_best_input_scale | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| double * | best_input_scale ) |
Returns value of best_input_scale field of the given object.
Returns the best inputScale whose results are used (see inputScales configuration option).
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| best_input_scale | 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 | ( | 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_document_found | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| bool * | document_found ) |
Returns value of document_found field of the given object.
Deprecated, please use quality instead, because it provides a more reliable result. 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.
Dominant orientation of the document, if found. 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.
Confidence that the reported orientation of the document is correct. 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_assessment_t * | quality ) |
Returns value of quality field of the given object.
Document quality as estimated from the given quality analysis model.
| 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_result_get_quality_level | ( | scanbotsdk_document_quality_analyzer_result_t * | self, |
| scanbotsdk_document_quality_t ** | quality_level ) |
Returns value of quality_level field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Deprecated, please use quality instead, because it provides a more reliable result. Quality of the document, if found. The exact behavior of this value can be configured with the qualityThresholds and qualityIndices parameters.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_result_t |
| quality_level | 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_analyzer_training_data_free | ( | scanbotsdk_document_quality_analyzer_training_data_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_document_quality_analyzer_training_data_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_document_quality_analyzer_training_data_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_analyzer_training_data_get_character_level_annotations | ( | scanbotsdk_document_quality_analyzer_training_data_t * | self, |
| scanbotsdk_character_level_annotations_t ** | character_level_annotations ) |
Returns value of character_level_annotations field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
Character level annotations, contains information about each character in the document.
| self | Pointer to the instance of scanbotsdk_document_quality_analyzer_training_data_t |
| character_level_annotations | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_document_quality_assessment_t_to_string | ( | scanbotsdk_document_quality_assessment_t | value, |
| const char ** | result ) |
Returns the string representation of the given scanbotsdk_document_quality_assessment_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_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. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_create | ( | bool | enabled, |
| double | min_processed_fraction, | ||
| double | max_processed_fraction, | ||
| int | min_number_of_required_symbols, | ||
| int | tile_size, | ||
| scanbotsdk_process_by_tile_configuration_t ** | result ) |
Creates a new instance of scanbotsdk_process_by_tile_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.
| enabled | Enable processing by tiles. |
Default is false
| 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
| tile_size | Image will be processed in tiles of this size; will be ignored if image is small. |
Default is 300
| result | Pointer to a variable that will store the created instance of scanbotsdk_process_by_tile_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_create_with_defaults | ( | scanbotsdk_process_by_tile_configuration_t ** | result | ) |
Creates a new instance of scanbotsdk_process_by_tile_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_process_by_tile_configuration_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_free | ( | scanbotsdk_process_by_tile_configuration_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_process_by_tile_configuration_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_process_by_tile_configuration_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_get_enabled | ( | scanbotsdk_process_by_tile_configuration_t * | self, |
| bool * | enabled ) |
Returns value of enabled field of the given object.
Enable processing by tiles.
Default is false
| self | Pointer to the instance of scanbotsdk_process_by_tile_configuration_t |
| enabled | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_get_max_processed_fraction | ( | scanbotsdk_process_by_tile_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_process_by_tile_configuration_t |
| max_processed_fraction | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_get_min_number_of_required_symbols | ( | scanbotsdk_process_by_tile_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_process_by_tile_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_process_by_tile_configuration_get_min_processed_fraction | ( | scanbotsdk_process_by_tile_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_process_by_tile_configuration_t |
| min_processed_fraction | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_get_tile_size | ( | scanbotsdk_process_by_tile_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_process_by_tile_configuration_t |
| tile_size | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_set_enabled | ( | scanbotsdk_process_by_tile_configuration_t * | self, |
| bool | enabled ) |
Sets value of enabled field of the given object.
Enable processing by tiles.
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_process_by_tile_configuration_t, the field of which will be set |
| enabled | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_set_max_processed_fraction | ( | scanbotsdk_process_by_tile_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_process_by_tile_configuration_t, the field of which will be set |
| max_processed_fraction | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_set_min_number_of_required_symbols | ( | scanbotsdk_process_by_tile_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_process_by_tile_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_process_by_tile_configuration_set_min_processed_fraction | ( | scanbotsdk_process_by_tile_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_process_by_tile_configuration_t, the field of which will be set |
| min_processed_fraction | The value to be set. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_process_by_tile_configuration_set_tile_size | ( | scanbotsdk_process_by_tile_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_process_by_tile_configuration_t, the field of which will be set |
| tile_size | The value to be set. |