Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save resulting depth video? #1

Closed
noobtoob4lyfe opened this issue Mar 3, 2022 · 1 comment
Closed

Save resulting depth video? #1

noobtoob4lyfe opened this issue Mar 3, 2022 · 1 comment

Comments

@noobtoob4lyfe
Copy link

Thanks for sharing your implementation!
How would one go about saving a .mp4 of the depth output from video_depth_estimation.py? In other words, how did you create your side by side video example?

@ibaiGorordo
Copy link
Owner

ibaiGorordo commented Mar 4, 2022

You only need three lines:

  • out = cv2.VideoWriter('output.avi',cv2.VideoWriter_fourcc('M','J','P','G'), 20, (1280*2,720)) before the while loop
  • out.write(combined_img) after the imshow
  • out.release() after cap.release.

Depending on your video size, you might have to modify the resolution of the video, otherwise it will not write the video. You can also search how to write video with opencv and you will get more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants