as.pixset: Methods to convert various objects to pixsets

View source: R/pixset.R

as.pixsetR Documentation

Methods to convert various objects to pixsets

Description

Methods to convert various objects to pixsets

Usage

as.pixset(x, ...)

## S3 method for class 'cimg'
as.pixset(x, ...)

## S3 method for class 'pixset'
as.cimg(obj, ...)

Arguments

x

object to convert to pixset

...

ignored

obj

pixset to convert

Methods (by class)

  • as.pixset(cimg): convert cimg to pixset

Functions

  • as.cimg(pixset): convert pixset to cimg

Examples


#When converting an image to a pixset, the default is to include all pixels with non-zero value 
as.pixset(boats)
#The above is equivalent to:
boats!=0


imager documentation built on May 29, 2024, 1:38 a.m.