detect.outline {shapeR}R Documentation

Detect otolith outline

Description

Determine the outline of otolith images in jpeg format which have been stored in the Fixed folder.

Usage

detect.outline(object, threshold=0.2, mouse.click=FALSE,
           display.images=FALSE, write.outline.w.org=FALSE)

Arguments

object

shapeR object

threshold

Grayscale threshold. Value between 0 and 1.

mouse.click

If TRUE, the user clicks where the starting point for the otolith contour extraction algorithm should start. Default is the center of the image. Could be good to set as TRUE if the otolith detection produces an error.

display.images

If TRUE, each image is displayed and the user can visualize how the outline is captured

write.outline.w.org

If TRUE, the outline is written on top of the original image using the function write.image.with.outline, and can be seen in the Original_with_outline folder

Details

Based on the Conte function (Claude 2008)

Value

A shapeR object with otolith outlines in the slot outline.list

Author(s)

Lisa Anne Libungan & Snaebjorn Palsson

References

Claude, J. (2008). Morphometrics with R. Springer. 316 p.

Urbanek, S. (2014). jpeg: Read and write JPEG images. R package version 0.1-8.

Bivand, R., Leisch, F. & Maechler, M. (2011) pixmap: Bitmap Images (”Pixel Maps”). R package version 0.4-11.

Libungan LA and Palsson S (2015) ShapeR: An R Package to Study Otolith Shape Variation among Fish Populations. PLoS ONE 10(3): e0121102. https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0121102

Examples

## Not run: 
#Use test data from Libungan and Palsson (2015):
shape = shapeR("ShapeAnalysis/","FISH.csv")
shape = detect.outline(shape, threshold=0.2,write.outline.w.org = TRUE)
## End(Not run)

[Package shapeR version 1.0-1 Index]