[sane-devel] Insights from a newbie backend writer...
Tue, 12 Apr 2005 22:10:15 -0400
Bertrik Sikken wrote:
>Can you get a scan of what this part off to the side looks like?
Yes. I'm taking a break from this for a while. But will try it when I
>The scanner I worked on had a black spot there and a white strip
>over the width of the scan bed.
>I used the black spot as a reference for a black pixel (this RGB value
>needs to be subtracted from every scanned pixel). I used the white
>stripe as a reference for white pixels. Every pixel along the width
>is multiplied by a value that would make the white pixels from the
>white strip exactly RGB=(255,255,255), thereby correcting for uneven
>lighting or variations between pixels in the CCD.
>These subtract and multiply operations are more accurate if
>they are done before conversion to 8-bit. So in my scanner they are
>done inside the scanner on the raw data. The subtract and multiply
>factors are stored per-pixel in a table that is sent to the scanner
>before the scan.
>(again actually three tables, one table per R, G or B component)
This isn't happening. No data gets sent to the scanner. Its all register
controlled commands to the scanner.
>I've followed the sane devel mailing list for a couple of years now
>and never read about anyone getting into legal trouble.
That's encouraging. I also suppose that disassembling the .dll and
studying the disassembled code to see how it works and writing my code
from that knowledge may be more acceptable than straight reverse
>On one hand, it seems that the scanner makers have little to lose:
>they provide the specs, we write the driver, for free!
No real specs from Lexmark.
>On the other hand I think that some scanner makers may be under NDA
>with the scanner chip makers, which makes it hard to open up the
I'm sure this is the case. I acutally contacted the chip manufacturer,
who subcontract the support out to another company. They've discontinued
development and let go the engineering team. However, they're still
selling the device and were unwilling/unable to provide a datasheet.
>I think that without detailed specifications or help from the
>scanner chip manufacturer that a reverse-engineered driver
>will always perform worse than the windows driver....
You're probably right. My plan now is to only look at the disassembled
code to see what some of the unknown registers are used for and to use
the file in combination with the .ini file, the usb logs, the assumed
register descriptions from similar chips, and calibration images to
provide more clues about what and how they're calibrating.