Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 7.14
Sv translation
languageru

Настройка OCR для различных перехватчиков производится в конфигурационных файлах:

  • Чтобы чтобы включить OCR для анализа перехваченных изображений, внесите изменения в файл /opt/iw/tm5/etc/warpd.conf. В секции Warp задайте параметру EnableOCR значение true.;
  • Чтобы чтобы включить OCR для анализа изображений, загружаемых в качестве эталонных документов, внесите изменения в файл /opt/iw/tm5/etc/sample_compiler.conf. Задайте параметру EnableOCR значение true.

Чтобы настроить OCR для каналов перехвата, используйте файл /opt/iw/tm5/etc/config-perm/bookworm/ocr_custom.xml. Уровни настроек перечислены от более низкого приоритета к более высокому:

  • на уровне сервиса;
  • на уровне типа события для конкретного сервиса;
  • на уровне протокола для конкретного типа события.

Подробнее о настройках см. Настройка использования OCR.

После того, как вы внесли изменения в файлах, перезапустите сервисы Traffic Monitor:

Блок кода
languagetext
iwtm restart
Информация
titleПримечание:

В случае распределенной установки Traffic Monitor на несколько серверов , задайте настройки включения OCR для каждого сервера отдельно.

Информация
titleПримечание:

Если с помощью SDK был зарегистрирован новый тип событий, то к нему применяются настройки для сервиса, к которому относится данный тип события. Если зарегистрирован новый протокол, для него действуют настройки типа события, к которому относится данный протокол.

Каналы перехвата

В таблице ниже перечислены каналы перехвата, для анализа событий из которых в Traffic Monitor может использоваться OCR.

СервисТип событияПротокол
ПочтаЭлектронная почта

POP3

SMTP

IMAP

MAPI

NRPC

Веб-почта

HTTP

HTTPS

МессенджерSkypeSKYPE

ICQOSCAR

XMPPXMPP

MS LyncSIP

Telegram-

ВКонтакте (VK)HTTPS

FacebookHTTPS

WhatsAppWhatsApp
Интернет-активностьВеб-сообщение

HTTP

HTTPS

Обмен файламиFTPFTP
Внешнее устройство-
Облачные хранилищаHTTPS
Принтер и МФУПечать-
ХранениеData Discovery-
Запись мультимедиаФотосъемка-

Поддерживаемые OCR-экстракторы

При установке Traffic Monitor с помощью инсталлятора на серверную часть Системы устанавливаются оба OCR-экстрактора , и выбирается для использования один из них:

  • ABBYY FineReader Engine 12
  • Tesseract 4.1.1

Если вы выбрали ABBYY FineReader Engine, необходимо нужно вручную добавить лицензию.

Различия в функциональности экстракторов приведены в таблице ниже:

Функциональность ABBYY FineReader EngineTesseract
Распознавание углов поворота изображения0(+/-20), 90(+/-20), 180(+/-20) и 270( + /-20) градусов-
Распознавание цветного изображения+-
Коррекция изображения+-
Рекомендуемое разрешение изображения

300 DPI для текста с размером шрифта от 10pt 

400-600 400–600 DPI для текста с размером шрифта 9pt и меньше

300 DPI для текста с размером шрифта от 10pt

400-600 400–600 DPI для текста с размером шрифта от 9pt и меньше

Информация
titleПримечание:

Чтобы избежать больших отклонений от рекомендуемого разрешения изображения, при работе экстрактора ABBYY FineReader Engine используется параметр AutoOverwriteResolution (со значением true по умолчанию), позволяющий автоматически определять разрешение изображения.

Настройки Tesseract

Включение экстрактора

Чтобы включить использование экстрактора Tesseract:

  1. Удалите символьную ссылку /opt/iw/tm5/bin/iw_image2text.
  2. Создайте символьную ссылку:

    Блок кода
    languagetext
    ln -s /opt/iw/tm5/bin/iw_image2text_ts /opt/iw/tm5/bin/iw_image2text

Ограничение размера изображения

