Exemple #1
0
import sys
sys.path.append("src")
import Argument
import IOutils
import ImageProcessing

userCommand = Argument.CommandParser()
userCommand.parseArguments()
inputVideo = userCommand.getInputVideoInfo()
outputVideo = userCommand.getOutputVideoInfo()
outputText = userCommand.getOutputTextInfo()

port = IOutils.IOport(inputVideo, outputVideo, outputText)
port.createFileInstancesUponRequirement()

preprocessor = ImageProcessing.VideoPreprocessor(inputVideo)
preprocessor.findSideToCrop()
preprocessor.findCropPoints()
scaleRatio = preprocessor.getDisplayTargetRatio()

algo = ImageProcessing.Algorithm()

arrowMaker = ImageProcessing.VideoArtist(scaleRatio)
arrowMaker.findBestFrameMapping((8, 8))

monitor = IOutils.Display()

frame = port.getInputVideoFrame()
croppedFrame = preprocessor.cropFrameIntoSquare(frame)
previousFrame = preprocessor.convertFrameIntoSpecifiedFormat(croppedFrame)