Technical FAQs

Question

For ImageGear .NET, what are the feature differences between an OCR Standard license, an OCR Plus license, and an OCR Asian license?

https://www.accusoft.com/products/imagegear-collection/imagegear-dot-net/#pricing

Answer

ImageGear’s OCR library has three different functionality options that you can choose for your website or application. The primary difference between the three options is the output formats created by the OCR engine. The options for your development are as follows:

  1. OCR Standard:
    The standard edition creates output formats for Western languages such as English. The standard edition outputs text only files and generates a PDF. The file formats it includes are searchable text PDFs and text documents.

  2. OCR Plus:
    The standard plus edition creates formatted outputs for Western languages like English. The formatted output is created with recognition technology that identifies font detail, locates image zones, and recognizes table structure in order to create a representation of the original document. The file formats it includes are Word, Excel, HTML, searchable PDF, and text documents.

  3. OCR Asian:
    The Asian edition creates a formatted output for Asian languages like Chinese, Japanese, and Korean. This formatted output is created with the same recognition technology as the Standard Plus that identifies font detail, locates image zones, and recognizes table structure. It also creates a representation of the original file. Formats include Word, Excel, HTML, searchable PDF, and text documents.

TAMPA, Fla. – On September 22, 2020, Accusoft announced its latest SDK, ImageGear PDF. This integration enables developers to add a variety of PDF functionalities into an application.

“We are proud to add ImageGear PDF as the latest addition to our product portfolio,” says Jack Berlin, CEO of Accusoft. “We recognized a need in the market for a more robust PDF solution that developers could use to enhance their products. Using our proprietary technology, I knew we could bridge that gap.”

ImageGear PDF gives end-users the ability to merge multiple PDFs, split a PDF into multiple PDFs, rearrange pages within a PDF, add pages or remove pages in a PDF, and more. The SDK adds programmatic annotation capabilities as well as compression, signature, comparison, and data capture.

“ImageGear PDF is a great tool for developers looking to enhance their application,” says Mark Hansen, Sr. Product Manager of SDKs. “Accusoft has a variety of different PDF solutions, but we wanted to add a more robust SDK that solves PDF pain points more efficiently.”

ImageGear PDF is available with an optical character recognition (OCR) add-on feature, which programmers can use to search for specific characters within a document, highlight different sections, and markup the output for easier viewing and collaboration. To learn more about ImageGear PDF, please visit our website at accusoft.com/products/imagegear-collection/imagegear-pdf/.

About Accusoft:

Founded in 1991, Accusoft is a software development company specializing in content processing, conversion, and automation solutions. From out-of-the-box and configurable applications to APIs built for developers, Accusoft software enables users to solve their most complex workflow challenges and gain insights from content in any format, on any device. Backed by 40 patents, the company’s flagship products, including OnTask, PrizmDoc™ Viewer, and ImageGear, are designed to improve productivity, provide actionable data, and deliver results that matter. The Accusoft team is dedicated to continuous innovation through customer-centric product development, new version release, and a passion for understanding industry trends that drive consumer demand. Visit us at www.accusoft.com.

Question

How do I remove XMP Data from my image using ImageGear .NET?

Answer

When removing XMP data in ImageGear, the simplest way to do this is to set the XMP Metadata node to null, like so:

ImGearSimplifiedMetadata.Initialize(); 
doc.Metadata.XMP = new ImGearXMPMetadataRoot();

Or, you can traverse through the metadata tree and remove each node from the tree:

// Example code. Not thoroughly tested
private static void RemoveXmp(ImGearMetadataTree tree)
{
ArrayList toRemove = new ArrayList();
foreach (ImGearMetadataNode node in tree.Children)
{
    if (node is ImGearMetadataTree)
        RemoveXmp((ImGearMetadataTree)node);

    if (node.Format != ImGearMetadataFormats.XMP)
        continue;

    toRemove.Add(node);
}

foreach (ImGearMetadataNode node in toRemove)
    tree.Children.Remove(node);
}
Question

How do I remove XMP Data from my image using ImageGear .NET?

Answer

When removing XMP data in ImageGear, the simplest way to do this is to set the XMP Metadata node to null, like so:

ImGearSimplifiedMetadata.Initialize(); 
doc.Metadata.XMP = new ImGearXMPMetadataRoot();

Or, you can traverse through the metadata tree and remove each node from the tree:

// Example code. Not thoroughly tested
private static void RemoveXmp(ImGearMetadataTree tree)
{
ArrayList toRemove = new ArrayList();
foreach (ImGearMetadataNode node in tree.Children)
{
    if (node is ImGearMetadataTree)
        RemoveXmp((ImGearMetadataTree)node);

    if (node.Format != ImGearMetadataFormats.XMP)
        continue;

    toRemove.Add(node);
}

foreach (ImGearMetadataNode node in toRemove)
    tree.Children.Remove(node);
}

