
we will use the above image for processing
1.add the image to matlab work space
ch=imread('char.jpg');
2.convert the RGB image to gray scale using rgb2gray function
Gch=rgb2gray(ch);
3.convert this gray scale image to BW comparing with some threshold
bw= im2bw(Gch,graythresh(Gch));
4. find the edge's in that binary image
Ibw= edge(uint8(bw));
imshow(Ibw);

5.using Morphological process to enhance the image
se = strel('disk',4);
bw2 = imdilate(Ibw, se);
imshow(bw2);

6. filling the holes in the dilated image
fill= imfill(bw2,'holes');
imshow(fill)

[lab n] = bwlabel(fill);
props = regionprops(lab);
Z = [props.BoundingBox];
Z= reshape(Z,[4 n]);
8. display the results
imshow(I);
hold on;
for i = 1:n
rectangle('position',z(:,i),'edgecolor','r');
end

this can be used with a neural network to recognize patterns
we will see how to do this in next blog
In 8th step, I find error of undefined symbol while displaying image.
ReplyDeleteCan you tell me what to do??
plz reply me to trushar_mechatronics@hotmail.com
ReplyDeletecan you help me please in speech recognition segmentation on matlab..my email E.Ibrahim.Ammar@gmail.com
ReplyDeletemail me at gnataraja@ymail.com
ReplyDelete