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

Difference between IPP ippiResize and IPL iplResize functions

Amante_Mangaser
Beginner
897 Views
From another thread Sergey Kolstrov wrote:

I've beed using an Image Processing APIfrom Intel'sIPPfor a couple of years, and prior to this API fromImage Processing library( IPL )v2.5.

IPP has ippiResize function.
IPL has iplResize function.

What's the difference between these two?
I notice that IPP has sample code that wraps IPL functions.

Thanks.
0 Kudos
1 Solution
SergeyKostrov
Valued Contributor II
897 Views
Here are somedetails:

>> It is from 'ippi.h' <<
/* /////////////////////////////////////////////////////////////////////////////
//
// Name: ippiResize
//
// Context: Resizes a source image by xFactor and yFactor (not in-place)
//
// Returns: IppStatus
// ippStsNoErr, if no errors
// ippStsNullPtrErr, if pSrc == NULL or pDst == NULL
// ippStsStepErr, if srcStep or dstStep is less than or equal to zero
// ippStsSizeErr, if width or height of images is less than or equal to zero
// ippStsResizeFactorErr, if xFactor or yFactor is less than or equal to zero
// ippStsInterpolationErr, if (interpolation != IPPI_INTER_NN) &&
// (interpolation != IPPI_INTER_LINEAR) &&
// (interpolation != IPPI_INTER_CUBIC) &&
// (interpolation != IPPI_INTER_SUPER)
// Parameters:
// pSrc pointer to the source image
// srcSize size of the source image
// srcStep step in bytes through the source image
// srcROI region of interest of the source image
// pDst pointer to the destination image
// dstStep step in bytes through the destination image
// dstRoiSize region of interest of the destination image
// xFactor, yFactor factors by which the x and y dimensions are changed
// interpolation type of interpolation to perform for image resampling:
// IPPI_INTER_NN nearest neighbour interpolation
// IPPI_INTER_LINEAR linear interpolation
// IPPI_INTER_CUBIC cubic convolution interpolation
// IPPI_INTER_SUPER supersampling interpolation
//
// Notes:
//
*/

