Zbr's days.
May
Sun Mon Tue Wed Thu Fri Sat
   
10
   
2007
Months
May

About TODO Blog RSS Old blog Projects Gallery Notes

Thu, 10 May 2007

Solving captchas.


I've (I think so) a brilliant idea of how to solve simple (with text only) captcha problems on comupter.
I thoughts about how human does it and found, that people frequently decide meaning of some letters and words based not on absolute knowledge, but 'this looks like A' and so on.
Computer, from another side, does not have such tristate logic, it can only compare and decided equal or not.
So I want to create a trivial application, which will select a letters from the picture (just by having a threshold of the colour difference), scale it to proper size (known to application), rotate to get main axis of the letter be vertical and then find a difference between image's letter and database letters using some kind of the smallest square interpolation metrics. Database letter with the smallest difference will be a winner.

It is quite simple task, I wanted to complete it just to show my idea is right or wrong, nothing more, and I even started to read GTK2 tutorials to get my first gtk application to read images, but then I found that in my mixed Ubuntu-Debian setup I do not have gtk development package and it can not be installed because of some problems in dependencies.
Crap.

Did you read Goncharov's 'Oblomov'? He failed to start completely new life just because when standing from the bed his feet missed the shoes.
I feel myself the same now...

P.S. No, I'm not Oblomov, I installed gtk2 and devel libs on my backup server.
Likely I will not go to development shop today...
P.P.S. Crap, I forgot that backup server has different arch, but I have not gave up yet. Thinking...
P.P.P.S. Solved: I've installed xserver on backup server in addition to gtk2 devel libs and use ssh X forwarding. Backup server has plenty of space, so it should not be a problem.

/devel/captcha :: Link / Comments (0)


First captcha solving results.


Problem has not been solved easily. Only the simplest case works:



Captchas from real site ends up with wrong results:








Code includes minimal affine transformation to find the best match, but does not scale images yet, which is a major drawnback, which ends up with above results.
Note, that it is proof of concept code, so I manually cut symbols from real-life captcha images into per-symbol files.

/devel/captcha :: Link / Comments (0)


Kevent strikes back?


Xavier Nicollet has sent me LWN article about yet another round of discussions about event delivery mechanisms in kernel.
After Davide Libenzi started his signalfd/timerfd/*fd patchset after eventfs and kevent, there were quite a bit of discussion about it, and eventually something new called pollfs (I did not follow that threads, since I'm not subscribed to linux-kernel@) appeared and started to fight for the place under the sun. Andrew Morton highlighted that likely eventfs by Davide will be included into 2.6.22, but strange things started to appear here...
Ulrich Drepper, glibc land monarch, said that he opposes against eventfd and similar patchsets because of lack of functionality for high-performance servers (mainly because of absence of special-purpose ring buffer implemented in kevent, there are also words about kevent possibility to carry more information and other small bits) and wants something similar to kevent to go in. Davide seems to be opposed to add such functionality (and actually it is not that simple task with old poll design).
As before - there is no active discussion and support developers for Ulrich's positions, but there are no developers against it too, so likely nothing will be included into mainline in 2.6.22 round.

Frankly, I removed kevent git tree from my machine, but I have backups...
So, I do not know should I dust off kevent patchset for yet another round of (empty as I predict) discussion or just forget it completely.
Let's see if new patchsets will appear in a near future, I will follow LWN kernel line, if nothing will be changed/added I will have a talk with Andrew about needs for this step at all.
We will see...

/devel/kevent :: Link / Comments (0)


Wikipedia computer science logo.


Wikipedia computer science logo: fixing broken lamp algo

Author of this algo is not a hacker. Absolutely.
In hacker's mind there is no even remotely stage called 'buy new lamp' or 'drop the problem'.

/devel/other :: Link / Comments (0)


Appartments.


University of Minnesota study suggests that ceiling height may affect problem-solving skills.
According to study, high ceiling activates idea of freedom, while low ceiling more constrained, confined concepts are activated.
The concept of freedom promotes information processing that encourages greater variation in the kinds of thoughts one has, said Meyers-Levy, professor of marketing at the University of Minnesota. The concept of confinement promotes more detail-oriented processing.

I knew my idea of having higher ceiling in the working area of the room (where table is going to be installed) and lower hinged ceiling with dotty lights in the rest area was scientifically correct.
Btw, I started to install dotty lights in my ceiling.

Some notes on perfectionism.
Some times you start to change good for the best, you fix small details, you redo and redo something, which is good already just to achieve perfect state. You do it in every single detail, in every single invisible part. You continue until result is really perfect.
Well, that's not about me, but nevertheless I started yet another round of cleaning my hinged ceiling. This time it will be the last one. Likely today I will by the last portion of the colour, will paint selected bits of ceiling this weekend, which were filled with plaster yesterday, and finally complete this fucking ceiling.
You can not even remotely imagine amount of knowledge (and problems) I got during its installation.
But it will be completed.
Actually, it is completed already, it just does not know this yet.

/devel/flat :: Link / Comments (0)