API details.

get_name[source]

get_name(path)

find_contours[source]

find_contours(thresh)

Get contour of a binary image Arguments: thresh: binary image Returns: Contours: a list of contour Hierarchy:

download_file_from_google_drive[source]

download_file_from_google_drive(id_or_link:"Link or file id", destination:"Path to the save file")

mkdir[source]

mkdir(path)

put_text[source]

put_text(image, pos, text, color=(255, 255, 255))

images_to_video[source]

images_to_video(images:"Path to the images folder or list of images", out_path:"Output output video path", fps:"Frame per second"=30, sort:"Sort images"=True, max_num_frame:"Max num of frame"=10000000000000.0, with_text:"Add additional index to image when writing vidoe"=False)

get_paths[source]

get_paths(directory, input_type='png', sort=True)

Get a list of input_type paths params args: return: a list of paths

video_to_images[source]

video_to_images(input_video:"", output_dir:"", skip:""=1)

CLI examples

  • Download file given a google link

      gdown --help
      gdown "https://drive.google.com/file/d/1xOb92Yx3hoOsMsAiI2mnkcyoQatRQNBf/view?usp=sharing" test.mp3

This should return a openable mp3 file

  • Compose a video given a folder of images

      i2v --help
      i2v PATH_TO_DIR out.mp4
  • Extract images given a video

      v2i --help # helper
      v2i test.mp4 test-img/

Time logger

class TimeLoger[source]

TimeLoger()