detectPaper: Detect the Water-Sensitive Paper

View source: R/detectPaper.R

detectPaperR Documentation

Detect the Water-Sensitive Paper

Description

Detect the water-sensitive paper in RGB images using a pre-trained SURF (Speed Up Robust Features) descriptor.

Usage

detectPaper(x, paper_dim = c(76, 26), display.it = TRUE)

Arguments

x

Either an object of class Image from package EBImage or a character indicating the path to the image file (.jpg, .jpeg, .png, .tif).

paper_dim

A numeric vector of length 2 indicating the length and width (in mm) of the water-sensitive paper.

display.it

(Logical) Should the image with the bounding box of the paper be displayed? Default is TRUE.

Value

An object of class Image. An additional attribute containing the bounding box for the paper is stored. See Examples.

Examples

path <- system.file('images', 'field1.jpg', package = 'hydropaper')
p1 <- detectPaper(path)
attr(p1, 'paper_bbox')



arsilva87/hydropaper documentation built on April 4, 2022, 10:47 a.m.