This repo contains tools used for my personal needs.
extract_slides_from_video.py
:- Usage: extract slides from video lecture, where the video contains a series of slides transition;
- Method: extract current frame as new slide, if changes from previous frame to current frame is detected (checking frequency: 1 frame/sec, no matter of the frame rate is)
- Output:
- individual images (.jpg) as slides in a folder with the same name of the video file in the same directory;
- single .pdf file per video lecture, with merged slides together.
make_passport_collage.py
:- Usage: make 4X6 collage photo from 6 2X2 photos, so it can be easily ordered online for print
- Details:
- It requires 6 copies of 2X2 photos, if the number of available image is fewer than 6, make copies; if there are more than 6, only the first 6 in sorted order will be used;
- It does not matter if the 2X2 photos are in different resolution, as long as they are square. They will be all resized into the same size (default: 20000X2000) before combining.
screenshot2slide.py
:- Usage: convert screenshots to slides by specifying the crop location and size (i.e. the coordinate of the left-top corner and right-bottom corner)
- Use cases:
- Case 1: assume you have saved a few screenshots of presentation slides from a video course, but the slides are not in full-screen size. If this is the case, you may want to check the size of the location of the slides in screenshots, and use this script to extract the slides from screenshot images.
- Case 2: After a running event, you received link to preview all your photos in small size and watermark. You don't want to pay the expensive price but still want to save a copy of these photos in smaller version. Then, you may take screenshots and then use this script to process.
- Details: change the image directories and capture location and size information before running.