[sane-devel] HP7650 (HP5590 back.) scanner works, quality bad - website states "complete"

Daniel Schäfer d-schaefer at gmx.net
Thu Aug 1 06:48:01 UTC 2013


Olaf Meeuwissen:
> Daniel Schäfer writes:
>> [...] Duplex [...]
> It'd be a lot nicer if the backend could take this information into
> account and start a new page when that column changes from black to grey
> (and vice versa).  Also, I guess that that last column should be removed
> from the image data.
This is the octave script I'm using:
#!/usr/bin/octave -q
# Author: Schaefer
# Date: 31.07.2013
# This file reads out the pixel column to
# seperate a single duplex file in two files
# containing the corresponding page
arg_list = argv ();
if(length(arg_list) != 1)
     display("A single argument is needed: filename without _raw.tiff")
     exit
endif

filename=arg_list{1}
im = imread(strcat(filename, "_raw.tiff"));
decline = length(im(1,:, 1));
[y,x]=find(im(:,decline) != 0, 2);

if(length(y) == 1)
     y(2) = length(im)
endif

imwrite(im(1:y(1),1:decline-1,:), strcat(filename, "-p1.tiff"))
imwrite(im(y(1):y(2),1:decline-1,:), strcat(filename, "-p2.tiff"))
# octave end

> Basically, you are assuming that the 0 offsets you pass the backend 
> correspond to the physical borders. That may not be the case. Hope 
> this helps, 
Yes, thanks!

But to be honest, these two are only minor issues, as I can work-around 
them :-)
My main problem is still the image brightness/contrast which makes the 
scanner useless :-/

Daniel




More information about the sane-devel mailing list