Чтобы изменить ограничение на размер пересылаемого изображения:

  1. Перейдите в директорию /opt/iw/tm5/etc/image2text_ts.conf.
  2. Отредактируйте параметры MaxSizeInKb (верхняя граница) и MinSizeInKb (нижняя граница). По умолчанию установлено 1536 КБ и 40 КБ соответственно.

Применение OCR только к событиям облачного хранилища

Чтобы включить OCR только для событий облачного хранилища:

  1. Откройте справочник /opt/iw/tm5/etc/config/bookworm/services.xml и найдите соответствующие для облачного хранилища параметры mnemo и key. 
    Например:

    Блок кода
    languagetext
    object_type mnemo="cloud_storage" 
    
    key="AA9DFB259F0DFEE040BADC95815E13A200000000" 
  2. Скопируйте значения параметров key и mnemo и вставьте в /opt/iw/tm5/etc/config-perm/bookworm/ocr_custom.xml

Настройки ABBYY FineReader Engine

Якорь
1
1
Настройка лицензии

Для того, чтобы настроить лицензию ABBYY FineReader Engine:

  1. Введите полученные серийный номер и пароль в конфигурационный файл image2text_fre.conf, расположенный в директории /opt/iw/tm5/etc:
    • в поле SerNum введите серийный номер;
    • в поле Pwd введите пароль.
  2. Скопируйте полученный файл с лицензией (формат .LocalLicense) в директорию /var/lib/Content_AI/SDK/12/Licenses.
  3. Убедитесь, что у пользователя iwtm есть права на доступ к скачанному файлу.
  4. Перезапустите сервис iw_warpd.

Включение экстрактора

Чтобы настроить на работу экстрактор ABBYY FineReader Engine:

  1. Удалите символьную ссылку /opt/iw/tm5/bin/iw_image2text.
  2. Создайте символьную ссылку:

    Блок кода
    languagetext
    ln -s /opt/iw/tm5/bin/iw_image2text_fre /opt/iw/tm5/bin/iw_image2text

Быстрый режим обработки документов

Экстрактор ABBYY FineReader Engine может работать в двух режимах:

  • сбалансированный – предусматривает максимально качественную обработку изображений. Этот режим включен по умолчанию. Настройки его пользовательского профиля находятся в файле /opt/iw/tm5/etc/CRProfile.ini;
  • быстрый – позволяет максимально быстро обработать изображения, при синтезе документа одновременно загружается 64 страницы. Настройки пользовательского профиля находятся в файле /opt/iw/tm5/etc/CRProfile_fast.ini.
    При необходимости этот режим можно настроить вручную. 

    В быстром режиме включены:

    • быстрый режим определения ориентации страниц (качество снижено);
    • стандартный анализ страницы, без подбора шаблонов;
    • игнорирование теней;
    • обнаружение таблиц во время анализа;
    • быстрое извлечение объектов (качество снижено).

    В быстром режиме выключены:

    • балансировочный режим;
    • обработка изображений, как фото;
    • сжатие изображений;
    • использование бинаризации изображений;
    • детектирование параметров шрифта;
    • удаление мусора с изображения;
    • удаление шумов с временного изображения; 
    • детектирование "пористого" текста;
    • распознавание всего текста на изображении, включая текст в самих изображениях;
    • извлечение из изображения всего возможного текста;
    • детектирование заголовков;
    • детектирование сносок;
    • детектирование оглавления;
    • детектирование колонтитулов;
    • детектирование страниц документа.

Чтобы активировать быстрый режим обработки документов, в конфигурационном файле image2text_fre.conf, расположенном в директории /opt/iw/tm5/etc, укажите путь до файла с настройками пользовательского профиля в параметре "ABBYYProfile":"etc/CRProfile_fast.ini" и сохраните изменения.

Предупреждение
titleВажно!

Оптимизация скорости обработки документов недоступна для скан-копий схем, карт местности и монохромных изображений.

Ограничение размера изображения

