MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by mmm ssss
on 31 Dec 2011

please ,how can i calculate the global and adaptive local threshold for the grayscale image using matlab ?

*No products are associated with this question.*

Answer by Image Analyst
on 1 Jan 2012

There are a variety of ways to find a threshold, from the Otsu method (bwthresh) to the triangle method, to an interactive manual method that I've uploaded to http://www.mathworks.com/matlabcentral/fileexchange/29372-thresholding-an-image

Image Analyst
on 2 Jan 2012

My email is just a spam catcher account. I can't reply or accept attachments. Post your image to tinypic.com. Have you tried adpathisteq? After doing that you can use a global threshold but it would have the effect of a local threshold since the output image has its output value adjusted for every pixel.

## 2 Comments

## Naz

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/25063#comment_55591

I have one algorithm that works good for images with relatively uniform background. For example, it would work great for contrasting images of eye retina. What kind of images do you need to work with?

## mmm ssss

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/25063#comment_55774

i have images for hand-dorsal veins.

is your algorithm will be suitable to these images or not?

thanks