【上海校区】python ubuntu dlib 8- 输出人脸坐标

python 未结 0 140
成都网站优化
成都网站优化 2021-06-22 14:46
悬赏:12
输入图片检测人脸,输出人脸坐标

import sys
import dlib
if len(sys.argv) < 1:
        print("need specify the image file")
        exit()

image_file = sys.argv[1]
img = dlib.load_rgb_image(image_file)

# Locations of candidate objects will be saved into rects
rects = []
dlib.find_candidate_object_locations(img, rects, min_size=500)

print("number of rectangles found {}".format(len(rects)))
for k, d in enumerate(rects):
    print("Detection {}: Left: {} Top: {} Right: {} Bottom: {}".format(
        k, d.left(), d.top(), d.right(), d.bottom()))

---------------------
作者:_iorilan
来源:CSDN
原文:https://blog.csdn.net/lan_liang/article/details/84715418
版权声明:本文为博主原创文章,转载请附上博文链接!

相关标签:
回答
  • 消灭零回复
提交回复