Print this Post

Deciphering QR code from Radio Spectrograph

Although I’ve been ridiculously busy the last few weeks, I’ve been eying some posts circulating around the Knights QRSS mailing list regarding mysterious signals in the 40m band. They recognized it as a QR Code and tried decoding it with phones and such, but the signal wasn’t strong enough above the noise to be automatically deciphered.on5ex-odd

That’s the original spectrograph as captured by ON5EX in Belgium. It’s a pretty good capture, it’s just not great enough to be automatically decoded. The first thing I did was pop it open in ImageJ, separate the channels, and use the most useful one (red, I believe). When adjusted for brightness and contrast, I was already at a pretty good starting point.better

I tried using an automated decoder at this point (http://zxing.org/w/decode.jspx) but it wasn’t able to recognize the QR code. I don’t blame it! It was pretty rough. I decided to manually recreate one, so I slapped the image into InkScape, add a grid, and align the image with the grid. From there, it was as easy as drawing a single grid-square-sized rectangle and copy/pasting it in all the right places.building

However problems came when working on those last few rows. The static was pretty serious, so I tried a lot of different filters / adjustments. One of the greatest benefits was when I stretched the image super-wide and performed a “rolling ball” background subtraction, then revered it to its original size. That greatly helped reduce the effect of the vertical striping, and let me visually determine where to place the last few squares by squinting a bit.building3

Once it was all done, I saved the output as orange, then later converted it to black and white for web-detection via the ZXing Decoder.building2

The final result:


… which when decoded reads:


Yay! I did it. Although my call sign is AJ4VD, I’m spending the afternoon at the University of Florida Gator Amateur Radio Club station and am using their computers, so I might QSL as W4DFU. Also, there’s a lot to be said for ON5EX for capturing/reporting the QR code in the first place. After a bit of research, it turns out that F4GKA is one of the Knights! I should have known it =o)

Thanks for the fun challenge!

About the author

Scott W Harden

Scott Harden has had a lifelong passion for computer programming and electrical engineering, and recently has become interested in its relationship with biomolecular sciences. He has run a personal website since he was 15, which has changed names from HardenTechnologies.com, to KnightHacker.com, to ScottIsHot.com, to its current SWHarden.com. Scott has been in college for 10 years, with 3 more years to go. He has an AA in Biology (Valencia College), BS in Cell Biology (Union University), MS in Molecular Biology and Microbiology (University of Central Florida), and is currently in a combined DMD (doctor of dental medicine) / PhD (neuroscience) program through the collaboration of the College of Dentistry and College of Medicine (Interdisciplinary Program in Biomedical Science, IDP) at the University of Florida in Gainesville, Florida. In his spare time Scott builds small electrical devices (with an emphasis on radio frequency) and enjoys writing cross-platform open-source software.

Permanent link to this article: http://www.SWHarden.com/blog/2010-11-11-deciphering-qr-code-from-radio-spectrograph/


  1. F4GKA, Guenael

    Great job !
    Finally, this enigmatic QRcode was decrypted and the message was found :)
    Thank you for your answer and thanks to everybody in the “Knightsqrss” mailing-list.


  2. Johan Breukink

    Bravo !

  3. Jimmy

    Love it!!! Haha, I enjoy your technique…

  4. Eldon R. Brown SR

    Good Job,

    I had the same thoughts for decoding, but I just did not follow through.

    I had been playing with QR Codes, See: http://wa0uwh.blogspot.com/2010/09/more-qr-code.html

    72 Eldon – WA0UWH

  5. Ian Tester

    BTW, JPEG’s are best for continuous-tone photos and the like. Using it for a bi-level image is really inappropriate.

    As an experiment I pulled the ‘final’ image into The GIMP, used the ‘threshold’ tool to remove the JPEG artefacts, autocropped it, and saved it as PNG with level 9 compression. The result was 572 bytes, much smaller than the 12K JPEG you posted. Running it through OptiPNG got it down to 270 bytes. That’s fewer bytes than are in this message!

    Similarly, many of your screenshots would probably be smaller in the PNG format. Don’t just always use JPEG.

    Anyway, interesting work! I wonder how much bandwidth that signal used compared to other methods of sending text.

  6. RBR

    I attempted to reconstruct it but i didn’t do it pixel per pixel i just traced it and scaled it into a square. It worked using google goggles, funny thing is that if i just take to raw image and use google goggles it comes up as “kill you” in txt.

  7. Paul

    Hey, I have a great Idea.

    Wat if I write a haiku on a piece of toilet paper, wipe my as with it flush it through the toilet. Is anybody interested in decoding that?

    I gues this is just not my kind of shit but I hope you enjoyed youself while playing with it.

  8. Patrick Donnelly

    wow. that is some dedication.

    Patrick, QrArts

  9. Patrick Donnelly

    One issue is that many QR readers will not Scan inverted codes.


  10. Patrick

    One issue is that many QR readers will not Scan inverted codes.


  11. Joshua Davison

    I used notepad to decode it, and came up with this:


  12. Joshua Davison

    Might have to copy and paste that somewhere :P
    Looked good in the editor.

  13. hamman

    Hey, well done on the decryption !
    Nice technique- and nice site !
    You are working on and are interested in all the same things as me !Day before yesterday i just built my first AVR programmer :) Im also into QRP, I have all the components gathered to build my first TX .
    Great site- really enjoyed it, first time here- but certainly not the last !
    Greetings from Ireland.

    N.B I dont have my licence- but perhaps when i get it, we could organise a contact ?
    Would be fun to ragchew with someone cool on the other side of the atlantic :)

  14. Xrummer Proxies

    Amazing Post.thanks for share..additional wait ..

  15. Pharme757

    Hello! aeabkkc interesting aeabkkc site! I’m really like it! Very, very aeabkkc good!

  16. splash resistant bluetooth

    Hello there I am so glad I found your blog, I really found you by mistake, while I was
    researching on Yahoo for something else, Anyways I am here now and would just like to
    say cheers for a incredible post and a all round interesting blog (I also love
    the theme/design), I don’t have time to look over
    it all at the minute but I have book-marked it and also added in your RSS feeds, so when I have time I will
    be back to read more, Please do keep up the awesome work.

Leave a Reply

Your email address will not be published.

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=""> <strike> <strong>