oleh Marek Mauder
https://galfar.vevb.net/deskew
https://github.com/galfar/deskew
v1.30 2019-06-07
Deskew adalah alat baris perintah untuk Deskewing Dokumen Teks Pindai. Ini menggunakan transformasi hough untuk mendeteksi "garis teks" di gambar. Sebagai output, Anda mendapatkan gambar yang diputar sehingga garisnya horisontal.
Ada biner yang telah dikompilasi sebelumnya yang dibangun untuk platform ini (terletak di folder bin): win64 ( deskew.exe ), win32 ( deskew32.exe ), linux x86_64 ( deskew ), macOS x86_64 ( deskew-mac ), linux lengan aarch64 ( deskew-arm64 ) ( deskew-arm ).
GUI Frontend untuk alat CLI ini juga tersedia (Windows, Linux, dan MacOS), lihat README GUI.
Lisensi: MPL 2.0
https://github.com/galfar/deskew/releases
https://galfar.vevb.net/deskew#downloads
Usage:
deskew [-o output] [-a angle] [-b color] [..] input
input: Input image file
Options:
-o output: Output image file (default: out.png)
-a angle: Maximal expected skew angle (both directions) in degrees (default: 10)
-b color: Background color in hex format RRGGBB|LL|AARRGGBB (default: black)
Ext. options:
-q filter: Resampling filter used for rotations (default: linear,
values: nearest|linear|cubic|lanczos)
-t a|treshold: Auto threshold or value in 0..255 (default: a)
-r rect: Skew detection only in content rectangle (pixels):
left,top,right,bottom (default: whole page)
-f format: Force output pixel format (values: b1|g8|rgb24|rgba32)
-l angle: Skip deskewing step if skew angle is smaller (default: 0.01)
-g flags: Operational flags (any combination of):
c - auto crop, d - detect only (no output to file)
-s info: Info dump (any combination of):
s - skew detection stats, p - program parameters, t - timings
-c specs: Output compression specs for some file formats. Several specs
can be defined - delimited by commas. Supported specs:
jXX - JPEG compression quality, XX is in range [1,100(best)]
tSCHEME - TIFF compression scheme: none|lzw|rle|deflate|jpeg|g4
Supported file formats
Input: BMP, JPG, PNG, JNG, GIF, DDS, TGA, PBM, PGM, PPM, PAM, PFM, TIF, PSD
Output: BMP, JPG, PNG, JNG, GIF, DDS, TGA, PGM, PPM, PAM, PFM, TIF, PSDUntuk dukungan TIFF di Linux dan MacOS, Anda harus menginstal LIBTIFF 4.x (paket biasanya disebut libbtiff5).
Untuk macOS Anda dapat mengunduh binari Libliff Prebuilt di sini: https://galfar.github.io/store/tifflibbins-macos.zip. Masukkan cukup file di dalam arsip ke folder yang sama dengan yang dapat dieksekusi oleh deskew-mac .
Target lengan yang menghubungkan ke libliff dinonaktifkan saat ini (diketahui jatuh dengan deskew). Jika Anda ingin mencoba sendiri mengaktifkannya di unit ImagingTiff.pas .
Anda dapat menemukan beberapa gambar tes di folder testimages dan skrip untuk menjalankan tes ( RunTests.bat dan runtests.sh ) di tempat sampah. Secara default skrip cukup panggil perintah deskew tetapi Anda dapat melewati yang berbeda sebagai parameter (misalnya runtests.sh deskew-arm ).
Mengajukannya di sini:
https://github.com/galfar/deskew/issues
v1.30 2019-06-07:
v1.25 2018-05-19:
v1.21 2017-11-01:
v1.20 2016-09-01:
v1.10 2014-03-04:
v1.00 2012-06-04:
V0.95 2010-12-28:
V0.90 2010-02-12:
Deskew ditulis dalam objek Pascal. Anda memerlukan Pascal atau Delphi gratis untuk mengkompilasi ulang.
Ada file proyek untuk IDE ini:
Selain itu, ada skrip shell/batch kompilasi untuk kompiler FPC mandiri di folder Scripts .
Deskew dapat dikompilasi dan diuji pada platform ini: Win32, Win64, Linux X86_64, MacOS x86_64, Linux Arm Aarch64 + V7.
Kode sumber terbaru dapat ditemukan di sini:
https://github.com/galfar/deskew
Perpustakaan Pencitraan Vampyre diperlukan untuk kompilasi dan termasuk dalam folder repo Deskew di folder pencitraan.