Determine boundary between foreground and background in an image
getOutline(imdf, var = "red", threshold = 0.5)
dataframe describing a pixellated image in x and y. Has to have columns x, y, and var
dimension along which foreground and background of a shape in the image are well separated. Usually one of 'red', 'green', or 'blue', but could be extended to any other numerical variable.
value specifying the cutoff along variable var. Values of var higher than the threshold are considered to belong to the foreground.
subset of data frame imdf consisting of just boundary points:
x x coordinate in pixels
y y coordinate in pixels (usually negative)
red number vector in (0,1) describing the amount of red of the pixel in an RGB model
green number vector in (0,1) describing the amount of green of the pixel in an RGB model
blue number vector in (0,1) describing the amount of blue of the pixel in an RGB model