[sane-devel] Accessing a scanner for a different reason

Justin Rosen rosen at nanotoon.com
Thu Aug 9 04:00:53 UTC 2007


Hello!

I've recently stumbled upon the SANE libraries in an effort to gain  
access to a scanner.  What I would like to do, is be able to read  
from a scanner, but not to create an image, but instead to pull RGB  
data from a single line of scan.  Meaning I only need a scan size of  
1 pixel x width of scanner.  Also, I don't necessarily need the  
flatbed itself.  Is it possible with SANE to access a scanner that  
has been taken apart?  I essentially need the RGB values of the  
scanning head in realtime (I'm not sure what the terminology is for  
the portion of the scanner that actually gets color values).

So imagine the scanner as a color sensor constantly pumping out an  
array of RGB colors, where the array size is the width of the scanner.

I'm completely new to the SANE libraries, I've read the SANE Standard  
and compiled the SANE libraries and I'm stuck on the fact that I  
think the scanner I purchased is broken, so I'm at a halt for the  
moment, but thought I could get a little more insight on my issue.

I thought my idea above could be possible using SANE for a few  
reasons.  If I were to write a front-end that used a scanner to scan  
an area of 1pixel x scanner width per frame, and to continually scan  
frames until I told it to stop, I could receive RGB data as fast as  
the scanner could scan (hopefully real-time).  If this can be done,  
great!  I need to really figure out how to write the front-end!  The  
only problem I see is that I'm hoping to take the scanner apart and  
use just the sensor to pull data from.  I noticed that some of the  
SANE calls may fail if the SANE_Status is SANE_STATUS_COVER_OPEN,  
which leaves me to believe I won't be able to take the scanner apart  
and just pull RGB data from the scanner head.

If anyone can answer any or part of my questions or point me in the  
right direction it would be greatly appreciated.

Thanks for your time.

Cheers,
Justin Rosen



More information about the sane-devel mailing list