Creating a paintbrush tool?

5 次查看(过去 30 天)
Suki Sandhu
Suki Sandhu 2017-3-9
Does anybody know of a way to replicate a paintbrush tool in Matlab? Something similar to the way that imfreehand() in combination with createMask() can be used to create a mask? I have tried the following code with button down/move/up:
XY = get(gca,'CurrentPoint');
circleBrush = imellipse(gca,[XY(1) XY(3) SIZE SIZE]); % size is the size of the brush
mask = circleBrush.createMask();
However, it is very slow as it generates a mask every time the mouse is moved. The end goal is just something that can be 'burned' into the original image to make it all zeros. Anything is helpful and appreciated. Cheers

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by