Description Usage Arguments Value Author(s) Examples
Convert an input image to a set of patches of given radius. Return the local patch position for each patch. Optionally return the ground truth data associated with each patch, if available.
1 2 | imageToPatches(image, mask = NA, radius = 5, npatches = NA,
groundTruth = 0, randomize = FALSE)
|
image |
a reference image defining the image space |
mask |
mask for the image |
radius |
a scalar defining the patch size |
npatches |
number of patches to regular sample from the image |
groundTruth |
single scalar or vector (size of mask) with groundTruth |
randomize |
randomize the location of the patch sampling |
list containing the image patches and separately the data frame holding the patch coordinate and the ground truth.
Avants BB
1 2 3 | rimg = makeImage( c(25,25) )
sim = simulateSphereData( rimg, radius = c( 2, 3 ) )
ptch = imageToPatches( sim$image, rimg * 0 + 1 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.