Page 1 of 1

Raspividyuv stereo

Posted: Tue Jan 21, 2020 3:04 pm
by Michael93
Hello.

I am using your tutorial for using high framerate. Video stream there is captured using raspividyuv.

(w,h) = (640,480)
bytesPerFrame = w * h
fps = 250

videoCmd = "raspividyuv --stereo tb -ex off -w "+str(w)+" -h "+str(h)+" --output - --timeout 0 --framerate "+str(fps)+" --luma --nopreview"
videoCmd = videoCmd.split()

cameraProcess = sp.Popen(videoCmd, stdout=sp.PIPE, bufsize=0)

while True:
cameraProcess.stdout.flush()

frame = np.fromfile(cameraProcess.stdout, count=bytesPerFrame, dtype=np.uint8)
if frame.size != bytesPerFrame:
print("Error: Camera stream closed unexpectedly")
break
frame.shape = (h,w)
cv2.imshow("Frame", frame)

In my project, I need to gather frames from both cameras. Is there the possibility to do it using raspividyuv (this requirement is duo faster image capturing)?

Re: Raspividyuv stereo

Posted: Wed Jan 22, 2020 7:14 am
by Realizator
Hi Michael93,
Actually this is not my tutorial, I just found this code at GitHub. :-)
I have several notices here:
1. Actually, raspividyuv has not stereoscopic support. It was added several months ago, and to add it to your Raspbian you need to do sudo rpi-update
2. 250 FPS is too fast for the stereoscopic mode. We've tested it with 1280x480 and C code on receiving part, and was able to get 89FPS We're planning to publish our code and article in the nearest week.
3. If you'll try to use another resolutions for the stereoscopic capture, please remember that it is better to set horisontal resolution for each image dividable by 128 to avoid capture issues.

Re: Raspividyuv stereo

Posted: Wed Jan 22, 2020 1:14 pm
by Michael93
Hello.

"2. 250 FPS is too fast for the stereoscopic mode. We've tested it with 1280x480 and C code on receiving part, and was able to get 89FPS We're planning to publish our code and article in the nearest week."

Actually, I do not need 250FPS, 90FPS is perfect. I wait for publication of the article :) Where it will be published?

Re: Raspividyuv stereo

Posted: Tue May 26, 2020 1:50 pm
by zoldaten
Have a look here - https://gist.github.com/CarlosGS/b8462a ... bb0f3a4d63

But i didnt get code working well (

Re: Raspividyuv stereo

Posted: Tue May 26, 2020 3:01 pm
by Realizator
Zoldaten, this code works, but need some fixes. You can find my comment in the mentioned thread.
Actually author uses 250 FPS settings to get the maximum from the camera.

Re: Raspividyuv stereo

Posted: Tue Jun 30, 2020 11:46 am
by zoldaten
got it working at last !
90 fps, single (not stereo mode)

Re: Raspividyuv stereo

Posted: Tue Jun 30, 2020 12:57 pm
by Realizator
Congratulations! :-)