IPPAPI(IppStatus, ippiResize_8u_C1R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_C3R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_C4R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_AC4R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_P3R, (const Ipp8u* const pSrc[3], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* const pDst[3], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_P4R, (const Ipp8u* const pSrc[4], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* const pDst[4], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_C1R, (const Ipp16u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_C3R, (const Ipp16u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_C4R, (const Ipp16u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_AC4R, (const Ipp16u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_P3R, (const Ipp16u* const pSrc[3], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* const pDst[3], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_P4R, (const Ipp16u* const pSrc[4], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* const pDst[4], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_C1R, (const Ipp32f* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_C3R, (const Ipp32f* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_C4R, (const Ipp32f* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_AC4R, (const Ipp32f* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_P3R, (const Ipp32f* const pSrc[3], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* const pDst[3], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_P4R, (const Ipp32f* const pSrc[4], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* const pDst[4], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))


>> It is from 'ipl.h' <<
/* /////////////////////////////////////////////////////////////////////////
// Name: iplResize
// Purpose: Resize image.
// Returns: None.
// Parameters:
// srcImage The source image.
// dstImage The resultant image.
// xDst, xSrc, yDst, ySrc
// They specify the fractions xDst\xSrc and yDst\ySrc.
// interpolate The type of interpolation to perform for resampling
// the input image.
// The following are currently supported.
// IPL_INTER_NN Nearest neighbour interpolation.
// IPL_INTER_LINEAR Linear interpolation.
// IPL_INTER_CUBIC Cubic convolution interpolation.
// IPL_INTER_SUPER Super sampling interpolation.
// Notes:
*/

IPLAPI(void, iplResize, (IplImage* srcImage, IplImage* dstImage,
int xDst, int xSrc, int yDst, int ySrc, int interpolate))

View solution in original post

0 Kudos
3 Replies
SergeyKostrov
Valued Contributor II
898 Views
Here are somedetails:

>> It is from 'ippi.h' <<
/* /////////////////////////////////////////////////////////////////////////////
//
// Name: ippiResize
//
// Context: Resizes a source image by xFactor and yFactor (not in-place)
//
// Returns: IppStatus
// ippStsNoErr, if no errors
// ippStsNullPtrErr, if pSrc == NULL or pDst == NULL
// ippStsStepErr, if srcStep or dstStep is less than or equal to zero
// ippStsSizeErr, if width or height of images is less than or equal to zero
// ippStsResizeFactorErr, if xFactor or yFactor is less than or equal to zero
// ippStsInterpolationErr, if (interpolation != IPPI_INTER_NN) &&
// (interpolation != IPPI_INTER_LINEAR) &&
// (interpolation != IPPI_INTER_CUBIC) &&
// (interpolation != IPPI_INTER_SUPER)
// Parameters:
// pSrc pointer to the source image
// srcSize size of the source image
// srcStep step in bytes through the source image
// srcROI region of interest of the source image
// pDst pointer to the destination image
// dstStep step in bytes through the destination image
// dstRoiSize region of interest of the destination image
// xFactor, yFactor factors by which the x and y dimensions are changed
// interpolation type of interpolation to perform for image resampling:
// IPPI_INTER_NN nearest neighbour interpolation
// IPPI_INTER_LINEAR linear interpolation
// IPPI_INTER_CUBIC cubic convolution interpolation
// IPPI_INTER_SUPER supersampling interpolation
//
// Notes:
//
*/

IPPAPI(IppStatus, ippiResize_8u_C1R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_C3R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_C4R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_AC4R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_P3R, (const Ipp8u* const pSrc[3], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* const pDst[3], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_8u_P4R, (const Ipp8u* const pSrc[4], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* const pDst[4], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_C1R, (const Ipp16u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_C3R, (const Ipp16u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_C4R, (const Ipp16u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_AC4R, (const Ipp16u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_P3R, (const Ipp16u* const pSrc[3], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* const pDst[3], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_16u_P4R, (const Ipp16u* const pSrc[4], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp16u* const pDst[4], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_C1R, (const Ipp32f* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_C3R, (const Ipp32f* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_C4R, (const Ipp32f* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_AC4R, (const Ipp32f* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_P3R, (const Ipp32f* const pSrc[3], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* const pDst[3], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

IPPAPI(IppStatus, ippiResize_32f_P4R, (const Ipp32f* const pSrc[4], IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp32f* const pDst[4], int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))


>> It is from 'ipl.h' <<
/* /////////////////////////////////////////////////////////////////////////
// Name: iplResize
// Purpose: Resize image.
// Returns: None.
// Parameters:
// srcImage The source image.
// dstImage The resultant image.
// xDst, xSrc, yDst, ySrc
// They specify the fractions xDst\xSrc and yDst\ySrc.
// interpolate The type of interpolation to perform for resampling
// the input image.
// The following are currently supported.
// IPL_INTER_NN Nearest neighbour interpolation.
// IPL_INTER_LINEAR Linear interpolation.
// IPL_INTER_CUBIC Cubic convolution interpolation.
// IPL_INTER_SUPER Super sampling interpolation.
// Notes:
*/

IPLAPI(void, iplResize, (IplImage* srcImage, IplImage* dstImage,
int xDst, int xSrc, int yDst, int ySrc, int interpolate))

0 Kudos
Amante_Mangaser
Beginner
897 Views
Sergey,
So it seems that iplResize() uses an iplImage object and hides more information about the images being processed. ippiResize() on the other hand exposes more details as to the type of image and uses ROI. Is this correct? Thanks,
AM
0 Kudos
SergeyKostrov
Valued Contributor II
897 Views
Hi Amante,

My answer is No, that is Not correct.

Here are more details and let me describe evrything step by step:

-Intel's IPL ( Image Processing Library ) and IPP ( Integrated Performance Primitives ) are two different software products;

- There are No any hidden details regarding functiondeclarations in IPL or IPP;

- There is just one iplResize() function in IPLand you could see it inipl.h or ipl.lib or ipl.dll files;

- There are at least 18 ippiResize() functions with different input parametersin IPPand you could see it in ippi.h, or ippixx.lib, orippixx.dll, where xx is a two-digitnumber;

- Intel's software developers decided to wrap all function declarations with macros IPLAPI or IPPAPI, like:

// for IPL:

IPLAPI(void, iplResize, (IplImage* srcImage, IplImage* dstImage,
int xDst, int xSrc, int yDst, int ySrc, int interpolate))

// for IPP:

IPPAPI(IppStatus, ippiResize_8u_C1R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation))

- When aC/C++ compiler's preprocessor compiles the code it unwrapsa macroto a real function name, something like:

// for IPL:

void iplResize( IplImage* srcImage, IplImage* dstImage,
int xDst, int xSrc, int yDst, int ySrc, int interpolate );

// for IPP:

IppStatus ippiResize_8u_C1R( const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcROI,
Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,
double xFactor, double yFactor, int interpolation );

- When a C/C++ compiler's preprocessing phase is completed the number of functions is the same;

- IPL isfor image processing, but could be usedfor some DSP ( Digital Signal Processing );

- IPP has at least 11 sub-components,differentdomains, like Image processing, Signal processing, Audio processing, etc, and it is more advanced, faster and there are morefunctions ( a couple of hundreds );

- There No anydependencies between these two software products;

- IPL is more than 12 years old, or so;

- IPP is about 10 years old, or so;

Best regards,
Sergey
0 Kudos
Reply