Dlib add_overlay(): 如何设置厚度?
Dlib add_overlay(): how to set thickness?
假设我有以下代码:
# ...initialization stuff above
win.set_image(frame)
win.add_overlay(my_rect)
问题是 my_rect 被绘制 只有 1 px 厚!
如何增加矩形的厚度?
我在文档中找不到任何内容(我必须说非常缺乏)。
谢谢!
查看所有overloads of add_overlay()方法,很明显它没有将厚度作为参数。来自文档 -
add_overlay(self: dlib.image_window, rectangles: dlib.rectangles,
color: dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None Add a list of
rectangles to the image_window. They will be displayed as red boxes by
default, but the color can be passed.
add_overlay(self: dlib.image_window, rectangle: dlib.rectangle, color:
dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None Add a rectangle to the
image_window. It will be displayed as a red box by default, but the
color can be passed.
add_overlay(self: dlib.image_window, rectangle: dlib.drectangle,
color: dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None Add a rectangle to
the image_window. It will be displayed as a red box by default, but
the color can be passed.
add_overlay(self: dlib.image_window, detection:
dlib.full_object_detection, color: dlib.rgb_pixel=rgb_pixel(0,0,255))
-> None Add full_object_detection parts to the image window. They will be displayed as blue lines by default, but the color can be passed.
add_overlay(self: dlib.image_window, line: dlib.line, color:
dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None Add line to the image
window.
add_overlay(self: dlib.image_window, objects: list, color:
dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None
假设我有以下代码:
# ...initialization stuff above
win.set_image(frame)
win.add_overlay(my_rect)
问题是 my_rect 被绘制 只有 1 px 厚!
如何增加矩形的厚度? 我在文档中找不到任何内容(我必须说非常缺乏)。
谢谢!
查看所有overloads of add_overlay()方法,很明显它没有将厚度作为参数。来自文档 -
add_overlay(self: dlib.image_window, rectangles: dlib.rectangles, color: dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None Add a list of rectangles to the image_window. They will be displayed as red boxes by default, but the color can be passed.
add_overlay(self: dlib.image_window, rectangle: dlib.rectangle, color: dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None Add a rectangle to the image_window. It will be displayed as a red box by default, but the color can be passed.
add_overlay(self: dlib.image_window, rectangle: dlib.drectangle, color: dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None Add a rectangle to the image_window. It will be displayed as a red box by default, but the color can be passed.
add_overlay(self: dlib.image_window, detection: dlib.full_object_detection, color: dlib.rgb_pixel=rgb_pixel(0,0,255)) -> None Add full_object_detection parts to the image window. They will be displayed as blue lines by default, but the color can be passed.
add_overlay(self: dlib.image_window, line: dlib.line, color: dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None Add line to the image window.
add_overlay(self: dlib.image_window, objects: list, color: dlib.rgb_pixel=rgb_pixel(255,0,0)) -> None