Region according to value
3 views (last 30 days)
Show older comments
Rutuja Kate
on 21 Nov 2017
Commented: Image Analyst
on 21 Nov 2017
I have a pixellated 8*8 data set in which the pixels have value either 1 or 2.
1 1 1 1 1 1 1 1,
1 1 c2 2 2 1 1 1,
1 1 2 2 2 1 1 1,
1 1 2 1 2 2 1 1,
1 1 1 2 2 2 1 1,
1 1 1 1 2 1 1 1,
1 1 1 2 2 1 c1 1,
1 1 1 1 1 1 1 1,
There are 2 control points C1 and C2 which have their value as 0. I need to create a continuous region around the control points such that the region around C1 has a summation of the pixel value as 32 and the region around c1 has the value of 44. The summation of values in the dataset is 32+44=76. As I need to create a region, I thought of using the region grow algorithm using my control points as the seed point but it grows the region according to the similar intensity of pixels. Is there any way to do this? Thanks in advance.
2 Comments
Image Analyst
on 21 Nov 2017
Explain in detail exactly how you get the 32 and 44 from a surrounding group of 1's and 2's.
Accepted Answer
Image Analyst
on 21 Nov 2017
You can set c1 and c2 as "true" in a binary image and then repeatedly call imdilate() and then call reqionprops() to find out the resulting area after a layer of pixels has been grown around it. Or just compute the area you need and make a circle with that area centered at that point. See the FAQ
What do you really want to do? What's the use case?
4 Comments
More Answers (0)
See Also
Categories
Find more on Fuzzy Logic Toolbox 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!