Printing text in dlib window

I would like to know how I can print some lines in the dlib window within a few seconds so that the user can read them correctly. So far I have 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 Opencv method void displayOverlay(const string& winname, const string& text, int delayms=0 )

. Is it possible?

+3


source to share


1 answer


I know this has been for a couple of years now, but I had the same problem and I hope this helps people.

I was able to display the rectangle and the text next to it by doing the following:



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

      

I found this on a thread here . I set the rectangle to a negative position and size to 0.0.

0


source







All Articles