find.skin: Find skinning threshold across the image and return skinning...

View source: R/skin_func.R

find.skinR Documentation

Find skinning threshold across the image and return skinning percent by tuber assumes all potatoes in the image are a sampling of the same clone ( will have same difference between skin/flesh colors)

Description

Find skinning threshold across the image and return skinning percent by tuber assumes all potatoes in the image are a sampling of the same clone ( will have same difference between skin/flesh colors)

Usage

find.skin(
  image,
  display = T,
  mode = "debug",
  write.clean = F,
  pix.min = 40000,
  scaledown = 8,
  colorcard = "bottomright",
  n.core = 1,
  color.correct = T
)

Arguments

image

The image to be processed, must be a JPEG

display

=T plots to quartz

mode

="debug" plots skinned area, numbers each tuber

write.clean

=T saves a 'clean_image.jpg' with background whited out (for presentations, etc)

pix.min

is number of pixels expected for the smallest object to be designated a tuber

scaledown

Multiple by which image is divided for faster computing (a reduction in image size)

colorcard

= NULL/"bottomright" to remove a color card if used

n.core

The number of processor cores to use in processing. Default is 1.

color.correct

Determines if pixel values will be color corrected based on the color card. TRUE by default.

Value

A list containing the redness, skinning, and lightness of each object in the image

Examples

  find.skin(system.file("images", "2020fy2_317.jpg", package = "TubAR"))
  find.skin(system.file("images", "2020fy2_317.jpg", package = "TubAR"),display=T, mode="debug", write.clean=F, pix.min=4e4, scaledown=7, colorcard="bottomright", n.core=2, color.correct=T)

shannonlabumn/TubAR documentation built on Aug. 14, 2022, 10:48 a.m.