calibrateFilm: Calibrate Film

View source: R/calibrateFilm.R

calibrateFilmR Documentation

Calibrate Film

Description

Convenience function to do the whole calibration of a densitometry image in one function call internally calling getSteps and fitCalibrationModel

Usage

calibrateFilm(
  im,
  thickness = stepIncrease(0.24, 7),
  density = 1.2922,
  plot = TRUE,
  auto = FALSE,
  nPixel = 50,
  plotAuto = FALSE,
  ...
)

Arguments

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

Value

an object of class 'loess' representing the film calibration

See Also

getSteps

Examples

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
  )
}


xRing documentation built on April 22, 2022, 5:05 p.m.

Related to calibrateFilm in xRing...