How to show only straight line in binary?

Please help me to solve this problem. I just need straight line in the midle as white.

2 commentaires

Andrew Newell
Andrew Newell le 20 Jan 2015
You'll need to provide more detail.
muhammad ismail
muhammad ismail le 21 Jan 2015
Modifié(e) : muhammad ismail le 21 Jan 2015
<<
>>
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.

Connectez-vous pour commenter.

 Réponse acceptée

Image Analyst
Image Analyst le 21 Jan 2015

0 votes

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.

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by