Jump to content

How to access the Front Stereo Pair for Vive Pro with C++ on Linux?


Milind Padalkar

Recommended Posts

I have the Vive Pro and I can access one of the front cameras (the right one specifically) with OpenCV's API and C++ (cv::VideoCapture()). How can I access both the front cameras? I am using Ubuntu 20.04.

Thanks and best regards,
Milind

Edited by Milind Padalkar
Tags
Link to comment
Share on other sites

  • 3 weeks later...

Seems it was fairly easy after looking at the output of :

v4l2-ctl --device /dev/video0 --list-formats-ext # /dev/video0 corresponds to the VivePro' camera

I found that it the following entries among many:
 

ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'YUYV' (YUYV 4:2:2)
		Size: Discrete 640x480
			Interval: Discrete 0.017s (60.000 fps)
		Size: Discrete 612x460
			Interval: Discrete 0.017s (60.000 fps)
		Size: Discrete 612x920
			Interval: Discrete 0.019s (52.000 fps)
			Interval: Discrete 0.018s (55.000 fps)
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.017s (60.000 fps)
		Size: Discrete 320x240
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 352x288
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 432x240
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 640x360
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 800x448
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 800x600
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 864x480
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 640x481
			Interval: Discrete 0.017s (60.000 fps)
		Size: Discrete 640x960
			Interval: Discrete 0.017s (60.000 fps)
		Size: Discrete 612x920
			Interval: Discrete 0.019s (52.000 fps)
			Interval: Discrete 0.018s (55.000 fps)
			Interval: Discrete 0.033s (30.000 fps)
			Interval: Discrete 0.017s (60.000 fps)

So by default it was showing 640x480 but one can also access 640x960 which is 2*(640x480).

The attached file shows how to access it.

vive_pro_front_stereo.cpp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...