transform_colours: Transforms RGB values into proportions (rgb values)

View source: R/transform_colours.R

transform_coloursR Documentation

Transforms RGB values into proportions (rgb values)

Description

This function transforms an array of RGB absolute values into a similar array containing the proportion of each band (= colour variable): r g and b.

Usage

transform_colours(image_array)

Arguments

image_array

an array of class image_array created by function read_image().

Details

The proportions are calculated as r = R / (R + G + B), and so on. It is used by function read_image().

Value

Returns an array of class transformed_image containing the proportions of each colour variable in the pixels of the image. The third dimension of the array is named "bands" and its elements are labelled as "r", "g" and "b", respectively.


pixelclasser documentation built on Oct. 18, 2023, 5:08 p.m.