[sane-devel] HP Scanjet 3670 bad colors

Stef stef.dev at free.fr
Sat May 24 05:58:23 UTC 2014


On 20/05/2014 18:42, Octavio Alvarez wrote:
> On 05/20/2014 12:27 AM, Octavio Alvarez wrote:
>> So far, I have repeated some of the tests with scanimage only and
>> target_code seems to be too high for my taste. 0x8000 seems like a lot
>> better value. I'm still testing though.
> Hi, Stef. I have made some tests using scanimage only. I, effectively,
> don't get the artifacts anymore. Thanks a lot! However, you were right,
> the image quality has problems.
>
> Using target_code = 0xe000, the currently coded value, I get a bluish
> and saturated image. I tried lowering target_code across multiple values
> down to 0x4000. The lower the value, the better the quality but the
> darker the image.
>
> At 0xb000, the horizontal extremes of the image are white balanced but
> it is still noticeably bluish towards the center. This is, two small
> vertical correctly white-balanced sections are noticed at the left and
> right extremes.
>
> For example, at 0x8000, the image is not saturated anymore, and the
> image is way better white-balanced overall. However, the image is
> noticeably darker image (75% of the histogram with typical white at 55%
> luminosity). There is still a noticeably vertical stripe towards the
> blue, a bit off the center towards the right.
>
> At 0x4000, I don't get bluish stripes and perfect white-balance, but it
> results in only half of the histogram.
>
> I tried tweaking the "o" value (offset?) but I didn't seem to find any
> kind of pattern, except that if I set it too high I get badly colored
> stripes, so I just left them at their original values.
>
> Thanks again.
     Hello,

     the offset shouldn't be touched. For some undocumented reason the 
ASIC needs it to have the shading coefficients match the right pixels.

     target_code is giving the desired target value for white. Once this 
value is correct : not too low, and not too high to avoid 
"solarization", you should turn to tuning gamma values. They are defined 
in genesys_devices.c for the CCD_HP3670. Currently it is 1.0 for each 
color channels, and this need to be adjusted. This will improve the 
histogram.

Regards,
     Stef



More information about the sane-devel mailing list