thinning | R Documentation |
thinning
applies a binary blob thinning operation to
achieve a skeletonization of a binary Image
object.
thinning(image, method = "Zhang-Suen", target = "new")
image |
An 8-bit (8U) single-channel, binary |
method |
A string indicating the binarization method to use. It can be any of the following:
|
target |
The location where the results should be stored. It can take 3 values:
|
If target="new"
, the function returns an Image
object. If target="self"
, the function returns nothing and modifies
image
in place. If target
is an Image
object,
the function returns nothing and modifies that Image
object in
place.
Simon Garnier, garnier@njit.edu
Image
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_gray <- changeColorSpace(balloon, "GRAY")
balloon_th <- niBlackThreshold(balloon_gray)
skel <- thinning(balloon_th)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.