首页 > 解决方案 > 将多个图像加载到 R 中进行操作

问题描述

目前,我正在尝试将 100 多个图像(已排序)加载到 R 中并由 deriche 的 imager 转换。我试过了:

files <- list.files(path="C:/Users/amarchand/Desktop/TVideos", pattern=".png$",all.files=T, full.names=F, no.. = T)

这工作正常,然后我输入:

PNG=lapply(files,readPNG)

一旦输入这些行,我就去做

im.xedges <- deriche(PNG,2,order=2,axis="x")

我得到:

Error in deriche(PNG, 2, order = 2, axis = "x") : 
Not compatible with requested type: [type=list; target=double].

有没有我遗漏的代码行,或者有没有比我拥有的代码更好的代码?

标签: rimageedge-detection

解决方案


推荐阅读