, regionprops. BoundingBox, . cell . 26 x N, , , , . , . , MATLAB. , GIF, ... . PNG, :

MATLAB:
im = imread('http://i.stack.imgur.com/q7cnA.png');
, . , . . :
se = strel('square', 7);
im_close = imclose(im, se);
regionprops , ( ):
s = regionprops(im_close, 'BoundingBox');
, s, , , , . . BoundingBox 4 , :
[x y w h]
(x,y) - , w h - . 4- , , :
bb = round(reshape([s.BoundingBox], 4, []).');
, , , , . , :
imshow(im);
for idx = 1 : numel(s)
rectangle('Position', bb(idx,:), 'edgecolor', 'red');
end
, :

- cell. cell, , cell . , , , , . :
chars = cell(1, numel(s));
for idx = 1 : numel(s)
chars{idx} = im(bb(idx,2):bb(idx,2)+bb(idx,4)-1, bb(idx,1):bb(idx,1)+bb(idx,3)-1);
end
, ch = chars{idx};, idx - 1 , . , , imshow(ch);
, , , . !