Description Usage Arguments Details Value See Also Examples
This function converts an image (rgb, grayscale or numeric) to binary by applying a thresholding function to it. 3-channels images (rgb and numeric) are first converted to 1-channel images (grayscale or numeric) prior to applying the thresholding function.
1 | thresholding(image, thres, type)
|
image |
A vpImage object to convert to a binary image. |
thres |
The threshold value to separate the pixels of the image in two groups. |
type |
The type of thresholding function to apply to the image. If set
to |
The vpImage object created by the thresholding
function is
not a persistent object, but a pointer to a C++ object that cannot be saved
for reuse in a different session.
This function returns a vpImage object.
1 2 3 4 5 6 7 | filename <- system.file("sample_img/SampleVideo_1080x720_5mb.png", package = "videoplayR")
img <- readImg(filename)
imshow(img)
bin <- thresholding(img, 128, "binary")
imshow(bin)
inv <- thresholding(img, 128, "inverted")
imshow(inv)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.