Grayscale Histogram Analysis

You are currently viewing the documentation for a pre-release version (2.2.0). To access documentation for other versions, click the "Switch Version" button located in the upper-right corner of the page.

■ If you're unsure about the version of the product you are using, please contact Mech-Mind Technical Support for assistance.

Description

This Step is used to output the grayscale histogram, pixel count, minimum gray value, maximum gray value, median gray value, mode gray value (the most frequently occurring gray value), mean gray value, standard deviation of gray values, and contrast of the image in the specified region of the grayscale image. A grayscale histogram is a statistical representation of the distribution of grayscale levels in a grayscale image, reflecting the frequency of occurrence of each grayscale level.

grayscale histogram demo

Usage Scenario

This Step is applicable to scenarios where the grayscale distribution characteristics of an image or a specified region need to be analyzed.

For example, it can be used to check whether a region is generally brighter or darker overall, whether the grayscale distribution is concentrated, and whether the contrast between bright and dark areas is significant, as well as to compare grayscale statistics across different images or regions.

Basic Concepts

  • Grayscale histogram

    The grayscale histogram counts the occurrences of each gray value in a specified region of the image, and can be used to check whether the grayscale distribution is concentrated and whether the image is generally brighter or darker overall.

  • Median, mean, audience

    The median is the middle value after sorting all gray values, the mean is the average of all gray values, and the mode is the gray value that occurs most frequently. These statistics can be used to describe the overall grayscale level within a specified region of an image from different perspectives.

  • Standard deviation

    The standard deviation is used to measure the degree of dispersion of gray values within a specified region of an image. A larger standard deviation indicates a more dispersed grayscale distribution, while a smaller standard deviation indicates a more concentrated grayscale distribution.

Input and Output

Input

Input ports Data type Description

Grayscale image

Image

The grayscale image used for grayscale histogram analysis.

Alignment parameter group

Pose2D

Used to adjust the feature region’s pose in sync with the target object’s pose changes.

Output

Output ports Data type Description

Grayscale histogram

Image

A histogram representing the grayscale distribution of the image.

Pixel count

Number

The number of pixels within the ROI.

Min gray value

Number

The minimum grayscale value within the ROI.

Maximum gray value

Number

The maximum grayscale value within the ROI.

Median gray value

Number

The median grayscale value within the ROI.

Mode gray value

Number

The number of grayscale objects within the ROI.

Mean gray value

Number

The mean grayscale value within the ROI.

Standard deviation

Number

The standard deviation of the grayscale values within the ROI.

Contrast

Number

The image is divided into two regions, brighter and darker, using an automatic binarization method. The mean gray value of each region is calculated separately. The contrast is defined as the difference between the mean gray value of the brighter region and that of the darker region.

Parameter Description

Parameter Description

ROI settings

This parameter is used to set the image region selected for grayscale histogram analysis.

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.