Creating a Cardboard QR code
I recently ordered Baofeng Small Mojing virtual reality headset from AliExpress. They start at $12, with free shipping, and come in a variety of colors.
I got the pink ones.
Unfortunately, they did not come with a Google Cardboard QR code. This is a symbol that you use to calibrate your headset, so that Google Cardboard virtual reality apps and YouTube movies show up as best as possible.
Google, unfortunately, was not my friend — apparently, this particular QR code had not yet been uploaded by anyone.
But I’m not someone who’s just willing to sit around and wait for other people to do the work. Especially when I can get a blog post out of it. And there’s a QR Code Generator that Google has created for folks to use. Of course, this generator is designed to be used by the manufacturers themselves, but it turned out that it wasn’t too difficult for a mere human to do it, either.
I loaded up the official website on my computer, then picked up my smartphone — a Samsung Galaxy S6, pulled up a QR code reader app, and scanned the QR code. Or you could also type in the URL provided. It opened up a tool on my smartphone that is synched with the form on my computer screen.
The phone loaded the tool and asked me for the “pixels per inch” value of my device. I Googled “samsung galaxy s6 pixels per inch” and got 577. Easy enough. It asked me to touch the screen to switch to full-screen view, then I got a bunch of lines on the screen.
Now, back to the website on my computer.
I skipped the part about adding my company name and device name, since I’m not the actual manufacturer — and I still have hopes that the manufacturer themselves will come through and create an official code.
So, first, it asked me for the primary button type. This headset doesn’t have any buttons — but it does allow me to touch the screen. That’s probably as good as having a touch-style button on the headset itself, so I selected “touch.”
Then it asked me for the screen-to-lens distance. I’m supposed to use calipers to measure this.
I don’t own a pair of calipers, but I do have measuring tape.
I got 55 millimeters.
Then they had me measure the distance from the center of one lens to the center of the other. That came out to 65 millimeters. My lenses were adjustable, so, per their instructions, I set them at the middle setting for this measurement.
Then they asked me how the phone is aligned. Some headsets — like the FireFly — have the phone positioned so that it’s centered in all directions. As you can see with this particular set, however, the phone is just dropped in and sits at the bottom of the two clips. So I chose “bottom” for the vertical alignment.
Then they had me measure the distance from the bottom of the tray — in my case, the bottom of those clips — to the center of the lenses. That came out to 40 millimeters in this particular case.
Now comes the tricky part — the distortion coefficients. This is what adjusts for the curvature of the lenses.
Here is where the magic happens. Since the online form is synched to the tool running on the smartphone, you can adjust the coefficients — using the little up and down arrows — and see the immediate effect on the phone.
I adjusted the k1 value up and down and a value of 0.15 seemed to work the best. Then I did the same for k2, and got 0.22.
That was it. I clicked the “Generate Profile” button and got my QR code:
I added this code to my QR Codes page, for anyone else to use.
I’m going to follow the same process and create QR codes for other headsets in my collection that don’t have official QR codes released yet.
Do you have a headset that you created a QR code for? Please share! Paste a link below, or email me: [email protected]. Thanks!