1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00
nixpkgs/nixos/lib
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
..
test-driver nixos/testing: Improve quality of OCR 2017-04-11 03:21:53 +02:00
build-vms.nix Use only one build of qemu in VM tests 2016-12-20 10:52:46 +01:00
eval-config.nix eval-config.nix: configuration->configuration.nix 2017-01-04 19:15:47 +01:00
from-env.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
make-channel.nix Unify NixOS and Nixpkgs channel structure 2015-08-05 17:37:11 +02:00
make-disk-image.nix make-disk-image.nix: set last fsck time on ext4 images to enable resize-on-startup 2017-02-26 02:02:22 +00:00
make-ext4-fs.nix nixos: Add derivations for SD card installation images on ARM 2015-07-26 00:31:20 +03:00
make-iso9660-image.nix Combine ISO generation steps 2016-03-15 14:15:12 +01:00
make-iso9660-image.sh Combine ISO generation steps 2016-03-15 14:15:12 +01:00
make-squashfs.nix Tune mksquashfs for smaller isos. 2016-12-28 16:07:16 +01:00
make-system-tarball.nix nixos/make-system-tarball: extra commands to be executed before archive 2014-12-11 23:17:27 +01:00
make-system-tarball.sh make-system-tarball.sh: use numeric uids 2017-01-01 06:03:05 +01:00
qemu-flags.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
testing.nix nixos/testing: Improve quality of OCR 2017-04-11 03:21:53 +02:00
utils.nix nixos: generalize copy-paste from stage-1 and zfs to utils 2016-08-23 18:14:06 +00:00