Page 1 of 2

### Permanent Programming#7

Posted: Tue Apr 29, 2008 12:00 am
Sorry about the other one I posted,
when I typed in my question and pressed submit, it
told me that I couldn't post again so soon.

My question is how could I actually know where to
move each line of the image?

I'm thinking it has to be something along the lines of
lining up the pixels of a certain color on either side of
the text, but I'm not positive.

### Re: Permanent Programming#7

Posted: Wed Apr 30, 2008 6:11 pm
Think about different sorting algorithms.

### Re: Permanent Programming#7

Posted: Thu May 01, 2008 5:37 am
There are several ways of solving this. It'd be a bit pointless if you were told how to work out where to move each line, since that's most of the challenge. evinyatar (the person who coded the new version) solved it a completely different way to me. Before you start coding, think "how will I tell if I've unscrambled it" then start thinking up an algorithm.

### PHP

Posted: Sun Jun 22, 2008 6:03 am
i am getting the image ,but not so clear to make out!
What algo Should i use?I use the first half set of pixels in each row SUM
Here is the source:Removed
EDT:
I Tried using another algo:get the RGB value of each pixels of the row and so the total sum of the R ,G,B values.Now do a % calculation of which one has the most value of R or G, or B,then arrange according to order.It worked fine with a downloaded image of unscrambled image.(i.e an unscrambled image will give back the same output without much working..)but it fails to give the correct output still now!

### Re: Permanent Programming#7

Posted: Sat Sep 20, 2008 6:06 pm
Hi,

thank you for this challenge, it was fun. It did take me a few days to figure it out how to solve it.

I think I coded a new solution for this (it kinda' reminds me on how ocr software work), so I'd like to add a hint: it's not even necessary to unscramble the image lines to solve this challenge.

Cheers,
kl223
(p.s. I did it using bash+sed. )

### Re: Permanent Programming#7

Posted: Tue Sep 30, 2008 5:57 am
it is suposed that i have to get better results than these?
http://img301.imageshack.us/my.php?image=screenshotua7.jpg
because I have tried a lot of diferent algorithms and still i only can read some characters....

### Re: Permanent Programming#7

Posted: Tue Sep 30, 2008 10:06 am
old_red_boots wrote:it is suposed that i have to get better results than these?
http://img301.imageshack.us/my.php?image=screenshotua7.jpg
because I have tried a lot of diferent algorithms and still i only can read some characters....

sure, there is way how to get the solution clear like this (3 random pictures):

### Re: Permanent Programming#7

Posted: Wed Oct 01, 2008 6:14 am
pfff i have to work more on this . I supose i'm ordering the wrong data, however, i don't think i will get such good results as yours

### Re: Permanent Programming#7

Posted: Thu Oct 09, 2008 8:30 pm
I'm really curious how you guys managed to get it that clear like that. At first I tried depending on the background, looping through each line, and for each one, selecting the one below it which had the lowest average difference in R, G, and B values for each pixel compared to the ones directly below it. That didn't work at all, it just seems like the background is far too blurred to be of any use like that.

What I eventually ended up doing was filtering out all the lines for each of the two "words", and processing each individually, looking for the line that kept each of the characters the most continuous. This worked well enough that I could tell what the letters said, except there was know way of knowing which was supposed to be first and which was second, so there was only a 50% chance of getting it right.

### Re: Permanent Programming#7

Posted: Sat Oct 18, 2008 5:32 am
The difficulty rating of this level is "hard" and maybe this is the reason why you are finding complicated patterns and relations between rows in that picture. In fact, it should be like medium because when I compare programming 3 with this one, 3th level is more harder (and prog3 is like medium, not hard. That's bullshit ). You need realized, that if you want sort lines of this pictures, you will need find something what is unique for each row. (the background do them unique too, therefore you shouldn't ignore it)
I'm sure there is another way how to solve it too and maybe the algorithm based on sorting which I used is not the best, but it works in 90% of pictures.