|
Scanbot SDK
|
Typedefs | |
| typedef struct scanbotsdk_ocr_engine_t | scanbotsdk_ocr_engine_t |
| scanbotsdk_ocr_engine_t class | |
| typedef struct scanbotsdk_ocr_element_t | scanbotsdk_ocr_element_t |
| scanbotsdk_ocr_element_t class | |
| typedef struct scanbotsdk_glyph_t | scanbotsdk_glyph_t |
| scanbotsdk_glyph_t class | |
| typedef struct scanbotsdk_word_t | scanbotsdk_word_t |
| scanbotsdk_word_t class | |
| typedef struct scanbotsdk_line_t | scanbotsdk_line_t |
| scanbotsdk_line_t class | |
| typedef struct scanbotsdk_block_t | scanbotsdk_block_t |
| scanbotsdk_block_t class | |
| typedef struct scanbotsdk_page_t | scanbotsdk_page_t |
| scanbotsdk_page_t class | |
Functions | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_engine_create (scanbotsdk_ocr_engine_t **result) |
| Creates a new instance of scanbotsdk_ocr_engine with given params and stores it in the location specified by the last argument. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_engine_free (scanbotsdk_ocr_engine_t *self) |
| Frees the memory allocated for the instance of scanbotsdk_ocr_engine_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_engine_run (scanbotsdk_ocr_engine_t *self, scanbotsdk_image_t *image, scanbotsdk_page_t **result) |
| Recognize text in the given image. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_free (scanbotsdk_ocr_element_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_ocr_element_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_get_text (scanbotsdk_ocr_element_t *self, const char **text) |
| Returns value of text field of the given object. The returned pointers do NOT own the underlying object, caller must not free them. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_get_confidence (scanbotsdk_ocr_element_t *self, double *confidence) |
| Returns value of confidence field of the given object. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_get_roi (scanbotsdk_ocr_element_t *self, scanbotsdk_pointf_t **roi) |
| Returns value of roi field of the given object. The returned value is direct view into memory, no pre-allocations needed. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_get_roi_size (scanbotsdk_ocr_element_t *self, size_t *size) |
| Returns size of roi array. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_glyph_create (const char *text, double confidence, scanbotsdk_pointf_t *roi, size_t roi_size, scanbotsdk_glyph_t **result) |
| Creates a new instance of scanbotsdk_glyph with given params and stores it in the location specified by the last argument. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_glyph_free (scanbotsdk_glyph_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_glyph_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_is_scanbotsdk_glyph (scanbotsdk_ocr_element_t *object, bool *result) |
| Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_glyph_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_as_scanbotsdk_glyph (scanbotsdk_ocr_element_t *object, scanbotsdk_glyph_t **result) |
| Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_glyph_t. If the given instance is not an instance of the subtype, result will be null. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_glyph_as_scanbotsdk_ocr_element (scanbotsdk_glyph_t *object, scanbotsdk_ocr_element_t **result) |
| Casts the given instance of scanbotsdk_glyph_t to its parent type scanbotsdk_ocr_element_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_word_create (const char *text, double confidence, scanbotsdk_pointf_t *roi, size_t roi_size, scanbotsdk_glyph_t **glyphs, size_t glyphs_size, scanbotsdk_word_t **result) |
| Creates a new instance of scanbotsdk_word with given params and stores it in the location specified by the last argument. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_word_free (scanbotsdk_word_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_word_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_is_scanbotsdk_word (scanbotsdk_ocr_element_t *object, bool *result) |
| Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_word_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_as_scanbotsdk_word (scanbotsdk_ocr_element_t *object, scanbotsdk_word_t **result) |
| Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_word_t. If the given instance is not an instance of the subtype, result will be null. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_word_as_scanbotsdk_ocr_element (scanbotsdk_word_t *object, scanbotsdk_ocr_element_t **result) |
| Casts the given instance of scanbotsdk_word_t to its parent type scanbotsdk_ocr_element_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_word_get_glyphs (scanbotsdk_word_t *self, scanbotsdk_glyph_t **glyphs, size_t size) |
| Returns value of glyphs field of the given object. The returned pointers do NOT own the underlying object, caller must not free them. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_word_get_glyphs_size (scanbotsdk_word_t *self, size_t *size) |
| Returns size of glyphs array. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_line_create (const char *text, double confidence, scanbotsdk_pointf_t *roi, size_t roi_size, scanbotsdk_word_t **words, size_t words_size, scanbotsdk_line_t **result) |
| Creates a new instance of scanbotsdk_line with given params and stores it in the location specified by the last argument. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_line_free (scanbotsdk_line_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_line_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_is_scanbotsdk_line (scanbotsdk_ocr_element_t *object, bool *result) |
| Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_line_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_as_scanbotsdk_line (scanbotsdk_ocr_element_t *object, scanbotsdk_line_t **result) |
| Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_line_t. If the given instance is not an instance of the subtype, result will be null. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_line_as_scanbotsdk_ocr_element (scanbotsdk_line_t *object, scanbotsdk_ocr_element_t **result) |
| Casts the given instance of scanbotsdk_line_t to its parent type scanbotsdk_ocr_element_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_line_get_words (scanbotsdk_line_t *self, scanbotsdk_word_t **words, size_t size) |
| Returns value of words field of the given object. The returned pointers do NOT own the underlying object, caller must not free them. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_line_get_words_size (scanbotsdk_line_t *self, size_t *size) |
| Returns size of words array. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_block_create (const char *text, double confidence, scanbotsdk_pointf_t *roi, size_t roi_size, scanbotsdk_line_t **lines, size_t lines_size, scanbotsdk_block_t **result) |
| Creates a new instance of scanbotsdk_block with given params and stores it in the location specified by the last argument. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_block_free (scanbotsdk_block_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_block_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_is_scanbotsdk_block (scanbotsdk_ocr_element_t *object, bool *result) |
| Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_block_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_as_scanbotsdk_block (scanbotsdk_ocr_element_t *object, scanbotsdk_block_t **result) |
| Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_block_t. If the given instance is not an instance of the subtype, result will be null. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_block_as_scanbotsdk_ocr_element (scanbotsdk_block_t *object, scanbotsdk_ocr_element_t **result) |
| Casts the given instance of scanbotsdk_block_t to its parent type scanbotsdk_ocr_element_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_block_get_lines (scanbotsdk_block_t *self, scanbotsdk_line_t **lines, size_t size) |
| Returns value of lines field of the given object. The returned pointers do NOT own the underlying object, caller must not free them. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_block_get_lines_size (scanbotsdk_block_t *self, size_t *size) |
| Returns size of lines array. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_page_create (const char *text, double confidence, scanbotsdk_pointf_t *roi, size_t roi_size, scanbotsdk_block_t **blocks, size_t blocks_size, scanbotsdk_page_t **result) |
| Creates a new instance of scanbotsdk_page with given params and stores it in the location specified by the last argument. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_page_free (scanbotsdk_page_t *object) |
| Frees the memory allocated for the instance of scanbotsdk_page_t. If null is passed, the function does nothing. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_is_scanbotsdk_page (scanbotsdk_ocr_element_t *object, bool *result) |
| Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_page_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_ocr_element_as_scanbotsdk_page (scanbotsdk_ocr_element_t *object, scanbotsdk_page_t **result) |
| Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_page_t. If the given instance is not an instance of the subtype, result will be null. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_page_as_scanbotsdk_ocr_element (scanbotsdk_page_t *object, scanbotsdk_ocr_element_t **result) |
| Casts the given instance of scanbotsdk_page_t to its parent type scanbotsdk_ocr_element_t. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_page_get_blocks (scanbotsdk_page_t *self, scanbotsdk_block_t **blocks, size_t size) |
| Returns value of blocks field of the given object. The returned pointers do NOT own the underlying object, caller must not free them. | |
| SBSDK_API scanbotsdk_error_code_t | scanbotsdk_page_get_blocks_size (scanbotsdk_page_t *self, size_t *size) |
| Returns size of blocks array. | |
| typedef struct scanbotsdk_block_t scanbotsdk_block_t |
scanbotsdk_block_t class
Represents a single block, e.g. a paragraph. A block is made up of lines.
| typedef struct scanbotsdk_glyph_t scanbotsdk_glyph_t |
scanbotsdk_glyph_t class
Represents a single glyph, i.e. a character.
| typedef struct scanbotsdk_line_t scanbotsdk_line_t |
scanbotsdk_line_t class
Represents a single line. A line is made up of words.
| typedef struct scanbotsdk_ocr_element_t scanbotsdk_ocr_element_t |
scanbotsdk_ocr_element_t class
Base class for units of text, e.g. glyphs, words, lines, blocks, pages.
| typedef struct scanbotsdk_ocr_engine_t scanbotsdk_ocr_engine_t |
scanbotsdk_ocr_engine_t class
API for optical character recognition.
Required licence feature(s): Ocr.
| typedef struct scanbotsdk_page_t scanbotsdk_page_t |
scanbotsdk_page_t class
Represents result of performing OCR on an image. A page is made up of blocks.
| typedef struct scanbotsdk_word_t scanbotsdk_word_t |
scanbotsdk_word_t class
Represents a single word. A word is made up of glyphs.
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_block_as_scanbotsdk_ocr_element | ( | scanbotsdk_block_t * | object, |
| scanbotsdk_ocr_element_t ** | result ) |
Casts the given instance of scanbotsdk_block_t to its parent type scanbotsdk_ocr_element_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_block_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_block_create | ( | const char * | text, |
| double | confidence, | ||
| scanbotsdk_pointf_t * | roi, | ||
| size_t | roi_size, | ||
| scanbotsdk_line_t ** | lines, | ||
| size_t | lines_size, | ||
| scanbotsdk_block_t ** | result ) |
Creates a new instance of scanbotsdk_block 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.
| text | The recognized text. The value must not be null. |
| confidence | Text confidence. Range is [0-1]. |
| roi | Quad where the text was found in image coordinates. The order of the points is clockwise starting from the top left. |
| roi_size | Size of the array roi |
| lines | List of lines. Entries of the array must not be null. |
| lines_size | Size of the array lines |
| result | Pointer to a variable that will store the created instance of scanbotsdk_block_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_block_free | ( | scanbotsdk_block_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_block_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_block_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_block_get_lines | ( | scanbotsdk_block_t * | self, |
| scanbotsdk_line_t ** | lines, | ||
| size_t | size ) |
Returns value of lines field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
List of lines.
| self | Pointer to the instance of scanbotsdk_block_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| lines | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_block_get_lines_size | ( | scanbotsdk_block_t * | self, |
| size_t * | size ) |
Returns size of lines array.
| self | Pointer to the instance of scanbotsdk_block_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_glyph_as_scanbotsdk_ocr_element | ( | scanbotsdk_glyph_t * | object, |
| scanbotsdk_ocr_element_t ** | result ) |
Casts the given instance of scanbotsdk_glyph_t to its parent type scanbotsdk_ocr_element_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_glyph_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_glyph_create | ( | const char * | text, |
| double | confidence, | ||
| scanbotsdk_pointf_t * | roi, | ||
| size_t | roi_size, | ||
| scanbotsdk_glyph_t ** | result ) |
Creates a new instance of scanbotsdk_glyph 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.
| text | The recognized text. The value must not be null. |
| confidence | Text confidence. Range is [0-1]. |
| roi | Quad where the text was found in image coordinates. The order of the points is clockwise starting from the top left. |
| roi_size | Size of the array roi |
| result | Pointer to a variable that will store the created instance of scanbotsdk_glyph_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_glyph_free | ( | scanbotsdk_glyph_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_glyph_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_glyph_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_as_scanbotsdk_ocr_element | ( | scanbotsdk_line_t * | object, |
| scanbotsdk_ocr_element_t ** | result ) |
Casts the given instance of scanbotsdk_line_t to its parent type scanbotsdk_ocr_element_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_line_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_create | ( | const char * | text, |
| double | confidence, | ||
| scanbotsdk_pointf_t * | roi, | ||
| size_t | roi_size, | ||
| scanbotsdk_word_t ** | words, | ||
| size_t | words_size, | ||
| scanbotsdk_line_t ** | result ) |
Creates a new instance of scanbotsdk_line 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.
| text | The recognized text. The value must not be null. |
| confidence | Text confidence. Range is [0-1]. |
| roi | Quad where the text was found in image coordinates. The order of the points is clockwise starting from the top left. |
| roi_size | Size of the array roi |
| words | List of words. Entries of the array must not be null. |
| words_size | Size of the array words |
| result | Pointer to a variable that will store the created instance of scanbotsdk_line_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_free | ( | scanbotsdk_line_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_line_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_line_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_get_words | ( | scanbotsdk_line_t * | self, |
| scanbotsdk_word_t ** | words, | ||
| size_t | size ) |
Returns value of words field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
List of words.
| self | Pointer to the instance of scanbotsdk_line_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| words | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_get_words_size | ( | scanbotsdk_line_t * | self, |
| size_t * | size ) |
Returns size of words array.
| self | Pointer to the instance of scanbotsdk_line_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_as_scanbotsdk_block | ( | scanbotsdk_ocr_element_t * | object, |
| scanbotsdk_block_t ** | result ) |
Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_block_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_block_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_as_scanbotsdk_glyph | ( | scanbotsdk_ocr_element_t * | object, |
| scanbotsdk_glyph_t ** | result ) |
Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_glyph_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_glyph_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_as_scanbotsdk_line | ( | scanbotsdk_ocr_element_t * | object, |
| scanbotsdk_line_t ** | result ) |
Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_line_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_line_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_as_scanbotsdk_page | ( | scanbotsdk_ocr_element_t * | object, |
| scanbotsdk_page_t ** | result ) |
Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_page_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_page_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_as_scanbotsdk_word | ( | scanbotsdk_ocr_element_t * | object, |
| scanbotsdk_word_t ** | result ) |
Casts the given instance of scanbotsdk_ocr_element_t to its subtype scanbotsdk_word_t. If the given instance is not an instance of the subtype, result will be null.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_word_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_free | ( | scanbotsdk_ocr_element_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_ocr_element_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_get_confidence | ( | scanbotsdk_ocr_element_t * | self, |
| double * | confidence ) |
Returns value of confidence field of the given object.
Text confidence. Range is [0-1].
| self | Pointer to the instance of scanbotsdk_ocr_element_t |
| confidence | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_get_roi | ( | scanbotsdk_ocr_element_t * | self, |
| scanbotsdk_pointf_t ** | roi ) |
Returns value of roi field of the given object. The returned value is direct view into memory, no pre-allocations needed.
Quad where the text was found in image coordinates. The order of the points is clockwise starting from the top left.
| self | Pointer to the instance of scanbotsdk_ocr_element_t |
| roi | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_get_roi_size | ( | scanbotsdk_ocr_element_t * | self, |
| size_t * | size ) |
Returns size of roi array.
| self | Pointer to the instance of scanbotsdk_ocr_element_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_get_text | ( | scanbotsdk_ocr_element_t * | self, |
| const char ** | text ) |
Returns value of text field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
The recognized text.
| self | Pointer to the instance of scanbotsdk_ocr_element_t |
| text | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_is_scanbotsdk_block | ( | scanbotsdk_ocr_element_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_block_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_is_scanbotsdk_glyph | ( | scanbotsdk_ocr_element_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_glyph_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_is_scanbotsdk_line | ( | scanbotsdk_ocr_element_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_line_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_is_scanbotsdk_page | ( | scanbotsdk_ocr_element_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_page_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_element_is_scanbotsdk_word | ( | scanbotsdk_ocr_element_t * | object, |
| bool * | result ) |
Checks if the given instance of scanbotsdk_ocr_element_t is an instance of its subtype scanbotsdk_word_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be checked |
| result | Pointer to a variable that will store the result of the check |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_engine_create | ( | scanbotsdk_ocr_engine_t ** | result | ) |
Creates a new instance of scanbotsdk_ocr_engine with given params and stores it in the location specified by the last argument.
As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.
| result | Pointer to a variable that will store the created instance of scanbotsdk_ocr_engine_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_engine_free | ( | scanbotsdk_ocr_engine_t * | self | ) |
Frees the memory allocated for the instance of scanbotsdk_ocr_engine_t. If null is passed, the function does nothing.
| self | Pointer to the instance of scanbotsdk_ocr_engine_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_ocr_engine_run | ( | scanbotsdk_ocr_engine_t * | self, |
| scanbotsdk_image_t * | image, | ||
| scanbotsdk_page_t ** | result ) |
Recognize text in 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_ocr_engine_t method to be called on |
| image | The image to recognize text in. The value must not be null. |
| result | Pointer to a variable that will store the created instance of scanbotsdk_ocr_engine_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_page_as_scanbotsdk_ocr_element | ( | scanbotsdk_page_t * | object, |
| scanbotsdk_ocr_element_t ** | result ) |
Casts the given instance of scanbotsdk_page_t to its parent type scanbotsdk_ocr_element_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_page_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_page_create | ( | const char * | text, |
| double | confidence, | ||
| scanbotsdk_pointf_t * | roi, | ||
| size_t | roi_size, | ||
| scanbotsdk_block_t ** | blocks, | ||
| size_t | blocks_size, | ||
| scanbotsdk_page_t ** | result ) |
Creates a new instance of scanbotsdk_page 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.
| text | The recognized text. The value must not be null. |
| confidence | Text confidence. Range is [0-1]. |
| roi | Quad where the text was found in image coordinates. The order of the points is clockwise starting from the top left. |
| roi_size | Size of the array roi |
| blocks | List of blocks. Entries of the array must not be null. |
| blocks_size | Size of the array blocks |
| result | Pointer to a variable that will store the created instance of scanbotsdk_page_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_page_free | ( | scanbotsdk_page_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_page_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_page_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_page_get_blocks | ( | scanbotsdk_page_t * | self, |
| scanbotsdk_block_t ** | blocks, | ||
| size_t | size ) |
Returns value of blocks field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
List of blocks.
| self | Pointer to the instance of scanbotsdk_page_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| blocks | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_page_get_blocks_size | ( | scanbotsdk_page_t * | self, |
| size_t * | size ) |
Returns size of blocks array.
| self | Pointer to the instance of scanbotsdk_page_t |
| size | Pointer to a variable that will store the size. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_word_as_scanbotsdk_ocr_element | ( | scanbotsdk_word_t * | object, |
| scanbotsdk_ocr_element_t ** | result ) |
Casts the given instance of scanbotsdk_word_t to its parent type scanbotsdk_ocr_element_t.
| object | Pointer to the instance of scanbotsdk_ocr_element_t to be casted |
| result | Pointer to a variable that will store the casted instance of scanbotsdk_word_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_word_create | ( | const char * | text, |
| double | confidence, | ||
| scanbotsdk_pointf_t * | roi, | ||
| size_t | roi_size, | ||
| scanbotsdk_glyph_t ** | glyphs, | ||
| size_t | glyphs_size, | ||
| scanbotsdk_word_t ** | result ) |
Creates a new instance of scanbotsdk_word 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.
| text | The recognized text. The value must not be null. |
| confidence | Text confidence. Range is [0-1]. |
| roi | Quad where the text was found in image coordinates. The order of the points is clockwise starting from the top left. |
| roi_size | Size of the array roi |
| glyphs | List of glyphs. Entries of the array must not be null. |
| glyphs_size | Size of the array glyphs |
| result | Pointer to a variable that will store the created instance of scanbotsdk_word_t |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_word_free | ( | scanbotsdk_word_t * | object | ) |
Frees the memory allocated for the instance of scanbotsdk_word_t. If null is passed, the function does nothing.
| object | Pointer to the instance of scanbotsdk_word_t to be freed |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_word_get_glyphs | ( | scanbotsdk_word_t * | self, |
| scanbotsdk_glyph_t ** | glyphs, | ||
| size_t | size ) |
Returns value of glyphs field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
List of glyphs.
| self | Pointer to the instance of scanbotsdk_word_t |
| size | Size of the pre-allocated array. Must be equal to the size obtained by calling the corresponding _size function. |
| glyphs | Pointer to a variable that will store the value of the field. |
| SBSDK_API scanbotsdk_error_code_t scanbotsdk_word_get_glyphs_size | ( | scanbotsdk_word_t * | self, |
| size_t * | size ) |
Returns size of glyphs array.
| self | Pointer to the instance of scanbotsdk_word_t |
| size | Pointer to a variable that will store the size. |