countNonZero: Count Non-Zero Pixels

View source: R/statistics.R

countNonZeroR Documentation

Count Non-Zero Pixels

Description

countNonZero returns the number of non-zero pixels in an Image object.

Usage

countNonZero(image)

Arguments

image

A single-channel Image object.

Value

An integer.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image

Examples

balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
changeColorSpace(balloon, "GRAY", "self")
countNonZero(balloon > 100)


swarm-lab/Rvision documentation built on Aug. 4, 2024, 2:29 p.m.