3

I would like to know how can I print some strings in a dlib library window for some seconds allowing the user to read them properly. So far I found the following method in the API:

const rectangle r;
win.add_overlay(r,rgb_pixel(255,0,0), "Someone smiled!");

which just prints for one frame. I would like to get something like the Opencv method void displayOverlay(const string& winname, const string& text, int delayms=0 ). Is it possible?

4

1 回答 1

0

我知道这已经有几年了,但我遇到了同样的问题,我希望这对人们有所帮助。

我设法在它旁边显示一个矩形和文本,执行以下操作:

win.add_overlay(image_window::overlay_rect(rect, rgb_pixel(255, 0, 0), "text"));

我在这里的一个线程中找到了这个。我将矩形设置为负位置,大小设置为 0,0。

于 2018-01-24T14:13:08.707 回答