michalkahle / RackScanner

Application for reading racks of Data Matrix barcoded tubes. Tested with Thermo Scientific Matrix tubes and racks.
MIT License
11 stars 2 forks source link

TWAIN on Linux #2

Open maashroom opened 4 years ago

maashroom commented 4 years ago

Hi

Really cool project. I've got the same scanner, and I am trying to get this to work on a computer running Ubuntu 18.04, but when I set it up, I get the following error:

Traceback (most recent call last): File "./http_server.py", line 27, in do_CGI web_app.run(**dic) File "/home/owen/repos/RackScanner/web_app.py", line 63, in run scanner_controller.scan(filename) File "/home/owen/repos/RackScanner/scanner_controller.py", line 26, in scan sm, scanner = open_scanner() File "/home/owen/repos/RackScanner/scanner_controller.py", line 55, in open_scanner sm = twain.SourceManager(0) NameError: name 'twain' is not defined

A bit of digging and I find that scanner_controller.py accesses the scanner through TWAIN. However, the pytwain module can only be called on Windows machines.

How did you get this to work on Linux?

michalkahle commented 4 years ago

Hi, I'm glad you find RackScanner useful. :) The problem with AVA6 scanner is there are drivers only for Windows and worse - only for 32 bit Windows. I tried to make it work on Linux (there are some drivers here:http://www.sane-project.org/sane-mfgs.html#Z-AVISION or you can try https://www.hamrick.com/) but I did not try very hard because my colleagues prefer to run it on Windows anyway and AVA6 is not manufactured anymore. You can try to make AVA6 Twain work on Linux or install 32 bit Windows in a VM (easier in my opinion).

By the way, I'm planning a new version of RackScanner that will use CCD camera and CNN to detect barcodes this winter so stay tuned if you are interested in this. Michal.

maashroom commented 4 years ago

I've tried the VM approach -- didn't work unfortunately.

That's exciting! I've been looking into camera-based alternatives. I know there's lots of small, cheap, camera-based box scanners out there for scanning QR codes (mostly for payment systems, here's an example). I wonder if they could be repurposed for scanning racks. At the very least, they could probably be used for single-tube decoding.

michalkahle commented 4 years ago

I wonder why the VM approach didn't work for you. I've developed the scanner controlling part in a Windoze VM in Virtual Box on Ubuntu and the whole thing worked fine.

On Wed, 30 Sep 2020, 23:59 maashroom, notifications@github.com wrote:

I've tried the VM approach -- didn't work unfortunately.

That's exciting! I've been looking into camera-based alternatives. I know there's lots of small, cheap, camera-based box scanners out there for scanning QR codes (mostly for payment systems, here's an example https://www.aliexpress.com/item/4000293312016.html). I wonder if they could be repurposed for scanning racks. At the very least, they could probably be used for single-tube decoding.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/michalkahle/RackScanner/issues/2#issuecomment-701669503, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7LRPN6LSQR3EBPU5ZCRW3SIOS57ANCNFSM4R6ICM7Q .

michalkahle commented 4 years ago

Simple barcode reader won't do. To scan racks you need quite high resolution camera (over 5 MP) with wide angle and good flatfield correction or you need to lengthen the focus distance ( possibly with a mirror) to get all wells in focus.

On Wed, 30 Sep 2020, 23:59 maashroom, notifications@github.com wrote:

I've tried the VM approach -- didn't work unfortunately.

That's exciting! I've been looking into camera-based alternatives. I know there's lots of small, cheap, camera-based box scanners out there for scanning QR codes (mostly for payment systems, here's an example https://www.aliexpress.com/item/4000293312016.html). I wonder if they could be repurposed for scanning racks. At the very least, they could probably be used for single-tube decoding.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/michalkahle/RackScanner/issues/2#issuecomment-701669503, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7LRPN6LSQR3EBPU5ZCRW3SIOS57ANCNFSM4R6ICM7Q .

AndriusMas commented 1 year ago

Hi Michal,

Great work. Just wondering if there are any good camera-based open source solutions out there. Are you still working on one? We are transitioning to barcoded tubes/racks but they are asking 15k for their scanner and software.

Thanks,

Andrius

michalkahle commented 1 year ago

Hi Andrius, currently I have no concrete plans for making this and I don't know other solutions. Sorry for not being able to help, Michal.

On Wed, 7 Dec 2022 at 00:57, Andrius @.***> wrote:

Hi Michal,

Great work. Just wondering if there are any good camera-based open source solutions out there. Are you still working on one? We are transitioning to barcoded tubes/racks but they are asking 15k for their scanner and software.

Thanks,

Andrius

— Reply to this email directly, view it on GitHub https://github.com/michalkahle/RackScanner/issues/2#issuecomment-1340174206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7LRPLB6II3IF7GIE7YO6DWL7HHJANCNFSM4R6ICM7Q . You are receiving this because you commented.Message ID: @.***>