Developer Reference

  • 2020
  • 10/21/2020
  • Public Content
Contents

ComputeThreshold_Otsu

Computes the value of the Otsu threshold.

Syntax

IppStatus ippiComputeThreshold_Otsu_8u_C1R
(
const Ipp8u*
pSrc
,
int
srcStep
,
IppiSize
roiSize
,
Ipp8u*
pThreshold
);
Include Files
ippi.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
Parameters
pSrc
Pointer to the source image ROI.
srcStep
Distance in bytes between starts of consecutive lines in the source image.
roiSize
Size of the image ROI in pixels.
pThreshold
Pointer to the Otsu threshold value.
Description
This function operates with ROI (see Regions of Interest in Intel IPP).
This function calculates the Otsu threshold ([Otsu79]) for the source image
pSrc
in accordance with the following formula:
where 0
x
<
roiSize.width
, 0
y
<
roiSize.height
, and
T
is the Otsu threshold.
where
The computed Otsu threshold can be used in the thresholding functions described above.
For example, the following figures shows how the Otsu threshold can be used for background/foreground selection. The figure a) below shows the initial image, the figure b) shows the histogram of the initial image with the red line indicating the computed Otsu threshold. The figure c) demonstrates the resulting image obtained by applying the function
ippiThreshold_8u_C1R
with a computed Otsu threshold value to the source image.
Using Otsu Threshold for Background/Foreground Selection
Return Values
ippStsNoErr
Indicates no error. Any other value indicates an error.
ippStsNullPtrErr
Indicates an error condition if one of the specified pointer is
NULL
.
ippStsSizeErr
Indicates an error condition if
roiSize
has a field with zero or negative value.
ippStsStepErr
Indicates an error condition if
srcStep
is less than or equal to 0.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804