Description Usage Arguments Details Value Author(s) Examples
The function clean_patterns
implements a k-means clustering-based automatic cleaning of the continuous dorsal pattern of a female brown anole lizard
traced from the ImageJ software.
1 | clean_patterns(data, kmeans = TRUE, seed = 123, outliers = TRUE)
|
data |
a data.table or data.frame: an input data should have two columns |
kmeans |
logical, whether to use k-means clustering to eliminate a reference pixel, if any. Defaults to TRUE. See the details below. |
seed |
a single value, interpreted as an integer with the default set to 123. |
outliers |
logical, whether to eliminate potential outliers in the x-coordinate even after removing the 1cm reference line with k-means clustering. Defaults to TRUE. |
clean_patterns
implements a k-means clustering-based automatic cleaning of the continuous dorsal pattern of a female brown anole lizard, Anolis sagrei,
traced from ImageJ, an open source image processing program
designed for scientific multidimensional images. The function efficiently
eliminates the 1cm reference pixel and possible outliers in the x direction,
randomly chooses a mid-dorsal axis if there exist more than one,
chooses the largest x-coordinate if multiple x-coordinates are given per y-coordinate,
manages left or right dorsal pattern that heavily crosses over the mid-dorsal axis by first removing the mid-dorsal axis and then regrouping left and right pattern,
removes pixels through which left or right pattern crosses over since empirically it has little impact on the values of the extracted features, see extract_features
function,
handles left or right dorsal pattern broken with a gap
Returns a data.table
object with the following three columns:
x
, y
the xy-coordinate of a pixel; type "numeric"
loc
the location label of a pixel, one of LEFT, RIGHT, MID; type "character"
Seong Hyun Hwang, Rachel Myoung Moon
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.