繼 上一篇關於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();
}
}
}