From: foek -at fajalobi.ricardis.tudelft.nl (F.Chin-Joe) Subject: Mitsubishi DJ-1000 / Umax Photorun To: eichin@thok.org Date: Sun, 9 Apr 2000 16:42:47 +0200 (CEST) Hi Mark, I've just read youre over 1-year old posting on the gdevel mailing list about the dj-1000/photorun camera. -------------- | Do you know a way to convert the dat files without using the | combination of wine and the windows program? | | (I've patched "dj1000.exe" to create 504x378 images by default) -------------- A long time ago I also examined the DAT files and wrote some test programs. The CCD used is an Sanyo LC9997M ccd (pdf can be found on the web). CCD layout: ACACACACAC... DEDEDEDEDE... ACACAC....... DEDE......... with 4 color filters A,B,C and D. A = Cyan + White C = Yellow + Green D = Cyan + Green E = Yellow + White The pdf contains the following formula's R = E-D B = A-C G = (C+D) / 2 (I've also seen an other set of formula's which have nearly equal results). The windows software does some serious "white balancing" and interpolation (using the shutterspeed and amplification values). This is the hard part, where I gave up after a while :-( greets, Foek --------- My file about the camera -------- Camera: F2.8 f=5.4 mm (63.51mm for 35mm equivalence) sensor dimension = 2.94 x 2.21 mm (3.678 mm diag) (35mm = 24x36mm, diag=42.26mm) HFOV = 31.65 deg VFOV = 21.40 deg sensor= sanyo LC9997M cmos CCD shutter speed = 1/60 to 1/15000 s ------------------ filename = MDSCxxxx.DAT filesize = 128 kb (131072 bytes) file contains the ccd data in 256 rows of each 512 bytes, giving an 512x256 image each row contains optically black pixels at the end (6 to 8 ?) my camera had 6 "00" pixels and 1 not totally black pixel (value < 10) row 247 and 248 almost optically black ( value < 10) row 249 till 256 are black (00), except for row 252 row 252 (offset 0x1f600) contains some config bytes, inserted by the Umax camera into the ccd-value-array ---------- config data bytes settings & id bytes: these are in the optical-black area of the CCD 0x1f000 - 0x1ffff = optically black at bottom of picture (DAT-file) base = 128512 (0x1f600) (line 250, zero based) byte# base+0:12 0-3 = signature = c4 b2 e3 22 4-7 = camera version = 00 01 00 01 (= 01.01) 8 = constant byte 01 9 = amplification-factor 10 = shutter speed (LSB) 11 = shutter speed (MSB) 12 = unknown: light with current ampl&shutter, average ?? camera logic: step 1 - choose shutter speed for use with minimum amplification (max S/N) step 2.1 - if required shutter speed is within range, use it 2.2 if not: use slowest shutter speed available and increase amplification conclusion camera uses one of the following: min-ampl with different shutter speeds (enough light) slowest-shutter-speed with different amplification (not enough light, ampl needed) --------------------------------- amplifier: 0xE6(230) (lowest ampl) with all but slowest shutter speeds minimum - 0xE6 (230) (enough light, shutter used) maximum - 0x36 (54 ) ("night vision", slowest shutter) (factor = 230/54 = 4.26) values seen (hex): # 0x with 0x0e 0x01 as shutter speed 51 36 1 43 3 48 1 4f 4 57 2 5a 3 5c 3 5f 4 61 4 66 1 72 4 75 2 78 2 7b 3 80 3 88 1 8c 1 9a 2 c0 1 cd 1 e6 --------------------------------- shutter speeds: slowest : 0x010E (270) (dark - not enough light, amplifier used) fastest : 0x0008 (8) (light, lowest amplification) (factor = 270/8 = 33.75) ?? linear with shutter-open-time ?? values seen (hex) # 0x (with ampl = 0xE6) 2 0008 1 0009 1 000a 2 000d 2 0010 7 0011 10 0012 3 0014 4 0016 1 0017 1 0018 5 0019 6 001a 3 001b 3 001c 3 001d 7 001e 1 001f 3 0021 1 0025 2 002a 2 002e 2 0039 5 003c 1 003f 1 0042 1 0045 3 0049 1 004d 1 0051 7 0055 4 0059 1 005e 1 0073 1 007a 4 0080 1 0096 2 00b0 1 00f5 1 0100 1 010e --------------------------------- unknown base+12: values seen # val 7 0 9 1 4 2 3 3 1 4 2 5 2 6 1 7 1 8 4 9 3 a 2 b 1 c 1 d 2 e 2 10 4 11 1 12 8 14 16 15 37 16 27 17 10 18 3 19 6 1a 8 1b 3 1c 5 1d 5 1e 5 1f 6 20 5 21 6 22 1 23 1 24 1 26 2 29 1 2a 1 2d 1 36