Download AdeptVision Reference Guide, Rev A
Transcript
Program Instruction VDEF.AOI Syntax VDEF.AOI-I VDEF.AOI aoi = shape, dim1, dim2, dim3, dim4, ang1, ang2 Function Define an area-of-interest (AOI). Areas-of-interest are used by most vision tools to specify the tool placement within an image. Usage Considerations A special AOI (accessed as numbers 1000, 1001, or 1002) is predefined for compatibility with programs written for 10.x versions of AdeptVision AGS. This AOI refers to the entire frame store and cannot be redefined with VDEF.AOI. Parameters aoi Real value, variable, or expression interpreted as an integer in the range 2000 to 200000 maximum (the actual range is specified with the DEVICE instruction) that specifies the area-of-interest being defined. shape Real value, variable, or expression specifying the shape of the area-of-interest. See Details below. dim1 - dim4 Dimensions of the area-of-interest. The interpretation of these values, as well as which values are required, is determined by the shape parameter. See Details below. ang1, ang2 Orientation or angular range of the area-of-interest. The interpretation of these values, as well as which values are required, is determined by the shape parameter. See Details below. Details This instruction defines the shape, size, and orientation for most vision tools. Figure 2-2 below shows the shape parameters that define rectangular or linear shaped tools. Note that an area-of-interest can be defined that includes all elements but still can be used for shapes that do not require all elements. For example, the instruction: VDEF.AOI 2000 = 1, 25, 45, 20, 10, 45 can be used by both point finders and linear rulers. In the case of a point finder, the tool will be centered at x = 25, y = 45, with a width of 20mm, a height of 10mm, and a rotation of 45°. If the area-of-interest is used for a linear ruler, the width specification will be ignored, resulting in a ruler centered at x = 25, y = 45, with a 50 AdeptVision Reference Guide, Rev A