import_Conte: Extract outlines coordinates from an image silhouette

View source: R/babel-import.R

import_ConteR Documentation

Extract outlines coordinates from an image silhouette

Description

Provided with an image 'mask' (i.e. black pixels on a white background), and a point form where to start the algorithm, returns the (x; y) coordinates of its outline.

Usage

import_Conte(img, x)

Arguments

img

a matrix of a binary image mask.

x

numeric the (x; y) coordinates of a starting point within the shape.

Details

Used internally by import_jpg1 but may be useful for other purposes.

Value

a matrix the (x; y) coordinates of the outline points.

Note

Note this function will be deprecated from Momocs when Momacs and Momit will be fully operationnal.

If you have an image with more than a single shape, then you may want to try imager::highlight function. Momocs may use this at some point.

References

  • The original algorithm is due to: Pavlidis, T. (1982). Algorithms for graphics and image processing. Computer science press.

  • is detailed in: Rohlf, F. J. (1990). An overview of image processing and analysis techniques for morphometrics. In Proceedings of the Michigan Morphometrics Workshop. Special Publication No. 2 (pp. 47-60). University of Michigan Museum of Zoology: Ann Arbor.

  • and translated in R by: Claude, J. (2008). Morphometrics with R. (p. 316). Springer.

See Also

Other import functions: import_StereoMorph_curve1(), import_jpg1(), import_jpg(), import_tps(), import_txt(), pix2chc()


MomX/Momocs documentation built on Nov. 18, 2023, 10:53 p.m.