Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: how to crop an image from Segout and bwoutline function?? *help
Replies: 4   Last Post: Aug 16, 2013 3:09 AM

 Messages: [ Previous | Next ]
 Rierien Merischaputri Posts: 1 Registered: 12/27/12
how to crop an image from Segout and bwoutline function?? *help
Posted: Dec 27, 2012 9:56 AM

Hi everyone,
I am a student which still in thesis research to build an algorithm for pattern recognition in numerical image (in my case: to recognize number of electricity bill in electricity home machine)

now, I have build the boundary of the original image
but I've got stuck for the next step (to crop image)

is there anyone who can help me, which function do I have to choose?
or, is there any demo which can I follow?

Thanks before, :)

note: this the link which connect to the picture for my syntax

syntax:
coba1 = imread ('D:\day of dare\sem 7\TA\Jessyntha\foto\9.jpg');
figure, imshow (coba1);
J=rgb2gray(coba1);
figure, imshow (J);
ved=edge(J,'prewitt');
imshow (ved);
cp=bwareaopen(ved,5);
figure, imshow (cp), title ('after cleaning phase');

se90 = strel('line',5,90);
se0 = strel ('line',5,0);
BWsdil = imdilate(cp, [se90 se0]);

BWdfill = imfill(BWsdil, 'holes');
figure, imshow(BWdfill);
title('binary image with filled holes');
BWnobord = imclearborder(BWdfill, 4);
figure, imshow(BWnobord), title('cleared border image');
seD = strel('diamond',1);
BWfinal = imerode(BWnobord,seD);
BWfinal = imerode(BWfinal,seD);
figure, imshow(BWfinal), title('segmented image');
BWoutline = bwperim(BWfinal);
Segout = I;
Segout(BWoutline) = 255;
figure, imshow(Segout), title('outlined original image');

Date Subject Author
12/27/12 Rierien Merischaputri
12/27/12 ImageAnalyst
1/3/13 dipti chaudhary
6/7/13 xmlfor
8/16/13 jacaboo