| agenbagFilters | R Documentation |
This function performs two (gradient) calculation approaches for SST, as outlined in the paper by Agenbag et al. (2003).
agenbagFilters(X, algorithm = c(1, 2), ...)
X |
A numeric |
algorithm |
|
... |
Not used. |
Section 2.2.4 of the paper by Agenbag et al. (2003) introduces the following two methods:
Based on the equation
Y_{i,j}=\sqrt{(X_{i+1,j}-X_{i-1,j})^2 +(X_{i,j+1}-X_{i,j-1})^2}
where Y_{i,j} represents the output value for each X_{i,j} pixel value
of a given X matrix.
the standard deviation in a 3x3 pixel area centered on
position (i,j).
As outlined in the original study, this method conducts searches within a 1-pixel vicinity of each point. For method 1, it only returns a value for points where none of the four involved values are NA. Conversely, for method 2, the standard deviation calculation is performed only for points where at least 3 non-NA values are found in the 3x3 neighborhood.
agenbagFilters returns a matrix object with the same
dimensions of X.
Agenbag, J.J., A.J. Richardson, H. Demarcq, P. Freon, S. Weeks, and F.A. Shillington. "Estimating Environmental Preferences of South African Pelagic Fish Species Using Catch Size- and Remote Sensing Data". Progress in Oceanography 59, No 2-3 (October 2003): 275-300. (\Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1016/j.pocean.2003.07.004")}).
data(wbImage)
# Agenbag, method 1
agenbag1 <- agenbagFilters(X = wbImage, algorithm = 1)
# Agenbag, method 2
agenbag2 <- agenbagFilters(X = wbImage, algorithm = 2)
# Plotting results
par(mfrow = c(3, 1), mar = rep(0, 4))
# Original
image(wbImage, axes = FALSE, col = gray.colors(n = 1e3))
# Calculated
cols <- hcl.colors(n = 1e3, palette = "YlOrRd", rev = TRUE)
image(agenbag1, axes = FALSE, col = cols)
image(agenbag2, axes = FALSE, col = cols)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.