Create an OCRPost object.
Prototype
std::unique_ptr< OCRPost > create(const std::vector< vitis::ai::library::InputTensor > &input_tensors, const std::vector< vitis::ai::library::OutputTensor > &output_tensors, const std::string &cfgpath, int batch_size, int &real_batch_size, std::vector< int > &target_h8, std::vector< int > &target_w8, std::vector< float > &ratioh, std::vector< float > &ratiow, std::vector< cv::Mat > &oriimg);
Parameters
The following table lists the create function arguments.
| Type | Member | Description |
|---|---|---|
| const std::vector< vitis::ai::library::InputTensor > & | input_tensors | A vector of all input-tensors in the network. Usage: input_tensors[input_tensor_index]. |
| const std::vector< vitis::ai::library::OutputTensor > & | output_tensors | A vector of all output-tensors in the network. Usage: output_tensors[output_index]. |
| const std::string & | cfgpath | configuration file path (*_officialcfg.prototxt ) |
| int | batch_size | the model batch information |
| int & | real_batch_size | the real batch information of the model |
| std::vector< int > & | target_h8 | inner data structure |
| std::vector< int > & | target_w8 | inner data structure |
| std::vector< float > & | ratioh | inner data structure for height ratio |
| std::vector< float > & | ratiow | inner data structure for width ratio |
| std::vector< cv::Mat > & | oriimg | original image |