pmeerw's blog

May 2008

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

SecureCode - WTF?

paylife (Mastercard) teilt per 20. Mai 2008 mit, dass die Umsatzabfrage light nur mehr bis Ende des Jahres moeglich ist, fuer das neue Portal ist eine Anmeldung fuer SecureCode (ein neues, 'sicheres' Zahlungssystem) notwendig; mit SecureCode koennen nicht nur die Umsaetze online abgefragt werden, sondern eben auch bezahlt werden (per PIN) ich halte die 'besonderen Geschaeftsbedingungen (BGB)' fuer SecureCode in einigen Punkten fuer wenig verstaendlich, praxisfern und nicht konsumentenfreundlich.

Leider gibt es in Österreich wenig Alternativen zu den Produkten von Mastercard/Visa.

Besonders hat es mir der Punkte 3.2 der BGB (Link oben) angetan: " 3.2 Die Regelungen des Punktes 9.1. der AGB betreffend die PIN sind vom KI auf MasterCard SecureCode und Benutzername vollinhaltlich anzuwenden. Der KI ist daher verpflichtet, Kartennummer, Benutzernamen und MasterCard SecureCode nur dann einzugeben, wenn er sich vorher vergewissert hat, dass bei der Eingabe die lokale, räumliche, technische und persönliche Umgebung so beschaffen ist, dass kein Dritter in der Lage ist, Kartennummer, Benutzername und/oder MasterCard SecureCode oder andere transaktionsrelevanten Daten auszuspähen. ..."

Meines Erachtens ist es unmöglich, den SecureCode 'sicher' einzugeben -- wer sitzt schon in einem Raum der keine elektromagnetische Abstrahlung entweichen laesst (Tempest-Attacke), wenn er seine Kreditkartenumsaetze prueft? :-)

Ich halte es fuer vermessen, eine PIN-Eingabe als "sicheres System" (¨brigens Punkt 4.2 der AGB) zu bezeichnen.

posted at: 21:36 | path: /rant | 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

Cython

Cython is a language that makes writing C extensions for the Python language as easy as Python itself. Cython is based on the well-known Pyrex, but supports more cutting edge functionality and optimizations.

cython does list comprehension, += works, etc. I like cython. I have obtained a 25x speedup with Pyrex for motion-compensated temporal filtering (MCTF).

posted at: 21:14 | path: /programming | 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

Ranger/Rover camp 'Grenzen-los 2008'

Was at Ranger/Rover scout camp, Grenzen-los 2008 in Vienna (Donauinsel) from May 10 - 12. Plenty of sunshine, too much Ottakinger.
Photos are here.

Next year's camp, Gigagampfa, is in Vorarlberg. Let's see...

posted at: 17:21 | path: /fun/scouting | permanent link

Made with PyBlosxom