update samples/demo/color_line_detect.cpp.

Signed-off-by: Daniel <1367240116@qq.com>
This commit is contained in:
Daniel 2023-06-28 11:27:34 +00:00 committed by Gitee
parent f9eb5c3205
commit 424910b175
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ using namespace sv;
int main(int argc, char *argv[]) {
// 实例化 圆形降落标志 检测器类
// 实例化 color line detection 检测器类
sv::ColorLineDetector cld;
// 手动导入相机参数如果使用Amov的G1等吊舱或相机则可以忽略该步骤将自动下载相机参数文件
cld.loadCameraParams(sv::get_home() + "/SpireCV/calib_webcam_640x480.yaml");
@ -30,12 +30,12 @@ int main(int argc, char *argv[]) {
cap.read(img);
cv::resize(img, img, cv::Size(cld.image_width, cld.image_height));
// 执行 降落标志 检测
// 执行 color line detection 检测
cld.detect(img, tgts);
// 可视化检测结果叠加到img上
sv::drawTargetsInFrame(img, tgts);
// 控制台打印 降落标志 检测结果
// 控制台打印 color line detection 检测结果
printf("Frame-[%d]\n", frame_id);
// 打印当前检测的FPS
printf(" FPS = %.2f\n", tgts.fps);