A number of people have asked me where they can get a plug for this camera. I don't know where else than Polaroid you could get a replacement plug, but here is how to make one. You need a serial plug (perhaps from a broken mouse) and a stereo plug (perhaps from a busted set of headphones). Here is a simple sketch of how to connect the wires. |
Polaroid Digital 320 Camera <--------what I need to select
Polaroid Fun!Flash Digital Camera
Polaroid PDC 640 or PDC 1000
Polaroid PDC700 Digital Camera
Here is a 48x48 blowup of one of the flawed BMP files.
The BMP files that the Windows software makes is rather blocky (16x16 blocks). Because of these blocks, there is more detail in red than green than blue. If we can adjust for this, the pictures will look better than the Windows software makes. There is also a problem of those annoying little dots. I imagine those could be smoothed out by about any graphics program. |
Using Portmon, me and the other people on this project have discovered
some interesting things about our cameras.
The 320 camera seems to have a sending buffer of 2000 bytes.
I am sure the 640 cameras have different sizes for their sending buffers.
When asked for ID, this 320 of mine returns "00 XIRLINK 02 01 03 00
16 C0".
What exactly that means, I don't know (yet).
Without knowing what it all means, I figured this
much out.
Here is a bit
of C sourcecode to get the raw picture data out of the camera and here
is my backup copy.
The program was written by Peter Desnoyers.
It does not make a jpeg file, but it might later if we use this new
knowledge of ours in it.
Here is the new knowledge that Karl Grill gave us mixed in with some things I figured out:
The data at offset 163 (0xA3) should be changed to 00 78 01 40 for the
320, or to 00 f0 02 80 for the 640se.
That data at offset 163 has to do with the width and height of the
image.
The data at offset 169 (0xA9) should be changed to 21 00 02 11 00 03
11 00 to set the proper subsampling rates and to change the quantization
tables (the latter may not be necessary).
Although it may seem odd, I found that 11 00 02 21 00 03 11 00 works
alot better for the 320.
The 21 is when doing 2x1,1x1,1x1 subsampling and should be changed
to 22 for 2x2 or 11 for 1x1.
The data at offset 616 (0x268) should be changed to 02 00 03 00 to
set the proper Huffman tables.
Just chop off everything but the first 623 bytes (the header).
Now, take this 623 Byte header, and concatenate it with the raw data,
from which the first 6 bytes have been chopped off.
The result is a jpg file which is read by a viewer without complaint.
I used sample1.jpg
from http://www.2xtreme.net/dubious/photo/640se.html.
That is also what Karl Grill
did.
Here
is the header from sample1.jpg modified to fit the PDC 320 camera.
I imagine experimenting with headers from different jpeg files will
be done.
I wrote jpeg.txt to assist anyone trying to figure out how to make a better header.
If any of the information is wrong or you have something to add or clear up, email me.
I wrote dat2jpg.c
to make a jpeg file from the dat file that pdc320 shoots out.
Unfortunately, dat2jpg.c can't handle it when there is a comment in
the jpeg you give it for a header source.
Gimp for example, adds a comment to the images by default.
I wrote splitrgbdemo.sh
to help debug the colors of a jpeg file, but it seems like the resulting green layer from that is inverted.
Those should help anyone who wants to try patching different jpeg files
to get trial headers for use with the camera.
The left image is from the proper methods.
The middle image is from adding a patched header.
The right image is from patched header attempts and image manipulation.
Here is the
actual BMP file that came out of the PhotoMax software.
Karl Grill suggested that I start looking at the jpeg lib and see how
to use it so that perhaps I could take the raw data and decode it properly.
Sounds like a good idea to me. Anyone else want to do the same?
Home |