diff --git a/Analyzer.py b/Analyzer.py new file mode 100644 index 0000000..1e5d111 --- /dev/null +++ b/Analyzer.py @@ -0,0 +1,3 @@ +class Analyzer: + def __init__(self): + print("Analyzer constructed") \ No newline at end of file diff --git a/ContourExctractor.py b/ContourExctractor.py new file mode 100644 index 0000000..8f8398f --- /dev/null +++ b/ContourExctractor.py @@ -0,0 +1,3 @@ +class ContourExtractor: + def __init__(self): + print("ContourExtractror initiated") \ No newline at end of file diff --git a/Exporter.py b/Exporter.py new file mode 100644 index 0000000..5d61c84 --- /dev/null +++ b/Exporter.py @@ -0,0 +1,3 @@ +class Exporter: + def __init__(self): + print("Layer constructed") \ No newline at end of file diff --git a/Layer.py b/Layer.py new file mode 100644 index 0000000..b2b446b --- /dev/null +++ b/Layer.py @@ -0,0 +1,3 @@ +class Layer: + def __init__(self): + print("Layer constructed") \ No newline at end of file diff --git a/LayerFactory.py b/LayerFactory.py new file mode 100644 index 0000000..0334b72 --- /dev/null +++ b/LayerFactory.py @@ -0,0 +1,3 @@ +class LayerFactory: + def __init__(self): + print("LayerFactory constructed") \ No newline at end of file diff --git a/generate test footage/gen.py b/generate test footage/gen.py index 8804029..830498a 100644 --- a/generate test footage/gen.py +++ b/generate test footage/gen.py @@ -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() diff --git a/main.py b/main.py new file mode 100644 index 0000000..7d8eee5 --- /dev/null +++ b/main.py @@ -0,0 +1,7 @@ + +def init(): + print("startup") + + +if __name__ == "__main__": + init() \ No newline at end of file diff --git a/motion_detector.py b/motion_detector.py index 588dcf7..ec6ea66 100644 --- a/motion_detector.py +++ b/motion_detector.py @@ -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