【发布时间】:2013-04-12 09:33:16
【问题描述】:
我拍摄了一张带有字符的扫描图像,裁剪了字符并将它们存储在矩阵中。
X={};
Y={};
for cnt = 1:50
rectangle('position',box(:,cnt),'edgecolor','r');
X{cnt}=imcrop(I, box(:,cnt));
Y{cnt}=im2bw(X{cnt});
end
这里,box 有矩形的坐标。我想使用 Y 作为newsom 的输入来创建一个自组织地图。但我得到了错误:
net=newsom(Y', [10,1])
???使用 ==> 猫时出错
CAT 参数维度不一致。==> 89 处的 cell2mat 中的错误
m{n} = cat(1,c{:,n});==>newsom>new_6p0 在 72 时出现错误
如果 isa(p,'cell'), p = cell2mat(p);结束==> newsom 在 58 时出错
net = new_6p0(varargin{:});
形成的图像具有不同的尺寸(12x6、15x12 等)。
谁能告诉我如何纠正我的方法,以便newsom 获取 50 个二进制图像的数据?
【问题讨论】:
-
我不熟悉
newsom,所以确定这是否会影响算法的输出,但您可以对所有图像进行零填充,使它们与集合。
标签: matlab image-processing neural-network som