TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Instagram Engineering Challenge: The Unshredder

156 pointsby mikeykover 13 years ago

20 comments

snotrocketsover 13 years ago
There's a famous anecdote about human unshredding: when the Iranian revolutionary took over the US embassy in 1979, they captured the shredded remains of secret documents. They took those shredding to the carpet weavers Iran is so famous of, who manually rewoven the shreds into the original documents (See <a href="http://en.wikisource.org/wiki/Documents_seized_from_the_U.S._Embassy_in_Tehran/Shredded_Documents" rel="nofollow">http://en.wikisource.org/wiki/Documents_seized_from_the_U.S....</a>)
评论 #3226457 未加载
评论 #3226845 未加载
评论 #3226085 未加载
ickiover 13 years ago
Interestingly enough, DARPA is running a similar challenge (their prize is a lot better): <a href="http://www.darpa.mil/shredder_splash.aspx#Splash" rel="nofollow">http://www.darpa.mil/shredder_splash.aspx#Splash</a>
评论 #3226161 未加载
评论 #3226034 未加载
评论 #3226315 未加载
评论 #3226042 未加载
uniclaudeover 13 years ago
I thought it would be a fun thing to do tonight until I saw all the tips given at the end of the article. They basically give the solution, it's not funny anymore :(.
评论 #3226134 未加载
评论 #3226150 未加载
评论 #3227409 未加载
asharpover 13 years ago
Warning, spoiler?<p>My first take on it was the following: Take the average of the differences between each pixel and the pixel adjacent to it over each column and store that as, say, X[]. Find some maximum number such that the sum of every nth column of X - the sum of all other rows of X is maximised. That's the column width. Split into a series of columns, use stable matching to match columns based on the sum of differences between rightmost male pixel and leftmost female pixel over all rows. Use stable marrage to give you a partial ordering, turn into a complete ordering and unscramble the image.<p>Any better/more elegant solutions?
评论 #3228024 未加载
评论 #3226056 未加载
______over 13 years ago
I find it strange that they don't provide an interface that the desired program should implement. For example, "provide the input image as a command line parameter to the script / binary, write the output to out.jpg"<p>Because of this, is someone going to actually take the time to understand what assumptions people make to run the program? If there was an interface, they could just run a script to test submissions...
lunaruover 13 years ago
The tips seem to be just a crude pixel matcher. Seems much more elegant to transfer the image into the frequency domain via FFT and find edges that way.
评论 #3227007 未加载
fferenover 13 years ago
Isn't this extremely obvious? Couldn't you just take the first slice, calculate the total color difference between its right edge pixels and the corresponding left edge pixels of each of the other slices, and stick it next to the one with least difference, then repeat?<p>I mean, you'd need to specify some threshold to handle slices on the ends, and maybe use sum of (difference^2) instead of just the sum, but it shouldn't be hard at all. Am I missing something?
评论 #3226817 未加载
评论 #3226722 未加载
评论 #3226856 未加载
评论 #3228519 未加载
joshmlewisover 13 years ago
Isn't this like the bunny slope of Darpas shredder challenge?
wallflowerover 13 years ago
Interesting. A 90 degree phase change makes a huge difference<p>&#62; For maximum security, documents should be shredded so that the words of the document go through the shredder horizontally (i.e. perpendicular to the blades). Many of the documents in the Enron Accounting scandals were fed through the shredder the wrong way, making them easier to reassemble.
username3over 13 years ago
Seems like they're trying to fix the rolling shutter effect on iPhones or shredded photos the iPhone takes sometimes.
vedranover 13 years ago
For anyone who's thinking of using Ruby I recommend OilyPNG instead of RMagick. It's a c extension to ChunkyPNG and is much faster if you don't need all of the fancy filters that come with ImageMagick.<p><a href="https://github.com/wvanbergen/oily_png" rel="nofollow">https://github.com/wvanbergen/oily_png</a>
tucazover 13 years ago
Looks like I was able to do it. I'm not sure if they will be happy to get a result in C#, though.<p>Also, not as easy as I thought it would be. A friend had to give me some help with the math to match the stripes.<p>Edit: How long did you guys take to figure this out? I took nearly 4 hours.
stuyguyover 13 years ago
You know you're done if you understand what this image means (and how it was made): <a href="http://i.imgur.com/Kn7Za.png" rel="nofollow">http://i.imgur.com/Kn7Za.png</a>
BarkMoreover 13 years ago
Although Instagram promised a brand-spankin’ new Instagram shirt if you complete the challenge correctly, they are only sending out stickers.<p>I hope they are not another Zynga :).
zx2c4over 13 years ago
It works! Here's a demo: <a href="http://www.youtube.com/watch?v=hILm9oojA48" rel="nofollow">http://www.youtube.com/watch?v=hILm9oojA48</a>
评论 #3233177 未加载
vidossover 13 years ago
Did anyone manage to match the 12th shred next to 6th ? (zero index). That white and black building is really messing it up.
评论 #3232974 未加载
dasil003over 13 years ago
Some of those Instagram filters look like they make the job easier.
st3fanover 13 years ago
Doesn't DARPA have a similar challange?
razzajover 13 years ago
in the sample they provided shreds seem to be 25 pix and not 32
评论 #3228531 未加载
wekaover 13 years ago
and this is why I need to start learning python.........