Detect the water-sensitive paper in RGB images using a pre-trained SURF (Speed Up Robust Features) descriptor.
detectPaper(x, paper_dim = c(76, 26), display.it = TRUE)
x | Either an object of class |
---|---|
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 |
An object of class Image
. An additional attribute containing
the bounding box for the paper is stored. See Examples.
path <- system.file('images', 'field1.jpg', package = 'hydropaper') p1 <- detectPaper(path) attr(p1, 'paper_bbox') #> xmin ymin xmax ymax #> 170.7656 186.1319 900.3028 455.6520