Configuration of Processing
The configuration of the Processor is primarily defined by an Accusoft.FormDirectorSdk.FormSet object and a corresponding set of Accusoft.FormDirectorSdk.FormDefinition objects. Each processor object is associated with only one FormSet object, which is passed into the Processor constructor or created by the Processor constructor. This form set object specifies the following things:
- Settings and order of any cleanup, enhancement, and transformation, that will be applied to the unknown form image. The list of operations and their settings is extensive, see the ScanFix Xpress documentation for more detail.
- The list of forms and their template images, which are part of the form set against which the Accusoft.FormFixSdk.IdentificationProcessor will identify unknown images.
- The configuration of the IdentificationProcessor. This includes settings such as the quality level of identification, and whether the input image could be scanned at a different orientation than the template image.
- A list of fields associated with each form.
- The method and relevant settings used for creating a clip image of a field. This could be the clip method, clip without scaling, or clip and dropout.
- Settings and order of any ScanFix Xpress operations to be applied to the field clip image.
- Type and settings of any data extraction operation to be performed on the image of a field.
It is the responsibility of the calling code to create the FormSet object and ensure that it is in the proper state before passing it to the Processor constructor.
Other Processor Configuration Options
The Processor class exposes some properties that control behavior and which cannot be controlled by a FormSet object. These behaviors are considered to be specific to application requirements and in most cases the default values of these properties are acceptable. The properties exposed are:
- bool OutputAlignedFormImage - Controls whether the aligned form image will always be created and output in the result objects.
- The aligned form image is a version of the identification input image that has been transformed (shifted, scaled, rotated, or sheared) so that the fields in the input image overlap with the fields in the template image.
- bool OutputIdentificationInputImage - Controls whether the identification input image will be returned with the result objects.
- The identification input image is the unknown image passed to the IdentificationProcessor, which may or may not have been cleaned up by ScanFix Xpress in the prior steps. When no ScanFix Xpress operations are applied to the input image, the identification input image is the argument to the ProcessImage method.
- bool OutputIntermediateFieldImages - Controls whether the intermediate images generated while processing fields are contained in the result objects.
- The intermediate images consist of a clip image of the field, and sometimes if a ScanFix Xpress cleanup operation is specified for the field then an enhanced image is also one of the intermediate images. In the case of a clip field, where the desired result of the field is a clip of the image, then the field clip or enhanced field clip image (if created) will always be returned through the regular Result property for the field.