因此,我要在培训中导入大量图像,然后在测试列表中...然后将它们的大小调整为100x100,这样它们就不会占用太多空间... 调整大小后,我想将所有内容组合在一起,以便最终得到4个尺寸。测试图像完美地结合在一起,但是训练图像不断出现我在问题中提到的错误:(函数(fdef mtable类)中的错误无法找到签名“ list”,“ list”的函数合并的继承方法...和我正在做完全相同的测试...不知道为什么会这样...任何帮助吗?在此错误之后R会话也会中止,因为包装过程中的错误会循环
#importing all training images in a list
setwd("C:/Users/Joanne/OneDrive/Third Year/Thesis Stuff/Sets/TrainingColourSet")
colourImages <- list.files(pattern = "*.jpeg")
Images <- list()
for (i in 1:length(colourImages)) {
Images[[i]] <- readImage(colourImages[[i]])
}
#importing all testing images in a list
setwd("C:/Users/Joanne/OneDrive/Third Year/Thesis Stuff/Sets/TestingColourSet")
colourtestingImages <- list.files(pattern = "*.jpeg")
TestingImages <- list()
for (i in 1:length(colourtestingImages)) {
TestingImages[[i]] <- readImage(colourtestingImages[[i]])
}
#Structure and Combine
str(Images)
for(i in 1:1120) {
Images[[i]] <-resize(Images[[i]],100,100)
}
Images <- combine(Images)
str(TestingImages)
for(i in 1:351) {
TestingImages[[i]] <-resize(TestingImages[[i]],100,100)
}
TestingImages <- combine(TestingImages)