pmeerw's blog

Sat, 31 May 2008

CHDK on A720

The Powershot A720 is a bit different compared to the IXUS 70; it runs on Canon's own DRYOS (instead of Windriver's VxWorks), it runs on regular AAA batteries, and it loads the CHDK firmware only on boot. So one has to make the SD card bootable in order that the DISKBOOT.BIN file get loaded.

And the image sensor seems to be of higher quality.

posted at: 18:46 | path: /projects/CHDK | permanent link

Thu, 29 May 2008

Another camera: Canon Powershot A720 IS

Got another Canon camera: Canon Powershot A720 IS. Has 8 MP and IS (image stabilization). Hopefully, it is CHDK-flashable.

posted at: 21:48 | path: /projects/CHDK | permanent link

Watermarking on Canon IXUS 70

Got first results with simple watermarking in camera firmware, see the seminar presentation (May 28, Univ. Salzburg).

Main problem is speed currently: just unpacking 9 MB of sensor data takes over 2 sec. The sensor data is stored 10 bits/pixel (packed).

p_row_buf = p_out_row_buf = (uint16 *) &buf_pos[PIXTOBYTES(RAW_LEFT_MAR$
        out_bit_buf = bit_buf = 0;

        for (c = 0; c < IMG_WIDTH - 8; c += 8) {
            bit_buf = *p_row_buf++;
            out_bit_buf = bit_buf >> 6;

            bit_buf = (bit_buf << 16) + *p_row_buf++;
            pixel = bit_buf >> 12 & 0x3ff; // process pixel
            WATERMARK_PIXEL(pixel);
            out_bit_buf = (out_bit_buf << 10) + pixel;
            *p_out_row_buf++ = out_bit_buf >> 4;

            out_bit_buf = (out_bit_buf << 10) + (bit_buf >> 2 & 0x3ff);
	    //... and so on, repeats after 8 pixels
        }
The ARM assembly language can handle shifts very efficiently; a mov instrution can have a third operand specifying an implicit shift! The following GCC-generated assembler code corresponds to the first statements above. Note the asr and asl -- shift right, shift left.
        ldrh    r3, [sl], #2
        mov     r6, r7, asr #6
        ldr     r5, [r2, #12]
        add     r7, r3, r7, asl #16
        tst     r9, r1
        mov     r3, r7, asr #12
        mov     r4, r3, asl #22

posted at: 21:30 | path: /projects/CHDK | permanent link

Thu, 15 May 2008

Embedded watermarking, first steps

The hook which writes the raw image is called before the JPEG file is created, thus enabling watermarking in the raw image domain. Further, the raw image can be decoded with eg. dcraw. Straightforward additive spread-spectrum embedding is detectable in the demosaicked image -- haven't tried the JPEG yet.

posted at: 17:30 | path: /projects/CHDK | permanent link

Sat, 12 Apr 2008

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

Made with PyBlosxom