Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Bitcoin Swami on September 26, 2011, 07:22:05 AM



Title: Invisible QR codes.
Post by: Bitcoin Swami on September 26, 2011, 07:22:05 AM
Somehow stumbled upon this, not sure what use it would be to bitcoins but it looks fun.

http://www.digimarc.com/discover/barcodes.asp?_kk=qr%20code&_kt=3efe5237-0e66-4328-9a7f-276e1822e7ad&gclid=CIyA-bivuqsCFQFS7AodIn9Ecg


Title: Re: Invisible QR codes.
Post by: ParrotyBit on September 26, 2011, 02:05:04 PM
QR codes are like sticking your hand into holes in the ground. Invisible QR codes are like a poorly covered-up hole in the ground with a sign next to it that says "Stick hand in hole to read about why you need to give me your money!"


Title: Re: Invisible QR codes.
Post by: Phinnaeus Gage on September 26, 2011, 02:16:16 PM
QR codes are like sticking your hand into holes in the ground. Invisible QR codes are like a poorly covered-up hole in the ground with a sign next to it that says "Stick hand in hole to read about why you need to give me your money!"

Exactly! That's what makes this a beautiful APP. Before, during and after watching the video, my head was spinning on how this could be used in conjunction with Bitcoin.


Title: Re: Invisible QR codes.
Post by: nefanon on September 26, 2011, 02:49:28 PM
Wow, this looks really cool.

It's be even better if someone hosted an open-source service like this so the community at large could use this.  :D


Title: Re: Invisible QR codes.
Post by: giszmo on September 26, 2011, 04:14:19 PM
Did I get this right? This "invisible QR code" is just image recognition? So at the app vendor's website there is a database of all "active" images. If I find one of these, the app translates it into a link.
Why would I want that? It has nothing to do with QR-codes as it only works as long as the database is not polluted by millions of similar pictures that confuse the app thus it will *only* work as proprietary software.


Title: Re: Invisible QR codes.
Post by: jim618 on September 26, 2011, 04:40:40 PM
This was the top google hit for 'java image steganography':

http://www.dreamincode.net/forums/topic/27950-steganography/

It gives example code where text is hidden directly in the image data.
Normally people hide the data in the low bits of the image data though I have not looked through that code's algorithm.

QR code recognition would be much more robust in noisy environments mind because of their error correction codes and position markers.


Title: Re: Invisible QR codes.
Post by: WiseOldOwl on September 26, 2011, 04:44:01 PM
This was the top google hit for 'java image steganography':

http://www.dreamincode.net/forums/topic/27950-steganography/

It gives example code where text is hidden directly in the image data.
Normally people hide the data in the low bits of the image data though I have not looked through that code's algorithm.

QR code recognition would be much more robust in noisy environments mind because of their error correction codes and position markers.

Wow, I love how the basic info of bits and bytes is explained here^^^ regardless of crypt/stegan stuff.


Title: Re: Invisible QR codes.
Post by: Bitcoin Swami on September 26, 2011, 07:06:08 PM
You could probably make some fun bitcoin games out of the idea.  People hunting for bitcoins scanning everything in sight looking for a hidden qr code.


Title: Re: Invisible QR codes.
Post by: RodeoX on September 26, 2011, 07:12:18 PM
I'm confused. Is this a photo with a stego QR image hidden in it, or is it scanning a known image?


Title: Re: Invisible QR codes.
Post by: casascius on September 26, 2011, 07:22:47 PM
I haven't read their spec, but when I blew their sample PDF up, it looked like it had a bunch of subtle imperfections in just one of the color planes (they were green and magenta) that could easily be what's encoding the data.


Title: Re: Invisible QR codes.
Post by: nhodges on September 26, 2011, 08:00:05 PM
I don't get it, am I correct in the assumption it only scans with their proprietary scanning app?


Title: Re: Invisible QR codes.
Post by: casascius on September 26, 2011, 08:46:03 PM
Yep.  Their technology reminds me more of Anoto digital ink (e.g. the "Tag" reader pen for kids) than a QR code.  The dots are scattered all around the page, but more so in places where there's poor detail or no real color saturation, and I'll bet they're extremely redundant so only a small percentage of them is needed.

