Quick and dirty Linescan photography 0 ▲ Tom Hodson's Blog 2 hours ago · Art · hide · 0 comments When you look out of a train window, it just scrolls past right? When you think about it a bit more, no, because of parallax… but what if we just clamped our hands over our ears and pretended parallax didn’t exist? This script extracts vertical slices from the middle of each frame of a video and stitches them into one long image. import cv2 as cv import numpy as np import matplotlib.pyplot as plt from skimage import transform from tqdm import tqdm import PIL as PIL # I used to work at a place where all the usernames # were of the form ma[your initials] # so I got "math" and have stuck with it even after leaving. file = "/Users/math/Downloads/IMG_3612.MOV" capture = cv.VideoCapture(cv.samples.findFileOrKeep(file)) frames = int(capture.get(cv.CAP_PROP_FRAME_COUNT)) # frames = 100 slice_width = 10 # channel_swizzle = (2,1,0) # Use this to "fix" the channels being wrong channel_swizzle = (0,1,2) vertical_slice = slice(None, None, 2) # Be a bit lazy and just grab a test frame to # compute… No comments yet. Log in to reply on the Fediverse. Comments will appear here.