Friday, 11 April 2014

Making 3D glasses from a phone

How to make 3D glasses with a phone and a 3D printer.

To be honest this is just a copy of a project of another guy that did all the real work, here I just show of my version with some tips and tricks on software and other hardware you can use.

I did this already some time ago, so I now found out that the amount of software heavily increased!
What is very nice, for I was under the impression that the Oculus Rift would have more support and thus more software avalible.
If you want a few point what make the OpenDive better (in my opinion):
  1. Cheaper
  2. Full HD (it depends on your phone).
  3. Mobile (Oculus needs a computer to connect to, can be laptop. But not the same) 
In the time I was writing this (it did take me some time...) there was a new project on Kickstarter what is very similar to OpenDive. Just that this looks like they just want to make money (sorry to say). Because they offer nice looking glasses, but at a higher cost, less freedom (you have set to your phone dimensions) and most of all, they did not publish (yet) any software...

Printing the 3D object 

For the 3D object I use the one from the site, from the how to part.To print it at my local 3D print shop cost like 40 euro, high density.

Here is the final result of the print job. First front and then back. I made it the color green because it is my son's favorite color.
 Afterward I did reinforce the top and fixed the phone holders (two bars going from top to bottom).
Also add some soft small isolation tape so the plastic is not scratching the face. And of course the lenses and the band to strap it to your face.

Doing a OpenDive Test run 

Here are the first results when running the OpenDive test run. What you can get from here.

Other applications

Of course that test run is boring, and I wanted to play Quake! For the full game you still need to provide your own texture files, you can search google for these details.
There are a few others that you can enjoy with these glasses:
  • Wings - a kind of sky diving game
  • RTPhiscics RT3DApp - Simple more testing game
  • The Height - No idea how to describe this one...
  • Bubblecards - Some stupid racing game
  • FOV2GO Minus Lab - strange looking
  • RollerCoast - Cool to show the folks the glasses!
  • Go Show Free - A real home theater
  • DiveCityCoaster - Same as the Rollercoaster
  • Virtual Reality FPS - Difficult to see FPS
  • Dive Launcher - Dive interface...
  • Jet Sprint - A Flight similator
  • Dive Deep - Underwater game
  • VR Scene - Nice look FPS, Unreal flavor
If you plan on making your own take a look here. But you can try to play game with it, see the video. This called Kainy and seems very promising.

Useful addon devices

When the games are installed, I soon found out that controlling with my bluetooth keyboard is not an option. The best is a bluetooth gamepad, I did it with a PS3 gamepad, but this required some other tweaking.
Just remember that when you use these glasses, you are wearing your control's.

The Next step: Leapmotion

First of all I came across the leap motion a year before it was released. And I was already thinking in this direction. Then Oculus Rift came alone and thus the OpenDive. Now somebody already combined the Leap with the Oculus.
But Oculus was just sold to Facebook and I the comment Markus "Notch" Persson gave on pulling back his Minecraft: "Facebook creep's him out!".
So Let now work on a way to have it work on OpenDive! I did see Minecraftfor Android, so...

I am working a some idea's, but nothing concrete yet...

Installing Open Biometric Recognition

Installing OpenBR


The Open Source Biometric Recognition is advanced framework that can act as a add-on on OpenCV, it doesn't work with SimpleCV. Also if you are interrested in more Robot Visioning program's keep reading!


Because GCC 4.7.3 is required, Ubuntu 13.04 is advised. See here for the official installation instructions. There are few reminders when following the instructions, there is a fair amount of data to be downloaded...and just remember that places where it says:
make -j 4
Means you use 4 cores, perhaps you have more or less (like my test machine is virtual and uses only 2). Also you will need a lot of disk space and it will consume a lot of bandwidth for downloading data-sets.

running in to the error message: libpng error: Incompatible libpng version in application and library
This is fairly know problem with self compiled program's. But nothing serious.
Just get the correct libpng and compile it [./configure, make, sudo make install ].

The OpenBR SDK.

If you run in to segmentation error/faults the most conclusive I could find is this. What shows that getting it to run correctly is not that easy...I did it 3 times, same Ubuntu and GCC, OpenCV 2.4.5 and 2.4.8 And there is nothing clear yet if 2.4.8 is not supported, I will update this article as soon the cause is more clear.

Other Projects

But meanwhile getting OpenBR to work and finding useful pages I came across a few more interresting programs that I do not want write a complete article about but did find useful to mention here! Here is a list of similar and handy project. I will expend this part when I have more information of the software.

Object Recognition Kitchen

The O.R.K. is based on Ecto what is a C++/Python framework. Highly ROS supported, but like ROS, very dependable.

Eulerian Magnification

Eulerian Magnification is a method to applies spatial decomposition, take a look at the website, the only hard part is getting correct images to use. But give it a try!


Gamera besides being some fictive monster it is also a toolkit for a document recognition system. What can be useful when you want your system to read document's, with special symbols.


CVV is a gesture recognition. Something that was to my personal robot needs.


PyVision is a object-oriented Computer Vision Toolk. I did not test it because it is Windows and Mac only! But if anyone has something? 


RoboVision is a software stack, besides that I found some useful information and links for stereo visioning. Plus on the blog there are some CUDA examples, but I did not try those yet.


Qualia is a little python script, that with the use of OpenCV can detect smiles. I did not benchmark it with a list of different faces, feel free to do so.


ofxlpVideoGrabber is not so useful recognition but to make overlay's.


MFtracker is based on the TLD, and uses Python. Very simple but indeed some potential! Do not confuse people with MFtracker for the financial sector...which I did not look at.


Besides there are some project like face authentication for desktop applications, but these I did not use. Perhaps somebody else can use them...