vitis::ai::PlateDetect - 2.5 简体中文

Vitis AI Library 用户指南 (UG1354)

Document ID
UG1354
Release Date
2022-06-15
Version
2.5 简体中文
此基本类用于检测车辆图像 (cv::Mat) 中车牌的位置。

输入为车辆图像 (cv::Mat)。

输出是输入图像中车牌的位置和得分。

代码样本:

cv::Mat image = cv::imread("car.jpg");
auto network = vitis::ai::PlateDetect::create(true);
auto r = network->run(image);
auto score = r.box.score.
auto x = r.box.x * image.cols;
auto y = r.box.y * image.rows;
auto witdh = r.box.width * image.cols;
auto height = r.box.height * image.rows;

函数快速参考

下表列出了 vitis::ai::PlateDetect 类中定义的所有函数:

表 1. 函数快速参考
类型 成员 实参
std::unique_ptr< PlateDetect > create
  • bool need_mean_scale_process
std::unique_ptr< PlateDetect > create
  • void
  PlateDetect
  • void
  PlateDetect
  • void
PlateDetect & operator=
  • void
  ~PlateDetect
  • void
int getInputWidth
  • void
int getInputHeight
  • void
size_t get_input_batch
  • void
PlateDetectResult run
  • const cv::Mat & image
std::vector< PlateDetectResult > run
  • const std::vector< cv::Mat > & images