继 上一篇关于mediapipe 文章
更改框体颜色
发现 mediapipe 框架 显示人脸框体这块, 会出现 Face, 相似度 ,还有5个小圆圈 等信息,
于是想着 去掉这些显示, 只留下框体…
恩,是其他不显示
那么位置 又在哪里呢?
对于 人脸检测 demo 而言…
文件
mediapipe-master/mediapipe/util/annotation_renderer.cc
for (const auto& annotation : render_data.render_annotations()) {
if (annotation.data_case() == RenderAnnotation::kRectangle) {
DrawRectangle(annotation);//矩形
} else if (annotation.data_case() == RenderAnnotation::kRoundedRectangle) {
//DrawRoundedRectangle(annotation);//圆角矩形
} else if (annotation.data_case() == RenderAnnotation::kFilledRectangle) {
//DrawFilledRectangle(annotation);//实心矩形
} else if (annotation.data_case() ==
RenderAnnotation::kFilledRoundedRectangle) {
//DrawFilledRoundedRectangle(annotation);//实心圆角矩形
} else if (annotation.data_case() == RenderAnnotation::kOval) {
// DrawOval(annotation);//椭圆
} else if (annotation.data_case() == RenderAnnotation::kFilledOval) {
// DrawFilledOval(annotation);//实心椭圆
} else if (annotation.data_case() == RenderAnnotation::kText) {
//DrawText(annotation);//文本
} else if (annotation.data_case() == RenderAnnotation::kPoint) {
//DrawPoint(annotation);//点
} else if (annotation.data_case() == RenderAnnotation::kLine) {
//DrawLine(annotation);//线
} else if (annotation.data_case() == RenderAnnotation::kGradientLine) {
//DrawGradientLine(annotation);//梯度线
} else if (annotation.data_case() == RenderAnnotation::kArrow) {
//DrawArrow(annotation);//箭头
} else {
LOG(FATAL) << "Unknown annotation type: " << annotation.data_case();
}
}
}