【发布时间】:2011-10-27 19:34:38
【问题描述】:
我有一张照片。我创建了共现矩阵(graycomatrix)来提取不同的属性(对比度、相关性)等(graycoprops)
x = []
for a lot of pictures, do the same:
imgB = imread('currentLoopImage.jpg')
contrast = graycoprops(graycomatrix(rgb2gray(imgB)), 'Contrast')
correlation = graycoprops(graycomatrix(rgb2gray(imgB)), 'Correlation')
energy = graycoprops(graycomatrix(rgb2gray(imgB)), 'Energy')
homogeneity = graycoprops(graycomatrix(rgb2gray(imgB)), 'Homogeneity')
x = [x;contrast;correlation;energy;homogeneity]
问题是我需要保存该矩阵 X 上的所有值,但出现以下错误:
CAT 参数在结构字段名称中不一致。
因为这是我从每种类型得到的输出:
homogeneity =
Homogeneity: 0.8587
有不同的类型,所以我无法将它们保存在 X 矩阵上。
输出矩阵 X,应该只保存数字,而忽略“同质性”
谁能告诉我谁能做到这一点?
【问题讨论】:
标签: matlab image-processing matrix glcm