draw
Drawing functions/utilities using Yayi.
This module contains a lot of drawing utilities using Yayi. These are basic implementation on what is not really supported on the C++ level.
-
Yayi.draw.DrawEmptyRect(im, box, colour, with_copy=True)[source]
Draws an empty rectangle of colour “colour”, which location and dimension is specified by the 2-2-uple box.
If with_copy is True, a copy of the input image is returned, otherwise the drawing occurs on the provided image.
colour should be compatible with the image format.
-
Yayi.draw.DrawLineOriented(im, start_point, size, angle, constant=255)[source]
This function creates a segment of size “size” and with orientation “angle”.
| Parameters: |
- im (image) – the image on which the line is drawn. This image is modified.
- start_point – the origin of the line
- size – the length of the line
- angle – the angle of the line, expressed in radius. The image orientation is from left to right, and from top to
bottom.
- constant – the ‘color’ of the line (should be of the type of the pixel, either scalar or tuple).
|
| Return type: | the image with the line
|
-
Yayi.draw.DrawOffsetsList(im, list_offsets, constant=255)[source]
Draws a sequence of points in im on each point specified by the offsets in list_offsets. Note that even if im is returned,
it is also modified.
-
Yayi.draw.makePlateOfPictures(l, nbrows=3)[source]
Creates a plate of images contained in the list l (list of pictures). Supposes that all images are of the same size
-
Yayi.draw.overlay(image_originale, imline, colour=(255, 0, 0))[source]
overlay de imline dans l’image originale av colour