Assemble the Cameras : build your 3D Position Tracker for VR

VrTracker Cameras

 

Today I am going to show you how to use and improve the main component of your 3D position tracker to improve your virtual reality experience : the camera.
The cameras are based CMUcam5 from Charmed Labs which is a position tracking camera which can output 2D coordinates.

cmu1
 

Why this camera ?

I have tested almost every alternatives, and the first prototypes were even based on Raspberry Pi camera, and the 2D position tracking was made using OpenCV image library on the Raspberry. I have also been working with the wiimote sensors and many standard HD webcam with FreeTrack. None of them did the job by a long shot !

You can order this camera on Amazon for 69$.

What’s under the hood of a CMUcam5 ?

  • Multi point tracking (great for multiple users)
  • 640*480 @ 50FPS
  • 1280*800 @ 30FPS
  • Lens field-of-view: 75 degrees horizontal, 47 degrees vertical
  • Voltage : 5 to 12V
  • Power consumption : 140mA
  • Open Source (hardware and firmware)
  • Removable optics

 

OK we found the camera, what do we “Gear Up” ?

That camera is nice, but we have to add some stuff to make it great. Here is what we are going to do :

1. Get to know your camera
2. Remove infrared blocking to filter
3. Add infrared pass filter
4. Update the firmware
5. Make the case

In another post, we will see how to make it wireless, this one is already long enough !

Get to know your camera

An important part is to understand how your camera works and how it see the outside world and how it talks about it.
I am not going to write a lot about it as the guys from CharmedLabs did a great job at explaining all about their product !

 

 

Here is the Main Website

Technical specifications

Technical documents

And her is the Quick Start page to setup your camera for its first use.

Play around with the camera, connect it to your computer and try to get an image.

Now you are supposed to know enough about the camera for the following steps. It is especially important to make it wireless.

 

Remove infrared blocking to filter

As you have seen on the video above, the camera tracks objects based on their colors. After a little testing, I found out that the color tracking is not good enough for our application, therefore we have to improve the tracking. Here is what we will do : instead of tracking color, we are going to track an infrared light. Infrared light is a light with a wavelength around 940nm, that can’t be seen by humans. Infrared is commonly used in remotes for examples.

Almost any camera can see infrared even though our eyes can’t. Unfortunately, in most cases we don’t want to see infrared with a camera, so the lens contains an infrared blocking filter. The CmuCam 5 has such a filter in its lens. We will have to remove that filter !

Different methods can be used to remove IR filters, such as eating the lens until the glue melts. In my case I took a screwdriver, broke the lens and remove the small pieces of glass left.

Here is how to do it step by step :

  1. Unscrew the lens from the camera
  2. Identify the IR filter. It is on the sensor side of the lens. It has a red-ish reflection like so : 
    eyetoy04
  3. Break the filter with a small screwdriver. Don’t go to far, you would broke the others lenses. Remove the small pieces of glasses left.
  4. You’re done !

 

Add infrared pass filter

Now your camera can see usual light and IR light. As we are only going to track IR, we could add a filter that removes usual light, called “infrared pass filter“. With this filter, the camera will see infrared and only infrared ! The tracking will be much better !

I am sure you are now thinking “Damn, where am I going to find such a filter ?”, well it used to be easy 15 years ago, today it’s going to be a little more complicated… Here is what you have to find :

floppy
Yes ! A goddamn floppy disk !!!

Because when you open a floppy disk, you see that round plastic thing on the next picture ? Well it can act an IR pass filter ! You just have to cut a small round in this disc with a pair of scissor and put it between the camera sensor and the lens, or at the end of lens.

open floppy
 

Update the firmware

The firmware inside the camera is made to detect colors, not white (IR) on black. So we have to update that firmware. Thanks to IR-LOCK team, a special firmware has already been made. Those guys use a Pixy cam too on their drones to make a target tracking system using infrared, for automated landing and much more ! You can also order a Pixy Cam right from their website with the right lenses and filter and a bunch of infrared LEDs If you prefer for 99$. I wouldn’t personally recommend it if you are low on budget, but if you want to gain some time, it could be a solution.

To download, install and configure the new firmware, please follow instructions 2 – 6 on IR-LOCK Getting Started page.

Now you can start playing around with infrared tracking 😉

 

Make the case

This step is not necessary, but I am going to give you all the steps and files to make a nice case for your camera and wireless module (we’ll talk about that a bit later).

The case is very easy and low cost to make. It is not the most beautiful case ever, but it will be practical and won’t require any tools (except a screwdriver).

The case is made of two pieces of plastic, laser cut, assembled with a few screws.

Camera support 2D bottom           Camera support 2D top
both
top
bootom
The camera and its wireless transceiver are sandwiched between both PVC parts as you can see here :

VrTracker Cameras

If you have never made any laser cutting ever, here is what I usually do :

  1. Go on SeeedStudio Laser cutting service
  2. Upload the following files Case CAD (you have to do it twice, once for the bottom and once for the top)
  3. Finish the order (login, shipping…) and should have 5 cases delivered to your home for less than 20$ !

Once received, you just have to find some long screws and assemble everything !

Note : If you are planning to order on SeeedStudio, you might want to order the PCB for the wireless transceiver at the same time. So checkout the next article on this subject.

 

In the next step, we will make an electronic circuit to make the camera wireless. I’ll give you all the files and instructions to build it yourself ! It is in another post as this is pretty long…

4 Comments

  1. Dimi

    Hi
    where is the post which explains the next steps? Is it live yet?
    Are the Developer packs ready for shipping if someone wants to save some time?

    • JulesThuillier

      Hi !

      We have been changing many things lately and that’s why we still didn’t posted those infos.
      Still you can find the previous posts with more informations here on Hackaday : https://hackaday.io/project/8853-vr-tracker

      About the Dev Packs we are awaiting to have enough pre-order to get to production (because at the moment it would cost about twice as much to build than the price shown on the website). We are at 80% at the moment, so we are planning the production and the team is growing this summer to get there ASAP. Don’t hesitate to join the waiting list to receive an update when we are ready 😉

      Have a good day !
      Jules

  2. Mark Vincent

    Hi Jules,

    Where is the post you are referring to in the last paragraph? The one with the files and instructions. I can’t seem to find it.

    Thanks.

    • JulesThuillier

      Hi Mark,

      Sorry for the delay, we have been changing so many things lately that it was hard to create that post, as the informations were always changing. We have now a clear idea of what we want to do and we will be posting those updates with better explanations during the summer. Thank you for your understanding and sorry about that.

      EDIT : Still the previous informations are still good and you can find the old posts her eon Hackaday : https://hackaday.io/project/8853-vr-tracker

      Have a great day !
      Jules

Leave a Reply to JulesThuillier Cancel Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>