FormFix forms identification processing

Without accurate forms recognition, developers will have a hard time building effective forms processing applications. The primary advantage of forms processing workflows is the ability to automate the data capture process, but the benefits of automation quickly evaporate if the system continually misidentifies forms or can’t align document images cleanly for accurate data capture. Accusoft’s FormFix SDK ensures that forms processing applications get off to the best start possible by quickly matching and aligning form images to predefined templates.

When to Use FormFix

FormFix works with structured forms that feature a standardized layout with fields located in fixed positions. The SDK has a number of use cases as part of a broader forms processing and data capture workflow. Its primary function is to identify form images and route them to the proper destination. In some instances, this will mean handing the recognized form off to the SmartZone integration, which performs optical character recognition (OCR) and intelligent character recognition (ICR) to extract printed text from form fields. If data capture doesn’t need to be done immediately, the form can instead be routed to a storage location for later reference.

But FormFix can do more than simply identify forms. It also features powerful optical mark recognition (OMR) capabilities, which allows it to detect marks in fillable bubbles or checkboxes that are commonly used on a wide range of forms. Without OMR, a forms processing application will be forced to rely on manual data entry for any form that contains these marks, which typically indicate information like marital status, health history, ethnic background, or a variety of demographic data. Deploying OMR to process these forms automatically helps to minimize the risk of human error and speeds up processing times. In addition to being able to read single or multiple marks, FormFix can also use OMR to detect the presence of a signature on a document. 

 

Creating Master Form Templates for Identification

Before FormFix can start identifying form images, it first needs FormSets to work with. A FormSet consists of several FormDefinitions, each of which represent a document form page. Every FormDefinition object contains compressed image data of a form template and indicates the fields from which data can be extracted. The individual fields can also have specific instructions associated with them that should be performed at the time of processing. This could include despeckling or other forms of image enhancement or clean-up

FormSets are created by the FormDirector API, which allows developers to designate what information needs to be extracted and where on a form it should be extracted from. Setting up a FormSet template for a IRS 1040 form, for instance, would involve designating which fields on an unfilled form will be matched and aligned so the information contained in them can be captured accurately. Developers can also create their FormSets using the FormAssist application, which is a graphical interface for FormDirector that allows them to easily upload blank form images and specify how each field should be handled during processing.

How FormFix Identifies Form Images

After a form image is uploaded and cleaned up (usually using the ScanFix Xpress SDK), it can be identified and aligned for data capture. FormFix uses its forms recognition processor to examine the input image and compare it to the available FormSets on file. It does this by looking at the FormDefinitions within the FormSets and matching their embedded template images to the current input image. Once a potential match is identified, FormFix selects the appropriate template and provides a confidence value for all identification candidates.

The FormFix alignment algorithm then takes over, placing the input image on the form template and making a series of adjustments to ensure that the field areas line up as precisely as possible. It can also perform form image drop-out, which removes pre-printed graphical elements, found in the template, like form field boxes and instructional text and leaves only the filled-in information behind. This helps improve recognition accuracy, whether the application is using SmartZone OCR/ICR or deploying FormFix’s OMR capabilities.

Improving FormFix Forms Recognition

Although FormFix is capable of quickly matching form images with the master forms the application has on file, there are a few steps developers can take to streamline the forms recognition process and improve workflow performance. For example, FormFix can be set to only compare images at 90, 180, and 270 degrees, or to only exert certain amounts of effort during forms identification. 

When setting up templates, developers can define what image operations need to be completed for each image input. These parameters can be set at different hierarchies, so some operations may be applied to all forms while others are only applied to specific FormDefinitions or form fields. This eliminates unnecessary image processing operations that may slow down workflows while still ensuring that consistent adjustments are being made where they’re needed.

If possible, barcodes can be affixed to different form types to quickly indicate which template needs to be referenced for the form alignment process. This allows FormFix to bypass the identification process and proceed directly to aligning the form images for dropout and recognition. 

Accelerate Your Forms Processing Workflow with FormFix

Accusoft’s FormFix SDK helps your forms processing application to quickly identify form images, prepare documents for zonal and full page OCR/ICR, and extract information with OMR functionality. Fully customizable to meet the needs of your forms workflow, FormFix also includes a variety of image cleanup tools that can remove imperfections and noise to improve recognition accuracy.

To learn more about the capabilities of the FormFix SDK and see how it fits into a broader forms processing solution, download our FormFix Fact Sheet today or contact one of our integration experts for more information.

Question

I encounter an Unhandled Exception error, as shown below, in ImageGear when trying to load a page into the recognition engine.

Error Message: An unhandled exception of type
‘ImageGear.Core.ImGearException’ occurred in ImageGear22.Core.dll

