From: Speccyfighter <zxwarior@yandex.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] sane + распознавание
Date: Sun, 05 Dec 2010 07:19:58 +0200
Message-ID: <4CFB20FE.3020008@yandex.ru> (raw)
In-Reply-To: <web-896241140@cgp.dol.ru>
04.12.2010 19:35, Andrey Liakhovets пишет:
> ALT Linux 5.0.1 Master, текущий p5.
>
> Попробовал вместо gocr вызывать cuneiform из sane.
> В настройках sane прописал:
> команда для распознавания -- cuneiform
> параметр для вых. файла -- -o
> (и стёр параметр -i для входного файла).
>
> В результате выходного файла нет.
>
> При этом cuneiform -o out.txt in.jpg нормально работает.
>
Попробовать так?
$ scanimage --resolution 300 -t 10 -l 20 -x 180 -y 170 -p --format=tiff
> img2.tiff
$
t, l - отступы
x, y - размер сканируемой зоны
$ cuneiform -l ruseng --singlecolumn -o out.txt img2.tiff
$
> Кто-нибудь уже распознавал прямо из sane?
Не пробовал :)
> Или рекомендуется yagf?
В ней проще задавать область распознавания.
> Есть ли документация на распознавалки (кроме исходников)?
> (symmetrica.net смотрел, манов нет, --help они не понимают)
Копипаст с http://habrahabr.ru/blogs/linux/95479/
(тут подсмотрел опцию singlecolumn)
[quote]
Запускать можно со следующими аргрументами:
|-l|
Указывает язык документа. Из возможных: eng(по умолчанию)
ger fra rus swe spa ita ruseng ukr srp hrv pol dan por dut cze rum hun bul
slo lav lit est tur.
|-o|
Сохраняет в файл.
|-f|
Формат полученного текста. Из поддерживаемых: text(по умолчанию),
html, rtf, smarttext(plain text with TeX paragraphs), hocr(hOCR HTML
format),
native(Cuneiform 2000 format)
|--dotmatrix|
Оптимизация работы скрипта под изображение, распечатанное с помощью
матричного принтера.
|--fax|
Оптимизация работы скрипта под изображение, распечатанное с помощью факса.
|--singlecolumn|
Отключает анализ страницы и подразумевает, что у нас изображение состоит
из одной колонки текста.
Пример использования:
|cuneiform -l ruseng -o /our/dir/text.txt /our/dir/book_1.tif|
[/quote]
Ещё есть способы выдирания параметров:
$ cuneiform
Cuneiform for Linux 1.0.0
Usage: cuneiform [-l languagename -f format --dotmatrix --fax -o
result_file] imagefile
$ cuneiform -l
Cuneiform for Linux 1.0.0
Supported languages: eng ger fra rus swe spa ita ruseng ukr srp hrv pol
dan por dut cze rum hun bul slo lav lit est tur.
$ cuneiform -f
Cuneiform for Linux 1.0.0
Supported formats:
html HTML format
hocr hOCR HTML format
native Cuneiform 2000 format
rtf RTF format
smarttext plain text with TeX paragraphs
text plain text
prev parent reply other threads:[~2010-12-05 5:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-04 17:35 Andrey Liakhovets
2010-12-04 18:41 ` Константин Михайленко
2010-12-05 5:19 ` Speccyfighter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CFB20FE.3020008@yandex.ru \
--to=zxwarior@yandex.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git