필터 지우기
필터 지우기

what are the preprocessing steps to get a binary Image using OTSU?

조회 수: 3 (최근 30일)
engineer
engineer 2018년 11월 22일
댓글: Image Analyst 2018년 11월 27일
Hi All
I am able to get a binary image for the attached example by defining threshold manually (trial and error). However, When I use Otsu thresholding, the result is not satisfactory. What pre-prosessing would be useful before I apply OTSU for the attached Image? I also present the result when I use OTSU AS below.
Any other methods to get a binary Image are welcome.
Thanks
binary_image.JPG

채택된 답변

Image Analyst
Image Analyst 2018년 11월 25일
Try a top hat filter. See attached.
0000 Screenshot.png
  댓글 수: 11
engineer
engineer 2018년 11월 27일
Because I have checked the tip location manually by using imtool and compared result I have got from binary image. There are differences around 20 pixels. Even when I align them, I can see that at the end of objec is not binarized well. It is shorter than the original one.
For example, the original tip position is (373,515). The position obtained from the binary image is (355,513).
My aim is just to be as close as posible to the original location.
Image Analyst
Image Analyst 2018년 11월 27일
It looks like you're trying to find the black stuff whereas I was trying to find the bright stuff inside the black stuff, so I got rid of the last part of the loop and looped over structuring element radii to see which one give the best values. Did you try that? I did and am attaching the code and the image it makes. Pick whatever radius looks best to you. Or you could try to change the shape of the structuring element from a disk to a cross or something to see if that does better.
0001 Screenshot.png

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

추가 답변 (1개)

Image Analyst
Image Analyst 2018년 11월 23일
편집: Image Analyst 2018년 11월 23일
Try this:
binaryImage = imbinarize(grayScaleImage);
You can also try my interactive method in my File Exchange.
Or you can try my triangle thresholding method, attached.
You should also do a background correction on the image before using a global threshold. See attached demo.
  댓글 수: 1
engineer
engineer 2018년 11월 25일
Hi Image Analyst
Thanks for your help. I could not implement triangle threshold algorithm unfortunately. Matlab gets busy and give an error in the end... I have tried background correction. Unfortunately, results are not satisfactory. It is so confusing for me to get a binary image from my attached image. On the other hand not having the same or even similar results ( as in manual thresholding) from another algorithms, such as OTSU...
I would appreciate if you look into my image and tell me what could be the problem.
Kind regards,

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

카테고리

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