필터 지우기
필터 지우기

why threholded image didn't show objects

조회 수: 2 (최근 30일)
Tian Tian
Tian Tian 2017년 8월 18일
댓글: Image Analyst 2017년 8월 19일
Hi, I have a binary image (multithreholded; 3472 * 3256), and now I want to get objects larger than 50 pixels in area, but every time the output is nothing (pure white or pure black when i changed 50 to others). Does it mean it regards the whole as one object after threholding? Mine is like grain distributed image. Could anyone help me? Thank you.
  댓글 수: 3
Tian Tian
Tian Tian 2017년 8월 19일
The attached is the figure outputted by matlab after threholding (I used multithrehold, then converted to binary). I want to get the grain size distribution (e.g.how many objects have area of 50 pixels), shape (how many objects have cicurlarity of some degree), etc. Could you help me? Many thanks.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2017년 8월 18일
Use either bwareafilt() or bwareaopen()
binaryImage = bwareaopen(binaryImage, 50);
or
binaryImage = bwareafilt(binaryImage, [50, inf]);
If you have a multilevel image, like 3 gray levels, then extract just one of the numbers to form a binary image:
binaryImage = grayImage == 1; % or whatever number you want.
  댓글 수: 2
Tian Tian
Tian Tian 2017년 8월 18일
Many thanks! Just a quick question, after multithresholding, the image is in black, gray and white (I only want white), then I found binaryImage = grayImage == 3 can help to extract white out, does this make sense?
Image Analyst
Image Analyst 2017년 8월 18일
Yes.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by