Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What should be the ideal thresholding technique for enhancing parts of the image?

enter image description here

What thresholding techique should i apply for the image in order to highlight the bright regions inside the image as well as the outer boundary..

The im2bw function does not give a good result

Help!!

Edit: Most of my images have the following histogram

enter image description here

Edit: Found a triangle threshold method that suits my work :)

enter image description here

like image 258
vini Avatar asked Feb 09 '12 10:02

vini


2 Answers

Your question isn't very easy to answer since you don't really define what a ideal solution should accomplish.

Have you tried im2bw(yourImage, 0.1); ? I.e using a threshold for what parts should be black and waht parts shouldn't. I got descent results with that (depending on what the purpose is of course). Try it and if it isn't good enough, tell us in what way you need to improve it and i will try to help with some more advanced techniques!

EDIT: Using threshold 0.1 and 0.01 respectively, perhaps something ~0.05 should be good?

Using threshold 0.1

Using threshold 0.01

like image 171
Niclas Avatar answered Sep 20 '22 03:09

Niclas


It sounds like what you want to do is ''image segmentation'' (see http://en.wikipedia.org/wiki/Segmentation_(image_processing) ).

Most methods are based on the Chan-Vese model which identifies the region of interest by solving an optimization problem involving a level set function. Since you're using matlab, this code: http://www.stanford.edu/~tagoldst/Tom_Goldstein/Split_Bregman.html should do a good job of finding the regions you are interested in.

like image 42
dranxo Avatar answered Sep 21 '22 03:09

dranxo