Programming mission 7

Put your programming skills to the test in these challenges.

Programming mission 7

Post by cowboyecosse on Fri Dec 16, 2011 6:32 am
([msg=63317]see Programming mission 7[/msg])

Hi all, I've spent way too much of my life on this one now. I've written a bunch of different "sorting" and compareTo style comparisons and I've exhausted my train of thought. Annoyingly I'm having to plead for a bit of guidance.

So far I can identify the rows of the image containing the text and can filter them out / remove the background / select each "word" on its own etc etc. I just can't seem to work out the correct maths to be applied to the image, either in it's entirety(as I'm sure is required) or just on the lines with the relevant data(so I can see the words during testing). I can kinda work out what some of the letters are supposed to be by seeing which pixels are where, an F and an L for example are easy to spot using only a human brain, I can't get how to re-jig those lines programatically so that they don't require brain processing!

So what I'm asking for is a poke in the right direction. Some online page I should perhaps read up on or some mathematical function I should take a look at.

I'm using HTML canvas elements and javascript, no frameworks, for this one by way of a browser userscript. It was effective and fast for the morse code one so figured I'd try it out here too, I haven't seen any mention of anyone else using this method either. It also has the advantage of not needing to bother cURLing in from somewhere else! ;oP

Image Image
New User
New User
Posts: 2
Joined: Mon Sep 28, 2009 9:33 am
Blog: View Blog (0)

Re: Programming mission 7

Post by QtDevl on Fri Jan 20, 2012 5:35 am
([msg=63787]see Re: Programming mission 7[/msg])

Unfortunately i am stuck like you.
First thing i tried was analyzing the whole image and finding same color pixels and putting them together.,but letters came out pretty bad,like an F coming out like a block

Then i tried changing algo,by analizing 9x9 pixels, weighting pixels ,giving more weight to the pixels that form the letters, and then averaging results ,it gave better results,but still nothing good:

And last i did the same as you,first removed the background then found same color pixel rows and put them together:

Now i would like to know how to reconstruct the letters or what to do..I heard from people that completed it that you should order the rows by analizing the pixels they have in common with the next row..but i have yet to implement that

I just managed to finish can or not use the background as long as you know the letter colors and decide based on that..The only thing i can say is: seeing the font, to form a letter a pixel from a row MUST be attached to the other right?what does that say?
this was my result btw:
If freedom is outlawed, only outlaws will have freedom...
New User
New User
Posts: 40
Joined: Sat May 17, 2008 3:50 pm
Location: my own world
Blog: View Blog (0)

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests