美文网首页
tif图像自动阈值遮罩

tif图像自动阈值遮罩

作者: youmigo | 来源:发表于2021-08-30 23:59 被阅读0次

tif图像自动阈值遮罩

# Sat Jul 31 10:50:08 2021 edit
# 字符编码:UTF-8
# R 版本:R 4.1 x64 for window 11
# cgh163email@163.com
# 个人笔记不负责任,拎了个梨🍐🍈
#.rs.restartR()
require(autothresholdr)
rm(list = ls());gc()

img_location <- system.file("extdata", "eg.tif", package = "autothresholdr")
img <- ijtiff::read_tif(img_location)
auto_thresh(img, "huang")
auto_thresh(img, "tri")
auto_thresh(img, "Otsu")
auto_thresh(img, 9)
mask <- auto_thresh_mask(img, "huang")
ijtiff::display(mask[, , 1, 1])
masked <- auto_thresh_apply_mask(img, "huang")
ijtiff::display(masked[, , 1, 1])
masked <- auto_thresh_apply_mask(img, 25)
ijtiff::display(masked[, , 1, 1])

image.png

相关文章

网友评论

      本文标题:tif图像自动阈值遮罩

      本文链接:https://www.haomeiwen.com/subject/atwhvltx.html