How to find what percentage of image an object covers
조회 수: 4 (최근 30일)
이전 댓글 표시
From the given image, how can i find the percentage of cells covers the image or in other words what percentage of cell covers that image or what is the percentage of foreground image?
댓글 수: 0
답변 (1개)
waqas
2021년 1월 26일
im = im2bw(imread('image.jpeg'));
imshow(bw)
whitearea = bwarea(bw);
blackarea = bwarea(~bw);
conversion to black and white is not perfect in the above code but this should give you the idea. You can use thresholding before converting to black and white image. This will take care of the pixels that are removed from the cells.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!