Skip to content

Commit

Permalink
automated video conversion and bugfixing
Browse files Browse the repository at this point in the history
  • Loading branch information
damaggu committed Nov 30, 2019
1 parent 3bdfd6f commit 41f9fbd
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions behaviopy/computervision.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os

import cv2
import ffmpeg
import numpy as np
from skimage.feature import canny
from skimage.filters import threshold_otsu
Expand All @@ -26,7 +25,6 @@
'nd750_a0082',
'nd750_a0083',
'nd750_a0084',
### neue kamera
'nd750_a0087',
'nd750_a0088',
'nd750_a0089',
Expand Down Expand Up @@ -226,10 +224,9 @@ def mkv_to_avi(self, videos,

command = 'ffmpeg -i ' + video + ' -vf scale=256:-1 -b 512k -flags global_header -vcodec mpeg1video -acodec copy ' + avi_path + id + '.avi'

fixed_but_fugly = subprocess.run(command,
shell=True,
# Probably don't forget these, too
check=True, text=True)
res = subprocess.run(command,
shell=True,
check=True, text=True)
pass


Expand Down Expand Up @@ -295,11 +292,11 @@ def main():
'distances': distances,
'speed': speed,
'inner_radius': inner_circle_radius,
'example_frame' : frames[50],
'example_frame' : frames[500],
}

np.save(results_path + filename + '_videoprocessing_results.npy', results)


if __name__ == "__main__":
main()
main()

0 comments on commit 41f9fbd

Please sign in to comment.