If you look at their sample PDF of a bright red car, there are no perceptible dots in the car itself... they are more in the background, in the sand, etc.


Title: Re: Invisible QR codes.
Post by: giszmo on September 26, 2011, 09:15:52 PM
Ok, i must take back my last post. This is interesting indeed.

My wild guess would be that they take a "QR-like code" and apply it to the image many times. Some areas get shifted to be green and some get shifted to be magenta. They do some kind of dithering with a set of patterns that all contain 50% green-shifting and 50% magenta-shifting. The ones can be translated to black and the others to white of the regular QR-code. As each such dithering pattern is balanced you don't see the QR-code without the appropriate pattern matching.

Now as a perceptible shift of the hue would be annoying in very bright and very dark areas, this is mainly done/visible in medium bright areas. Also highly saturated areas don't allow such operations without adverse effects.


Title: Re: Invisible QR codes.
Post by: giszmo on September 26, 2011, 09:41:27 PM
Ok, I tried the pdf and installed the android app and it's fun:

I stretched the saturation and brighness and cropped the image down to this little image:
http://lw2.leowandersleb.de/blub/digimarcSmall.png

Context:
http://lw2.leowandersleb.de/blub/digimarcBig.jpg

And the app did still trigger. And no, it did not trigger when I pointed it to some other pictures, so I would assume the information to really be in the image.


Title: Re: Invisible QR codes.
Post by: giszmo on September 26, 2011, 09:54:46 PM
For the fun of it:

This car is also available without the embedded information:
http://i.istockimg.com/file_thumbview_approve/8242493/2/stock-photo-8242493-rally-car.jpg

+saturation
+lightness
*2
=
http://lw2.leowandersleb.de/blub/istockSaturated.jpg

The image with the embedded information:
http://lw2.leowandersleb.de/blub/digimarcSaturated.jpg

and yes, even at this small scale the information can be extracted, so maybe it is slightly more sophisticated than what I suggested above ;)


Title: Re: Invisible QR codes.
Post by: TiagoTiago on September 26, 2011, 10:59:14 PM
How long do you expect until people reverse engineer this and release a FLOSS variation of the standard?


Title: Re: Invisible QR codes.
Post by: giszmo on September 26, 2011, 11:32:31 PM
How long do you expect until people reverse engineer this and release a FLOSS variation of the standard?

Firstly, where is there a standard?

Secondly, I doubt it is hard to find out. Most likely if you ask them, they point you to the patent describing how it works. From their commercial though it is clear that all that is stored in the image is a little snippet of information - an ID maybe. The actual link behind that ID can be changed on the server at any time. This way it heavily relies on a central database with very limited information in the picture stored highly redundant. Storing a whole business card in a picture readable when offline would surely distort it much more.


Title: Re: Invisible QR codes.
Post by: Phinnaeus Gage on September 26, 2011, 11:52:51 PM
Quote
Storing a whole business card in a picture readable when offline would surely distort it much more.

How about a vector image?


Title: Re: Invisible QR codes.
Post by: phelix on September 27, 2011, 08:07:33 AM
For the fun of it:

[...]

and yes, even at this small scale the information can be extracted, so maybe it is slightly more sophisticated than what I suggested above ;)
+1, nice work, gisz!


Title: Re: Invisible QR codes.
Post by: giszmo on September 27, 2011, 09:36:59 AM
Quote
Storing a whole business card in a picture readable when offline would surely distort it much more.

How about a vector image?

I don't understand. The difference between vector and bitmap is only in the storage format. QR-like codes work even after printing when the storage format is "ink on paper".
Sure in an SVG you can embed arbitrary information. You can add a whole book without violating the SVG standard and without distorting the image's visual representation ;)

Check it out. It's 3.9MB and for convenience I put the bible as the title but other and new tags are perfectly allowed in the standard: http://lw2.leowandersleb.de/blub/bibel.svg


Title: Re: Invisible QR codes.
Post by: payb.tc on September 27, 2011, 10:08:38 AM
Quote
Storing a whole business card in a picture readable when offline would surely distort it much more.

How about a vector image?

I don't understand. The difference between vector and bitmap is only in the storage format. QR-like codes work even after printing when the storage format is "ink on paper".
Sure in an SVG you can embed arbitrary information. You can add a whole book without violating the SVG standard and without distorting the image's visual representation ;)

