শনিবার, ১৩ এপ্রিল, ২০১৩

How to send binary image data to self organizing map - Stack Overflow

I have taken a scanned image with characters, cropped the characters and stored them in a matrix.

X={};  Y={}; for cnt = 1:50     rectangle('position',box(:,cnt),'edgecolor','r');     X{cnt}=imcrop(I, box(:,cnt));     Y{cnt}=im2bw(X{cnt});  end 

Here, box has the coordinates of the rectangle. I want to use Y as input to newsom to create a self organizing map. But i get the error:

net=newsom(Y', [10,1])
??? Error using ==> cat
CAT arguments dimensions are not consistent.

Error in ==> cell2mat at 89
m{n} = cat(1,c{:,n});

Error in ==> newsom>new_6p0 at 72
if isa(p,'cell'), p = cell2mat(p); end

Error in ==> newsom at 58
net = new_6p0(varargin{:});

The images formed have different dimensions(12x6, 15x12 etc). Can anyone tell me how I rectify my approach so that newsom gets the data of 50 binary images?

Source: http://stackoverflow.com/questions/15967792/how-to-send-binary-image-data-to-self-organizing-map

Emmy nominations 2012 Ramadan 2012 Michelle Jenneke batman Colorado Shooting News joe paterno British Open

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন