Olaf Meeuwissen | 1 Feb 2011 04:37
Picon

Re: How to get infrared image data with sane on an epson v700 scanner?

Alain Culos <sane-devel <at> asoundmove.net> writes:

> Thanks Olaf,
>
> Please help me out a little more on general stuff.
> I never hacked into these parts.
>
> My system is Ubuntu.
> I downloaded the standard Ubuntu 10.04 source for sane-frontends and
> sane-backends which gives me:
> ./sane-backends-1.0.20/
> ./sane-frontends-1.0.14/
>
> First I understand that I need to configure and compile the frontend
> with SANE_FRAME_IR defined. Is this correct, or should I only touch
> the backend or both?
> [snip]

You don't need to do anything for sane-frontends.  It has *no* support
for infrared, period.  For sane-backends, you need a newer version of
the code[1], sane-backends-1.0.20 does not have the infrared support
yet.  It was added in sane-backends-1.0.21.

  [1] http://sane.alioth.debian.org/source.html

After extracting the archive,

  cd sane-backends-1.0.21/
  ./configure CPPFLAGS=-DSANE_FRAME_IR
  make
(Continue reading)

stef | 1 Feb 2011 05:30
Picon
Favicon

Re: A couple issues with genesys HP G4010

Le Monday 31 January 2011 23:53:52 Brian Shaver, vous avez écrit :
> On Mon, Jan 31, 2011 at 4:07 PM, stef <stef.dev <at> free.fr> wrote:
> > Le Sunday 30 January 2011 19:46:00 Brian Shaver, vous avez écrit :
> > > Thanks Stef!
> > > 
> > > Let me know if you'd like any additional information, or if I can be
> > > any help with the fix.
> > > 
> > > Thanks,
> > > Brian ..
> > > 
> > > On Sun, Jan 30, 2011 at 2:36 AM, stef <stef.dev <at> free.fr> wrote:
> > > > Le Saturday 29 January 2011 21:26:03 Brian Shaver, vous avez écrit :
> > > > > allan,
> > > > > If I comment out the function call which was causing the crash,
> > > > > then I'm able to run with a high genesys debug level. This
> > > > > function call was just for debug purposes to create the
> > > > > "unprocessed.pnm" file. The following commands were executed with:
> > > > > 
> > > > > SANE_DEBUG_GENESYS=255
> > > > > SANE_DEBUG_SANEI_MAGIC=255
> > > > > 
> > > > > ./scanimage --mode Lineart --resolution 100 -l 21.4 -t 79.7 -x
> > > > > 148.7
> > 
> > -y
> > 
> > > > > 138.9 --swdespeck=yes > /tmp/despeck.pnm 2> /tmp/despeck.log
> > > > > 
> > > > > ./scanimage --mode Lineart --resolution 100 -l 21.4 -t 79.7 -x
(Continue reading)

Jan Niggemann | 1 Feb 2011 07:46
Picon
Gravatar

sane-pixma duplex scan

 Dear developers,

 does the sane-pixma backend (or any other) dupport duplex scanning with 
 the Canon Pixma MX310?
 I need to be sure before buying one...

 Thank you in advance!
 Jan

--
sane-devel mailing list: sane-devel <at> lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to sane-devel-request <at> lists.alioth.debian.org

Paul Schenkeveld | 1 Feb 2011 19:25
Picon

HP5590 problems

Hi,

I hope this is the right place to post this question, otherwise please
point me to a better place and accept my apologies for bothering you.

I'm trying to use a HP5590 scanner with sane-backends (1.0.21) running
on FreeBSD 8.2-PRERELEASE (tried 8.1-RELEASE with the same results).

I finally got the scanner to function more or less reliably by using
saned instead of talking to the scanner directly.  Only the ADF is not
working.  When I execute:

    scanimage -x 210 -y 297 --source ADF > scan.out

the scanner moves the lamp towards the left where the ADF aperture is
located, it then pulls one sheet from the ADF as if it were scanning
but scanimage displays:

    scanimage: sane_start: Invalid argument

and exits leaving scan.out empty.

Setting SANE_DEBUG_HP5590 to 50 reveals the folowing debugging lines:

    [sanei_debug] Setting debug level of hp5590 to 50.
    [hp5590] SANE backed for HP ScanJet 4500C/4570C/5500C/5550C/5590/7650 1.0.5
    [hp5590] (c) Ilia Sotnikov <hostcc <at> gmail.com>
    [hp5590] sane_hp5590_get_devices, local only: 0
    [hp5590] Found 0 devices
    scanimage: sane_start: Invalid argument
(Continue reading)

Olaf Meeuwissen | 2 Feb 2011 01:22
Picon

Re: How to get infrared image data with sane on an epson v700 scanner?

Alain Culos <sane-devel <at> asoundmove.net> writes:

>>  > scanimage -d epson2 -h
>> <...>
>> scanimage: open of device epson2 failed: Invalid argument
> <...>
>> However scanimage does not seem to recognise my scanner any longer (see
>> above), despite the version being the new one.
>>
>>  > scanimage --version
>> scanimage (sane-backends) 1.0.21; backend version 1.0.21
>
> Solved this problem: I was missing libusb-dev, now it finds my
> scanner, although only with the epson2 backend, not with the epkowa
> any longer.

The epkowa backend is *not* part of sane-backends.  It was removed
together with iscan when you removed libsane.  I suggest you grab
the source tarball and build that the same way as you build the
sane-backends.  You'll need to add the backend to dll.conf after
installation.

If you don't care for the iscan frontend, you can `--disable-frontend`
at `./configure` time and save some CPU cycles (but you may still need
to satisfy some frontend build dependencies :-().

> This is not an immediate issue for me, but I'd appreciate pointer in
> the right direction. The epson2 driver now restricts me in terms of
> scan resolution.  [...]
> When with the epkowa backend of the previous version this was:
(Continue reading)

Brian Shaver | 2 Feb 2011 03:16
Picon
Gravatar

Re: A couple issues with genesys HP G4010

On Mon, Jan 31, 2011 at 11:30 PM, stef <stef.dev <at> free.fr> wrote:
Le Monday 31 January 2011 23:53:52 Brian Shaver, vous avez écrit :
> On Mon, Jan 31, 2011 at 4:07 PM, stef <stef.dev <at> free.fr> wrote:
> > Le Sunday 30 January 2011 19:46:00 Brian Shaver, vous avez écrit :
> > > Thanks Stef!
> > >
> > > Let me know if you'd like any additional information, or if I can be
> > > any help with the fix.
> > >
> > > Thanks,
> > > Brian ..
> > >
> > > On Sun, Jan 30, 2011 at 2:36 AM, stef <stef.dev <at> free.fr> wrote:
> > > > Le Saturday 29 January 2011 21:26:03 Brian Shaver, vous avez écrit :
> > > > > allan,
> > > > > If I comment out the function call which was causing the crash,
> > > > > then I'm able to run with a high genesys debug level. This
> > > > > function call was just for debug purposes to create the
> > > > > "unprocessed.pnm" file. The following commands were executed with:
> > > > >
> > > > > SANE_DEBUG_GENESYS=255
> > > > > SANE_DEBUG_SANEI_MAGIC=255
> > > > >
> > > > > ./scanimage --mode Lineart --resolution 100 -l 21.4 -t 79.7 -x
> > > > > 148.7
> >
> > -y
> >
> > > > > 138.9 --swdespeck=yes > /tmp/despeck.pnm 2> /tmp/despeck.log
> > > > >
> > > > > ./scanimage --mode Lineart --resolution 100 -l 21.4 -t 79.7 -x
> > > > > 148.7
> >
> > -y
> >
> > > > > 138.9 > /tmp/no_despeck.pnm 2> /tmp/no_despeck.log
> > > > >
> > > > > Attached are the images and log files. The black band at the bottom
> >
> > of
> >
> > > > the
> > > >
> > > > > despeck image does not change size based on the despeck value.
> > > > >
> > > > > Thanks,
> > > > > Brian ..
> > > > >
> > > > > On Sat, Jan 29, 2011 at 11:30 AM, m. allan noah
> > > > > <kitno455 <at> gmail.com>
> > > >
> > > > wrote:
> > > > > > brian- I did not write the genesys backend, but I did write the
> > > > > > sanei_magic library that it uses to provide the swdespeck option.
> >
> > It
> >
> > > > > > would be interesting to see a low resolution version of the two
> > > > > > images, and a log with:
> > > > > >
> > > > > > SANE_DEBUG_SANEI_MAGIC=255
> > > > > >
> > > > > > combined with whatever the highest debug level genesys will give
> > > > > > without crashing.
> > > > > >
> > > > > > allan
> > > > > >
> > > > > > On Fri, Jan 28, 2011 at 8:19 AM, Brian Shaver <
> >
> > shakerlxxv <at> gmail.com>
> >
> > > > > > wrote:
> > > > > > > I'm using the Lineart mode and trying the --swdespeck option
> > > > > > > and I've noticed its leaving a black band along the bottom of
> > > > > > > the image. The 2nd issue, is that when I turn the debug up (
> > > >
> > > > SANE_DEBUG_GENESYS=10
> > > >
> > > > > > > ) and try the same scan, the process seg faults. The following
> > > > > > > is the stack from the core:
> > > > > > > (gdb) bt
> > > > > > > #0  0x00007fa3e4ce35c8 in sanei_genesys_write_pnm_file
> > > > > > > (filename=0x7fa3e4cec479 "unprocessed.pnm",
> > > > > > >
> > > > > > >     data=0x7fa3e2267000 <Address 0x7fa3e2267000 out of bounds>,
> > > > > > >     depth=1,
> > > > > > >
> > > > > > > channels=1, pixels_per_line=2360, lines=3188)
> > > > > > >
> > > > > > >     at genesys_low.c:144
> > > > > > >
> > > > > > > #1  0x00007fa3e4caa60f in genesys_buffer_image (s=0x99e340) at
> > > > > > > genesys.c:6895
> > > > > > > #2  0x00007fa3e4caccab in sane_genesys_start (handle=0x99e340)
> > > > > > > at genesys.c:7864
> > > > > > > #3  0x00007fa3eae33ae2 in sane_dll_start (handle=0x99b2a0) at
> > > > > > > dll.c:1263 #4  0x00007fa3eae20d38 in sane_start (h=0x99b2a0) at
> > > > > > > dll-s.c:48 #5  0x0000000000406d1c in main (argc=13,
> > > > > > > argv=0x7fffe2b73a08) at scanimage.c:2283
> > > > > > >
> > > > > > >  The code is trying to write out a file ( unprocessed.pnm )
> > > >
> > > > containing
> > > >
> > > > > > ... I
> > > > > >
> > > > > > > think the Lineart converted data before performing the despeck
> > > >
> > > > process.
> > > >
> > > > > > > I'd be happy to help with a fix for this, or provide further
> > > > > > > information
> > > > > >
> > > > > > or
> > > > > >
> > > > > > > testing.
> > > > > > > Thanks,
> > > > > > > Brian ..
> > > > > > > --
> > > > > > > sane-devel mailing list: sane-devel <at> lists.alioth.debian.org
> > > > > > > http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> > > > > > > Unsubscribe: Send mail with subject "unsubscribe your_password"
> > > > > > >
> > > > > > >             to sane-devel-request <at> lists.alioth.debian.org
> > > > > >
> > > > > > --
> > > > > > "The truth is an offense, but not a sin"
> > > > > >
> > > >         Hello,
> > > >
> > > >        thanks for providing these detailed information. For the
> > > >        crash, the
> > > >
> > > > image
> > > > writing function doesn't handle line art bitmap format. I'm currently
> > > > fixing
> > > > that. For the black band, it is due to incorrect settings in
> > > > registers
> >
> > in
> >
> > > > line
> > > > art mode which makes the backend reading too much data from the
> >
> > scanner.
> >
> > > > This
> > > > extra data is filled with 'noise'. I am currently looking into that.
> > > >
> > > > Regards,
> > > >
> > > >         Stef
> >
> >         Hello,
> >
> >        I have committed the fix for this bug. Now image size will be
> >
> > correct.
> > The logging issue is also fixed. You may try the latest git source code.
> >
> > Regards,
> >
> >         Stef
>
> Stef,
> When I test with these latest changes, they do address the issues
> referenced in this thread; however, I'm seeing an increase in the noise in
> the image. Just to make sure I rolled back a couple days and re-scanned
> the same images again. The additional noise is present both with and
> without the swdespeck option. I'm attaching sample images. Any ideas?
>
> Thanks,
> Brian ..

       Hello,

       there is no calibration nor warmup done for the G4010/G4050. So the kind
