[sane-devel] Accessing a scanner for a different reason
rosen at nanotoon.com
Sat Aug 11 21:24:18 UTC 2007
> you need to give more data about the size of read-head you need, the
> bit-depth, and your intended use, before anyone can suggest a
> particular model of scanner.
The size of the read head isn't particularly important. I think an
average scanner width is sufficient.
Bit-depth, the higher the better, but 24 is fine.
I am looking to connect a scanner to my computer that has been taken
apart. Meaning, that you could wave around the scanning head. My
program would essentially start scanning until i told it to stop. I
would take the data thats being read form the scanning head (looking
for real-time), and output it somewhere.
The first iteration of the program I'm trying to write would
essentially open a window that shows an image of what is being
scanned at that moment. The image only needs to be 1 pixel high!
So, I'm guessing this is possible to do in real-time. Essentially
I'm using a scanner as a 1 pixel high video camera.
On Aug 9, 2007, at 1:28 PM, Gerard Klaver wrote:
> A sheetfeed scanner seems the best device to use (after removing
> Depending on your specifications, tests with a webcam can also deliver
> enough information (remove the lines with data you don't need).
> A modified xcam backend is maybe also usable.
I need the highest res I can get. 24bit-depth. Not sure I'll be
able to get that out of a webcam :). A sheetfeed scanner sounds
interesting. Would I be able to take it apart and use just the scan
head without any problems?
On Aug 9, 2007, at 9:35 AM, m. allan noah wrote:
> the problem here is not sane. infact, sane is not all that useful to
> you, as it is designed as an interface to setup a wide variety of
> parameters on 2-d scan, and aquire an image occasionally. you would be
> better off probably writing a stand-alone libusb program to aquire the
> your big problem is hardware. every manufacturer does something
> different in terms of the control language. cheaper units typically
> rely on the host computer for many functions, and feature a very low
> level command set (lamp on, move head 1 step, read 1 line, etc). more
> expensive machines have higer-level commands which rely on the cpu in
> the scanner (accept scan params, scan)
This sounds like a better and more complex approach. How and where
would I go about figuring out how to write a stand-alone libusb
program? I checked out http://libusb.sourceforge.net/ and they have
a little bit of documentation that might help me get started. Does
anyone know of any good websites that may be helpful? And, in terms
of contacting a Manufacturer for a information regarding their
control language, is this usually a pain?
> On 8/9/07, Justin Rosen <rosen at nanotoon.com> wrote:
>> 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
>> 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.
>> Justin Rosen
>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>> 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"
More information about the sane-devel