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')+"/"
|
||||
outputPath = os.path.join(dirname, 'out.mp4')
|
||||
|
||||
|
||||
# creating new Image object
|
||||
def genImages():
|
||||
counter = 0
|
||||
writer = imageio.get_writer(outputPath, fps=fps)
|
||||
|
|
@ -55,16 +53,16 @@ def genImages():
|
|||
img1.rectangle(objectShape, fill = color)
|
||||
#img.save( imagesPath + str(counter).zfill(6) + imageType)
|
||||
writer.append_data(np.array(img))
|
||||
|
||||
|
||||
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()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
def init():
|
||||
print("startup")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
init()
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue