MATLAB Answers


Detection object in image

Asked by farhat
on 7 Dec 2013
Latest activity Answered by Image Analyst
on 7 Dec 2013

Hi Master,,

I'm trying to detect the circle object in an image.

But it's only for the circle nearby with the corner of the image..

The program don't have to detect the circle in the center.

Here is the example image with the explanation..

But first of all.. I have to detect the rectangle n the image.

After that i can know the boundary of the image (the rectangle).

In that image, there is 2 rectangle, i is complete rectangle and the other is a half rectangle. Do u know how to recognice those 2 different rectangle.

Here is what i have done..

       close all
       img = 'G14_2.jpg';
       I = imread(img);
       I = imresize(I, 0.5);
       Ibw = rgb2gray(I);
       threshold = graythresh(Ibw);
       a_bw = im2bw(Ibw,threshold);
       citra_bw= imclearborder(a_bw,4);
       citra_adjust= imadjust(uint8(citra_bw));
       citra_filt=medfilt2(citra_adjust,[3 3]);
       citra_intens_opening1 = imerode(citra_filt,se);
       citra_intens_opening = imopen(citra_intens_opening1,se);
       citra_intens_opening2 = imerode(citra_intens_opening,se);

How to do it in Matlab??

What the first step i have to do??

Please help me.. Thanx


Sign in to comment.

1 Answer

Answer by Image Analyst
on 7 Dec 2013

Do you want to know if the circle is there or not there? Or will it always be there but you just need to know its center and radius? Is your image always registered/aligned, so that we can just look in pre-defined locations, or can that thing be in any location at any angle or rotation and at any magnification (hopefully you don't have that situation!)?


Sign in to comment.