ibaiGorordo / ONNX-CREStereo-Depth-Estimation

Python scripts performing stereo depth estimation using the CREStereo model in ONNX.
MIT License
125 stars 27 forks source link

Save an image sequence? #3

Open noobtoob4lyfe opened 2 years ago

noobtoob4lyfe commented 2 years ago

Thanks for sharing this fantastic work.

How would I go about saving the resulting video or image sequence from running "video_depth_estimation.py". I can see each frame being displayed in imshow as it renders but I'd really like to save all the frames. Would you have any idea what code I would need to add to "video_depth_estimation.py"?
Thanks!

ibaiGorordo commented 2 years ago

you can use cv2.VideoWriter (https://learnopencv.com/read-write-and-display-a-video-using-opencv-cpp-python/).

Make sure the size of the video matches the size of the frames you want to save.