필터 지우기
필터 지우기

how can I connect two or more connected components in binary image?

조회 수: 10 (최근 30일)
abdelrahim hashem
abdelrahim hashem 2017년 11월 19일
댓글: Image Analyst 2017년 11월 20일
after I get connected components for binary image, I need to merge two or more connected components to be one CC
  댓글 수: 2
Matt J
Matt J 2017년 11월 19일
How do you get them? In what form do you have them now?
abdelrahim hashem
abdelrahim hashem 2017년 11월 19일
I get many CCs, some of them represent characters. I need to combine these CCs represent characters to extract text from image. I think the form should be a new CC.

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

답변 (1개)

Image Analyst
Image Analyst 2017년 11월 19일
Try imclose() to merge nearby regions into the same region.
  댓글 수: 2
abdelrahim hashem
abdelrahim hashem 2017년 11월 20일
Can you give me more explanation to use imclose()?
Image Analyst
Image Analyst 2017년 11월 20일
It basically dilates the binary blobs by one or more layers, making it "grow" and possibly connect to other blobs. This will also make the blob boundaries smoother. Then it erodes that by the same amount to get it back to the same size. The boundary will be smoother than the original and any connections made to adjacent blobs will still be there. So basically it will merge blobs and smooth the outlines.

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

Community Treasure Hunt

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

Start Hunting!

Translated by