Convert image matrix to a data frame

Share:

Description

S3 method to create a data frame from a 3d array.

Usage

1
2
3
4
fortify(model, data, ...)

## Default S3 method:
fortify(model, data, ...)

Arguments

model

array as e.g. returned from readJPEG

data

not used by this method

...

not used by this method

Value

data frame

  • x x coordinate in pixels

  • y y coordinate in pixels (usually negative)

  • red number vector in (0,1) describing the amount of red of the pixel in an RGB model

  • green number vector in (0,1) describing the amount of green of the pixel in an RGB model

  • blue number vector in (0,1) describing the amount of blue of the pixel in an RGB model