crop.image裁剪图像,R语言imagefx包,时序图像特征识别
# Tue Oct 12 13:50:42 2021 edit
# 字符编码:UTF-8
# R 版本:R 4.1.1 x64 for window 11
# cgh163email@163.com
# 个人笔记不负责任,拎了个梨🍐🍈
#.rs.restartR()
require(imagefx)
rm(list = ls());gc()
? crop.image # 裁剪图像
sakurajima.crop <- crop.image(sakurajima,xleft=146,ybottom=7,xright=203,ytop=256)
split.screen(c(1,2))
screen(1)
image2(sakurajima,asp=1,main='Original')
screen(2)
image2(sakurajima.crop[[1]],asp=1,main='Cropped')
dev.copy(png, "crop.image裁剪图像.png");dev.off()
#鼠标手动设置裁剪区 Tue Oct 12 14:16:24 2021 ------------------------------
close.screen(all.screens=TRUE)
sakurajima.crop <- crop.image(sakurajima)
split.screen(c(1,2))
screen(1)
image2(sakurajima,asp=1,main='Original')
screen(2)
image2(sakurajima.crop[[1]],asp=1,main='Cropped')
print(sakurajima.crop[[2]])
## close screens
close.screen(all.screens=TRUE)
dev.copy(png, "crop.image裁剪图像2.png");dev.off()
crop.image裁剪图像.png
网友评论