Additional information: IMG_DPI_WARN (0x4C711): Non-supported
resolution. Value1:0x4C711

What is causing this and how can I fix it?

Answer

This is probably because the original image used to create the page didn’t have a Resolution Unit set.

Resolution unit not set in original image

To fix this, check if the page has a Resolution Unit set. If it does not, set it to inches. You should also set the DPI of the image as those values were probably not carried over from the original image since the Resolution Unit wasn’t set. The following code demonstrates how to do this.

// Open file and load page.
using (var inStream = new FileStream(@"C:\Path\To\InputImage.jpg", FileMode.Open, FileAccess.Read, FileShare.Read))
{
    // Load first page.
    ImGearPage igPage = ImGearFileFormats.LoadPage(inStream, firstPage);

    if (igPage.DIB.ImageResolution.Units == ImGearResolutionUnits.NO_ABS)
    {
        igPage.DIB.ImageResolution.Units = ImGearResolutionUnits.INCHES;
        igPage.DIB.ImageResolution.XNumerator = 300;
        igPage.DIB.ImageResolution.XDenominator = 1;
        igPage.DIB.ImageResolution.YNumerator = 300;
        igPage.DIB.ImageResolution.YDenominator = 1;
    }

    using (var outStream = new FileStream(@"C:\Path\To\OutputImage.jpg", FileMode.OpenOrCreate, FileAccess.ReadWrite))
    {
        // Import the page into the recognition engine.
        using (ImGearRecPage recognitionPage = recognitionEngine.ImportPage((ImGearRasterPage)igPage))
        {
            // Preprocess the page.
            recognitionPage.Image.Preprocess();

            // Perform recognition.
            recognitionPage.Recognize();

            // Write the page to the output file.
            recognitionEngine.OutputManager.DirectTextFormat = ImGearRecDirectTextFormat.SimpleText;
            recognitionEngine.OutputManager.WriteDirectText(recognitionPage, outStream);
        }
    }
}

Automated data capture tools are an essential feature of today’s business applications. Without the ability to quickly extract information from incoming forms and documents, organizations will struggle to keep their records, databases, and customer-facing software up-to-date. While software SDKs like Accusoft’s SmartZone can deliver powerful optical character recognition (OCR) and intelligent character recognition (ICR) to help applications accurately capture the information they need, these tools were not designed to operate in isolation. To get the best performance out of them, they need to be incorporated into a comprehensive and well-designed forms processing workflow.

Building an Efficient and Effective Forms Processing Workflow

Although data capture is often the primary objective of forms processing, a number of elements need to be in place for an application to be able to deploy SmartZone’s powerful OCR/ICR functionality. The first step involves the creation of form templates that can be used both for identifying incoming scanned forms and for defining field regions on the page from which data can be extracted. Building this library of templates provides a road map of sorts for the recognition process.

After form images are acquired, either from pre-existing digital documents or newly scanned images, they may need to be enhanced or cleaned up to ensure the best recognition results. Operations such as binarization, despeckling, deskewing, and line removal can all improve the data capture process, especially in the case of scanned documents. Older documents frequently include a great deal of image noise when scanned into digital format, which can make it difficult for an OCR/ICR engine to properly segment and read characters cleanly.

Once a form image has undergone enhancement, it can be matched and aligned with the correct template to ensure that the SmartZone recognition engine will be able to obtain a clean field clip. Scanned images can be overlaid via an alignment algorithm that performs minor adjustments to match it exactly with the correct template. This step is crucial because the data capture process is set up to read the field areas identified by the template rather than recalibrating for each form. If the alignment is off, the engine will not get a clean read of the characters, which could result in inaccurate recognition results.

After the form is identified and aligned, additional enhancement and cleanup operations can be performed on the specific areas of the form that contain information to be extracted. This typically means individual field areas where text or other characters have been entered. The locations to be cleaned up can be designated during the template creation process when data extraction zones are defined. In some instances, a processing workflow may skip the initial full-page enhancement and instead only perform clean-up on areas where data capture will be carried out. This approach is often more efficient from a processing standpoint, especially when targeted, zonal recognition is being applied.

Form image dropout can also be performed at this stage, which involves the removal of image content like signature lines, text field boxes, comb lines, or other extraneous guiding content. Here again, proper form alignment is crucial. If the form is slightly “off” from the template, valuable character content could be removed, making accurate recognition much more difficult. Good form dropout tools should also be able to reconstruct characters that lose pixel data during the dropout process, which is common for characters that have an element that overlaps form lines (such as the lower half of a “j” or a “y,” which might otherwise be read as an “i” or a “v” if not repaired prior to recognition).

SmartZone’s Role in the Recognition Phase of Application Workflows

After a form is acquired, enhanced, identified, and aligned, it can be passed along to the next stage of the workflow for text recognition using SmartZone OCR/ICR. There are a few options that can be selected at this point to help improve recognition accuracy and faster data capture performance.

1. Select Character Sets

SmartZone supports a wide variety of languages and alphanumeric character sets. Realistically, only a few of these sets will need to be used at any one time. Selecting only the sets needed for a particular form will improve recognition accuracy and speed. For instance, there’s no need to have support of Cyrillic languages (like Russian or Greek) enabled if all of the forms being processed are in English.

2. Designate Field Types

SmartZone can designate the expected format of text found in specific fields on a template. Rather than reading each field out of context and extracting the contents without knowing whether or not it’s been filled in correctly, field types can be set to values such as date, email, currency, phone number, or Social Security Number. Regular expressions can also be established for more customizable results. If the character content of the field doesn’t match the designated field type, SmartZone will immediately return an exception and move on rather than trying to recognize and extract the incorrect data. Setting this parameter can greatly improve both accuracy and speed.

3. Set Minimum Character Confidence

Every character SmartZone reads is assigned a confidence value, which reflects the OCR/ICR engine’s assessment of its recognition accuracy. A lower value means that there is a higher likelihood that a character was incorrectly identified. Setting a minimum character confidence value ensures that any character result below that value will be rejected and replaced with a designated rejection character. In practice, this control is used to determine which characters require a manual review following recognition. Setting a high confidence value will ensure higher recognition accuracy, but will likely lead to more exceptions that need to be reviewed by a human.

SmartZone Recognition Results

After character recognition is performed, results can be returned for the character, text line, or text block level. This data can then be passed along to the next stage of a business workflow or used to populate databases connected to the application. Operation instructions, identification, and image areas defined can be transferred to other components for additional forms processing or stored in memory for later access using SmartZone’s Read From Stream or Write From Stream functions.

Getting Started with SmartZone

With support for both OCR and ICR data capture, Accusoft’s SmartZone SDK can serve a vital role in high-performance forms processing applications. The powerful OCR engine can recognize multiple languages, including select Asian, African, and Indian characters. Capable of performing full page or zonal text extraction, SmartZone also includes a variety of customization features that can improve accuracy and recognition speed. Learn more about this versatile SDK’s features and use cases in our product fact sheet.

Question

Why do I get a “File Format Unrecognized” exception when trying to load a PDF document in ImageGear .NET?

Answer

You will need to set up your project to include PDF support if you want to work with PDF documents. Add a reference to ImageGear24.Formats.Pdf (if you’re using another version of ImageGear, make sure you’re adding the correct reference). Add the following line of code where you specify other resources:

using ImageGear.Formats.PDF;

Add the following lines of code before you begin working with PDFs:

ImGearFileFormats.Filters.Insert(0, ImGearPDF.CreatePDFFormat());
ImGearPDF.Initialize();

The documentation page linked here shows how to add PDF support to a project.

Question

Why do I get a “File Format Unrecognized” exception when trying to load a PDF document in ImageGear .NET?

Answer

You will need to set up your project to include PDF support if you want to work with PDF documents. Add a reference to ImageGear24.Formats.Pdf (if you’re using another version of ImageGear, make sure you’re adding the correct reference). Add the following line of code where you specify other resources:

using ImageGear.Formats.PDF;

Add the following lines of code before you begin working with PDFs:

ImGearFileFormats.Filters.Insert(0, ImGearPDF.CreatePDFFormat());
ImGearPDF.Initialize();

The documentation page linked here shows how to add PDF support to a project.

Question

The logging for ImageGear C & C++ Deployment Packaging Wizard (DPW) is showing different output for some components since v19.3, why is this?

In ImageGear C & C++ v19.2 and prior, the DPW had additional logging information for the ARTX component in its deployment.log:

Deploying an application that uses the ARTXGUI library of ImageGear
ARTX Component requires the following merge modules to be installed:

Microsoft_VC90_CRT_x86_x64.msm

Microsoft_VC90_MFC_x86_x64.msm

But since v19.3, the logs are no longer telling me to install these modules. Is this a mistake, or are they no longer necessary?

Answer

This was an intentional change on our end, and the Deployment Packaging Wizard (DPW) is working as intended. We made some updates to the DPW in the latest release; one update is that the CRM requirements for CORE (which is required in every project) now also covers the ARTX component. If the DPW is not saying you need additional components to use the ARTX component, then you’ll be fine.

Question

When using OCR in ImageGear .NET, is there any way to distinguish between a capital/uppercase letter O and the number 0?

Answer

Not without context or a font that makes the difference clear (such as one with a slashed 0). ImageGear will properly recognize Oliver and 1530 as containing O and 0, respectively, but cannot reliably distinguish it when letters and numbers are mixed. That is, ImageGear may not reliably distinguish between 1ABO0F3 and 1AB0OF3.