Learn R Programming

measuRing (version 0.5.1)

dataSegments: Data segments

Description

Segmented data sets required by function plotSegments.

Usage

dataSegments(image, segs = 1, 
    ...)

Value

a list with segmented sets of the gray matrix, the ring borders, and the ring widths (see plotSegments).

Arguments

image

Either path of an image section or an array representing a gray matrix.

segs

number of image segments.

...

arguments to be passed to three functions: ringWidths, ringBorders, and/or imageTogray.

Author

Wilson Lara <wilarhen@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-3527-1380>), Carlos Sierra [aut] (<https://orcid.org/0000-0003-0009-4169>), Felipe Bravo [aut] (<https://orcid.org/0000-0001-7348-6695>)

Examples

Run this code
## (not run) Read one image section in package measuRing:
image1 <- system.file("P105_a.tif", package="measuRing")    
## (not run) compute a gray matrix from its RGB:
gray <- imageTogray(image1)
## (not run) Columns in gray matrix to be included/excluded:
Toinc <- c(196,202,387,1564) 
Toexc <- c(21,130,197,207,1444,1484)
## (not run) segmented data:
segm <- dataSegments(image1,segs = 3)
lapply(segm,str)
attributes(segm)

Run the code above in your browser using DataLab