of issue you're having isn't surprising. Once I have finished to add 2400/4800
dpi modes for the Lide 100/200, I'll turn back to the G4040.

Regards,
       Stef

Stef / allan,

Not sure I completely understand either of your responses, but another test I just ran ( with a different image ) did not have any problem. So that's good news.

Stef, one thing I really like about the current SANE interface to the HP G4010 is how quickly I can scan multiple pages as long as I'm not changing anything (even changing some parameters doesn't cause any delay ). It sounds like this could be related to the calibration / warmup functions not yet implemented. I hope the speed wouldn't change too much when these functions are implemented, or perhaps there could be an option to avoid the calibration/warmup steps?

Thanks,
Brian ..

--
sane-devel mailing list: sane-devel <at> lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to sane-devel-request <at> lists.alioth.debian.org
stef | 2 Feb 2011 06:51
Picon
Favicon

Re: A couple issues with genesys HP G4010

Le Wednesday 02 February 2011 03:16:23, vous avez écrit :
> On Mon, Jan 31, 2011 at 11:30 PM, stef <stef.dev <at> free.fr> wrote:
...
> 
> Not sure I completely understand either of your responses, but another test
> I just ran ( with a different image ) did not have any problem. So that's
> good news.
> 
> Stef, one thing I really like about the current SANE interface to the HP
> G4010 is how quickly I can scan multiple pages as long as I'm not changing
> anything (even changing some parameters doesn't cause any delay ). It
> sounds like this could be related to the calibration / warmup functions
> not yet implemented. I hope the speed wouldn't change too much when these
> functions are implemented, or perhaps there could be an option to avoid
> the
> calibration/warmup steps?
> 
> Thanks,
> Brian ..

	Hello,

	the calibration and warmup ensure that scan quality is always good and 
doens't vary over time like you saw. The genesys backend uses a calibration 
cache, so only the first scan will be longuer. All the other scans will be as 
fast as today.

Regards,
	Stef

--
sane-devel mailing list: sane-devel <at> lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to sane-devel-request <at> lists.alioth.debian.org

Ilia Sotnikov | 2 Feb 2011 13:37
Picon

Re: HP5590 problems

On Tue, Feb 1, 2011 at 8:25 PM, Paul Schenkeveld
<sane-devel <at> psconsult.nl> wrote:
> Hi,
>
> I hope this is the right place to post this question, otherwise please
> point me to a better place and accept my apologies for bothering you.

Hi, Paul! No worries - this is the right place.

> I'm trying to use a HP5590 scanner with sane-backends (1.0.21) running
> on FreeBSD 8.2-PRERELEASE (tried 8.1-RELEASE with the same results).

Frankly, didn't test the backend under FreeBSD, hope no dramatical
differences would arise.

> I finally got the scanner to function more or less reliably by using
> saned instead of talking to the scanner directly.

Could you please provide debug output when scanner works well (setting
SANE_DEBUG_HP5590 variable)?

> Only the ADF is not working.  When I execute:
>
>    scanimage -x 210 -y 297 --source ADF > scan.out
>
> the scanner moves the lamp towards the left where the ADF aperture is
> located, it then pulls one sheet from the ADF as if it were scanning
> but scanimage displays:
>
>    scanimage: sane_start: Invalid argument
>
> and exits leaving scan.out empty.

Well, at least the device accepted the sequence of commands. I suspect
that something is wrong with setting scan area, although didn't face
similar issues.

> Setting SANE_DEBUG_HP5590 to 50 reveals the folowing debugging lines:
>
>    [sanei_debug] Setting debug level of hp5590 to 50.
>    [hp5590] SANE backed for HP ScanJet 4500C/4570C/5500C/5550C/5590/7650 1.0.5
>    [hp5590] (c) Ilia Sotnikov <hostcc <at> gmail.com>
>    [hp5590] sane_hp5590_get_devices, local only: 0
>    [hp5590] Found 0 devices
>    scanimage: sane_start: Invalid argument
>    [hp5590] sane_hp5590_exit

I suppose this output was produced after the "Invalid argument" error
appeared. Could you please do the same but in a fresh condition (eg.
after the device will be initialized by unpligging the power cord then
re-plugging it)?

--

-- 
 Ilia Sotnikov

--
sane-devel mailing list: sane-devel <at> lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to sane-devel-request <at> lists.alioth.debian.org

m. allan noah | 2 Feb 2011 14:12
Picon

Re: How to get infrared image data with sane on an epson v700 scanner?

On Tue, Feb 1, 2011 at 10:20 PM, Alain Culos <sane-devel <at> asoundmove.net> wrote:
> Thanks again for your help Olaf.
>
> For Allan's information, I'm still stuck in a mode where my posts don't show
> up on the list, so I'm relying on one of you to reply for them to appear on
> the list.
>

I will contact the alioth admins about it. Perhaps they dont like
something about your mailserver.

I'm leaving the rest of the email for others to see, but I will make
one comment- you will probably have to dig deep on this one, I don't
think anyone ever got this working before.

> I have managed to get scanimage to produce some results with IR mode from my
> scanner thanks to your help Olaf. However I seem to have a few problems with
> the data: format and contents.
>
> Scanimage seems to work normally with plain regular reflective scans
> (paper). So that's a good start.
>
>
> 1/ Format issues:
>
> First it seems that the tiff or the pnm produced by scanimage is interpreted
> strangely: it shows as if it was three frames, side by side, of B&W data.
>
> scanimage -p -d epson2 --resolution 150 --mode Infrared --depth 8 --format
> tiff -v --batch-count=1 --batch=IR-test.tiff
>
> scanimage -p -d epson2 --resolution 150 --mode Infrared --depth 8 --format
> pnm -v --batch-count=1 --batch=IR-test.pnm
> (scans 1272x1754)
>
> scanimage -p -d epson2 --resolution 150 --source "Transparency Unit" --mode
> Infrared --depth 8 --format tiff -v --batch-count=1 --batch=IR-test.tiff
>
> scanimage -p -d epson2 --resolution 150 --source "Transparency Unit" --mode
> Infrared --depth 8 --format pnm -v --batch-count=1 --batch=IR-test.pnm
> (scans 880x1453)
>
>
> Imagemagick complains thus (different numbers whether I go with TPU or not,
> but same errors):
>
>> convert IR-test.tiff IR-test.jpg
> convert: IR-test.tiff: Bogus "StripByteCounts" field, ignoring and
> calculating from imagelength. `TIFFReadDirectory'  <at>  tiff.c/TIFFWarnings/703.
> convert: IR-test.tiff: Read error at scanline 584; got 2544 bytes, expected
> 7632. `TIFFFillStrip'  <at>  tiff.c/TIFFErrors/493.
>
>> convert IR-test.pnm IR-test.jpg
> convert: unable to read image data `IR-test.pnm'  <at>  pnm.c/ReadPNMImage/923.
> convert: missing an image filename `IR-test.jpg'  <at> 
> convert.c/ConvertImageCommand/2838.
>
>
> Like I say it shows as three frames side by side (left/right) - as if it was
> RGB data displayed as three B&W images: each channel as a full separate
> image. Only I expected the image to be a single grayscale channel.
>
>
> 2/ IR content issues:
>
> It seems like the data itself is not proper IR data. Without TPU, it looks
> like plain light, but I can't tell whether it is RGB or just grayscale. Ok,
> maybe that's normal, since I would expect the IR to only be active with the
> TPU.
>
> With TPU it looks like Grayscale data split in three separate images. It
> certainly does not look like IR data (I expect dark flecks of dust and only
> very slight shades of light gray based on the actual RGB pixel colour for
> the slides).
>
>
> Any way you would advise me getting my teeth into this. Debug settings, dump
> files to produce and look at. What part of the code should I start with
> rather than try and make sense of it all in one go?
>
>
> Thanks again for any hints.
>
> Regards,
> Alain.
>

--

-- 
"The truth is an offense, but not a sin"

--
sane-devel mailing list: sane-devel <at> lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to sane-devel-request <at> lists.alioth.debian.org

Olaf Meeuwissen | 3 Feb 2011 01:28
Picon

Re: How to get infrared image data with sane on an epson v700 scanner?

Alain Culos <sane-devel <at> asoundmove.net> writes:

> I have managed to get scanimage to produce some results with IR mode
> from my scanner thanks to your help Olaf. However I seem to have a few
> problems with the data: format and contents.
>
> Scanimage seems to work normally with plain regular reflective scans
> (paper). So that's a good start.
>
>
> 1/ Format issues:
>
> First it seems that the tiff or the pnm produced by scanimage is
> interpreted strangely: it shows as if it was three frames, side by
> side, of B&W data.

Like m. allan noah said in another mail in this thread, time to roll up
your sleeves.  The scanimage sources have no support for SANE_FRAME_IR
whatsoever.  I had a quick glance at frontend/scanimage.c and it looks
like you will need to patch up the scan_it() function in there.  Note,
though, that I am not familiar with that code so you are basically on
your own there.  I also don't know what kind of data the frontend can
expect when the backend says it'll provide SANE_FRAME_IR.

> [snip]
>
> 2/ IR content issues:
>
> It seems like the data itself is not proper IR data. Without TPU, it
> looks like plain light, but I can't tell whether it is RGB or just
> grayscale. Ok, maybe that's normal, since I would expect the IR to
> only be active with the TPU.
>
> With TPU it looks like Grayscale data split in three separate
> images. It certainly does not look like IR data (I expect dark flecks
> of dust and only very slight shades of light gray based on the actual
> RGB pixel colour for the slides).

I honestly have no idea what to expect when you enable the device's IR
mode.  The ESC # command that gets sent to the scanner is not documented
in any of the 50+ ESC/I command specs that I have access to.

> Any way you would advise me getting my teeth into this. Debug
> settings, dump files to produce and look at. What part of the code
> should I start with rather than try and make sense of it all in one
> go?

Sorry I can't be of more help,
--

-- 
Olaf Meeuwissen, LPIC-2           FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962               Help support software freedom
                 http://www.fsf.org/jf?referrer=1962

--
sane-devel mailing list: sane-devel <at> lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to sane-devel-request <at> lists.alioth.debian.org


Gmane