IPP image processing function naming format

column directory

1. Introduction to IPP and installation instructions under Windows
2. Cooperating use of IPP and Opencv
3. Naming format of IPP image processing functions
4. Description of commonly used functions in IPP image processing

illustrate

1. IPP version
IPP version: IPP2021
2. Official website description
Direct URL

1. Function format

ipp<data-domain><name>_<datatype><descriptor>[<_extension>](<parameters>)

Two, data-domain

The data field represents the subset of functionality to which a given function belongs.
s: 1D signal data
i: 2D image and video
m: Matrix
r: 3D data processing
g: Fixed-length signal

3. Name

<name>-<operation>[_modifier]

Operational components One or more words describing the core operation
Modifiers are optional and denote slight modifications or changes in functionality

1. Names without modifiers

Add, RGBToYCbCr, MorphAddGetSize

2. Names with modifiers

DCT8x8Inv_2x2, DCT8x8Inv_4x4, RGBToYCbCr_JPEG

4. Data type

<bit depth><bit interpretation>

Bit depth and bit type description
bit depth = <1|8|16|32|64>
bit interpretation = <u|s|f>[c]
u means unsigned integer, s means signed integer, f means float Dot type, c means complex type
For image and video
8u: 8-bit unsigned data
8s: 8-bit signed data 16u:
16-bit unsigned data
16uc: 16-bit complex short unsigned data
16s: 16-bit signed data
32u : 32-bit unsigned data
32s : 32-bit signed data
32sc : 32-bit complex integer data
32f : 32-bit single-precision floating-point data
32fc : 32-bit single-precision complex floating-point data
64s : signed quadruple word (quadword)
64f: double-precision floating-point data
For image processing functions that do not support 1u data types, use the ippiConvert_1u8u_C1R function to convert black and white images to 8u grayscale images.
Complex data types are defined by structures

typedef struct {
    
         Ipp16s re;     Ipp16s im; } Ipp16sc;
typedef struct {
    
         Ipp32s re;     Ipp32s im; } Ipp32sc;
typedef struct {
    
         Ipp32f re;     Ipp32f im; } Ipp32fc;

Among them, re represents the real part, and im represents the imaginary part.
Complex data types are used in some arithmetic image processing functions. 32fc format can be used in some Fourier transform functions
64-bit formats 64s and 64f are used to store data computed by some image statistics functions For functions operating on a single data type, the data type field contains only one of the values
​​listed above
operating on the source and target images of the type, the corresponding data type identifiers will be listed in the function name in the order of source and target

<datatype> = <src1Datatype>[src2Datatype][dstDatatype]

Functions that convert 8-bit unsigned source image data to 32-bit floating-point destination image data have the value 8u32f in the data type field.

5. Descriptor

A descriptor further describes the operation. A descriptor is a single character that represents additional details about an operation.
If multiple descriptors are used, they appear alphabetically in the function name.
Every function that manipulates image data has a channel count descriptor Cn (for interlaced images) or Pn (for planar images).
If the input and output channel layouts are different, the source and destination layouts are listed, for example, the function ippiHLSToBGR_8u_C3p3R Convert a three-channel interleaved HLS image to a three-plane BGR image.
A: The image data contains an alpha channel as the last channel, which requires C4, and the alpha channel is not processed.
A0: The image data contains an alpha channel as the first channel, which requires C4, and the alpha channel is not processed.
C1, C2, C3, C4: The image data is in pixels and consists of 1-4 discrete channels
C: The channel of interest (COI) is used in the operation.
I: The operation is performed in-place – that is, the result of the operation is written back to the source file (not in-place by default).
M: The operation uses a mask to determine which pixels to process
P: This function is suitable for non-contiguous volume data (the position of the plane is passed to the function with a pointer on the plane)
P2\P3\P4: The image data is in plane order Arrayed, consisting of 2, 3 or 4 discrete planar (non-interleaved) channels, each with a separate pointer
R: The function operates on a defined region of interest (ROI)
Sfs for each source image: Use Saturation and Fixed Scale Modes
: Saturation and No Scale (default).
V: The function operates on a volume of interest (VOI) defined by each source image

6. Parameters

Arguments in a function are ordered in the following order: all source operands, all destination operands, and all other operand-specific arguments.
The source parameter names if there are multiple input images. The target parameter name is Dst. For in-place operations, the in/out parameters contain the name SrcDst. All parameters defined as pointers start with a lowercase p, such as pSrc, pMean, pSpec.

7. Expansion

The extension field indicates the "Intel IPP" extension to which the function belongs. The "Intel IPP Image Processing" function supports the following extensions.

8. Function prototype

Function names in Intel IPP contain datatype and descriptor fields after the name field (see Function Naming). Most of the Intel IPP functions for image processing have some flavors that differ in the data types associated with the operation and some additional parameters.
Each function has its own unique prototype, which is used for function definition and calling that function from the application. For many types of a given function, these prototypes look very similar.
To avoid listing all such prototypes in function descriptions in this paper, it is possible to just give different templates for such prototypes, followed by a table of applicable data types and descriptors for each function. For simplicity, the datatype and descriptor fields in the function name are denoted mod in this case.
For example, the prototype template for an image dilation function that performs non-in-place operations looks like this

IppStatus ippiDilate_<mod>(const Ipp<datatype>* pSrc, 
							int srcStep, 
							Ipp<datatype>* pDst, 
							int dstStep, 
							IppiSize roiSize);

The type of mod has
8u_C1R
8u_C3R
8u_AC4R
. This symbol means that the ippiDilate function has three flavors for a non-in-place operation. They handle 8-bit unsigned data (Ipp8u type) and differ in the number of channels for processing images. The prototypes of these styles are as follows.

IppStatus ippiDilate_8u_C1R(const Ipp8u* pSrc, 
							int srcStep,     
							Ipp8u* pDst, 
							int dstStep, 
							IppiSize roiSize);
IppStatus ippiDilate_8u_C3R(const Ipp8u* pSrc, 
							int srcStep,     
							Ipp8u* pDst, 
							int dstStep, 
							IppiSize roiSize);
IppStatus ippiDilate_8u_AC4R(const Ipp8u* pSrc, 
								int srcStep,     
								Ipp8u* pDst, 
								int dstStep, 
								IppiSize roiSize);

So to get the full name and argument list for a particular function flavor not listed directly, do the following.
Select the function mode of operation (denoted in this paper as case 1, 2, etc.) and look up the supported data types and descriptors in the table.
Set the mod field in the function name to the concatenation of the selected data type and descriptor, bounded by underscores.
Using the corresponding template, replace all data type fields in the parameter list with the selected data type. Note that the Ipp prefix is ​​written before the data type in the parameter list (see data type for details).

Guess you like

Origin blog.csdn.net/puqian13/article/details/127630682