ovl.image_utilities.display_image module

ovl.image_utilities.display_image.display_image(image: Union[numpy.ndarray, str, List[Union[numpy.ndarray, str]]], window_name='image', display_loop=False, resizable=False)[source]

The function displays an image

The function is based on cv2.imread() is able to open both paths and numpy arrays (already opened) images

When using this function to display images in a loop, delay=0 will cause the loop to stop until a key is pressed.

for frame in video_frames:
    ovl.display_image(frame, delay=1)
    # the video will play normally in one window

If delay is 0:

for frame in video_frames:
    ovl.display_image(frame)
    # the video will freeze until a key is pressed
Parameters:
  • image – Represents an image path (string), an already open image in the for of a numpy array (ndarray) or a list of images (strings and arrays are valid)
  • window_name – Name of the Window that displays the images
  • display_loop – if display is used in a loop should be true, else false
  • resizable – A boolean that determines whether the image window is resizable or not
Returns:

the key pressed while image was displayed

ovl.image_utilities.display_image.show_image(image, window_name, delay)[source]
ovl.image_utilities.display_image.stitch_images(images)[source]