rgb_2gray: convert an RGB image to Gray

View source: R/open_image_rscript.R

rgb_2grayR Documentation

convert an RGB image to Gray

Description

convert an RGB image to Gray

Usage

rgb_2gray(RGB_image)

Arguments

RGB_image

a 3-dimensional array where the third dimension is equal to 3

Details

This function converts an RGB image to gray

Value

a matrix

Author(s)

Lampros Mouselimis

Examples


path = system.file("tmp_images", "1.png", package = "OpenImageR")

image = readImage(path)

gray = rgb_2gray(image)


OpenImageR documentation built on July 9, 2023, 5:43 p.m.