ddd2d: Flatten a 3-channels image to 1 channel

Description Usage Arguments Details Value See Also Examples

Description

This function converts a 3-channels image (rgb or numeric) to a 1-channel image (binary, grayscale or numeric) by computing the average of the 3 channel values for each pixel. For instance, this function can be used to convert an rgb image to grayscale.

Usage

1

Arguments

image

A 3-channels vpImage object to convert to 1 channel.

Details

The vpImage object created by the ddd2d function is not a persistent object, but a pointer to a C++ object that cannot be saved for reuse in a different session.

Value

This function returns a vpImage object.

See Also

d2ddd, vpImage

Examples

1
2
3
4
filename <- system.file("sample_img/SampleVideo_1080x720_5mb.png", package = "videoplayR")
img <- readImg(filename)
imshow(img)
imshow(ddd2d(img))

swarm-lab/videoplayR documentation built on May 30, 2019, 9:36 p.m.