Cannot reproduce expected levels

Project:Multilevel Thresholding
Version:IGOR.6.10.x-0.99
Component:Documentation
Category:support request
Priority:normal
Assigned:harneit
Status:won't fix
Description

I tried this:
make /o/b/u/n=(100,100) test=gnoise(1)+10+10*mod(x+y,3)
which basically makes a matrix with 3 levels, plus noise.
When I run:
NewImage test; MultiThresh("", 3, 0)
the output levels I get are 0,3,6,9,255. I don't understand what this means, since my pixels are clustered around intensity values of 10, 20, and 30.

#1

Assigned to:Igor Pro User» harneit
Status:active» postponed

I have no positive answer.

I tried your recipe (many times) and consistently found
ThresholdWave[0]={0,8,12,23,0}
as a result (IP6.12A on WinXP).

In the test case you provided, two threshold levels would actually suffice (I get ThresholdWave[0]={0,12,23,0}).

Note that only the "middle" numbers count, the first and last points are overhead needed by my implementation of the LUT conversion (in ApplyThresholds).

For an image (such as your test case) with three readily identifiable peaks in the histogram (e.g., produced by
Make/N=256/O test_Hist;Histogram/B={0,1,256} test,test_Hist;Display/K=0 test_Hist
), you could set the threshold probably more easily manually. For this, you could use
Redimension/N=4 ThresholdWave;ThresholdWave[0]={0,15,25,35};ApplyThresholds(test, "test_ManualThresholds")
I guess this produces the "expected" result...

I have no clear idea why the LCC algorithm finds slightly too low values ({12,23} instead of {15,25}) -- I just coded what I found in the papers mentioned in this forum post.

If you find a solution to this mystery or any other pathological cases, please let me know.
Wolfgang

#2

Status:postponed» won't fix

I set the status to "won't fix" since I have no idea what to do...

Back to top