在Dlib如何保存图像叠加? [英] In Dlib how do I save image with overlay?

查看:895
本文介绍了在Dlib如何保存图像叠加?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试修改Dlib的面部检测示例,以保存图像,检测到文件,因为我使用的是没有GUI的服务器。到目前为止,我只想到如何保存图像,但不是覆盖。如何将两者保存到同一个文件?

I'm trying to modify Dlib's face detection example to save an image with detections to a file since I'm using a server without GUI. So far I have only figured how to save the image but not the overlay. How do I save both to the same file?

//win.add_overlay(dets, rgb_pixel(255,0,0));
save_png(img, "detected.png");


推荐答案

您可以调用 draw_rectangle ,然后再保存。

You can call draw_rectangle on the image before saving it.

这篇关于在Dlib如何保存图像叠加?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