Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

ComputeThreshold_Otsu Bug(?) when applied to already binary images

Daniel_G_7
Beginner
398 Views

Hi all.

I discovered that when you apply ippiComputeThreshold_Otsu_8u_C1R to an 8 bit gray image that only contains 0 and 255 (i.e., is already binarized), the resulting Otsu threshold is t = 0.

From my reading of the documentation, I expected that the "lower" of the two Otsu classes would be all values strictly less than the resulting threshold, i.e. the threshold could have been any value between 1 and 255. The value zero results in a uniformly white image after thresholding regardless of the input.

Best,

Daniel

0 Kudos
3 Replies
Ying_H_Intel
Employee
398 Views

Hi Daniel,

Thanks for the reports. Which version of IPP are you using?

I seems be able to reproduce the problem and investigate further.

Thanks

Ying

0 Kudos
Daniel_G_7
Beginner
398 Views

I am using IPP 9.0 Update 3, which is also where I first noticed the effect.

Best,

Daniel

0 Kudos
Ying_H_Intel
Employee
398 Views

Hi Daniel,

Thanks for the reply.  I get reply from our developer.

The result should be expected.  Because according to the original article (this link also exists in the manual) - http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=4310076 . This function calculates a histogram of an image roi and tries to find a valley: “In an ideal case, the histogram has a deep and sharp valley between two peaks representing objects and background, respectively, so that the threshold can be chosen at the bottom of this valley”. In his particular case the histogram looks like N1,0,0,0,0,….,N2 (where N1 reflects a number of zero elements, N2 – a number of 0xFF elements), - N1 index is the bottom of the valley between N1 and N2 peaks, so corresponding Otsu threshold value is 0.

Best,

Ying

 

0 Kudos
Reply