Region according to value
조회 수: 3 (최근 30일)
이전 댓글 표시
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
Image Analyst
2017년 11월 21일
Explain in detail exactly how you get the 32 and 44 from a surrounding group of 1's and 2's.
채택된 답변
Image Analyst
2017년 11월 21일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!