Display each object in a binary image separately
Show older comments
Hello everybody,
I have an image, with undefined number of objects, just like the image below.

I want to create an image for each one of the objects. For this case, I want to create 4 images each one with only one object. The new images should have the same size as the original image.
Is there anyone who could help me?
Cheers,
Joaquim
3 Comments
Rik
on 23 Mar 2017
You can look into regionprops. This will identify the number of objects and give you an idea about how to proceed. If you can't make sense of the usage of this function, do get back and we will try to help you.
Joaquim
on 23 Mar 2017
Rik
on 23 Mar 2017
As long as it gets the job done it usually doesn't matter how efficient your code is in terms of memory (in most of my cases anyway).
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic 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!