How to show only straight line in binary?

조회 수: 1 (최근 30일)
muhammad ismail
muhammad ismail 2015년 1월 20일
댓글: muhammad ismail 2015년 1월 21일
Please help me to solve this problem. I just need straight line in the midle as white.
  댓글 수: 2
Andrew Newell
Andrew Newell 2015년 1월 20일
You'll need to provide more detail.
muhammad ismail
muhammad ismail 2015년 1월 21일
편집: muhammad ismail 2015년 1월 21일
<<
>>
I want to detect scratch on metal surface. This is original image. After I convert this image to binary(BW), it show unwanted shape in that image. So I just need scratch line and want to remove that unwanted shape in binary condition. Really need your help. Thank You.

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

채택된 답변

Image Analyst
Image Analyst 2015년 1월 21일
Several ways. Since the sample seems to be centered, simply crop your image with imcrop.
Another way is to use the whole image but get rid of blobs touching the border with imclearborder() and get rid of small remaining specs with bwareaopen().
Another way is to do a background correction so you don't get that junk in the bottom in the first place. To do that you need to divide your image by an image of a uniform gray sheet.
  댓글 수: 1
muhammad ismail
muhammad ismail 2015년 1월 21일
Thank you very much. It really helpful.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by