iRob Feeder in Action (Video)

Finally! PROFACTOR (the company I work for) has decided to get a youtube account and upload some videos. Best of all, this gives me a chance to show off a bit of my (our) work ;)

iRob Feeder is a solution for equipping of industry facilities. We can recognize the 3D position of different pices, grasp it, put it wherever you want them, and all of this quickly. Actually, the whole thing is a bit more than that, since it is possible to reuse components from it. We have a nice demonstrator for very fast object recognition moving along on a conveyer belt.

Here you can see it in action:

I am mostly involved in the algorithm development on the object recognition side. We have put quite some effort into making it fast: depending on the kind of object, we can have a reliable recognition in as low as 0.1 second on a standard desktop PC.

Hopefully Profactor will post some more videos about this in the near future.

PS: The article here are my personal opinions and do not necessarily reflect the position of my employee.

Online Password Encrypter for Apache

Apache uses (among other hashes) SHA-1 keys for encryption in the .htpasswd. I administer a subversion server, and from time to time I have to add new external users to the system. This is usually rather cumbersome because there is no easy way to get to their encrypted password.

Thats why I have created The Online Password Encrypter. Here users can enter their desired username and password, and the encrypted key is automatically generated online, without transmitting anything to any server.

Here is an iframe of the file. Click here for full screen.

The Online Password Encrypter is just one single HTML page, it does not depend on any other files. So it is easy to download it, modify and send it around. Feel free do whatever you want with it.

Have fun,
Martin

Scientific Approach to Green Tea Preparation

A few months ago I seem to have become a green tea advocat, since I have realized that it is probably the most healthy beverage ever invented (including water).

The enormous study “Green Tea Consumption and Mortality Due to Cardiovascular Disease, Cancer, and All Causes in Japan” took 11 years with over 40.000 participants, and got the following result:

Green Tea Benefits in Woman

Green Tea Benefits in Men

On my quest for the perfect cup of tea, I have looked for scientific analysis and have found the enlightening paper “Factors Affecting the Caffeine and Polyphenol Contents of Black and Green Tea Infusions“. Here are the most important findings of it:

How to get the most out of a tea bag. The more extracted solids / catechins, the better.

Brewing

Teabags vs. loose leafes

Leafe size / packing

CONCLUSION

Java Challenge – The Mysterious Method Wrapper

Here is the challenge. Create some Java code so that this JUnit test works:

public class EachMethodTest {

    /**
     * Simple test object.
     */
    public static class Fu {
        @Callable
        public int fu() {
            return 1;
        }

        @Callable
        public int bar() {
            return 2;
        }
    }

    /**
     * Call all methods that have the @Callable annotation.
     * The MethodsToProc works for ANY type of object, not just Fu.
     */
    @Test
    public void eachMethodTest() {
        final Fu fu = new Fu();

        int sum = 0;
        for (final Proc<Integer> c : new MethodsToProc<Integer>(fu)) {
            sum += c.call();
        }

        Assert.assertEquals(3, sum);
    }
}

Basically what I want to do is be able to automatically create wrappers for some object, so that each method with the @Callable can be called with a single common wrapper interface call(). It should be possible to specify the return type via Generics, and the ctor of MethodsToProc should be able to take any type of object.

See if you can do a general solution without cheating! The simpler, the better. You can post code snippets e.g. at snipit or gist. Have fun!

Beautiful Font Hinting in Ubuntu 8.10 and 9.04

Even though I have an LCD monitor, I always have the subpixel hinting switched off because it is just painfully ugly to my eyes. Even when hinting is switched to maximum, the fonts are quite blurry (if you don’t believe me, type xmag and take a screenshot of your font. You can see red and blue linese everywhere). My eyes hurt when I see this.

Thanks to Johan Kivinemi I have just found out how to bring back the excellent legacy subpixel hinting engine. This has a much more crisp hinting, and uses subpixels only where it really is an improvement:

Just open these files in your home directory, and copy the content into them:

~/.fonts.conf

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <match target="font">
    <edit name="antialias" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
      <const>hintfull</const>
    </edit>
    <edit name="lcdfilter" mode="assign">
      <const>lcdlegacy</const>
    </edit>
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
  </match>
</fontconfig>

~/.Xresources

Xft.antialias:  true
Xft.hinting:    true
Xft.hintstyle:  hintfull
Xft.lcdfilter:  lcdlegacy
Xft.rgba:       rgb

This should work in Ubuntu 8.04, 8.10, and 9.04 too, and makes all fonts much more crisp. Of course, your mileage may vary.

UPDATE: Comparison Screenshots

As promised on reddit, I got back from an awesome snowboard trip so I am able to put up extensive comparison screenshots of the two subpixel hinting engines. Move your mouse over the following images to see the differences. Watch especially out for letters like “m” where the spacing between the lines is very small. You might have to wait a bit for the image to load.

I have used all of the most important fonts that I usually use, and just for fun I have added “Dijkstra”, which just looks cool.

Sans Fonts

Mouse to see the same fonts with the legacy hinter.

 

Mono Fonts

Mouse to see the same fonts with the legacy hinter.

 

Zoomed Comparison Screenhots

Here is an excerpt with 400% magnifications. Mouse over the pictures to see the legacy hinter.

Zoomed Sans

 

Zoomed Mono

 

← Previous PageNext Page →