Samstag, 15. Juni 2013

Live Remote Stereo Vision

By combining the poor and impatient man's Oculus Rift, the Durovis Dive 3D printed smartphone virtual reality headset with ROS, I have built something I call "Live Remote Stereo Vision".

Creating pretty fair 3D video is much easier than most people think.
Two smartphones with ROS Java installed streaming their camera image directly to another smartphone is enough. There the streams are shown side by side on the display. Nearly no calibration is needed to get the 3D effect.

For now the streamed video has low frame rate and is uglily compressed, but I am working on improving this.

For everyone with 3 smartphones to try out:

Download these three apks:
ROS_Image_Viewer.apk
ROS_Camera_1.apk
ROS_Camera_2.apk

They should work on all devices running Android >= version 4.

  1. Make sure all smartphones are connected to the same WLAN access point.
  2. Start the ROS_Image_Viewer.apk on the smartphone with the biggest display and highest resolution you have.
  3. Select "New Master"
  4. Note down the URI given as toast message including the port 11311.
  5. Start the ROS_Camera_1.apk and enter the noted down URI.
  6. Start the ROS_Camera_2.apk and enter the noted down URI.
  7. Align both camera smartphones next to each other. The distance between the camera lenses should be about the same as the distance between your eyes. Try to make them look forward parallelly.
  8. On the ROS_Image_Viewer smartphone make sure that the images are aligned correctly (Left camera left image, right camera right image)
  9. Put your smartphone into the Durovis Dive and enjoy.

For developers: 

ROS Java install instructions:
http://rosjava.github.io/rosjava_core/installing.html

My forked repository:
https://github.com/fivef/android_core
The ROS_Image_Viewer app is a modified version of the "android_image_transport_demo".
The ROS_Camera_2 is the "android_camera_demo" with just the node name and the publishing topics names changed.
I just hacked this together in a couple of hours so it's not done very nicely.