ComputeImageSharpness
ComputeImageSharpness computes a measure of the relative focus of an input image as part of an iterative process for refocusing an In-Sight camera's lens.
ComputeImageSharpness Overview
Called the image sharpness score, this measure indicates the degree to which the image, or a region of interest (ROI), includes the smallest resolvable features in a "scene" (that is, the object and its background as captured in the image).
Operation is simple—an image is acquired, and the ComputeImageSharpness tool obtains the image sharpness score. Then, the lens is refocused, nothing else is changed within the scene and a new image is acquired and scored. The higher the score, the sharper the focus. This process is repeated until the focus is acceptable to the user.
ComputeImageSharpness Inputs
Parameter | Description | ||||||||||||
Image |
This parameter must use Cell References in
a spreadsheet cell that contains an Image data structure; by
default, this parameter references A0, the cell containing the Image data structure returned by |
||||||||||||
Fixture |
Defines the Region of Interest (ROI) relative to a Fixture input or the output of a Vision Tools function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. The default setting is (0,0,0), the top leftmost corner of the image.
|
||||||||||||
Region |
Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis; creates an Interactive Graphics Mode that can be transformed and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's Job Edit toolbar, the region will automatically be stretched to cover the entire image.
|
||||||||||||
Operation |
Gradient Energy: Computes image sharpness based on the energy in the local grey-level gradient of the image or the ROI. The local grey-level gradient represents the rate of change in greyscale values for a given area. An abrupt change in greyscale results in a large magnitude in the grey-level gradient and a higher image sharpness score. |
||||||||||||
Smoothness |
Specifies an image-smoothing operation to help eliminate high-frequency noise that might be present in the ROI. There are three settings:
|
||||||||||||
Show |
Specifies which graphical overlays are displayed on top of the image.
|
ComputeImageSharpness Outputs
Returns |
An image sharpness score as a floating point value, or #ERR if any of the input parameters are invalid. |