How Can I do image extraction of chosen region?
17 views (last 30 days)
Show older comments
Ali Zulfikaroglu
on 28 Dec 2020
Commented: Ali Zulfikaroglu
on 6 Jan 2021

I have an mammogram image . I use roipoly command to draw tumor suspicious area . Maybe something easier ways to draw that blue polygon.
My question is I need to extract that blue polygon tumor suspicious region from original image and then I will segment that extracted image.
How Can I do that ?
(The image was taken from mias database).
0 Comments
Accepted Answer
Image Analyst
on 29 Dec 2020
Once you have the mask, do this:
% Mask the image using bsxfun() function to multiply the mask by each channel individually.
% Works for gray scale as well as RGB Color images.
maskedImage = bsxfun(@times, rgbImage, cast(mask, 'like', rgbImage));
changing the names to whatever you want to call them.
More Answers (1)
KALYAN ACHARJYA
on 29 Dec 2020
Edited: KALYAN ACHARJYA
on 29 Dec 2020
Steps:
- Draw
- Right Click (Cursor above the Drawing)
- Create Mask
- Save the Mask

See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!