Tae-Sung Shin
Tae-Sung Shin

Reputation: 20633

thresholding an image based on gradient

I have multiple simple circle objects in grid of an image from which I want to create mask image for the objects. A gotcha is that light intensity for each object is different. So simple thresholding would not create a mask.

As a solution, I want to threshold based on gradient. Basically, I'd like to first find the circle with edge detection and make inside of the circle white and outside black. But this is really slow. Is there any better way to do this on matlab?

Upvotes: 2

Views: 1473

Answers (1)

kol
kol

Reputation: 28678

I would create a low-pass filtered version of the image, and use it as the threshold. The "strength" of the filter should be tuned carefully in order to make the result follow the distribution of light intensity, but this is not that hard.

(This approach worked for me when I had to extract the contour of blood vessels from brain-surface images, few years ago.)

Upvotes: 2

Related Questions