

Ask YC: How to Dazzle? - ideamonk
http://ideamonk.blogspot.com/2008/08/trying-to-dazzle.html
eversince I have seen http://tinyurl.com/6ddzjh , I have always wanted to automate creation of such images. such an attempt is http://ideamonk.blogspot.com/2008/08/trying-to-dazzle.html
But I am wondering how to perfect it. Right now it's just a rand() doing the magic. But there is something more to the original art. It seems that "the edges have a nice particle effect, the size of squares vary according to either luminance or similarity of neighbor area... and there might be a lot more to watch out! Boxes don't overlap much in the original work, and smaller tiny boxes play very significant role in giving life to the guitar kid..."<p>So, fellow hackers please help this kid as to what he needs to know in image processing to be able to do the trick. Like how to detect uniform areas in an image... how to detect edges. For example if i have a photo of a shirt, I wish to detect where it is crumpled where it is plain. If I am able to do this, I will put big squares at plain areas and small ones at non uniform areas. I think that might reproduce the effect!
Thanks!
======
ideamonk
eversince I have seen <http://tinyurl.com/6ddzjh> , I have always wanted to
automate creation of such images. such an attempt is
<http://ideamonk.blogspot.com/2008/08/trying-to-dazzle.html> But I am
wondering how to perfect it. Right now it's just a rand() doing the magic. But
there is something more to the original art. It seems that "the edges have a
nice particle effect, the size of squares vary according to either luminance
or similarity of neighbor area... and there might be a lot more to watch out!
Boxes don't overlap much in the original work, and smaller tiny boxes play
very significant role in giving life to the guitar kid..."

So, fellow hackers please help this kid as to what he needs to know in image
processing to be able to do the trick. Like how to detect uniform areas in an
image... how to detect edges. For example if i have a photo of a shirt, I wish
to detect where it is crumpled where it is plain. If I am able to do this, I
will put big squares at plain areas and small ones at non uniform areas. I
think that might reproduce the effect! Thanks!

~~~
dandelany
In regards to the size, it looks to me like it varies according to similarity
of neighboring area. This makes much more sense than luminance, since it
allows the more complex areas of the images to be represented by more
"pixels".

~~~
ideamonk
Yes after trying out luminance style plotting, I'm sure its based on
uniformity!

How about taking a point(p,q) and the area of 3x3 around it,

find the average of luminance in this 3x3 block,

store it as a0 and

now increase the size of 3x3 square to 4x4, find average of luminance, lets
call it a1,

now if |a1-a0|<threshold, we say the area is uniform! and repeat steps till
size<size_threshold

Will this work? or instead of averaging luminance, I should average R,G,B
separately and match against threshhold to increase the size(to be more
strict)

Have got exam tomorrow, will work more on these insights as soon as I finish
preparing my data sctuctures and discrete maths syllabus. thanks :), (psst!
can't get my head away from these new ideas)

------
omouse
I'm curious, why aren't you trying to use the GIMP to do this? It can be
scripted with Scheme/Script-Fu and Python, it seems that would be easier than
using C++ and Allegro.

Cool stuff in any case :D

~~~
ideamonk
It will be less _open_ in nature if I try doing in Script-Fu. Firstly I will
have to understand how it works... then it will become something which only
GIMP users can use, and besides... I just want to do from basics... once done
;) I will surely make it for GIMP and Matlab (psst.. I have no idea of matlab
and know very little python ;) )

yeah! GIMP will give support for loads of image formats ;) But nothing new to
explore before my exams get over :X

------
rewind
Here is another option:

<http://mybedazzler.com/>

~~~
ideamonk
what the hell is this?

------
maxklein
Split the picture into grids of 10x10. Take the color in that grid and find
the average color of all the colors in there. Calculate the color distance to
the box beside it. Do same for luminance.

------
alex_c
It's been a while since my multimedia class (and I was never that good at it
:D) but the effect is reminiscent of JPEG compression. Might be worth looking
into that algorithm.

~~~
ideamonk
JPEG compression is producing pixelation type effects... I think it is bigger
than this. <http://ideamonk.blogspot.com/2008/08/dazzle-hard.html>

~~~
alex_c
Not as very low quality settings:

<http://cobweb.ecn.purdue.edu/~ace/jpeg-tut/pix/imagec3.jpg>

------
herdrick
This is great.

