Skippy2626
Skippy2626

Reputation: 1

Purple + White Bar in Right Image With Stereo Side By Side Recording + Streaming

I'm using a StereoPi v2 Camera Kit and running the OpenCV OS that came with the pi.

I'm running into an issue where there is a purple and white flickering column in the right image of a side by side stereo recording. This happens with both raspivid, and PiCamera.

Raspivid command I'm using:
raspivid -o - -t 0 -3d sbs -w 800 -h 600 -fps 12 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8085/}' :demux=h264

PiCamera code:

import picamera

camera = picamera.PiCamera(stereo_mode="side-by-side")
camera.resolution = (1920, 1088)
camera.start_recording('my_video.h264')
camera.wait_recording(5)
camera.stop_recording()

Raspivid result: https://i.imgur.com/36QQzkG.png

PiCamera result: https://i.imgur.com/n7e8rUu.png

I've also noticed that sometimes the split between the two images flickers to the right, cutting off some of the right image but revealing some of the left image underneath it. It appears as if the right image is shifted to the left, where the right column is raw memory. To me it seems like a memory issue since it happens with both raspivid and picamera, and only while recording. I'd be happy to provide the h264 files if someone wants to look at them more closely.

Image depicting what I've just described. The shifted part is near the bottom: https://imgur.com/a/znBTPWJ

The stereo image looks completely fine if a still image is taken, these issues only happen when recording in stereo.

Here's what I've done to try to solve this issue:

Upvotes: 0

Views: 40

Answers (1)

Skippy2626
Skippy2626

Reputation: 1

I fixed this by having my aspect ratio be 4:3 for the picamera code. Later on, I had a similar issue that was then caused by setting the camera.resolution initially then resizing it during a camera.capture_continuous call to the same resolution as was specified before.

Upvotes: 0

Related Questions