Base class for ocr.
Input is an image (cv:Mat).
Output is a struct of detection results, named OCRResult.
Sample code :
Mat img = cv::imread("sample_ocr.jpg");
auto ocr = vitis::ai::OCR::create
("ocr_pt",true);
auto results = ocr->run(img);
// please check test samples for detail usage.
Quick Function Reference
The following table lists all the functions defined in the vitis::ai::OCR
class:
Type | Member | Arguments |
---|---|---|
std::unique_ptr<
OCR
> |
create |
|
vitis::ai::OCRResult | run |
|
std::vector< vitis::ai::OCRResult > | run |
|
int | getInputWidth |
|
int | getInputHeight |
|
size_t | get_input_batch |
|