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)
Run the code above in your browser using DataLab