Open topic with navigation

Before You Index > Enrich Your Content > Analyze Images

# Analyze Images

When you index images into IDOL Server through CFS, KeyView can extract metadata from the images but cannot process their content. To enrich documents that represent images, you can send the images to an IDOL Image Server. The Image Server processes the images, and extracts useful information. CFS can run any analysis task that you have configured your Image Server to complete. For example, if the image is an image of text, you can run Optical Character Recognition. If the image contains faces, you can run face recognition. CFS takes the information extracted by Image Server and adds it to the document's metadata or content.

For example, you might want to tag all images that contain your company logo. After this information has been added to the document, it can be used by other IDOL operations.

Before you set up Image Analysis in CFS, complete the following steps.

- Install Image Server. To run analysis on images, CFS requires Image Server 10.3 or later.
- Configure Image Server. You must set up Image Server to run the analysis tasks that you want to use. You might also need to train Image Server. For example, to use face recognition or object detection, you must train Image Server to recognize specific faces or objects.
- Test Image Server. HPE recommends manually sending an action to Image Server to test that your analysis tasks complete successfully.

After completing these steps, you can configure CFS. You can configure CFS to run analysis on all images, or you can configure CFS to process specific files.

## Run Analysis on All Images

To automatically run analysis on all images ingested by CFS, run the Lua script `ImageAnalysis.lua`. This script is supplied with CFS, in the `scripts` folder. This script runs analysis on all images that Image Server can process (including PDF files). By default, the script runs all the analysis tasks that have been configured in your Image Server configuration file.

In the `[ImageServerSettings]` section of your CFS configuration file, you must specify the host name (or IP address) and ACI port of your Image Server.

The following example shows how to configure image analysis in the CFS configuration file:

    [ImportTasks]
    Pre0=Lua:scripts/ImageAnalysis.lua

    [ImageServerSettings]
    ImageServerHost=server
    ImageServerPort=18000

In the `[ImageServerSettings]` section, you can also specify the configuration parameters `ImageAnalysisTaskSections` (to run only named analysis tasks) and `ImageAnalysisTransform` (to specify an XSL transformation to use to transform the metadata returned from Image Server, before it is added to the document). For more information about these parameters, refer to the CFS documentation.

## Run Analysis on Specific Images

To run analysis on specific images, you must use the `ImageServerAnalysis` import task, and write your own Lua script to identify the documents that you want to process. The `ImageServerAnalysis` task processes only documents that have the field `AUTN_NEEDS_IMAGE_SERVER_ANALYSIS`, so your script must add this field to any document that you want to process.

The following example shows how to configure the `ImageServerAnalysis` task in the CFS configuration file:

    [ImportTasks]
    Post0=Lua:EnableImageAnalysis.lua
    Post1=ImageServerAnalysis:ImageServerSettings

    [ImageServerSettings]
    ImageServerHost=server
    ImageServerPort=18000
    ImageAnalysisTaskSections=dococrtask,facerectask,objecttask
    ImageAnalysisTransform=xslt/My_Transform.xsl

The `Post0` import task runs your Lua script, which must determine whether a file is suitable for image analysis, and add the field `AUTN_NEEDS_IMAGE_SERVER_ANALYSIS` to any document that you want to process.

The `Post1` import task is the `ImageServerAnalysis` task. This parameter specifies the name of a section in the CFS configuration file that contains the settings for image analysis.

In the named section, specify the host name (or IP address), and ACI port of your Image Server. You can also specify the configuration parameters `ImageAnalysisTaskSections` (to run only named analysis tasks) and `ImageAnalysisTransform` (to specify an XSL transformation to use to transform the metadata returned from Image Server, before it is added to the document). For more information about these parameters, refer to the CFS documentation.

## Run Analysis from a Lua Script

You can include image analysis as part of a custom Lua script by using the Lua functions provided by CFS. CFS provides the functions `analyze_image_in_document` and `analyze_image_in_file`. For more information about these functions, refer to the Connector Framework Server Administration Guide.

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close We welcome your comments! To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm