[sane-devel] Accessing a scanner for a different reason
On 8/15/07, Justin Rosen rosen at nanotoon.com wrote: Thanks for the feedback and help - I'm guessing most folks don't come onto the forums asking to rip these things apart and do strange projects with them :) no, your specific request comes up every two months or so. we never hear back from any of them, so its hard to say if we are giving good advice or not :) It sounds like starting with the card scanner you've developed tools for would be a logical place to get my feet wet. Would it be possible to have a look at your SANE backend or libusb code for reference purposes? the sane backend is open source. i can send you the libusb program. but i dont know about running either of these things on windows, if thats your platform. That being said, maybe you might know of some other scanners that are higher spec and also have good SANE support and libusb references.. snip *So here's what I think are some working specs: * Bus: USB 2.0 is where it's at. Sensor/Data: The scanner should be a CCD that uses white light illumination and gets RGB in a single pass, not color by color with R,G, and B colored lights. both of those are pretty standard now. I realize that the lens will be an issue when removing the sensor from its intended case, but I can work around those optics. Also, the actual width of the sensor is not immediately important, but more compact would probably be better. What does matter is bit depth and DPI. I think 48 bit/16 bits per channel would be ideal, but 24 is a good place to start for testing purposes. I don't know much about how many pixels wide the typical scanner sensor is, but certainly the higher the DPI the better in my case - lets say over 1000 would be ideal. ok, but understand that the lower 2 bits of those 16 bit scanners is pretty much random noise, the available sensors are mostly really 10-14 bit, IIRC. email me off-list if you want to talk about the cardscanner. allan -- The truth is an offense, but not a sin
[sane-devel] Accessing a scanner for a different reason
Hello again, 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 parts). 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 data. 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) allan 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? Cheers, Justin On 8/9/07, Justin Rosen rosen at nanotoon.com wrote: 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 -- 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
[sane-devel] Accessing a scanner for a different reason
On 8/11/07, Justin Rosen rosen at nanotoon.com wrote: Hello again, 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. 'average'- you sure are specific :) 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. again, you have given us no additional info over your original post, making you very hard to help, but i can say that CCD sensors (which is a bit of a misnomer) tend to be more sensitive, and work at larger distances that CIS. but in either case, 'wave it around' might be a bit of an issue, since both sensors are meant to focus on a surface a few mm away. i think you will need some serious lens-making help if you intend to scan anything farther away that the original scan distance. this is where a 2-d camera with a lens might be useful. 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? google :) 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? the libusb docs are weak, but once you read the 'usb in a nutshell' website, and the usb specs, they make a little more sense. unfortunately, then you still have to figure out what data to send, and that depends on the chipset in the scanner. And, in terms of contacting a Manufacturer for a information regarding their control language, is this usually a pain? most of the big name scanner makers wont talk to you. but there are some chipset-only makers which do publish info. but in either case, you can use the source code for the sane backend (if it exists), and extract enough info from that to operate the scanner. if it's wide enough, the cardscan 800c has a very simple protocol, easy-to-open hardware, and a working sane backend (by yours truely). it would be very simple to use in this fashion, since it has no concept of scan length, but only 'keep scanning' or 'stop scanning'. i even have a stand-alone libusb program that could be modified to stream the data. the only issues are its width- 4.12 inches, and that the read-head might be hard to separate from the feed roller. oh, and its only 300dpi, 24 bit. allan -- The truth is an offense, but not a sin
[sane-devel] Accessing a scanner for a different reason
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
[sane-devel] Accessing a scanner for a different reason
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 data. 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) 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. allan On 8/9/07, Justin Rosen rosen at nanotoon.com wrote: 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 -- 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
[sane-devel] Accessing a scanner for a different reason
A sheetfeed scanner seems the best device to use (after removing parts). 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. On Thu, 2007-08-09 at 09:35 -0400, 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 data. 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) 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. allan On 8/9/07, Justin Rosen rosen at nanotoon.com wrote: 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 -- 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 -- m.vr.gr. Gerard Klaver