slitscan x multicordes

i wanted to explore slitscan as it affected multicordes videos. i find the jitter on the visual lines of the cordes to be ideal for showing the action of the slitscan.

i developed a “short multicordes” apparatus specifically for this video (gymnastics ring with hitched nautical sash cordes (properly whipped ends this time)) as i had extra material lying around from original development.

extremely simple python code in a local notebook below

import sys
# !{sys.executable} -m pip install numpy
!{sys.executable} -m pip install opencv-python

import numpy as np
import cv2

cap = cv2.VideoCapture('toeclimbspin4.mov')
saveline=[]
first=1

width  = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) 
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

offset = height-700 # bottom
offset2 = 420 # top

# slitscan in 2 directions

while(cap.isOpened()):
    ret, frame = cap.read()
    if (first==1):
        savesection = frame[offset:height,0:width]
        savesection2 = frame[0:offset2, 0:width]
        first=0
    else:
        for j in range(height-offset-1,0,-1):
            savesection[j,:] = savesection[j-1,:] 
        for j in range(0-1,offset2,1):
            savesection2[j-1,:] = savesection2[j,:]
    savesection[0] = frame[offset,0:width]
    savesection2[0] = frame[offset2,0:width]
    frame[offset:height] = savesection
    frame[0:offset2] = savesection2
    cv2.imshow('frame',frame)
    if cv2.waitKey(1) & 0xFF == ord('q'): 
        break
    if cv2.waitKey(1) & 0xFF == ord('m'):
        offset=offset+50
        savesection = frame[offset:height,0:width]
        frame[offset:height] = savesection
        print("offset changed to " + str(offset))
        print(len(savesection))
cap.release()
cv2.destroyAllWindows()