Raspividyuv stereo

OpenCV, Python and other image processing questions
Post Reply
Michael93
Posts: 3
Joined: Sat Dec 14, 2019 12:12 pm

Raspividyuv stereo

Post by Michael93 » Tue Jan 21, 2020 3:04 pm

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)?

User avatar
Realizator
Site Admin
Posts: 392
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Raspividyuv stereo

Post by Realizator » Wed Jan 22, 2020 7:14 am

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.
Eugene a.k.a. Realizator

Michael93
Posts: 3
Joined: Sat Dec 14, 2019 12:12 pm

Re: Raspividyuv stereo

Post by Michael93 » Wed Jan 22, 2020 1:14 pm

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?

Post Reply