getCloseMatch: Get a tile which is a close match for a pixel in the...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getCloseMatch.R

Description

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.

Usage

1
getCloseMatch(pixelArray, libraryDataFrame, nneig = 20)

Arguments

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.

Value

The filename of a tile that is a close match to a pixel in the parameter space.

Author(s)

Alberto Krone-Martins

See Also

nn2

Examples

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)

RsimMosaic documentation built on May 2, 2019, 7:29 a.m.