nixpkgs/nixos
aszlig a443bdc0a6
nixos/testing: Improve quality of OCR
First of all, we're now using ImageMagick to improve the screenshot so
that Tesseract has an esier time to recognize the text. The resulting
image of this post-processing is a scaled up black-and-white version
with the backgrounds almost entirely removed and the text edges a bit
blurred, so the screen shots now more or less resemble an image from a
scanner rather. This is what Tesseract is trained for by default.

As mentioned in the previous commit we now also use Tesseract 4, which
further improves the quality of text recognition.

I've spent countless hours just to test different postprocessing
variants and testing what works best for our tests and this is the one
that worked best so far. It's certainly not perfect and I'd like to
avoid the scaling step but we're way better off than before.

In addition to this, the OCR process is now done without an intermediate
file, solely using pipes.

I've tested this using the following VM tests which have OCR enabled:

 * nixos/tests/chromium.nix -A stable
 * nixos/tests/emacs-daemon.nix
 * nixos/tests/installer.nix -A luksroot
 * nixos/tests/lightdm.nix
 * nixos/tests/plasma5.nix
 * nixos/tests/sddm.nix

All of the tests still succeed and comparing some of the recognition
results to the earlier results it now also detects a lot more text than
before this commit.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-04-11 03:21:53 +02:00
..
doc/manual Update 17.03 release notes 2017-04-03 22:54:34 +02:00
lib nixos/testing: Improve quality of OCR 2017-04-11 03:21:53 +02:00
maintainers Revert "Revert "EC2: Disable PV support"" 2017-04-04 13:03:05 +02:00
modules tlp service: mask systemd-rfkill 2017-04-11 02:09:29 +03:00
tests Merge branch 'master' into postgresql-tests 2017-04-07 10:28:58 +01:00
COPYING
default.nix Remove nixFallback 2017-03-06 15:54:50 +01:00
README
release-combined.nix nixos/sddm: test automatic and manual login 2017-03-24 10:39:13 -05:00
release-small.nix nixos/release-small.nix: cleanup to use default versions 2017-01-27 15:33:54 +01:00
release.nix Merge branch 'master' into postgresql-tests 2017-04-07 10:28:58 +01:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.