pmeerw's blog

Apr 2008

Sun, 27 Apr 2008

High dynamic range photography

There is a Linux program, qtpfsgui, which allows to create high dynamic range (HDR) image from a series of images with bracketed shutter speed. I'm using the CHDK firmware for my Canon IXUS 70.
Below is a series of shots of the Franziskanerkirche in Salzburg, in the middle is the tonemapped HDR image. Well, lacking a tripod, the result is poor.

A higher resolution image is here (1024x766, 78 KB).

posted at: 21:29 | path: /fun | permanent link

Sat, 26 Apr 2008

Trying Google App Engine

Had to try Google's App Engine, so here is my first project, imgal ( It's just a guestbook thingie with image upload capability (stored as blobs in the database).

App Engine uses Python Paste's WebOb to provide objects for HTTP requests and responses.

posted at: 17:18 | path: /programming | permanent link

Google BigTable

Some material on Google's BigTable

posted at: 15:30 | path: / | permanent link

Tue, 22 Apr 2008


Playing around with Karp-Rabin exact string search algorithm; did some assembler optimization -- the inner loop can be coded to use only registers. kr.c:

#define SHIFT 3
#define REHASH(a, b, h, m) ((((h) - ((a)<<(m))) << SHIFT) + (b))
#define OUTPUT(j) printf("%d\n", (j))

void KR(const char *pattern, int pattern_len, const char *text, int text_len) {
   int i;
   unsigned int hx, hy;

   /* Preprocessing */
   for (hy = hx = i = 0; i < pattern_len; ++i) {
      hx = ((hx<
kr_opt.s (loop only):
        mov     edi, DWORD PTR [ebp+16] /* text[i] pointer */
        lea     esi, [edi+eax] /* load text[i+pattern_len] pointer */
        mov     edx, DWORD PTR [ebp-32] /* load hy */
        jmp     .L7
        mov     ch, BYTE PTR [esi] /* get text[i+pattern_len] */
        inc     esi
        movzx   eax, BYTE PTR [edi] /* get text[i] */

        inc     edi
        dec     ebx /* i <= (text_len-pattern_len) */
        jz      .L8

        sal     eax, cl /* tmp = text[i] << shift */
        sub     edx, eax /* hy - tmp */
        movzx   eax, ch
        lea     edx, [eax+edx*8] /* hy = (hy << 3) + text[i+pattern_len]
        cmp     DWORD PTR [ebp-36], edx /* hx == hy */
        jne     .L6
The results against gcc 4.3.0, can this be improved?

posted at: 17:16 | path: /programming | permanent link

Sun, 20 Apr 2008

Fixing pyblosxom's OpenID stuff

Three things need fixes

posted at: 23:56 | path: /projects/OpenID | permanent link


test stuff here

posted at: 15:35 | path: / | permanent link

Wed, 16 Apr 2008

Turing complete?

A Universal Turing Machine in XSLT already exists, but... is CSS Turing-complete?

posted at: 18:54 | path: /fun | permanent link

Sun, 13 Apr 2008

Serving Mercurial repositories with lighttpd on OpenWrt

Sadly, Mercurial is not in OpenWrt yet; here is my lighttpd config (/etc/lighttpd.conf):

server.modules = (

# OpenWrt has troubles with more advanced backends (#2401) = "write"
# needed to store data of POST requests (#2224)
server.upload-dirs = ( "/tmp" )

static-file.exclude-extensions = ( ".cgi" )
cgi.assign = ( ".cgi" => "/usr/bin/python" )

# where hgwegdir.cgi resides
alias.url = ( "/cgi-bin/" => "/data/www-cgi/" )

# I have public and a private repositories
url.rewrite += ( "^/hg-priv([/?].*)?$" => "/cgi-bin/hgwebdir_priv.cgi$1" )
url.rewrite += ( "^/hg([/?].*)?$" => "/cgi-bin/hgwebdir.cgi$1" )

# require user/password for private repositories under /data/hg-priv
auth.debug = 0
auth.backend = "htdigest"
auth.backend.htdigest.userfile = "/data/hg-priv/.htdigest"
auth.require = ( "/cgi-bin/hgwebdir_priv.cgi" => (
    "method" => "digest",
    "realm" => "Private Mercurial repositories",
    "require" => "valid-user"))

# only require require user/password for push requests to public
# repositories under /data/hg
$HTTP["url"] =~ "^/cgi-bin/" {
    $HTTP["querystring"] =~ "cmd=unbundle" {
        auth.debug = 0
        auth.backend = "htdigest"
        auth.backend.htdigest.userfile = "/data/hg/.htdigest"
        auth.require = ( "/cgi-bin/hgwebdir.cgi" => (
            "method" => "digest",
            "realm" => "Mercurial repositories",
            "require" => "valid-user"))

$SERVER["socket"] == "nslu2:80" {

$SERVER["socket"] == "nslu2:443" {
  ssl.engine = "enable"
  ssl.pemfile = "/etc/ssl/server.pem"

And the hgweb.config configuration file (in /data/www-cgi/):

/data/hg/repos/ = /data/hg/repos/

motd = 

Repositories maintained by me

baseurl = /hg push_ssl = true

posted at: 21:49 | path: /projects/OpenWrt | permanent link

Sat, 12 Apr 2008

Trying OpenID

The OpenID setup for PyBlosxom is simple.
bjelli hat's schon immer gewusst :-)

posted at: 16:20 | path: /projects/OpenID | permanent link

South Park cartoon

... created with South Park Studio.

posted at: 15:51 | path: /fun | permanent link

Host USB working

With the supplied Nokia micro-USB cable and a female-to-female USB-A adapter it is possible to attach USB devices to the N810. usbcontrol allows to switch the USB controller to host mode, however, the kernel needs also to be fixed (requiring a kernel recompile which is easy, see here and here).

Some devices, such as the MA-620 Infrared Adapter (0x0df7:0x0620) just seem to suck too much power and the N810 collapses (I had to remove the battery to get it working again).

posted at: 15:29 | path: /projects/N810 | permanent link

CHDK firmware

Setting up the toolchain (arm-elf) and compiling CHDK is rather straightforward. Then just put the binaries on the SD card and boot the new firmware!

The firmware sports a tiny basic interpreter, eg. for bracketing and raw file mode. I have yet to find software for linux to support HDR

posted at: 15:15 | path: /projects/CHDK | permanent link

New camera: Canon IXUS 70

I got a new camera: Canon IXUS 70; one of the reasons was the CHDK project; an open-source effort to extend the firmware of DiGIC II and III based cameras.

The new camera is really tiny but seems a bit fragile, at least compared to my previous Canon IXUS v2.

posted at: 15:07 | path: /projects/CHDK | permanent link

ICME 2008

My paper Blind motion-compensated video watermarking got accepted at the 2008 IEEE International Conference on Multimedia & Expo, ICME '08.

posted at: 15:01 | path: /academic | permanent link

Made with PyBlosxom