How to fill circles with color using "vision.ShapeInserter"?

8 views (last 30 days)
Hello, I'm trying to fill a circle with a determined color in an image I'm working with, I've tried just leaving the vector that has the color I need but it doesn't work, it still leaves the circles in another color, here's what I have tried:
I=imread('artv11.jpg');
>> shapeInserter=vision.ShapeInserter('Shape','Circles','Fill', true,'BorderColor','Custom','CustomBorderColor',uint8([0 159 60]));
Warning: The BorderColor property is not relevant in this configuration of the System object.
> In C:\Program Files\MATLAB\R2012b\toolbox\matlab\system\+matlab\+system\pvParse.p>pvParse at 25
In C:\Program Files\MATLAB\R2012b\toolbox\matlab\system\+matlab\+system\SystemProp.p>SystemProp.parseInputs at 642
In C:\Program Files\MATLAB\R2012b\toolbox\matlab\system\+matlab\+system\SystemProp.p>SystemProp.setProperties at 151
In C:\Program Files\MATLAB\R2012b\toolbox\vision\vision\+vision\ShapeInserter.p>ShapeInserter.ShapeInserter at 283
Warning: The CustomBorderColor property is not relevant in this configuration of the System
object.
> In C:\Program Files\MATLAB\R2012b\toolbox\matlab\system\+matlab\+system\pvParse.p>pvParse at 25
In C:\Program Files\MATLAB\R2012b\toolbox\matlab\system\+matlab\+system\SystemProp.p>SystemProp.parseInputs at 642
In C:\Program Files\MATLAB\R2012b\toolbox\matlab\system\+matlab\+system\SystemProp.p>SystemProp.setProperties at 151
In C:\Program Files\MATLAB\R2012b\toolbox\vision\vision\+vision\ShapeInserter.p>ShapeInserter.ShapeInserter at 283
>> circles=uint32([102 383 3; 90 281 3; 173 310 3; 218 357 3; 255 292 3; 211 256 3]);
>> J=step(shapeInserter, I,circles);
>> imshow(J)
I know that the Warning stuff is because I'm using the 'Fill' parameter, but how can I change the color of the circles, I tried just to write:
>> shapeInserter=vision.ShapeInserter('Shape','Circles','Fill', true, uint8([0 159 60]));
but it sends me an error, how can I change it?
Thanks
P.S. I know about the ShapeInserter tool from Matlab 2014, but I have to work in M2012 because I'll use another code that has compatibility issues with M2014

Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!