7.5.6.1   General Options

Under General Options, you can decide on the Generation Mode, on the Alignment Method and whether code from the Image Acquisition Assistant should be integrated into the generated code.

Generation Mode lets you select the task for which the code is generated, that is

Activate Initialize Acquisition if you have previously used the 图像采集助手 to acquire images and want to integrate the generated code from this assistant in your code. Such an automatic integration of code results, for example, in the automatic opening of the framegrabber if Image Acquisition Assistant is activated. If code for image acquisition already exist, the checkboxes should be deactivated. If Image Acquisition Assistant is not in use, Initialize Acquisition is grayed out.

  • Alignment

    If the characters in your image can appear shifted or rotated, an alignment, which can be chosen on the Code Generation tab under Alignment Method, is necessary. An alignment allows you to automatically relocate your ROI in an image where the object occurs in a different position. Note, however, that the OCR Assistant does not perform the alignment by itself, but only generates code to align the measurements if a transformation matrix is available from other methods such as Template Matching. For general information, please read the following paragraph about alignment with the OCR Assistant. For more detailed information, please refer to the documentation on matching in the Solution Guide on Matching, Chapter 2.4 “Use the Results of Matching”.

    To perform an alignment with the OCR Assistant, please follow the description in this paragraph. When generating code with an activated Affine Transformation option, the assistant produces code that requires a transformation matrix. To find the characters within the image, you can perform a matching as explained in the Solution Guide on Matching or use the 匹配助手 to guide you through the matching task and generate the alignment code. No Alignment is needed if the characters always appear in the same position. You can now continue to change variable names if necessary, or preview the generated code before inserting it into your HDevelop program.