Чтобы изменить ограничение на размер пересылаемого изображения:

  1. Перейдите в директорию /opt/iw/tm5/etc/image2text_fre.conf.
  2. Отредактируйте параметры MaxSizeInKb (верхняя граница) и MinSizeInKb (нижняя граница). По умолчанию установлено 1536 КБ и 40 КБ соответственно.

Применение OCR только к событиям облачного хранилища

Чтобы включить OCR только для событий облачного хранилища:

  1. Откройте справочник /opt/iw/tm5/etc/config/bookworm/services.xml и найдите соответствующие для облачного хранилища параметры mnemo и key. 
    Например:

    Блок кода
    languagetext
    object_type mnemo="cloud_storage" 
    
    key="AA9DFB259F0DFEE040BADC95815E13A200000000" 
  2. Скопируйте значения параметров key и mnemo и вставьте в /opt/iw/tm5/etc/config-perm/bookworm/ocr_custom.xml
Sv translation
languageen

OCR for different interceptors is configured in the configuration files:

  • To enable OCR for analysis of intercepted images, use the /opt/iw/tm5/etc/warpd.conf file. In the Warp section, set the value of the EnableOCR parameter to true.
  • To enable OCR for analysis of images loaded as sample documents, use the /opt/iw/tm5/etc/sample_compiler.conf file. Set the value of the EnableOCR parameter to true.

To configure OCR for different interception channels, use the /opt/iw/tm5/etc/config-perm/bookworm/ocr_custom.xml file. Setting levels are listed by priority, from lowest to highest.

  • Level of a service;
  • Level of the event type for a particular service;
  • Level of a protocol for a particular event type. 

For details, see Настройка использования OCR.

After you have changed the files, run the following command:

Блок кода
languagetext
iwtm restart
Информация
titleNote:

For distributed installation when you install Traffic Monitor on several servers, you should specify individual OCR settings for each server.

Информация
titleNote:

If a new event type is registered by means of SDK, it will be processed with settings specified for the service the event type belongs to. If a new protocol is registered, it is processed with settings specified for the event type this protocol belongs to.

Interception channels

The table below lists interception channels for which OCR can apply.

ServiceEvent typeProtocol
EmailEmail

POP3

SMTP

IMAP

MAPI

NRPC

Web email

HTTP

HTTPS

MessengerSkypeSKYPE

ICQOSCAR

XMPPXMPP

MS LyncSIP

Telegram-

VK (VKontakte)HTTPS

FacebookHTTPS

WhatsAppWhatsApp
Internet activityWeb message

HTTP

HTTPS

File exchangeFTPFTP
External devices-
Cloud storagesHTTPS
Printer and MFDPrint-
StorageData Discovery-
Recording mediaPhoto-

Supported OCR extractors

During Traffic Monitor installation, both extractors are installed to the server end of the System, and one of them is chosen for usage:

  • ABBYY FineReader Engine 12;
  • Tesseract 4.1.1.

In case you selected ABBYY FineReader Engine, configure the license manually.

Functional differences of extractors are listed in the table below:

Functionality

ABBYY FineReader Engine

Tesseract

Recognition of image rotation angles

0 (+/-20) , 90 (+/-20), 180 (+/-20) and 270 (+/-20) degrees

-


Recognition of colour images


+

-

Image correction

+

-


Recommended image resolution


300 DPI  for text with a font size from 10pt 

400-600 DPI for text with a font size of 9pt and less

300 DPI for text with a font size from 10pt 

400-600 DPI for text with a font size of 9pt and less

Информация
titleNote:

To avoid deviation from recommended image resolution, when using ABBYY FineReader Engine the parameter AutoOverwriteResolution (true by default) is used, which allows to specify the image resolution automatically.

Tesseract settings

Select the extractor

To configure the System to use Tesseract:

  1. Delete the /opt/iw/tm5/bin/iw_image2text symlink.
  2. Create a symlink:

    Блок кода
    languagetext
    ln -s /opt/iw/tm5/bin/iw_image2text_ts /opt/iw/tm5/bin/iw_image2text

Change image size limits

