OCR C++ API

Functions

DLL_PUBLIC size_t aspose::ocr::page (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_rect (const char *image_path, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h)
 Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::page_rect_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h, const wchar_t *const alphabet)
 Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t aspose::ocr::line (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC size_t aspose::ocr::line_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC void aspose::ocr::set_license (const char *licenseFullPath)
 Set license to library. License is XML file. More...
 
DLL_PUBLIC bool aspose::ocr::get_state ()
 Check license. More...
 
DLL_PUBLIC double aspose::ocr::get_skew (const char *image_path)
 Returns the skew angle in degrees. More...
 
DLL_PUBLIC size_t asposeocr_page (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_rect (const char *image_path, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h)
 Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_page_rect_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, int x, int y, int w, int h, const wchar_t *const alphabet)
 Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size. More...
 
DLL_PUBLIC size_t asposeocr_line (const char *image_path, wchar_t *buffer, size_t buffer_size)
 Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC size_t asposeocr_line_abc (const char *image_path, wchar_t *buffer, size_t buffer_size, const wchar_t *const alphabet)
 Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters. More...
 
DLL_PUBLIC void asposeocr_set_license (const char *licenseFullPath)
 Set license to library. License is XML file. More...
 
DLL_PUBLIC bool asposeocr_get_state ()
 Check license. More...
 
DLL_PUBLIC double asposeocr_get_skew (const char *image_path)
 Returns the skew angle in degrees. More...
 

Detailed Description

Function Documentation

◆ asposeocr_get_skew()

DLL_PUBLIC double asposeocr_get_skew ( const char *  image_path)

Returns the skew angle in degrees.

Parameters
image_pathFull path to image.
Returns
Angle in degrees.

◆ asposeocr_get_state()

DLL_PUBLIC bool asposeocr_get_state ( )

Check license.

Returns
True if the license is installed and valid, otherwise false.

◆ asposeocr_line()

DLL_PUBLIC size_t asposeocr_line ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

References asposeocr_line_abc().

◆ asposeocr_line_abc()

DLL_PUBLIC size_t asposeocr_line_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

Referenced by asposeocr_line(), and aspose::ocr::line().

◆ asposeocr_page()

DLL_PUBLIC size_t asposeocr_page ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

References asposeocr_page_abc().

◆ asposeocr_page_abc()

DLL_PUBLIC size_t asposeocr_page_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

Referenced by asposeocr_page(), and aspose::ocr::page().

◆ asposeocr_page_rect()

DLL_PUBLIC size_t asposeocr_page_rect ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h 
)

Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

References asposeocr_page_rect_abc().

◆ asposeocr_page_rect_abc()

DLL_PUBLIC size_t asposeocr_page_rect_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h,
const wchar_t *const  alphabet 
)

Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

Referenced by asposeocr_page_rect(), and aspose::ocr::page_rect().

◆ asposeocr_set_license()

DLL_PUBLIC void asposeocr_set_license ( const char *  licenseFullPath)

Set license to library. License is XML file.

Parameters
licenseFullPathFull path to license file.
Returns
void

◆ get_skew()

double aspose::ocr::get_skew ( const char *  image_path)

Returns the skew angle in degrees.

Parameters
image_pathFull path to image.
Returns
Angle in degrees.

◆ get_state()

bool aspose::ocr::get_state ( )

Check license.

Returns
True if the license is installed and valid, otherwise false.

◆ line()

size_t aspose::ocr::line ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

References asposeocr_line_abc().

◆ line_abc()

size_t aspose::ocr::line_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image with one text line. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size in wide characters.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page()

size_t aspose::ocr::page ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size 
)

Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

References asposeocr_page_abc().

◆ page_abc()

size_t aspose::ocr::page_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
const wchar_t *const  alphabet 
)

Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ page_rect()

size_t aspose::ocr::page_rect ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h 
)

Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

References asposeocr_page_rect_abc().

◆ page_rect_abc()

size_t aspose::ocr::page_rect_abc ( const char *  image_path,
wchar_t *  buffer,
size_t  buffer_size,
int  x,
int  y,
int  w,
int  h,
const wchar_t *const  alphabet 
)

Optical character recognition image. Allowed formats is PNG, JPG, BMP. Buffer allocated by the caller. If the buffer is null, the function returns the required buffer size.

Parameters
image_pathFull path to image.
bufferBuffer allocated by the caller.
buffer_sizeSize of buffer allocated by the caller in wchar_t characters.
xLeft rectangle in pixels.
yTop rectangle in pixels.
wRectangle width in pixels.
hRectangle height in pixels.
alphabetAllowed symbols.
Returns
Returns the length of a wide string or required buffer size, that is the number of non-null wide characters that precede the terminating null wide character. In bytes it 'RETURN_VALUE' * sizeof(wchar_t)

◆ set_license()

void aspose::ocr::set_license ( const char *  licenseFullPath)

Set license to library. License is XML file.

Parameters
licenseFullPathFull path to license file.
Returns
void