View source: R/calibrateFilm.R
calibrateFilm | R Documentation |
Convenience function to do the whole calibration of a densitometry image in one function call internally calling getSteps and fitCalibrationModel
calibrateFilm( im, thickness = stepIncrease(0.24, 7), density = 1.2922, plot = TRUE, auto = FALSE, nPixel = 50, plotAuto = FALSE, ... )
im |
a grayscale image |
thickness |
a vector specifying the thickness of the calibration wedge at each step |
density |
the density of the reference material (i.e. the calibration wedge) |
plot |
if TRUE the calibration model is displayed |
auto |
logical. If TRUE, automatic detection of the steps given a line is carried out. Use with care |
nPixel |
if 'auto = TRUE': number of pixels gives the line width |
plotAuto |
if TRUE the automatic detection of the grayscale values is displayed |
... |
further arguments to be passed to loess |
an object of class 'loess' representing the film calibration
getSteps
if (interactive()) { # read a sample file im <- imRead(file = system.file("img", "AFO1046.1200dpi.png", package = "xRing")) # display the image imDisplay(im) # calibrate the film: calibration <- calibrateFilm(im, thickness = stepIncrease(0.24, 7), density = 1.2922, plot = TRUE ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.