extract_features: Extract quantitative features from the continuous dorsal...

Description Usage Arguments Details Value Author(s) Examples

View source: R/extract.R

Description

The function extract_features efficiently extracts various features such as the pattern sinuosity indices, coefficient of variation, and max-min width from the output of clean_patterns.

Usage

1

Arguments

data

a data.table or data.frame object with three columns x, y, and loc in that order, indicating the x-coordinate, the y-coordinate, and the location of a pixel (LEFT, RIGHT, or MID), respectively, preferably from an output of clean_patterns. The xy-coordinates should be of type "numeric", whereas the location should be of type "character" and capitalized.

Details

extract_features efficiently extracts common features from the continuous dorsal pattern of a female brown anole lizard, Anolis sagrei, such as the pattern sinuosity indices, coefficient of variation, and max-min width. The input data should either be a data.table or data.frame object with the columns indicating the xy-coordinates and the location of the pixels.

Value

Returns a data.table object with the following columns:

lt_psi, rt_psi

left/right pattern sinuosity index (PSI), computed as lt_len / md_len and rt_len / md_len, respectively

av_psi

average pattern sinuosity index (PSI), (ls_ind + rs_ind) / 2

lt_pcv, rt_pcv

left/right pattern coefficient of variation (PCV), computed by dividing the standard deviation of the distance values between mid-dorsal axis and left/right pattern by the average distance.

av_pcv

average pattern coefficient of variation (PCV), (lt_pcv + rt_pcv) / 2

max_width, min_width

the maximum and the minimum width between the left and the right pattern

av_width

average width between the left and the right pattern

pmm

pattern max-min width (PMM), (max_width - min_width) / av_width

pasy

pattern asymmetry index (PASY), computed by first subtracting the distance between mid-dorsal axis and left pattern from the corresponding distance between mid-dorsal axis and right pattern and then taking the average of the resulting differences; the closer to zero it is, the more symmetric the dorsal pattern is on average

lt_len, rt_len, md_len

the length (the count of pixels) of the left pattern, the right pattern, and the mid-dorsal axis, respectively

Author(s)

Seong Hyun Hwang, Rachel Myoung Moon

Examples

1
2
3
4
5
# load the sample dorsal pattern image
data(anole)

# clean the dorsal pattern and extract quantitative features
features <- extract_features(clean_patterns(anole))

patternator documentation built on May 2, 2019, 6:12 a.m.