Measure the number of pixels of certain colors in an image
- Last UpdatedFeb 12, 2024
- 3 minute read
Use the Pixel Count block to get the number of pixels that belong to the specified range of colors.
To measure the number of pixels of a certain color range in an image
-
On the Block Definitions toolbar, select Measurement.
The Measurement list expands.
-
Drag a Pixel Count block onto the Canvas.

-
Connect the block to other blocks on the Canvas as needed.
-
Select the Pixel Count block on the Canvas.
-
Right-click the block, and then select Properties.

The Properties side sheet appears on the right side of the screen.

-
Optional: Select the expand button (
) to enlarge the image.
You can select the collapse button (
) to return to the previous menu.
-
Optional: On the enlarged image, use the zoom tools to zoom in (
) and out (
) of the image.
-
Select the eyedropper icon (
), and then select the image to choose a color.
The software updates the H, S, and V values based on your selection.
-
In the Set H range percentage box, enter the percentage of the H value that you want to use to define the range of hues for the pixel count.
The software then adds and subtracts the percentage from the H value to give the full range of hues.
You can set this value to any real number between 0 and 15.
-
In the Set S range percentage box, enter the percentage of the S value that you want to use to define the range of saturations for the pixel count.
The software then adds and subtracts the percentage from the S value to give the full range of saturations.
You can set this value to any real number between 0 and 15.
-
In the Set V range percentage box, enter the percentage of the V value that you want to use to define the range of brightnesses for the pixel count.
The software then adds and subtracts the percentage from the V value to give the full range of brightnesses.
You can set this value to any real number between 0 and 15.
-
Select Apply Changes.
The preview result for the block updates on the Canvas.