フィルターのクリア

Viscircles set color not working

4 ビュー (過去 30 日間)
Wiliam Thomas
Wiliam Thomas 2016 年 11 月 29 日
回答済み: Vishal Neelagiri 2016 年 12 月 5 日
Basically when I try to set a different color to a Viscircle using circle.color as I do with every other graphical objects. I just get a "No public property Color exists for class matlab.graphics.primitive.Group." error. However I'm able to change the colour during the creation of the circle.
Is it possible to change the color after the circle has been drawn ?
Thanks for any help.

回答 (1 件)

Vishal Neelagiri
Vishal Neelagiri 2016 年 12 月 5 日
I understand that you would like to change the colors of the circles after using the 'viscircles' command. In order to illustrate this, I am modifying the first example given in the following documentation: https://www.mathworks.com/help/images/ref/viscircles.html
A = imread('circlesBrightDark.png');
imshow(A)
Rmin = 30;
Rmax = 65;
[centersBright, radiiBright] = imfindcircles(A,[Rmin Rmax],'ObjectPolarity','bright');
h = viscircles(centersBright, radiiBright);
h
h.Children
h.Children(1)
h.Children(1).Color = 'b'

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by