getSteps {xRing} | R Documentation |
Obtain the Grayvalue of Each Step of a Calibration Wedge
getSteps(im, nSteps = NULL, auto = FALSE, nPixel = 50)
im |
an image. |
nSteps |
number of steps of the calibration wedge to obtain grayvalues from. |
auto |
logical. If TRUE, automatic detection of the steps given a line is carried out. Use with care. |
nPixel |
gives the line width when 'auto = TRUE' |
a numeric vector
if (interactive()) {
# read a sample file
im <- imRead(file = system.file("img", "AFO1046.1200dpi.png", package = "xRing"))
# display the image
imDisplay(im)
# get the grayvalues from the calibration wedge on the film
steps <- grayvalues <- getSteps(im, 7) # select 7 ROIs
steps1 <- grayvalues <- getSteps(im, 7, auto = TRUE) # select a single ROI
cor(steps, steps1)
}