wormpose.images.worm_drawing

Contains the functions that deal with drawing the worm or some overlays

wormpose.images.worm_drawing.draw_measurements(image: numpy.ndarray, skeleton: numpy.ndarray, measurements, color)[source]

Draw overlays on top of an image to represent the worm measurements: circles to indicate the width at three points along the worm body: head, midbody and tail

wormpose.images.worm_drawing.draw_skeleton(image: numpy.ndarray, skeleton: numpy.ndarray, color, head_color)[source]

Draw the worm centerline as lines and draw the worm head as a circle

wormpose.images.worm_drawing.draw_width_circle(image: numpy.ndarray, center, width: float, color)[source]

Draw a circle on top of an image to represent the worm width

wormpose.images.worm_drawing.make_draw_worm_body(body_color: int = 255) Callable[source]

Functor to draw a filled worm body on an image as a serie of quadrilaterals with some circles at the extremities

Parameters

body_color – which color the worm body will be drawn (default 255)

Returns

function to call to draw a worm on an image