Commit graph

30 commits

Author SHA1 Message Date
Marco Trevisan (Treviño) d1fb1e26f3 Uncrustify everything except for nbis 2019-11-20 20:38:06 +01:00
Benjamin Berg 7ef64b5f5f aes3k: Port aes3500 and aes4000 drivers to new API 2019-11-20 13:53:45 +01:00
Bastien Nocera 3f64b2ea5a lib: Remove fpi_imgdev_get_usb_dev()
We now use fpi_get_usb_dev(FP_DEV()) instead.
2018-09-15 01:12:18 +02:00
Bastien Nocera 058f91909d lib: Remove fp_img_dev->priv
And use the new instance data helper.
2018-09-15 01:12:18 +02:00
Bastien Nocera f40f231a63 lib: Make fp_img_dev structure opaque 2018-05-29 13:34:18 +02:00
Bastien Nocera 19dfb138a6 drivers: Use new drivers_api.h in drivers 2018-05-29 13:34:18 +02:00
Bastien Nocera 994061af44 drivers: Simplify headers
Remove all the headers already included through "fp_internal.h" such as
<libusb.h> and <errno.h>, include "assembling.h" and "driver_ids.h" there
as well to avoid doing it in (almost) every driver.
2018-05-24 17:02:15 +02:00
Bastien Nocera 32fcfde86b lib: Use GLib and libusb directly for debug output
Use GLib internally to output debug information, and tell about
libusb's LIBUSB_DEBUG envvar for libusb debug.

fp_set_debug() is now a no-op.

https://bugs.freedesktop.org/show_bug.cgi?id=106552
2018-05-23 19:13:08 +02:00
Bastien Nocera 76269decdd aes4000: Fix possible crash if USB init fails
The code was indented, but only the first call was actually in the
conditional, which meant that initialisation carried on as normal on top
of a failed USB device. Exit early and remove the conditional to fix
this.

https://bugzilla.gnome.org/show_bug.cgi?id=98594
2016-11-05 00:13:51 +01:00
Bastien Nocera a0bbbd7d32 drivers: Print USB error when libusb_claim_interface() fails
https://bugs.freedesktop.org/show_bug.cgi?id=98594
2016-11-05 00:10:17 +01:00
Juvenn Woo 12c1088777 aes3k: extract common routines aes3k from aes4000
AES3500 and AES4000 are pretty similar devices, have same
command send, the only difference is in image size and init sequence.
Extract common routines from AES4K to be used later in AES3500 driver

https://bugs.freedesktop.org/show_bug.cgi?id=64351
2013-08-12 11:18:18 +03:00
Vasily Khoruzhick 22d204cc68 lib: Split fpi_im_resize factor into width/height
https://bugs.freedesktop.org/show_bug.cgi?id=57426
2012-11-29 09:59:27 +01:00
Vasily Khoruzhick ea6d5ba6d6 lib: Fix mess with driver IDs
ID is just a some magic number to make fingerprint from one scanner model
incompatible with another scanner model. Get rid of "magic", declare enum
and use it.

https://bugs.freedesktop.org/show_bug.cgi?id=56956
2012-11-16 17:57:47 +01:00
Bastien Nocera 29044d9ca9 Export scan type for each driver
For each driver, export the scan type supported by the devices it
handles. This allows front-ends to direct the user better.
2008-11-20 14:53:01 +00:00
Daniel Drake 6b8b17f575 Split imagemagick hack from main library
Cleans up the conditional compilation system
2008-08-10 14:41:13 -05:00
Vasily Khoruzhick 40e7ac195a Adapting to latest libusb
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2008-04-06 23:52:04 +01:00
Daniel Drake 4e884807a7 Update for libusb API rework 2008-03-10 13:33:23 +00:00
Daniel Drake 88e9f4a5f8 Public async API implementation
Involved some internal overhaul/reorganisation. Nice side effect is that
the synchronous API is now expressed purely in terms of the public async
API.
2008-03-01 13:02:17 +00:00
Daniel Drake 77b5dab04b aeslib: introduce user_data for write registers callback
aes2501 needs this for state tracking
2008-02-16 12:49:27 +00:00
Daniel Drake d914712437 aes4000: port to asynchronous model 2008-02-16 12:49:17 +00:00
Daniel Drake bf7093d607 Port to libusb-0.9.0 (synchronous I/O)
Straightforward port to libusb-0.9.0 sync I/O functions, to give libusb-1.0
a bit of a test drive and to create a reference point for later.
2008-01-30 14:16:35 +00:00
Daniel Drake 3479dee0e4 aeslib: image assembly
All 3 authentec drivers now use a shared image assembly function.
2007-11-26 23:28:14 +00:00
Daniel Drake e228f2c7da Introduce shared functions for authentec drivers
Currently provides register writing functionality only, more common ground
will be moved here soon.
2007-11-26 22:53:41 +00:00
Daniel Drake fa742a2142 Use G_N_ELEMENTS macro 2007-11-17 23:47:06 +00:00
Daniel Drake ba24c0884a Rework some image handling; add public binarization API
I want to offer the ability for an application to view a binarized
version of a scanned print. This lead onto a few changes:

 1. Store minutiae and binarized data inside fp_img
 2. Move resize code to the capture path, it previously happened much
    later.
 3. Add fp_img_binarize() to return a new image in binarized form.
 4. Add a BINARIZED_FORM flag to prevent an image being binarized again.

In future, it would be nice to be able to binarize without detecting
minutiae, but this involves some work on the NBIS interaction.
2007-11-17 12:51:28 +00:00
Daniel Drake 71e4bb39ec Allow drivers to specify custom bz3 match threshold
aes4000 detects fewer minutiae and hence returns lower scores.
2007-11-12 23:28:46 +00:00
Daniel Drake e3451158e9 Custom image resizing
mindtct appears to completely ignore the pixels-per-mm input parameter
(ippmm). When processing AES4000 images, the binarized image is
completely mangled and a lot of ridge information is lost.

Resizing the AES4000's small images results in a huge imaging performance
gain.

We use imagemagick for the resizing, as it's resizing code resamples the
image too (smoothing it out), which further improves performance.
2007-11-12 23:28:46 +00:00
Daniel Drake a73cbc10fb aes4000: image quality improvements
The windows driver takes one sample at the previous register settings
and then changes some registers before resamping (and getting much better
images). The exact changes that it makes seem to vary, perhaps based on
the histogram.

Anyway, this is an approximation of the settings used for the 2nd sample
which should help matching results.
2007-11-12 23:28:46 +00:00
Daniel Drake 294f9ad447 Improve print_data structure and on-disk format
Drivers now have an ID number. These will be assigned by me and documented
on the wiki. 0 cannot be used.

Drivers now define a devtype for each device they initialise. This is to
cope with the situation where a driver can support varying devices where
their print data is incompatible (i.e. image scaling is totally changed).
This doesn't apply to any existing supported devices.

Print data no longer includes driver name, and includes driver ID instead.

Paths to saved print data now include driver ID and devtype, and no longer
include driver name.

APIs exposed for converting a print_data into a blob which can then
be loaded back again later. Useful for systems who don't want to use
my simple storage system (which is only aimed at a single user).

File format is now defined and will be documented on the wiki. The header
is larger as we can no longer rely on directory paths in all scenarios.

Print data compat check now checks devtype and driver ID.
2007-10-28 22:13:51 +00:00
Daniel Drake be67f85caa Add Authentec AES4000 driver 2007-10-27 19:33:00 +01:00