Skip to content

Count Non Zero Activity

The Count Non Zero activity analyzes image files to determine the black and white dispersion ratio. This activity provides insights into the distribution of pixel values, quantifying the spread of non-zero pixels within an image.

Field Description Requirement
Input image File path of the image to be analyzed. Required
Result variable name The name of the variable to which the calculated dispersion ratio and related metrics will be assigned. Required

Action Types & Examples

Input Image Path

  • Format: String (file path)
  • Example Result: C:RobustaCar.png

Dispersion Ratio Output

  • Format: JSON object (string representation)
  • Example Result: {"ratio":1.3,"black":6,"white":450}

Implementation Examples

Field Setup - Input image: C:RobustaCar.png - Result variable name: imageAnalysisResult

Technical Notes

The Count Non Zero activity is designed for binary image analysis or for quantifying pixel distribution in grayscale images. It processes the input image to identify and count non-zero pixels, providing a ratio that indicates the spread or density of these pixels. The output is typically a structured object containing the calculated ratio, along with counts of black and white pixels, depending on the image's color depth and interpretation.