Clear Filters
Clear Filters

To find generalised threshold value of an image

1 view (last 30 days)
I extracted the tumour from the original image by using the following code. I found the threshold value by trial and error method. How to find the generalised threshold value?
I=imread('tum.tif');
a=imadjust(I);
a=imadjust(I,[0.3; 0.7],[0.3; 0.7]);
b=im2bw(a);
  3 Comments
rohith bharadwaj
rohith bharadwaj on 26 Jan 2018
So does that mean for every image I will have to change the thresholding value accordingly on the basis of trial and error?
Rik
Rik on 26 Jan 2018
That depends on how general you want your code to work. There might not be answer that works for all tumors, but density based segmentation might work for all your images. I'm sure you'll be able to find some examples if you type that into your favorite internet search engine.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 26 Jan 2018
I also don't know what a "generalised" threshold is. I disagree that kmeans is a good method. While it may work good for images where you know for a fact that there is definitely a good sized tumor there, it will not work in general for small tumors, and you don't want to miss those. A fixed threshold, perhaps based on some reference if your overall intensity is not stable, would detect tumors of any size.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!