Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Vision AI Assistant

Measure the number of pixels of certain colors in an image

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

  1. On the Block Definitions toolbar, select Measurement.

    The Measurement list expands.

  2. Drag a Pixel Count block onto the Canvas.

    Embedded Image (65% Scaling) (LIVE)

  3. Connect the block to other blocks on the Canvas as needed.

  4. Select the Pixel Count block on the Canvas.

  5. Right-click the block, and then select Properties.

    Embedded Image (65% Scaling) (LIVE)

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

    Embedded Image (65% Scaling) (LIVE)

  6. Optional: Select the expand button () to enlarge the image.

    You can select the collapse button () to return to the previous menu.

  7. Optional: On the enlarged image, use the zoom tools to zoom in (Zoom In Button) and out (Zoom Out Button) of the image.

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. Select Apply Changes.

    The preview result for the block updates on the Canvas.

TitleResults for “How to create a CRG?”Also Available in