scanner

Using C#/WIA version 2.0 on Vista to Scan

I want to implement a paperless filing system and was looking to use WIA with C# for the image acquisition. There are quite a few sample projects on CodeProject, etc. However, after downloading every one of them that I can find, I have run into a problem. In each and every one of them, the reference to WIALib is broken. When I go to add...

Getting Java and TWAIN to play together nicely

I'm working on building an app to scan directly from TWAIN scanner to a Java applet. I'm already aware of Morena and JTwain, but they cost money. I need free. I could re-invent the wheel with JNI, but it seems like someone has probably already done this as a FOSS tool. Is anyone familiar with a free tool that can get a Java applet to re...

How do I implement a two-pass scanner using GNU Flex?

As a pet-project, I'd like to attempt to implement a basic language of my own design that can be used as a web-scripting language. It's trivial to run a C++ program as an Apache CGI, so the real work lies in how to parse an input file containing non-code (HTML/CSS markup) and server-side code. In my undergrad compiler course, we used Fl...

Emulating user input for java.util.Scanner

I'm writing a game in Java, and I want the user to be able to provide input from both the command line and my GUI. Currently, I use this method to get input: static String getInput(){ System.out.println("Your move:"); Scanner sc = new Scanner(System.in); return sc.nextLine(); } I want to keep using this...

flex (lexical analyzer) regular expressions - Reusing definitions

Hi, I have this working definition: IDENTIFIER [a-zA-Z][a-zA-Z0-9]* I don't want to keep repeating the [a-zA-Z] and [0-9], so I made two new definitions DIGIT [0-9] VALID [a-zA-Z] How can I rewrite the IDENTIFIER rule to use the DIGIT and VALID definitions? I don't know how to do the "second" match, I'm stuck here: IDENTI...

A .Net component for processing a scanned questionnaire?

I am looking to incorporate scanning as a way of collecting feedback from paper questionnaires in my desktop application (a feedback management app). Questionnaires are completed using tick or cross marks as well as free text. The questionnaires are designed using the applications' designer. I am looking for a components that will pick...

get image from scanner

How do you get a image from the scanner using .NET (C#) on Vista? Preferably to have the possibility to set the DPI. There are a few controls on the market that do this, but they don't seem to work very well. ...

Can one listen a twain (Maybe WIA) scanner?

I am evaluating VintaSoft .net control and Atalasoft DotTwain Image Capture. And I am very but very lost with the most of the definitions and keywords. So I am asking this because I think I am in Lala land. Is it possible to listen or have the scanner tell my app that there is a scanned image and I can process it? The idea is to have a...

Java image library to deskew and crop images

Does anybody have a suggestion for a java library that performs automatic cropping and deskewing of images (like those retrieved from a flatbed scanner)? ...

3D laser scanner capturing normals?

The Lab university I work at is in the process of purchasing a laser scanner for scanning 3D objects. All along from the start we've been trying to find a scanner that is able to capture real RAW normals from the actual scanned surface. It seems that most scanners only capture points and then the software interpolates to find the normal ...

Faster MD5 alternative?

Hello everyone, I'm working on a program that searches entire drives for a given file. At the moment, I calculate an MD5 hash for the known file and then scan all files recursively, looking for a match. The only problem is that MD5 is painfully slow on large files. Is there a faster alternative that I can use while retaining a very sma...

Recommendations for a programmable drivers license scanner?

Our motor pool wants to scan drivers’ licenses and have the data imported into our custom system. We're looking for something that will allow us to programmatically get the data from the scanner (including the picture) and let us insert it into our application. I was wondering if anyone has had experience with this type of system and cou...

Usin Microsoft Office Document Image Viewer with VBS

Hi all, I want to use Microsoft Office 2003(or 2007) Document Image (MODI) Viewer on my web site to user can scan image (from a scanner) and save image (.tif format) to a location and i want to upload this image to my site from that location. First of all, Can i use MODI Viewew with scripting? Can i get or set file save location f...

How to turn a token stream into a parse tree

Hello all. I have a lexer built that streams out tokens from in input but I'm not sure how to build the next step in the process - the parse tree. Does anybody have any good resources or examples on how to accomplish this? ...

Java - Easier way to guarantee integer input through Scanner?

For a program I am writing, I need to ask a user for an integer between 1 and 8. I've tried multiple (cleaner) ways of doing this but none of them worked, so I'm left with this: int x = 0; while (x < 1 || x > 8) { System.out.print("Please enter integer (1-8): "); try { x = Integer.par...

C# TWAIN interaction

Hello, I'm trying to set up a C# application which uses TWAIN example from http://www.codeproject.com/KB/dotnet/twaindotnet.aspx This works fine except that I need to cast Form to IMessageFilter and call IMessageFilter.PreFilterMessage() to catch TWAIN callbacks. Also I need to start this filtering by calling Application.AddMessag...

Identify scanner(s) attached to the computer?

The application I'm working on is using a scanner, which may belong to one of a few types. I need to identify the attached scanner(s), give an option to select a default scanner from those attached and also change this selection whenever required. So far I came up with this solution: ManagementObjectSearcher search = new System.Managem...

WIA.DeviceManager.DeviceInfos.Count = 0. Why?

I'm trying to identify the scanners attached to the computer. One of the possible solutions is to use WIA (Windows Image Acquisition Automation Library). These were my actions so far: Download wiaaut.dll Copy it to system32 Register it with "regsvr32 wiaaut.dll" (successfully) Add reference to my project in Visual Studio.NET Check tha...

java.util.Scanner and Wikipedia

Hi, I'm trying to use java.util.Scanner to take Wikipedia contents and use it for word based searches. The fact is that it's all fine but when reading some words it give me errors. Looking at code and making some check it turned out that with some words it seems not to recognize the encoding, or so, and the content is no more readable....

How to use parsers like lex or yacc in c++

Hi, I want to parse the strings, so that to check whether they have specified syntax or not. Ex: Str = Z344-R565l t Here my requirement is after z there should be a number and after that a "-" and after that R should be there followed by a number, followed by "l", followed by a space and then finally "t". If any thing other than this ...