Check it out. It's 3.9MB and for convenience I put the bible as the title but other and new tags are perfectly allowed in the standard: http://lw2.leowandersleb.de/blub/bibel.svg

i thought bruno was saying "how about embedding a vector image into the photo, instead of embedding text data".


Title: Re: Invisible QR codes.
Post by: giszmo on September 27, 2011, 10:46:27 AM
Quote
Storing a whole business card in a picture readable when offline would surely distort it much more.

How about a vector image?

I don't understand. The difference between vector and bitmap is only in the storage format. QR-like codes work even after printing when the storage format is "ink on paper".
Sure in an SVG you can embed arbitrary information. You can add a whole book without violating the SVG standard and without distorting the image's visual representation ;)

Check it out. It's 3.9MB and for convenience I put the bible as the title but other and new tags are perfectly allowed in the standard: http://lw2.leowandersleb.de/blub/bibel.svg

i thought bruno was saying "how about embedding a vector image into the photo, instead of embedding text data".


Well, svg is "text data". Am I missing something?

http://lw2.leowandersleb.de/blub/see.png


Title: Re: Invisible QR codes.
Post by: payb.tc on September 27, 2011, 10:49:41 AM
Well, svg is "text data". Am I missing something?

http://lw2.leowandersleb.de/blub/see.png

oh, i didn't know that.

(but i'm looking at your SVG code now on my phone, thanks)


Title: Re: Invisible QR codes.
Post by: giszmo on September 27, 2011, 10:54:27 AM
i'm looking at your SVG code now on my phone, thanks

I realized that it is maybe non-trivial to get the qr-code into an svg-file.

In order to get a rather small qr-code I stripped a lot of meta-data from the original svg-file as it came out of inkscape.
... uhm ... opening the file on my desktop works. In the browser it doesn't. Crippled too much, but you get the idea ;)

Here is the svg:

Code:
<svg width="157" height="29">
<g transform="translate(-121,-116)">
<text style="font-size:40px;">
<tspan x="167" y="144">See?</tspan>
</text>
</g>
</svg>


Title: Re: Invisible QR codes.
Post by: idontknow on September 27, 2011, 11:04:10 AM
Can you show us the original SVG file for comparison or is it too big?


Title: Re: Invisible QR codes.
Post by: giszmo on September 27, 2011, 11:32:40 AM
Can you show us the original SVG file for comparison or is it too big?

Nah, it's not "big" at all. I stripped just everything that looked like "extra" (namespace sodipodi and inkscape) or "default" (color:black), ids and some numbers precision. Probably adding back the first line would make the svg work in the browser:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="156.08125"
   height="28.16"
   id="svg2"
   version="1.1"
   inkscape:version="0.48.1 r9760"
   sodipodi:docname="New document 1">
  <defs
     id="defs4" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.35"
     inkscape:cx="-267.49143"
     inkscape:cy="-388.17143"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     showgrid="false"
     fit-margin-top="0"
     fit-margin-left="0"
     fit-margin-right="0"
     fit-margin-bottom="0"
     inkscape:window-width="1112"
     inkscape:window-height="740"
     inkscape:window-x="134"
     inkscape:window-y="155"
     inkscape:window-maximized="0" />
  <metadata
     id="metadata7">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(-121.06286,-116.03076)">
    <text
       xml:space="preserve"
       style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:LMSans8;-inkscape-font-specification:LMSans8"
       x="117.14286"
       y="143.79076"
       id="text2985"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan2987"
         x="117.14286"
         y="143.79076">Die Bibel</tspan></text>
  </g>
</svg>


Title: Re: Invisible QR codes.
Post by: HostFat on September 30, 2011, 07:08:48 AM
I like the idea of a "virus" that puts hidden QR-codes everywhere on images ;D


Title: Re: Invisible QR codes.
Post by: BitcoinPorn on September 30, 2011, 10:58:25 AM
Cool idea but looks like marketing it will be tough.

Yes, seems like fun for creative people though.  Finding ways to get people to scan a part of the page that shows nothing, which is good for actual conversions of qr scans. The bad part being them having to download an extra app to do it though.