【更新】center-face检测功能调试完成
This commit is contained in:
23
app/main.cpp
23
app/main.cpp
@@ -1,6 +1,27 @@
|
||||
#include <iostream>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include "util/TimeCount.h"
|
||||
#include "CenterFaceMnn.h"
|
||||
|
||||
int32_t main(int32_t argc, char** argv) {
|
||||
std::cout << "Hello, World!" << std::endl;
|
||||
CenterFaceMnn::GetInstance();
|
||||
std::vector<FaceInfo> faces;
|
||||
cv::Mat img = cv::imread("F:/33.jpg");
|
||||
int32_t count = 0;
|
||||
re_test:
|
||||
count++;
|
||||
{
|
||||
USE_TIME t(USE_TIME_US, "face_detect: ");
|
||||
CenterFaceMnn::GetInstance()->Detect(img, faces, 1);
|
||||
}
|
||||
if (count < 10) {
|
||||
goto re_test;
|
||||
}
|
||||
|
||||
for(auto& face : faces) {
|
||||
cv::rectangle(img, cv::Rect(face.x1, face.y1, face.x2 - face.x1, face.y2 - face.y1), cv::Scalar(0, 0, 255), 2);
|
||||
}
|
||||
cv::imshow("test", img);
|
||||
cv::waitKey(0);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user