ExtractHistogram
Extracts a Histogram array from an image region.
ExtractHistogram Overview
The Histogram function returns a one-dimensional representation of pixel values in a region of interest. A histogram is represented by an array of integers, where each element of the array, called a bin, stores a count of the number of pixels in the region, where the value in bin n is the number of pixels in the region of pixel value n. The total of all bin counts in the array is equal to the number of pixels in the region.
ExtractHistogram 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. Double-click on the Region parameter to create an Interactive Graphics Mode that you can transform and rotate. Select this parameter and press the Maximize Region button on the Job Edit toolbar of the property sheet to automatically stretch the region to cover the entire image.
Note:
|
||||||||||||
External Region |
This parameter uses Cell References to an Annulus, Circle, Region, EditAnnulus, EditCircle, EditCompositeRegion, EditPolygon, EditRegion. When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area. Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.
|
||||||||||||
Show |
Specifies the display mode for ExtractHistogram graphical overlays on top of the image.
|
ExtractHistogram Outputs
Returns |
A Hist data structure containing the greyscale frequency distribution, or #ERR if any of the input parameters are invalid. |
||||||||||||||||||
Results |
When ExtractHistogram is initially inserted into a cell, a result table is created in the spreadsheet. The following Hist Vision Data Access Functions are automatically inserted into the spreadsheet to create the result table:
|