started basic structure

This commit is contained in:
Askill 2020-09-20 22:01:54 +02:00
parent 434d6df1e4
commit 7173c427b9
8 changed files with 29 additions and 9 deletions

3
Analyzer.py Normal file
View File

@ -0,0 +1,3 @@
class Analyzer:
def __init__(self):
print("Analyzer constructed")

3
ContourExctractor.py Normal file
View File

@ -0,0 +1,3 @@
class ContourExtractor:
def __init__(self):
print("ContourExtractror initiated")

3
Exporter.py Normal file
View File

@ -0,0 +1,3 @@
class Exporter:
def __init__(self):
print("Layer constructed")

3
Layer.py Normal file
View File

@ -0,0 +1,3 @@
class Layer:
def __init__(self):
print("Layer constructed")

3
LayerFactory.py Normal file
View File

@ -0,0 +1,3 @@
class LayerFactory:
def __init__(self):
print("LayerFactory constructed")

View File

@ -23,8 +23,6 @@ imageType = ".png"
imagesPath = os.path.join(dirname, 'images')+"/"
outputPath = os.path.join(dirname, 'out.mp4')
# creating new Image object
def genImages():
counter = 0
writer = imageio.get_writer(outputPath, fps=fps)
@ -58,13 +56,13 @@ def genImages():
writer.close()
def makeVideo():
def makeVideo(input, output):
fileList = []
for file in sorted(os.listdir(imagesPath)):
for file in sorted(os.listdir(input)):
complete_path = imagesPath + file
fileList.append(complete_path)
writer = imageio.get_writer(outputPath, fps=fps)
writer = imageio.get_writer(output, fps=fps)
for im in fileList:
writer.append_data(imageio.imread(im))
@ -76,5 +74,5 @@ def deleteImages():
os.remove(f)
genImages()
#makeVideo()
#makeVideo(imagesPath, outputPath)
#deleteImages()

7
main.py Normal file
View File

@ -0,0 +1,7 @@
def init():
print("startup")
if __name__ == "__main__":
init()

View File

@ -4,7 +4,7 @@ import datetime
import imutils
import time
import cv2
import os
import traceback
import _thread
@ -13,7 +13,7 @@ import _thread
def compare():
try:
url = "1.mp4"
url = os.path.join(os.path.dirname(__file__), "./generate test footage/out.mp4")
min_area = 100
max_area = 30000