Download 3.2 The pylon API
Transcript
Standard Features 9.9.2 Gain Auto Gain Auto is an auto function and the "automatic" counterpart of the manual gain feature. The gain auto function automatically adjusts the Auto Gain Raw parameter value within set limits, until a target average gray value for the pixel data from Auto Function AOI1 is reached. The gain auto function uses Auto Function AOI1 and can be operated in the "once" and continuous" modes of operation. When the gain auto function is used, the exposure auto function can not be used at the same time. If Auto Function AOI1 does not overlap the Image AOI (see the "Auto Function AOI" section) the pixel data from Auto Function AOI1 will not be used to control the image brightness. Instead, the current manual setting of the Gain Raw parameter value will control the image brightness. For more information about gain, see Section 9.1 on page 137. To use the gain auto function, carry out the following steps: 1. Select Auto Function AOI1. 2. Set the postion and size of Auto Function AOI1. 3. Set the lower and upper limits for the Auto Gain Raw parameter value. 4. Set the target average gray value. 5. Enable the gain auto function by setting it to "once" or "continuous". The currently settable limits for the Auto Gain Raw parameter value depend on the current pixel data format, on the current settings for binning, and on whether or not the Gain Raw parameter limits for the manually set gain feature are disabled. The target average gray value may range from 0 (black) to 255 (white). Note that this range of numbers applies to 8 bit and to 16 bit (12 bit effective) output modes. Accordingly, also for 16 bit output modes, black is represented by 0 and white by 255. You can carry out steps 1 to 5 from within your application software by using the pylon API. The following code snippets illustrate using the API to set the parameter values: Selecting and setting Auto Function AOI1 Setting the limits for the Auto Gain Raw parameter value. The currently accessible minimum and maximum parameter values are chosen as examples Setting the target average gray value. A medium gray value is chosen as an example Enabling the gain auto function and selecting, for example, the "once" mode of operation // Select the appropriate auto function AOI for luminance statistics // Currently AutoFunctionAOISelector_AOI1 is predefined to gather // luminance statistics // Set position and size of the auto function AOI Camera.AutoFunctionAOISelector.SetValue( AutoFunctionAOISelector_AOI1 ); Camera.AutoFunctionAOIOffsetX.SetValue( 0 ); Camera.AutoFunctionAOIOffsetY.SetValue( 0 ); 168 Basler scout