Find and plot the center of a circle

11 ビュー (過去 30 日間)
Laisa Fernochio
Laisa Fernochio 2018 年 6 月 2 日
コメント済み: Ameer Hamza 2018 年 6 月 10 日
I have a code that makes a circle around the iris in a eye image, and now i need to show the center of this circle how do i do that?
% code
r = bboxeyeshalf(1,4)/4;
[centers, radii, metric] = imfindcircles(eyesImage, [floor(r-r/4) floor(r+r/2)], 'ObjectPolarity','dark', 'Sensitivity', 0.93); % Hough Transform
[M,I] = sort(radii, 'descend');
eyesPositions = centers;
subplot(2,2,2),imshow(eyesImage); hold on;
viscircles(centers, radii,'EdgeColor','b');

採用された回答

Ameer Hamza
Ameer Hamza 2018 年 6 月 2 日
You can display the center of circle using
viscircles(centers, radii,'EdgeColor','b');
plot(centers(1), centers(2), '+')
  4 件のコメント
Laisa Fernochio
Laisa Fernochio 2018 年 6 月 9 日
Can you help me with the mouse move , I wanna take that coordinates of center and make the mouse move, how do i do that? I know i little of java robot,but i don't know where to start
Ameer Hamza
Ameer Hamza 2018 年 6 月 10 日
Here is a general idea. You can use Position property of figure and axes objects along with XLim and YLim to find the screen coordinates of the desired point. Then you can use java robot to move to that location.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by