Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How to use ratio of pixel to recognite object
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a binary image as below. I want to take out the green object and eliminate the rest. I have already tried to eliminate some object using "regionprops":
- size of object (200<x<6600 pixel)
- MajorbyMinorAxis (1.25< x < 1.75)
Therefore that properties will not work.
I have an idea that using a bounding box for each object and count the number of pixel of each object in its own bounding box (number of pixel of object/ number of pixel of bounding box).
For example: the object on the top left corner will get around 15% of its bounding box and the green object can make > 75%. Even the size of bounding box for each object is different (compare the top left corner and top right corner object) but the ratio (number of pixel of object/ number of pixel of bounding box) will be similar from 15-30%
But it is just an idea. I don't know how to make the code to make it work and whether it will work correctly.
Can anyone help. but I still accept even if cannot work perfectly but giving an improvement
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/188250/image.png)
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!