To change size limit for images that can be sent:

  1. Go to /opt/iw/tm5/etc/image2text_ts.conf directory.
  2. Edit the MaxSizeInKb (maximum size) and MinSizeInKb (minimum size) parameters. By default, their values are 1536 KB and 40 KB respectively.

Enable OCR only for cloud storage events

To enable OCR only for cloud storage events:

  1. Open the /opt/iw/tm5/etc/config/bookworm/services.xml file and find mnemo and key parameters, which are suitable for cloud storage.
    For example:

    Блок кода
    languagetext
    object_type mnemo="cloud_storage" 
    
    key="AA9DFB259F0DFEE040BADC95815E13A200000000" 
  2. Copy the values of the key and mnemo parameters and paste them into/opt/iw/tm5/etc/config-perm/bookworm/ocr_custom.xml file.

ABBYY FineReader Engine settings

Якорь
1
1

Configure license

To configure ABBYY FineReader Engine license:

  1. In the /opt/iw/tm5/etc/image2text_fre.conf configuration file, edit values of the fields as follows: 
    • Enter serial number in the SerNum field;
    • Enter password in the Pwd field.
  2. Copy the license file (.LocalLicense format) to the /var/lib/Content_AI/SDK/12/Licenses directory.
  3. Make sure that iwtm user can access the downloaded file. 
  4. Restart the iw_warpd service.

Select the extractor

To configure the System to use ABBYY FineReader Engine:

  1. Delete the /opt/iw/tm5/bin/iw_image2text symlink.
  2. Create a symlink:

    Блок кода
    languagetext
    ln -s /opt/iw/tm5/bin/iw_image2text_fre /opt/iw/tm5/bin/iw_image2text

Activate fast mode of document processing

ABBYY FineReader Engine can operate in two modes:

  • Balanced mode provides the best quality of images processing (default mode). You can configure the user profile of the mode in /opt/iw/tm5/etc/CRProfile.ini file;
  • Fast mode provides the fastest images processing, 64 pages can be loaded at a time while document synthesis. You can configure the user profile of the mode in /opt/iw/tm5/etc/CRProfile_fast.ini file. If required, configure the mode manually. 

 The following options are enabled while Fast mode is on:

  • Fast mode of page orientation detection (the quality lowers);
  • Standard analysis of page, no sample selection;
  • Ignoring the shadows;
  • Detecting tables during analysis;
  • Fast objects extraction (the quality lowers).

The following options are disabled while Fast mode is on:

  • Balanced mode;
  • Processing images as photos;
  • Compressing images;
  • Using image binarization;
  • Detecting font parameters;
  • Removing garbage from image;
  • Removing texture from temporary image; 
  • Detecting porous text;
  • Detecting whole text on image, including text within image;
  • Extracting whole text from image;
  • Detecting headlines;
  • Detecting footnotes;
  • Detecting table of contents;
  • Detecting running titles;
  • Detecting pages of document.

To activate the fast mode of document processing, in "ABBYYProfile":"etc/CRProfile_fast.ini" parameter of the configuration file /opt/iw/tm5/etc/image2text_fre.conf, indicate the path to the file with user profile configuration, then save the changes.

Предупреждение
titleWarning!

Speed optimization of images processing cannot be applied for scanned copies of schemes, location maps, monochrome images.

Change image size limits

To change size limit for images that can be sent:

  1. Go to /opt/iw/tm5/etc/image2text_fre.conf directory.
  2. Edit the MaxSizeInKb (maximum size) and MinSizeInKb (minimum size) parameters. By default, their values are 1536 KB and 40 KB respectively.

Enable OCR only for cloud storage events

To enable OCR only for cloud storage events:

  1. Open the /opt/iw/tm5/etc/config/bookworm/services.xml file and find mnemo and key parameters, which are suitable for cloud storage.
    For example:

    Блок кода
    languagetext
    object_type mnemo="cloud_storage" 
    
    key="AA9DFB259F0DFEE040BADC95815E13A200000000" 
  2. Copy the values of the key and mnemo parameters and paste them into/opt/iw/tm5/etc/config-perm/bookworm/ocr_custom.xml file.