[Insight-users] "Look-up-table" suggestion

Martin Kavec kavec at messi.uku.fi
Mon Jul 3 06:21:51 EDT 2006


Hi Shlomo,

On Friday 30 June 2006 14:20, Shlomo Kashani wrote:
> Hi Martin,
> There are several ways to approximate the exp() function. I think it would
> be best if you read a paper about it instead of me quoting it here:
>
> http://www.restena.lu/convict/Jeunes/ultimate_stuff/exp_ln_2.htm
> http://www.research.scea.com/research/pdfs/RGREENfastermath_GDC02.pdf

Thanks for the references. It was interesting to note that this topic is 
actually quite active.

I tried on the fly approximation pow(2, ln(x/ln(2)), but it seems that for the 
dynamic range of my images (regular medical images) the approximation is not 
accurate. It underperformed on the edges where intensity difference is 
perhaps too high and the approximation is not good any more for this 
argument.

I found very interesting papers in Neural Computation by Schraudolph in 1999 
and later on refined approach by Cawley in the same journal in 2000. They 
report calculations even faster than the LUT can provide and even provide the 
C/C++ code. However, the input values must be between -700 and 700.

>
> What is the range of your input to the exp() function?

I am doing following:

1. INTENSITY_NORM = [percentile98( inputImageHistogram) - percentile2( 
inputImageHistogram)]/10

In a neighborhood:

2. argument = ( centerPixel - workingPixel )/INTENSITY_NORM
argument *= argument

3. exp( -argument )


For some images, like the one I have just checked (T1-weghted MRI 3D volume),  
the maximum argument would be -504, which is well inside the -700, 700, but 
to be general, I would have to provide an interface allowing automatic 
scaling of images outside of the range. This would compromise approximation 
accuracy, which could be acceptable for some applications, including mine.

Thanks for (further) suggestions.

Martin


More information about the Insight-users mailing list