otosearch: Search new specimens against project database

Description Usage Arguments Details Value See Also

View source: R/otosearch.R

Description

search the images/ semi-landmarks configuration(s) of new, unknown specimens against the configurations saved in the project.

Usage

1
2
otosearch(project, query, show = 5, saveresult = FALSE, showplot = TRUE,
  savename)

Arguments

project

path to a project (.rds file) to be read, saved using saveproj, or a project object already read into R. if not given, interactive file selector will pop out to prompt user to select a .rds file (Windows only)

query

path(s) to otolith images/ path(s) of folder containing the otolith images/ .tps file containing the semi-landmark configurations/ p x k matrix or p x k x n array of semi-landmark configuration(s) to be searched. If none is given, interactive file selector will pop out to prompt user to select images to be searched (Windows only)

show

integer. how many search results to be shown (in order of ranking). Note that if number of specimens in database searched against is less than show, the result shown will be less than the given number

saveresult

logical. whether to save the result

showplot

logical. whether to show plot of query and their matches

savename

character. optional. the file name, if saveresult=TRUE

Details

The search is based on the Procrustes (Riemannian) distance between the query and the database. the lower the distance (rdist) between the query and the project's configuration, the higher their ranking in the search result. Perfect match will have 0 distance (for non-sliding landmark method).

To shorten the time of searching, the query is first searched against the meanshape configurations of each species present in the project. For each species in the project, maximum distance between individuals and the species's meanshape was already calculated (by sprdist, wrapped within rGPA). First the search will determine if the query to each species's meanshape distance is within this range, if say, the query is within the range of 2 species' range, then searching will be continued with the individuals of these 2 species only. Otherwise, searching will be continued with the individuals of the top 5 closest species only.

The search has taken the semi-landmarks configuration arrangements into consideration already, hence the user doesn't need to know the side/ direction of the query.

Note: sliding semi-landmark is currently not supported due to the difficulty to achieve short searching time and correct configuration guessing at the same time. Therefore the gpa object saved in the project should be built with fixed semi-landmarks. However, this does not affect otopred, thus if sliding is preferred, otopred will still give good predictions.

Value

The search result. if saveresult=TRUE, the result is written into a .txt file. The results include:

See Also

Similar: otopred


jinyung/otolith documentation built on May 19, 2019, 10:36 a.m.