[sane-devel] Canon FS4000: image data is sensor data, not RGB?
Thu, 17 Jun 2004 18:25:33 +0200
On Thu, Jun 17, 2004 at 11:59:18AM -0400, Dave Burns wrote:
> I am making good progress reverse-engineering the SCSI protocol for this
> film scanner. I now have a short test program in C that scans film and I now
> have the challenge of decoding the image data returned. It appears to be raw
> sensor data. I don't have experience with many other scanners: is this
> typical of scanners to return raw data? Or maybe typical of film scanners
> but not flatbed?
What do you mean exactly by "raw sensor data"? The format of the image
data varies with the scanner chipset. Some scanners provide the
calibrated and even gamma corrected data in the resolution you have
selected. For others , calibration and gamma correction must be done
by the backend.
> Also, the image data appears to contain more data than expected. I.e. there
> is more data then there should be if I consider the size of my scanning
> window and work out the math. Is this typical and is it normal to have to
> interpolate to provide the user with expected results?
Most scanners can only do some fixed resolutions, e.g. 100, 300, and
600 dpi. So other resolutions are done by using the higher resolution
and downsampling the result. Well, some windows drivers use the lower
resolution and interpolate the missing pixels...
This downsampling is sometimes done in the scanner, som,etimes it must
be done by the backend.
Some scanners can only scan in fixed window steps, e.g. the number of
pixels must be a multiple of 64 or similar.