🖥
🖥
🖥
🖥
AugeLab Studio Manual
English
Ask or search…
K
Comment on page

Non-zero of Image

Node_Count_NonZero Documentation

The Node_Count_NonZero in AugeLab Studio calculates the total number of non-zero pixels in an image. This node is useful for analyzing the presence or density of pixels with non-zero values in an image.

Node Overview

The Node_Count_NonZero node calculates the total number of non-zero pixels in an image.

Node Properties

  • Node Title: Non-zero of Image
  • Node ID: OP_NODE_COUNT_NONZERO
  • Tooltip: Get total number of non-zero pixels in an image

Inputs

The Node_Count_NonZero node has one input socket:
  1. 1.
    Input Image: Connect the image for which you want to count the number of non-zero pixels. The image should be of type ImageAny.

Outputs

The Node_Count_NonZero node has one output socket:
  1. 1.
    Count: Provides the total number of non-zero pixels in the input image. The count is of type Number.

Node Configuration

The Node_Count_NonZero node does not have any additional configuration parameters.

Usage

  1. 1.
    Drag and drop the Node_Count_NonZero node from the node library onto the canvas in AugeLab Studio.
  2. 2.
    Connect the input image for which you want to count the number of non-zero pixels to the "Input Image" input socket.
  3. 3.
    Run your project or trigger the execution of the node.
  4. 4.
    The node will calculate the total number of non-zero pixels in the input image and provide the count as the output.

Example

Let's walk through an example to illustrate how the Node_Count_NonZero node works.
  1. 1.
    Drag and drop the Node_Count_NonZero node onto the canvas.
  2. 2.
    Connect the input image for which you want to count the number of non-zero pixels to the "Input Image" input socket.
  3. 3.
    Run your project or trigger the execution of the node.
  4. 4.
    The node will calculate the total number of non-zero pixels in the input image and provide the count as the output.

Notes

  • The Node_Count_NonZero node operates on grayscale or single-channel images. If the input image has multiple channels, it will be converted to grayscale using the BGR to grayscale conversion before counting the non-zero pixels.
  • The output count represents the total number of non-zero pixels in the image.
  • The node uses the cv2.countNonZero() function from the OpenCV library to perform the pixel counting.
That concludes the documentation for the Node_Count_NonZero node in AugeLab Studio. This node provides a simple and efficient way to calculate the total number of non-zero pixels in an image, enabling various image analysis and processing tasks.