vitis::ai::PlateNum - 3.5 English

Vitis AI Library User Guide (UG1354)

Document ID
Release Date
3.5 English
Base class for recognizing plate from an image (cv::Mat).

Input is a plate image (cv::Mat).

Output is the number and color of plate in the input image.

sample code:

Note: Only China plate Only edge platform supported @endnote
cv::Mat image = cv::imread("plate.jpg");
auto network = vitis::ai::PlateNum::create(true);
auto r = network->run(image);
auto plate_number = r.plate_number;
auto plate_color = r.plate_color;

Quick Function Reference

The following table lists all the functions defined in the vitis::ai::PlateNum class:

Table 1. Quick Function Reference
Type Member Arguments
std::unique_ptr< PlateNum > create
  • const std::string & model_name
  • bool need_mean_scale_process
std::unique_ptr< PlateNum > create
  • const std::string & model_name
  • xir::Attrs * attrs
  • bool need_mean_scale_process
int getInputWidth
  • void
int getInputHeight
  • void
size_t get_input_batch
  • void
PlateNumResult run
  • const cv::Mat & img
std::vector< PlateNumResult > run
  • const std::vector< cv::Mat > & imgs