Aspose.Ocr.Cpp
23.9.0
See the version list below for details.
dotnet add package Aspose.Ocr.Cpp --version 23.9.0
NuGet\Install-Package Aspose.Ocr.Cpp -Version 23.9.0
<PackageReference Include="Aspose.Ocr.Cpp" Version="23.9.0" />
paket add Aspose.Ocr.Cpp --version 23.9.0
#r "nuget: Aspose.Ocr.Cpp, 23.9.0"
// Install Aspose.Ocr.Cpp as a Cake Addin #addin nuget:?package=Aspose.Ocr.Cpp&version=23.9.0 // Install Aspose.Ocr.Cpp as a Cake Tool #tool nuget:?package=Aspose.Ocr.Cpp&version=23.9.0
Optical character recognition (OCR) API for C++
![Downloads]Windows-CPU / Windows-GPU / Linux-CPU / Linux-GPU
Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
This package can be used to develop applications for different operating systems and platforms. You can build both 32-bit and 64-bit software.
Please note: Aspose.OCR for C++ requires ONNX Runtime 1.11.0 or later (CPU / GPU).
API overview
Aspose.OCR for C++ can extract text from photos, scans, PDF documents and other graphical files. It allows you to add OCR functionality to a desktop or web application in less than 10 lines of code, without having to delve into complex mathematical operations, neural networks, and other technical details.
- Ready-to-use OCR engine with superior recognition speed and accuracy.
- Supports 27 languages based on Latin, Cyrillic and Asian scrips.
- Can work with rotated, distorted and noisy images.
- Supports most file formats you can get from a scanner or camera, as well as web links.
- Batch recognition of all images in a folder or archive.
- Recognizes the whole image or selected areas only; identifies words, lines or paragraphs.
- Recognition results are returned in the most popular document and data exchange formats.
- Spell checking of recognition results.
- Full compatibility with other Aspose products - build solutions of any complexity using familiar concepts with minimal code.
Recognition languages
Aspose.OCR can recognize a large number of languages and all popular writing scripts, including texts with mixed languages.
Extended Latin alphabet
- Croatian
- Czech
- Danish
- Dutch
- English
- Estonian
- Finnish
- French
- German
- Italian
- Latvian
- Lithuanian
- Norwegian
- Polish
- Portuguese
- Romanian
- Slovak
- Slovenian
- Spanish
- Swedish
Cyrillic alphabet
- Belorussian
- Bulgarian
- Kazakh
- Russian
- Serbian
- Ukrainian
Asian languages
- Chinese
- Hindi
Supported file formats
Aspose.OCR for C++ can recognize just about any file that you get from a scanner or camera, or download from the Internet:
- JPEG
- PNG
- TIFF
- GIF
- BMP
Recognition results are returned in the most popular document and data exchange formats:
- Plain text
- RTF
- Microsoft Word document
- Microsoft Excel spreadsheet
- Searchable PDF
- JSON
- XML
Get started
You can get familiar with Aspose.OCR for C++ by creating a minimal console application for extracting text from an image.
- Create a basic C++ project in Visual Studio.
- Install this NuGet package to the project.
- Locate an image containing a line of text and save it to the project output directory under the name
source.png
. - Add an image to
AsposeOCRInput
structure:string file = current_dir + "/source.png"; AsposeOCRInput source; source.url = file.c_str(); std::vector<AsposeOCRInput> content{ source };
- Set recognition language:
RecognitionSettings settings; settings.language_alphabet = language::eng;
- Extract text from the image:
auto result = asposeocr_recognize(content.data(), content.size(), settings);
- Output the recognized text:
wchar_t* buffer = asposeocr_serialize_result(result, buffer_size, export_format::text); std::cout << std::wstring(buffer) << std::endl;
- Release the resources (recommended):
asposeocr_free_result(result);
Full code:
// Provide the image
string file = current_dir + "/source.png";
AsposeOCRInput source;
source.url = file.c_str();
std::vector<AsposeOCRInput> content{ source };
// Set recognition language
RecognitionSettings settings;
settings.language_alphabet = language::eng;
// Extract text from the image
auto result = asposeocr_recognize(content.data(), content.size(), settings);
// Output the recognized text
wchar_t* buffer = asposeocr_serialize_result(result, buffer_size, export_format::text);
std::cout << std::wstring(buffer) << std::endl;
// Release the resources
asposeocr_free_result(result);
Run the program. You will see the extracted text in the console output. If the text is too large, the result may be cut off due to trial restrictions. You can get a temporary license to remove all limitations of the trial version for 30 days.
Learn more
Product | Versions Compatible and additional computed target framework versions. |
---|---|
native | native is compatible. |
-
- Microsoft.ML.OnnxRuntime (= 1.12.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Aspose.Ocr.Cpp:
Package | Downloads |
---|---|
Aspose.Total.Cpp
Aspose.Total for C++ is a complete package of C++ libraries specifically designed to create, manipulate and convert popular file formats from Microsoft Office and PDF without requiring Office or Adobe Automation. C++ API package also includes a specialized library to generate and recognize barcode labels from images with advanced features to customize the barcode generation and recognition process. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
24.9.0 | 569 | 9/3/2024 |
24.5.0 | 1,616 | 5/31/2024 |
24.4.0 | 2,119 | 4/30/2024 |
24.3.0 | 3,519 | 3/31/2024 |
24.2.0 | 3,742 | 2/29/2024 |
24.1.0 | 3,796 | 1/30/2024 |
23.12.0 | 4,692 | 12/28/2023 |
23.11.0 | 5,180 | 11/30/2023 |
23.10.0 | 5,637 | 10/30/2023 |
23.9.0 | 5,609 | 9/22/2023 |
23.8.0 | 6,138 | 8/31/2023 |
23.6.0 | 10,543 | 7/1/2023 |
23.4.0 | 7,773 | 4/28/2023 |
23.3.0 | 5,766 | 3/31/2023 |
23.2.0 | 6,207 | 2/8/2023 |
22.12.0 | 9,358 | 12/2/2022 |
22.11.0 | 6,249 | 11/21/2022 |
22.10.0 | 6,295 | 10/18/2022 |
22.9.1 | 1,247 | 10/3/2022 |
22.8.0 | 10,066 | 8/29/2022 |
22.7.0 | 7,352 | 7/25/2022 |
22.6.0 | 7,992 | 6/29/2022 |
22.5.0 | 5,914 | 5/20/2022 |
22.4.0 | 6,433 | 4/22/2022 |
22.3.0 | 6,443 | 3/28/2022 |
22.1.0 | 9,058 | 1/28/2022 |
21.12.0 | 6,558 | 12/29/2021 |
21.11.0 | 11,666 | 11/22/2021 |
21.10.0 | 8,652 | 10/3/2021 |
21.8.0 | 12,046 | 8/9/2021 |
21.7.0 | 6,771 | 7/14/2021 |
21.5.0 | 6,974 | 5/26/2021 |
21.4.0 | 7,318 | 5/4/2021 |
21.2.0 | 9,211 | 3/1/2021 |
20.11.0 | 16,921 | 11/27/2020 |
20.10.0 | 6,665 | 10/23/2020 |
20.9.0 | 8,224 | 9/30/2020 |
20.8.0 | 5,142 | 8/28/2020 |
20.7.1 | 11,229 | 7/17/2020 |
20.6.2 | 5,632 | 6/26/2020 |
20.6.1 | 8,900 | 6/10/2020 |
20.6.0 | 1,508 | 6/2/2020 |
20.4.0 | 8,950 | 4/15/2020 |