بقلم ماريك مودر
https://galfar.vevb.net/deskew
https://github.com/galfar/deskew
v1.30 2019-06-07
Deskow هي أداة سطر الأوامر لـ Deskewing المستندات النصية الممسوحة ضوئيًا. يستخدم تحويل Hough للكشف عن "خطوط النص" في الصورة. كإخراج ، تحصل على صورة تدور بحيث تكون الخطوط أفقية.
هناك ثنائيات مسبقة تم إنشاؤها لهذه المنصات (تقع في مجلد BIN): Win64 ( deskew.exe ) ، Win32 ( deskew32.exe ) ، Linux X86_64 ( deskew ) ، MacOS X86_64 ( deskew-mac ) ، Linux ArmArch64 ( deskew-arm deskew-arm64
تتوفر واجهة واجهة المستخدم الرسومية للأداة CLI هذه أيضًا (Windows و Linux و MacOS) ، انظر GUI's ReadMe.
الترخيص: MPL 2.0
https://github.com/galfar/deskew/release
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, PSDلدعم TIFF في Linux و MacOS ، تحتاج إلى تثبيت LIBTIFF 4.x (تسمى الحزمة عادة libtiff5).
بالنسبة إلى MacOS ، يمكنك تنزيل ثنائيات libtiff prebruilt هنا: https://galfar.github.io/store/tifflibbins-macos.zip. ما عليك سوى وضع الملفات داخل الأرشيف على نفس المجلد مثل deskew-mac قابل للتنفيذ.
على أهداف ARM التي تربط LIBTIFF يتم تعطيلها في الوقت الحالي (المعروف بالتعطل مع DESKOW). إذا كنت تريد أن تجرب نفسك تمكينها في وحدة ImagingTiff.pas .
يمكنك العثور على بعض صور الاختبار في مجلد Testimages والبرامج النصية لتشغيل الاختبارات ( RunTests.bat و runtests.sh ) في Bin. بشكل افتراضي ، فقط اتصل على أمر deskew ولكن يمكنك تمرير علامة مختلفة كمعلمة (على سبيل المثال runtests.sh deskew-arm ).
تقديمها هنا:
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:
ديسكو مكتوب في كائن باسكال. تحتاج إلى Pascal أو Delphi مجاني لإعادة ترجمة ذلك.
هناك ملفات مشروع لهذه المعرفات:
بالإضافة إلى ذلك ، هناك برامج نصية قذيفة/دفعات لمرجم FPC المستقل في مجلد Scripts .
يمكن تجميع Deskew وتم اختباره على هذه المنصات: Win32 ، Win64 ، Linux X86_64 ، MacOS X86_64 ، Linux ARM AARCH64 + V7.
يمكن العثور على أحدث رمز مصدر هنا:
https://github.com/galfar/deskew
هناك حاجة إلى مكتبة تصوير Vampyre لتجميعها وهي مدرجة في مجلد Deskew's Respo في مجلد التصوير.