add last changes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ __pycache__
|
||||
him_projects
|
||||
*.hef
|
||||
*.avi
|
||||
venv
|
||||
@@ -1,5 +1,5 @@
|
||||
import cv2
|
||||
from video_loader import VideoLoader
|
||||
from video_loader import VideoLoader, VideoType
|
||||
from background_heatmap import BackgroundHeatmap, BackgroundHeatmapFromGroup
|
||||
import numpy as np
|
||||
|
||||
@@ -30,7 +30,7 @@ if __name__ == '__main__':
|
||||
groupheatmap = BackgroundHeatmapFromGroup(group)
|
||||
for recording in group[1]:
|
||||
first = True
|
||||
frames = VideoLoader.extract_frames(recording)
|
||||
frames = VideoLoader.extract_frames(recording, video_type=VideoType.DEPTH)
|
||||
for frame in frames:
|
||||
groupheatmap.update(frame)
|
||||
cv2.imshow("IR", frame)
|
||||
@@ -49,7 +49,7 @@ if __name__ == '__main__':
|
||||
cv2.imshow("BGF diff", frame_with_keypoints)
|
||||
cv2.moveWindow("Background filter", 600, 100)
|
||||
cv2.moveWindow("BGF diff", 1200, 100)
|
||||
if cv2.waitKey(1) & 0xFF == ord('q'):
|
||||
if cv2.waitKey(1000) & 0xFF == ord('q'):
|
||||
break
|
||||
heatmaps.append(groupheatmap.heatmap)
|
||||
# Reset current heatmap and sum
|
||||
@@ -60,7 +60,7 @@ if __name__ == '__main__':
|
||||
imname = "Heatmap " + str(i)
|
||||
cv2.imshow(imname, bgh)
|
||||
cv2.moveWindow(imname, 500 * i, 0)
|
||||
cv2.waitKey(2000)
|
||||
cv2.waitKey()
|
||||
cv2.destroyAllWindows()
|
||||
|
||||
# out.release()
|
||||
|
||||
Reference in New Issue
Block a user