Type Package Package grec August 13, 2017 Title GRadient-Based RECognition of Spatial Patterns in Environmental Data Version 1.1.1 Date 2017-08-13 URL https://github.com/luislaum/grec BugReports https://github.com/luislaum/grec/issues Maintainer Wencheng Lau-Medrano <luis.laum@gmail.com> Provides algorithms for detection of spatial patterns from oceanographic data using image processing methods based on Gradient Recognition. License GPL (>= 2) Depends R (>= 3.2.0), imagine (>= 1.3.1), raster Imports utils LazyData true RoxygenNote 6.0.1 NeedsCompilation no Author Wencheng Lau-Medrano [aut, cre] Repository CRAN Date/Publication 2017-08-13 21:35:46 UTC R topics documented: grec-package........................................ 2 bathy............................................ 2 chl.............................................. 2 colpalette.......................................... 3 detectfronts.rasterlayer.................................. 3 extraparams......................................... 5 sst.............................................. 6 Index 7 1
2 chl grec-package GRadient-Based RECognition of Spatial Patterns in Environmental Data Provides algorithms for detection of spatial patterns from oceanographic data using image processing methods based on Gradient Recognition. Author(s) Wencheng Lau-Medrano, <luis.laum@gmail.com> bathy Bathymetric data Bathymetric maps downloaded from ERDDAP for running examples with grec functions. bathy A list with bathymetric information from ETOPO source. ERDDAP website: https://coastwatch.pfeg.noaa.gov/erddap/index.html chl Sea Surface Chlorophyll Data Surface chlorophyll maps downloaded from ERDDAP for running examples with grec functions. chl
colpalette 3 A list with chlorophyll information from February to April of Aqua MODIS source. ERDDAP website: https://coastwatch.pfeg.noaa.gov/erddap/index.html colpalette Default color palette most using on environmental representations. Vector with 2000 colors generated from tim.colors function. colpalette A vector of 2000 colors in RBG format. fields package detectfronts.rasterlayer Detection of fronts based on gradient recognition This function takes a environmental map (as a numeric matrix) and allows the user to idenitify the gradients by using of sobel filters. ## S3 method for class 'RasterLayer' detectfronts(x, qlimits = c(0.9, 0.99), finalsmooth = FALSE, intermediate = FALSE, control = list()) ## S3 method for class 'array' detectfronts(x, qlimits = c(0.9, 0.99), finalsmooth = FALSE, intermediate = FALSE, control = list())
4 detectfronts.rasterlayer ## Default S3 method: detectfronts(x, qlimits = c(0.9, 0.99), finalsmooth = FALSE, intermediate = FALSE, control = list()) detectfronts(x, qlimits = c(0.9, 0.99), finalsmooth = FALSE, intermediate = FALSE, control = list()) Arguments x qlimits finalsmooth intermediate control Main input of class matrix, list, RasterLayer or array. See Details. numeric vector of length 1 or 2 with info of limits of values to consider. See Details. logical indicating whether to apply a smooth to final matrix so as to remove noise. logical indicating whether to get the intermediate matrices (TRUE) or just the final one (FALSE). A list of control parameters for filter application See Details. Details Inspired by the algorithm described on Belkin & O Reilly (2009), this function performs 4 steps: 1. Smoothing of the original data by a median filter application. 2. Application of sobel filters horizontally (sobelh) and vertically (sobelv). 3. Extract gradients, using the formula sqrt(sobelh 2 + sobelv 2 ). 4. Removing noise signals using a median filter, from imagine package. x could be given as a single numeric matrix containing the values of a environmental map. Othersiwe it also can be a list with dimensions x, y and z specifying the dimensions of the data as follows: x will be a numeric vector with the values of longitude, y will indicate the latitude (numeric vector as well). grec package is not rigorous in the check of the values given for dimensions, so the user must be carefull with them. x can be specified as a RasterLayer or array object. If x is an array, it must have 3 dimensions: lon, lat and time. It is not required to specify the dimnames. The output will preserve all the attributes and the order of input. qlimits works after the extraction of grandient matrix. Values of these matrix are vectorized and the quantiles indicated on qlimits are taken (that is the reason of the argument name). Then the values out of the limits are replaced by NA. qlimits could be given as a single value. If so, the second value must be calculated as c(qlimits, qlimits + (1 - qlimits)/2). The control argument is a list that allows the (advanced) users modify some aspects of filter application. The parameters of control are given to functions of imagine package. It must be a list including the following named objects: firstsmooth Arguments (radius and times) pased to medianfilter function, used for apply the smoothing to the original matrix. It must be given as a named list. sobelstrength Number that multiplies qlimits vector. It is usefull to highlight the differences.
extraparams 5 Value clearnoise Arguments (radius and times) pased to medianfilter function, used for apply the median-filter for cleaning noise and getting the output matrix. It must be given as a named list. Depending of input class of x, the output will preserve its class. Belkin, I. M., & O Reilly, J. E. (2009). An algorithm for oceanic front detection in chlorophyll and SST satellite imagery. Journal of Marine Systems, 78(3), 319-326 (http://dx.doi.org/10. 1016/j.jmarsys.2008.11.018). Examples # Build an example data # Load example data data(sst) examplesstdata <- list(x = sst$longitude, y = sst$latitude, z = sst$sst[,,1]) # Simple application out <- detectfronts(x = examplesstdata) image(out, col = colpalette) extraparams Gets the extra parameters for grec functions Show as a list the extra parameters for main grec function. extraparams(fx = c("detectfronts")) Arguments fx character vector indicating the values that will be returned. Details Value This function is usefull for advance users that require to modify intermediate steps in terms of filter application. A list with the extra parameters used by default.
6 sst Examples # For getting all the extra parameters extraparams() sst Sea Surface Temperature Data SST maps downloaded from ERDDAP for running examples with grec functions. sst A list with SST information from February to April of Aqua MODIS source. ERDDAP website: https://coastwatch.pfeg.noaa.gov/erddap/index.html
Index Topic environmental-data Topic gradient, Topic pattern-detection, bathy, 2 chl, 2 colpalette, 3 detectfronts (detectfronts.rasterlayer), 3 detectfronts.rasterlayer, 3 extraparams, 5 grec (grec-package), 2 imagine, 4 medianfilter, 4, 5 sst, 6 7