-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print bounding box label text with draw_on_image #195
Comments
Seems reasonable. I added it to the TODO list. |
This patch adds automatic drawing of BB labels upon calls of `BoundingBox.draw_on_image()` and `BoundingBoxesOnImage.draw_on_image()`. This resolves issues #519 and #195. * Add method `imgaug.augmentables.BoundingBox.draw_label_on_image()`. * Add method `imgaug.augmentables.BoundingBox.draw_box_on_image()`. * Change method `imgaug.augmentables.BoundingBox.draw_on_image()` to automatically draw a bounding box's label.
How to set label in chinese? I had try it but chinese is not normal display! |
imgaug currently uses PIL's text drawing function with a custom font file, saved under under |
Hi, thanks for the useful library.
Right now we can print image with BBs using draw_on_image function as mentioned here also.
image_output = bbs.draw_on_image(image, thickness=2)
It would useful if we wil be able to print bounding box label string on the image using something like
image_output = bbs.draw_on_image(image, thickness=2, print_label=True)
BoundingBox class already have label parameter.
class imgaug.imgaug.BoundingBox(x1, y1, x2, y2, label=None)
The text was updated successfully, but these errors were encountered: