Add Media Analysis
After adding a media service, you can add a processor to perform media analysis.
To add media analysis
-
Add a processor, by dragging the processor icon
from the components toolbar to the canvas.
The Add Processor dialog box opens.
-
In the Source list, click idol.nifi.media.
-
Select the OpticalCharacterRecognition processor and click ADD.
The processor is added to the canvas.
-
Create a connection between the KeyViewRouteOnFileType processor and the OpticalCharacterRecognition processor.
The Create Connection dialog box opens.
-
In the For Relationships area, select the images check box and click ADD.
The connection appears on the canvas. FlowFiles that represent image files are added to the queue for OCR, because this relationship matches the name of the property you created in the KeyViewRouteOnFileType processor in Add File Format Detection.
-
Right-click the OpticalCharacterRecognition processor and click Configure.
The Configure Processor dialog box opens.
- Click the Properties tab.
-
In the properties list, set the following properties:
IDOL License Service The name of the IDOL License Service that you created in Create a License Service. Media Service The name of the media service that you created in Add a Media Service. - Click the Scheduling tab.
-
In the Concurrent Tasks box, type the number of FlowFiles to process concurrently. If the machine has sufficient resources you can increase the value so that several files are analyzed at the same time, increasing throughput. For example, to process four images concurrently type
4
. - Click Apply.
-
Create a connection between the OpticalCharacterRecognition processor and the StandardizeMetadata processor.
The Create Connection dialog box opens.
-
In the For Relationships area, select the success check box and click ADD.
The connection appears on the canvas. Media files that were processed successfully are sent to the StandardizeMetadata processor. Notice that the media files bypass the KeyView filtering step. This makes sense because KeyView is unlikely to extract any useful text from an image file.