imager (version 0.42.7)

as.pixset: Methods to convert various objects to pixsets

Description

Methods to convert various objects to pixsets

Usage

as.pixset(x, ...)

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

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

Arguments

x

object to convert to pixset

...

ignored

obj

pixset to convert

Methods (by class)

  • cimg: convert cimg to pixset

  • pixset: convert pixset to cimg

Examples

Run this code
# NOT RUN {
#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

# }

Run the code above in your browser using DataCamp Workspace