Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RGB2GRAY

translates an RGB image matrix to gray scale


Description

This function translates the rgb values of the array myTile into a scalar matrix with just one gray value per pixel.

Usage

RGB2GRAY(myTile)

Arguments

myTile

rgb image matrix, usually array with 3 dimensions

Details

Gray scale intensity defined as 0.30R + 0.59G + 0.11B

Value

image tile

Author(s)

Markus Loecher

Examples

if (0){


  BrooklynLatLon = getGeoCode("Brooklyn")


  mapBrooklyn <- GetMap(center=BrooklynLatLon, destfile = file.path(tempdir(), "Brooklyn.png"), 


                 zoom=11, size = c(240,240))


  mapBrooklynBW$myTile = RGB2GRAY(mapBrooklyn$myTile)


  PlotOnStaticMap(mapBrooklynBW)


}

RgoogleMaps

Overlays on Static Maps

v1.4.5.3
GPL
Authors
Markus Loecher
Initial release
2020-02-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.