Cardboard QR Decode - google-cardboard

tl;dr: Is there a way to get Cardboard's calibration data without parsing through Google's protocol buffers?
I need to access Cardboard viewer's lens data, coefficients etc. to do proper undistortion calculation.
I contacted two Cardboard viewer manufactures and both had no idea what the values are and pointed me to contact google, since they used googles calibration.
As discribed here you can decode the QR code by c++ parsing it through Google's protocol buffers, but I am currently not in a c++ dev enviroment and crunching through the doc to get the manufacturers calibration is very time consuming for just a bunch of coefficients. Is there a better way?

Someone build a Webpage (https://lisa-wolfgang.github.io/vrEmbed/tools/google_profile_decode.html) that decodes the Google Cardboard Links into JSON using googles javascript protocol buffer library. (If you use the short URL, leave out the http://)
I used it to get out the data for a project.

The accepted answer didnt work for me so I scanned the QR code with a reader, got a short goo.gl URL.
I ran this through https://www.expandurl.net/ and got a longer link that just points to the app store to download Cardboard app like this:
http://google.com/cardboard/app?p=ALONGSTRINGOFCHARACTERS
I just needed this to set my Unity project's Cardboard profile automatically so that the QR code doesnt have to be scanned on every device:
GvrCardboardHelpers.SetViewerProfile("http://google.com/cardboard/cfg?p=ALONGSTRINGOFCHARACTERS");
You can Base64 decode that long string of characters (the 'p' parameter) to get the coefficients, but it's encoded in a binary format.
Reverse engineering the Cardboard profile generator (https://vr.google.com/cardboard/viewerprofilegenerator/) may help decode exactly which variables are what, but unfortunately it seems broken currently.

Related

API to retrieve images from within an image or pdf

I am looking for a way to extract images from within another image. For example:
Here is a picture taken of a paper. It includes text, an image of a camera, and an image of a qr code. Is there an API that can possibly extract those two(camera and qr code) from this larger image and separate them into their own individual images. I know this is doable with the text(OCR), but I need to find some way to do Image Recognition if that even exists. For now, I cant find any reference to doing this besides extracting images from pdf's, which none of those softwares have the capability to extract them from a non-perfect pdf.
Price for the API(node.js prefered, but i can adapt to use any language) is not a big concern, I'm just not sure this is even possible to due without programming a legitable artificial intelligence using machine learning, which I would no doubt cause a global internet shutdown from breaking everything if I attempted to do so.
Anyway, any suggestions would be great and much appreciated. Thanks!
EDIT: the images aren't always those, it can be an image of anything, from potatoes to flags
For the QR code, you can simply use a QR code scanner library and convert the output back into a QR code. As for the camera, you are going to need an image recognition service like Google Cloud Vision or train your own neural network with something like TensorFlow to recognize pictures of cameras.
QR detectors abound around the web and some are on github but for single objects you could try hotpot API https://hotpot.ai/docs/api
your code example linked into https://hotpot.ai/remove-background
for striping back you may need a secondary autocrop task

How to detect handwriting using Google Cloud Vision API

TL;DR: how can I detect the presence of handwriting in an image?
I'm using Google's Python Vision API to scan for text in images, with generally good results. Most of the time the images contain printed text, but sometimes there is handwriting.
As noted in the documentation, you sometimes get better results for handwritten text using document_text_detection rather than the standard text_detection API call. My own tests back this up, but also show that the standard text_detection call generally works best for printed text in JPEG images.
So I'd like to use the standard text_detection by default, and only run images thrrough document_text_detection if there is handwriting. However, I can't find a reliable way to detect the presence of handwritten text in an image using the Vision APIs.
I tried label detection, but there does not appear to be a specific label for handwriting. Occasionally it will spit out "Calligraphy" but not reliably.
Does anyone know of a way to accomplish this?
I haven’t used Google Cloud Vision API but you can try Object detection models. I would suggest to create a labeled dataset over the document images of your use case using tools like LabelImg and train an Object detection model like Yolov3 [paper] [code]. I have worked on similar problems It should work.

Converting Audio From Unknown Format

I would like to create a utility in either PHP or Perl to convert an audio file created by the Nortel's Callpilot voice mail system into a wave file. The problem is that the format, which has the .vbk file extension, is unknown to virtually any audio player. To date, I have not found one that will play a .vbk file. I've looked at audio file conversion libraries in CPAN and tried many of them, they don't recognize the file. I was not successful with PHP's audio formats manipulation either. Nortel does provide a converter, however, it does not suite my needs. I would like to have this run via cron on a CentOS system. I don't know how to reverse engineer this format. There seems to be just scraps of info on this format on the web. This page indicates that it is "based on the H.232 format":
https://www.odesk.com/o/jobs/job/Reverse-Engineer-Nortel-VBK-Audio-Format_~~f501f11679f3f6bb/
I know this is a very old thread, but I've recently been looking into converting Nortel's vbk format as well. Importing the vbk files into Audacity with raw data option, Encoding: U-Law, Byte order: little-endian, Channels: 1 Channel (Mono), Sample rate: 8000 Hz. Not sure if they have multiple formats for their vbk files, but mine were from a BCM50 phone system.
Well, this is the joy of closed proprietary systems. But there is a chance they could play nice. Try to contact Callpilot and see if they'll give you the format specs. It's worth a shot.
As for reverse engineering, you need to be able to generate known content. Like a constant tone at 60Hz for exactly 1 second. Then at 50Hz. Then at 10 seconds. Compare them. Isolate the data from the metadata. There is going to be compression involved, so try a handful of common compression schemes, maybe research into Nortel's practices will probably tell you more. If you can feed that into a player and get a tone back out, you're on your way.
There's probably more informed and structured ways to go about reverse engineering, but from my experience it's a lot of trial and error.

Convert Finger Print image to comparable template

I have a finger print scanner which gives me only an image of finger-print(it's SDK doesn't provide any functionality for "converting" them into template and for comparing these templates).
My question is which approach should I use: look for an SDK which does provide functionality for converting and comparing finger-print images, or shpuld I write these algorithms on my own(which seems hard and time consuming). If first method is preferred, What are open source/paid sdk's for that work? Can you give me some links
My device is Verifier 300 LC.
Thanx in advance :)
There is a free NBIS Biometric image software and libfprint library based on it.
It seems that fingerprint image comparison can be easily developed, See this thread
There are commercial libraries available too:
VeriFinger SDK
Griaule Fingerprint SDK
Bio-Plugin SDK
There are many software available, You can start with NBIS which has many tools ex:minutiae extraction tools (mindtct), Bitmap Image (JPG/PNG) to WSQ snd vice versa, etc., With NBIS.NET Some trouble is during image conversion 32bpp image to 16bppGrayScale or 8bppIndexed,
By learning from NBIS samples you can quickly learn and create your own proprietary FP matching algorithm.
I was looking for this fingerprint raw image conversion to WSQ standard in java and I found the below useful. Hope it helps.
http://jmrtd.org/index.shtml
and this https://github.com/E3V3A/JMRTD/tree/master/wsq_imageio
I work for Lakota Software Solutions, Inc. and we have a commercial product available (free developer license) that will solve your issue.
Lakota's Image product is the only FBI certified WSQ encoder/decoder that is written in pure Java, and it is probably the fastest out there. We tested it and it was 5 times faster than the NIST WSQ encoder/decoder.
Converting between image formats is very simple and straightforward with Image.
byte[] rawBytes = ...
Image rawImage = ImageReader.read(rawBytes, ImageFormat.RAW);
Image wsqImage = rawImage.toWsqImage();
You can visit our website at http://www.lakotasoftware.com/products/image
If you are looking for a free version, you can look at Jnbis, which is a Java version of NBIS. https://github.com/kareez/jnbis.
Note that Jnbis has not certified by FBI to meet the WSQ quality requirements, which may or may not matter in your case. You can find the listing of certified WSQ algorithms at https://www.fbibiospecs.cjis.gov/WSQ/Implementations

How do I send a low size black and white image using plain text SMS without utilizing EMS/MMS?

I want to send very low size black and white images using plain text SMS without utilizing EMS/MMS. Searching on the net yielded some results which contained hints that logos are sent using SMSs, which make use of the User Data Header in an SMS. But it is not clear exactly how to approach the code. I want to send the message from my PC to any low cost phone (regardless of whether the phone contains J2ME or any other programming support or not). The images can be described in binary form in <140 bytes or sometimes will require it to be split into two parts if greater than 140. Thanks in advance.
You might be able to send an image using Nokia's OTA Bitmap specification, but it requires 3 SMS messages and is usually used for images that are 72px x 28px. Older Nokia's could use it as a screen saver but that was a long time ago (e.g. 2004 was that last time I saw it) and I don't think the newer handsets allow this.
A bit more info at under generic "smart messaging" at Wikipedia.

Resources