started basic structure
This commit is contained in:
parent
434d6df1e4
commit
7173c427b9
|
|
@ -0,0 +1,3 @@
|
||||||
|
class Analyzer:
|
||||||
|
def __init__(self):
|
||||||
|
print("Analyzer constructed")
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
class ContourExtractor:
|
||||||
|
def __init__(self):
|
||||||
|
print("ContourExtractror initiated")
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
class Exporter:
|
||||||
|
def __init__(self):
|
||||||
|
print("Layer constructed")
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
class Layer:
|
||||||
|
def __init__(self):
|
||||||
|
print("Layer constructed")
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
class LayerFactory:
|
||||||
|
def __init__(self):
|
||||||
|
print("LayerFactory constructed")
|
||||||
|
|
@ -23,8 +23,6 @@ imageType = ".png"
|
||||||
imagesPath = os.path.join(dirname, 'images')+"/"
|
imagesPath = os.path.join(dirname, 'images')+"/"
|
||||||
outputPath = os.path.join(dirname, 'out.mp4')
|
outputPath = os.path.join(dirname, 'out.mp4')
|
||||||
|
|
||||||
|
|
||||||
# creating new Image object
|
|
||||||
def genImages():
|
def genImages():
|
||||||
counter = 0
|
counter = 0
|
||||||
writer = imageio.get_writer(outputPath, fps=fps)
|
writer = imageio.get_writer(outputPath, fps=fps)
|
||||||
|
|
@ -58,13 +56,13 @@ def genImages():
|
||||||
|
|
||||||
writer.close()
|
writer.close()
|
||||||
|
|
||||||
def makeVideo():
|
def makeVideo(input, output):
|
||||||
fileList = []
|
fileList = []
|
||||||
for file in sorted(os.listdir(imagesPath)):
|
for file in sorted(os.listdir(input)):
|
||||||
complete_path = imagesPath + file
|
complete_path = imagesPath + file
|
||||||
fileList.append(complete_path)
|
fileList.append(complete_path)
|
||||||
|
|
||||||
writer = imageio.get_writer(outputPath, fps=fps)
|
writer = imageio.get_writer(output, fps=fps)
|
||||||
|
|
||||||
for im in fileList:
|
for im in fileList:
|
||||||
writer.append_data(imageio.imread(im))
|
writer.append_data(imageio.imread(im))
|
||||||
|
|
@ -76,5 +74,5 @@ def deleteImages():
|
||||||
os.remove(f)
|
os.remove(f)
|
||||||
|
|
||||||
genImages()
|
genImages()
|
||||||
#makeVideo()
|
#makeVideo(imagesPath, outputPath)
|
||||||
#deleteImages()
|
#deleteImages()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
def init():
|
||||||
|
print("startup")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
init()
|
||||||
|
|
@ -4,7 +4,7 @@ import datetime
|
||||||
import imutils
|
import imutils
|
||||||
import time
|
import time
|
||||||
import cv2
|
import cv2
|
||||||
|
import os
|
||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
import _thread
|
import _thread
|
||||||
|
|
@ -13,7 +13,7 @@ import _thread
|
||||||
|
|
||||||
def compare():
|
def compare():
|
||||||
try:
|
try:
|
||||||
url = "1.mp4"
|
url = os.path.join(os.path.dirname(__file__), "./generate test footage/out.mp4")
|
||||||
|
|
||||||
min_area = 100
|
min_area = 100
|
||||||
max_area = 30000
|
max_area = 30000
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue