Description Usage Arguments Value Author(s) See Also Examples
View source: R/getCloseMatch.R
This function will return the filename of a tile that is a close match to a pixel in the parameter space. The nneig
matches are selected using a nearest neighbour search (nn2
) in the tile library (libraryDataFrame
). After the candidates selected, one of the is randomly choosen and its filename is returned by the function.
1 | getCloseMatch(pixelArray, libraryDataFrame, nneig = 20)
|
pixelArray |
The parameters of the pixel to get a similar image from the library in the parameter space. |
libraryDataFrame |
The tile library containing the data of the tiles in the parameter space. |
nneig |
Number of neighbours to retrieve in the intermediate test. Only one of the neighbours will be returned to the user. |
The filename of a tile that is a close match to a pixel in the parameter space.
Alberto Krone-Martins
1 2 3 4 5 6 7 8 | # Creates the tile library data frame from the example tiles
my2MassTiles <- createLibraryIndexDataFrame(system.file("extdata/2Massier", package="RsimMosaic"))
# Get a close match for the point with parameters (0.2, 0.3, 0.2)
getCloseMatch(c(0.2, 0.3, 0.2), my2MassTiles)
# Get another close match for the point with parameters (0.2, 0.3, 0.2)
getCloseMatch(c(0.2, 0.3, 0.2), my2MassTiles)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.