Should I scan Slides, Negatives, Photos at 24-bit, 48-bit, or some other color depth? 2400 or 4800 p

D

Don

Re-coding
for perceptual or gamma-compensated space equalises the lopsided
distribution exactly the same as direct hardware encoding would - within
the limits of the available bits. In the case of 16-bit linear data, it ....
Additive: no, not by a long way. Even applying the same magnitude of
change at each step, the information loss rapidly reduces to zero after
a few steps.

OK, that explains it!
What do you actually get in the SDK? API calls for discrete functions
such as stepping the scanner head, reading single lines, exposing
individual RGBI channels

I wish!

Getting access to the scanner at each scan line (focus, exposure, etc)
is my Holy Grail and why I got the SDK in the first place, but that's
not what you get. So I'm now disassembling and tracing both the TWAIN
module and the DLLs it calls.
or just entry points to the TWAIN interface?

There is a single entry and you pass function numbers on stack as one
of the parameters. You can see this if you use:
"C:\Program Files\Microsoft Visual Studio\Common\Tools\DEPENDS.EXE"
and point it at the TWAIN module.

The SDK is divided into two parts: MAID and command (two CDs).

MAID refers to TWAIN and simply enumerates all functions. It's further
subdivided into "regular" (my wording) and vendor specific. The latter
is where ICE, GEM and friends are listed.

You also get an example program in C which is command based (runs in a
DOS box). The programming interface to MAID is a maze of C structures
in a linked list. They are all defined in the program using official
Nikon names (also used in the documentation).

The second CD of the SDK, command, is a single document, listing all
low level commands sent to the scanner.

However, there is no documentation on the actual interface other than
the theoretical high level explanation. This is a problem with USB
because there are no standard programming interfaces. Nikon's USB
implementation actually emulates SCSI phases. Alas, there is no
example program.

These "low level" commands are actually quite high level and still
don't give you access to individual scanner controls like the stepper
motor. You do get some insight, though, because the data is returned
as structures of bytes where each bit means something different. Of
course, there are also strings, etc.

Finally, most written documentation is in "Japanese English" ;o) but
it's understandable. The SDK comes "as is" with no after support.
For example, if I
can respond to a message that the scan is complete, I can then move my
cine film forward to the next batch of frames, while a processing
complete message would allow my application to initiate the next scan
capture. At the moment I just wait a fixed period of time but, as you
might appreciate, a few seconds saved on each scan amounts to hours when
you are scanning 200ft of film!

Indeed! You do get a message when the scan is complete but it's
tricky. The actual call to start the scan includes an address of a
callback routine (and a structure). The callback routine will signal
when the scan is complete by modifying this structure. That's how you
know when the scan is finished.

I think that would be OK for your purpose because if you get the
callback routine to signal to you that the scan is done you could
advance the film and be ready for the next batch. Indeed, you could
even rewrite the callback routine to implement a different signaling
mechanism, if you so chose.

I actually rewrote the sample program in VB (which is really, really
hard because of C structures and linked lists) and in the process I
had to dissect the code - which was very good for learning purposes,
albeit time consuming. You don't get the scan data in a one big swoop
but it comes in "gulps" of 32K chunks. I suspect this is due to
internal scanner memory but it may not be (I'm too busy with other
things to look into it).

Don.
 
Top