此基本类用于检测车辆图像 (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
类中定义的所有函数:
类型 | 成员 | 实参 |
---|---|---|
std::unique_ptr<
PlateDetect
> |
create |
|
std::unique_ptr<
PlateDetect
> |
create |
|
int | getInputWidth |
|
int | getInputHeight |
|
size_t | get_input_batch |
|
PlateDetectResult
|
run |
|
std::vector<
PlateDetectResult
> |
run |
|