STANDARD HOUGH TRANSFORM TO DETECT ELLIPSE AND CIRCLES

8 Ansichten (letzte 30 Tage)
Andri Pranata
Andri Pranata am 6 Nov. 2012
i'm doing some final project in my campus, my topic is to analyze the difference between ellipse and circle detection using STANDARD HOUGH TRANSFORM now my problem is, i want to reconstruct the ellipse or the circle i've detect with hough transform, but i dont know how..
can anybody help me with this: .reconstruct the ellipse or the circle .is feature extraction needed for this kind of project? .how can i detect ellipse or circle with any noise above the object, for example a pen i put above the circle object..
here's the sample of a circle i want to detect : http://i1306.photobucket.com/albums/s578/andripranatakusuma/image12.jpg
here's the sample of a ellipse i want to detect : http://i1306.photobucket.com/albums/s578/andripranatakusuma/image15.jpg
i appreciate any kind of help, thank you :)
  2 Kommentare
Andri Pranata
Andri Pranata am 6 Nov. 2012
Bearbeitet: Walter Roberson am 6 Nov. 2012
with my codes, for now i can see the difference between ellipse and circle by measuring the standard deviation of the HOUGH map, though it was my own codes, but if i want to detect more than 1 object, my codes will not effective.. any suggestion?
here's my codes, i insert this code, when i've got the Standard Hough coordinater (rho theta) after detecting ellipse or circle.
==========================
capt = getframe(gca);
citra_capture = capt.cdata;
figure; imshow(citra_capture);
citra_capture = rgb2gray(citra_capture);
figure; imshow(citra_capture);
level = graythresh(citra_capture);
citra_capture_bw = im2bw(citra_capture,level);
figure; imshow(citra_capture_bw);
[jml_bar jml_kol] = size(citra_capture_bw);
%lebar = [];
for i = 1:jml_kol
atas = find(citra_capture_bw(:,i) > 0, 1, 'first');
bawah = find(citra_capture_bw(:,i) > 0, 1, 'last');
if (~isempty(atas) && ~isempty(bawah))
lebar(i) = bawah - atas;
end
end
nonzero=find(lebar);
lebarnonzero=lebar(nonzero);
figure;plot(lebarnonzero);
lebar_rata = mean(lebarnonzero)
lebar_std = std(lebarnonzero)

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Harshit
Harshit am 7 Nov. 2012
A simple solution is for say a circle of radius r. Pick up 10000 (any large number ) values between -r and r and feed them in variable x. Get y using circle equation. plot(x,y) and take a reflection along x axis.
  1 Kommentar
Andri Pranata
Andri Pranata am 7 Nov. 2012
when i can applied it? is it after the hough transform? before? or thats not using the hough transform for detection? any way thanx man :)

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by