How to Extract Text From Image in C++.
source link: https://gist.github.com/aspose-com-kb/4e5ead744602a5c46af478aaee88fa89
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How to Extract Text From Image in C++. · GitHub
Instantly share code, notes, and snippets.
#include <iostream> #include <stdio.h> #include <fcntl.h> #include <io.h> #include <aspose_ocr.h>
void ExtractTextFromImage() {
const std::string licStr = "LicenseFilePath"; aspose::ocr::set_license(licStr.c_str());
std::string image_path = "sample.png";
RecognitionSettings Recogsettings; Recogsettings.format = export_format::json;// or text Recogsettings.language_alphabet = language::chi; Recogsettings.save_format = file_format::txt; aspose::ocr::page_save(image_path.c_str(), "ExtractedText.txt", Recogsettings); }
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK