get_trainig_set_from_image: Get training set from image

Description Usage Arguments Value Author(s)

Description

Calculates nine features (intensity, gradient magnitude and gradient orientation, from each of the RGB channels), and uses a mask to return the pixels of interest, together with a specified number of pixels from the non-selected region of the image

Usage

1
get_trainig_set_from_image(Img, n_bgpixels = 1000)

Arguments

Img

A list containing *img* and *mask* elements. The former must be an three-dimensional matrix with the original image (each RGB channel corresponding to each of the slices defined by the third dimension), and the latter must be a two-dimensional matrix, of the exact same size as each of the chanels from the *img* element, where non-zero values indicate the pixels of interest.

n_bgpixels

Number of background pixels (pixels not selected in the mask) to keep.

Value

A data.frame with all the 9 feature values for the selected pixels, as well as for the selected number of background pixels. Can be used as training set.

Author(s)

Sur Herrera Paredes


surh/RosetteDetector documentation built on May 14, 2019, 10:36 a.m.