Live data from Hacker News

Image unshredding using a TSP solver

github.com

31–40 of 56 posts

Re: Image unshredding using a TSP solver

#31
post #8

I'm really surprised by double-shuffling can actually be solved. https://github.com/robinhouston/image-unshredding/#double-sh... It looks very unintuitive.

I wouldn't be surprised if a complete shuffling could be solved — i.e., every pixel is given a new random location. (Source: I do research involving stuff like this.)

Re: Image unshredding using a TSP solver

#32

Earlier quoted context omitted.

Isn't the definition of insanity something about doing the same thing and expecting different results.

Funny, I thought more people would have gotten what I was saying here.

You're forgetting HN is serious discussion for serious people or something like that. Humour in a substantive post seems fine, but usually any humour on its own doesn't fare well here.

Re: Image unshredding using a TSP solver

#33

Now I'd like to see this run on a more realisticly shredded image. A real paper shredder creates strips that are more than one pixel thick are not straight on (I.e. the pixels don't necessarily align with the cuts) and possibly have cutting defects such as ragged edges or nicks.

The big difference is that this actually preserves a lot of structure, due to being oriented to columns (and/or rows): a real shredder produces chads without any of that, and would presumably be a much harder problem to solve.

Re: Image unshredding using a TSP solver

#34
post #8

I'm really surprised by double-shuffling can actually be solved. https://github.com/robinhouston/image-unshredding/#double-sh... It looks very unintuitive.

I wouldn't be surprised if a complete shuffling could be solved — i.e., every pixel is given a new random location. (Source: I do research involving stuff like this.)

How could that be possible? Wouldn't that literally throw away everything but the distribution of colors in the image?

Re: Image unshredding using a TSP solver

#35

I guess this could be used to reassemble images corrupted in other ways (other than shuffling). I have a disk image of jpegs and other data I'd like recovered. It was Windows formatted a few different ways but any blocks that format didn't touch are still there. There's other data there of course as well, so there would be lot of blocks that aren't part of images so would need to be ignored when reassembling the imag…

I'd guess not, actually. In this a lot of the information is there. Just in a different order. Corrupting data is a different problem.

That said, I'm sure I could be surprised by what is possible.

Re: Image unshredding using a TSP solver

#37
post #12
post #6

Earlier quoted context omitted.

the important bit is you have to unscramble in reverse order of the scrambling. Unscrambling the columns and then unscrambling the rows would lead to smooth gibberish.

No. Column scrambling doesn't affect row ordering and row scrambling doesn't affect column ordering. They are literally orthogonal. You can't tell, from a scrambled matrix, whether the rows or the columns were scrambled first. Here's a more explicit breakdown: (0,0) (1,0) (2,0) (0,1) (1,1) (2,1) (0,2) (1,2) (2,2) Column scrambling: swap 1&2: (0,0) (2,0) (1,0) (0,1) (2,1) (1,1) (0,2) (2,2) (1,2) Now row scrambling: sw…

Thanks! my mental model was incorrect.

Re: Image unshredding using a TSP solver

#38
post #34

Earlier quoted context omitted.

I wouldn't be surprised if a complete shuffling could be solved — i.e., every pixel is given a new random location. (Source: I do research involving stuff like this.)

How could that be possible? Wouldn't that literally throw away everything but the distribution of colors in the image?

Pretty much, but if you have some good knowledge of what the distributions of neighboring pixels must look like (e.g. the l1 norm error used here wouldn't be enough, I believe) then I think you'd be surprised at the outcome.

Re: Image unshredding using a TSP solver

#39
post #34

Earlier quoted context omitted.

I wouldn't be surprised if a complete shuffling could be solved — i.e., every pixel is given a new random location. (Source: I do research involving stuff like this.)

How could that be possible? Wouldn't that literally throw away everything but the distribution of colors in the image?

You could constrain it so the pixels are only shuffled within a set distance of their origin. Still sounds very hard to solve, but would leave a lot more information.
Post reply on HN