Workaround for pkg-config - ecplise CDT Problem
September 22, 2007 on 9:17 pm | In english, linux, open source, python, technic | 1 CommentIn the last days I started to learn a bit more GTK and GDK development. I like eclipse very much, but the new CDT version 4.0 have still no real feature to use the pkg-config tool from the freedesktop organisation. Thats makes me a bit nervous. In the first two small projects I copied all the include and lib pathes from the pkg-config output.
Example output:
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
You know, that is not really funny. Some evenings ago I developed a small python script to solve this problem a bit.
The biggest problem is that eclipse creates the important XML node after configuring a extra directory or/and library. After you add for example a directory called “aaa” and an library called “aaa” you can close eclipse and run the python script.
pkg2eclpise.py -p <path to projectpath> -c <pkg-config params>
e.g.:
pkg2eclipse.py -p FirstGTKWindow/ -c “gtk-2.0 –cflags –libs”
After running the script, restart eclipse and you see all the directorys and librarys in your manipulated project. You can rerun the script again and again. The script avoid duplicated entrys
Have fun with the great CDT 4.0 and the nice fast code completion feature.
Seam Carving
September 14, 2007 on 8:31 pm | In english, hacking, open source, photography, science, technic | No CommentsAbout 3 weeks ago I saw the amazing Siggraph 2007 film from Dr. Ariel Shamir on YouTube. Immediately I downloaded the document from Shamirs webside. This takes about 5 hours download time for an about 20 MB PDF file. A lot of people was interested in Shamirs work at this time.
After reading the paper I understand how Shamir realized his idea. My big problem was my ignorance about image energy functions For example, history of Gradienst (HoG) is until now a unknown algorithm for me. After some days I saw the solution from Swieskowski in the net. He explained that he using a simple colour difference algorithm for the energy picture. That was something I learned in my study. Perfect, lets start the experiment to develop a small command line tool to shrunk the width of pictures. After some hours I generate the first shrunken pictures.

The Emirates Towers in Dubai. A really easy example. Because the shrunk algorithm just needs to remove the blue sky space between the towers. After that I tried this photo shot from the Colosseum in Roma

After that I realized that I am on the right way. Lets try a painting.

Not bad, but here you see a problem. The face on the right picture is distorted. Dr. Shamir found a solution for that problem. He creates a mask for important areas . So I tried to do the same. I used GIMP to create the stencil picture.

After rerun my small tool with the stencil picture the result is a shrunken picture without face distortion.

Another example with stencil.

The first picture is the origin, the second is shrunken by 20 pixel without a stencil picture. You see the problem with the left leg of the Fairy Dust at Chaos Communication Camp 2007. The third picture is also shrunken by 20 pixel put with the stencil picture. The fourth picture is the stencil picture.
Shamirs idea is genius and amazing easy to practise. My small hacked solution was done with C# under Linux, it took me about 3 evenings to develop this small solution. Bad is, that it is far away from realtime resizing.
Perhaps, I will start in some days a new GIMP PlugIn. Why not an open source content-aware image resizing plugin for GIMP. Shamir is currently doing the same for Adobe.
But first I need to learn more about image energy functions. Perhaps somebody knows some good documents about that. Especial I am very interested in the Histogram of Gradients and the e1 image energy function algorithm.
And now my small solution.
I put some of my experiments on Flickr tagged with seamcarvingopen. Perhaps some other users can upload there experience with my small tool. Good and bad examples are welcome. .
Chaos Communication Camp 2007
August 13, 2007 on 6:48 pm | In art, berlin, english, hacking, science, travel | No Comments
The CCC presents every 4 years a chaos hacker camp. This one was the best ever. The place at Finowfurt (near Berlin) was amazing. The lectures, hackcenter and the art and beauty area was this time in different old USSR airplane bunkers. That was an fantastic feeling. The only bad thing was the weather on some days. Heavy rain showers that generates big deep slops. One time this was directly used for a football match in the mire. The rest was perfect.
OK, except the showers and the toilets. OK, 2 stolen laptops. One accident with a bike and an old MIG fighter ( Normaly the place is used as an museum for old soviet union fighter planes. ), this is a crazy story that you can tell your children one day.
Very interesting and nice lectures in the shelter bar and the shelter foo took place. Every night was party until the hack of dawn.

Dan Kaminsky’s promotion at the Powerpoint Karaoke.

A nice weatherballon experiment.

Mitch and his amazing brain machine lecture.


In fairy dust we trust. The very very nice Art&Beauty area.
My First Silverlight Application
July 25, 2007 on 8:49 pm | In english, silverlight | No CommentsSo now I have some expericence with with Microsofts Silverlight. Nice to programm.

It is a small 3D Vector Balls Animation. I saw something like that the first time in an old Amiga Red Sector Demo.



