formatting

This commit is contained in:
Askill 2022-08-15 12:21:20 +02:00
parent de1a741e62
commit 90ecff91f4
2 changed files with 5 additions and 4 deletions

View File

@ -19,7 +19,7 @@ class VideoReader:
# buffer data struct: # buffer data struct:
# buffer = Queue([(frameNumber, frame), ]) # buffer = Queue([(frameNumber, frame), ])
self.buffer = multiprocessing.Queue(config["videoBufferLength"]) self.buffer = multiprocessing.Queue(config["videoBufferLength"])
#self.vc = cv2.VideoCapture(videoPath) # self.vc = cv2.VideoCapture(videoPath)
self.stopped = False self.stopped = False
self.getWH() self.getWH()
self.calcFPS() self.calcFPS()
@ -90,7 +90,6 @@ class VideoReader:
self.lastFrame = self.listOfFrames[0] self.lastFrame = self.listOfFrames[0]
self.buffer.put((self.lastFrame, None)) self.buffer.put((self.lastFrame, None))
def videoEnded(self): def videoEnded(self):
if self.stopped and self.buffer.empty(): if self.stopped and self.buffer.empty():
return True return True
@ -130,5 +129,5 @@ class VideoReader:
res, image = vc.read() res, image = vc.read()
self.w = image.shape[1] self.w = image.shape[1]
self.h = image.shape[0] self.h = image.shape[0]
return (self.w, self.h) return (self.w, self.h)

View File

@ -30,7 +30,9 @@ def main(config):
if len(layerManager.layers) == 0: if len(layerManager.layers) == 0:
exit(1) exit(1)
heatmap = HeatMap(config["w"], config["h"], [contour for layer in layerManager.layers for contour in layer.bounds], 1920 / config["resizeWidth"]) heatmap = HeatMap(
config["w"], config["h"], [contour for layer in layerManager.layers for contour in layer.bounds], 1920 / config["resizeWidth"]
)
heatmap.showImage() heatmap.showImage()
print(f"Exporting {len(contours)} Contours and {len(layerManager.layers)} Layers") print(f"Exporting {len(contours)} Contours and {len(layerManager.layers)} Layers")