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

image resize for color image size limitation

ezeng3
Beginner
540 Views

Hi, All:

           I am resize the large image (width 35776, height 34880) to smaller image (width 8000, height 7800) for display. For mono image, it is working perfectly, but for color image with depth is 24 bit per pixel ~ 3 byte per pixel of the same image size, in which i just overlay a color layer, only upper part can be resized successfully; the low part looks wrong.

 

          I have also dump the Top left part and bottom right part of the original color image buffer, the image is OK. So the remaining doubt is about whether there is any limitation on the image resizing

Mono resize image: Refer to the Mono_intel in the attachment

Color resize image: Refer to the Color_intel in the attachment

 

Here comes the code on the resizing.

//spec init with the corresponding init buffer
m_status = ippiResizeGetSize_8u( expRoiSize, dstRoiSize, ippLinear, nAntiAlias, &szSpec, &szInit );//0 : no anti-alias, 1 : with anti alias
pSpec = (IppiResizeSpec_32f*)ippsMalloc_8u( szSpec );
m_status = ippiResizeLinearInit_8u( expRoiSize, dstRoiSize, pSpec );
 
//working buffer init and resize
m_status = ippiResizeGetBufferSize_8u( pSpec, dstRoiSize, nSrcBytePerPixel, &szWork );
pBufWork = ippsMalloc_8u( szWork );
switch(nSrcBytePerPixel)
{
case 1:
m_status = ippiResizeLinear_8u_C1R( pExp, nExpPitch, pDst, nDPitch, dstOffset, dstRoiSize, borderType, 0, pSpec, pBufWork );
break;
case 3:
m_status = ippiResizeLinear_8u_C3R( pExp, nExpPitch, pDst, nDPitch, dstOffset, dstRoiSize, borderType, 0, pSpec, pBufWork );
break;
case 4:
m_status = ippiResizeLinear_8u_C4R( pExp, nExpPitch, pDst, nDPitch, dstOffset, dstRoiSize, borderType, 0, pSpec, pBufWork );
break;
}
 
Please help to advise on what can be changed to overcome the issue. Thank you!
 
Best Regards
Edwin Zeng
0 Kudos
5 Replies
ezeng3
Beginner
540 Views

Hi, All:

 

          Using the tile can help to solve the issue. Thank you.

 

Best Regards

Edwin Zeng

0 Kudos
Pavel_B_Intel1
Employee
540 Views

Hello Edwin,

is it possible to share with IPP team the original image for experiments?

Pavel

0 Kudos
ezeng3
Beginner
540 Views

Sorry to reply late. But the image is too big to upload. the raw image is more than 2GB [43k x 52k]

0 Kudos
Pavel_B_Intel1
Employee
540 Views

Ok,

the problem solved with tiling. If you fine to share your image for our experiments you can use my email for this: pavel.berdnikov@intel.com. We will investigate the issue in any case, maybe not so fast as it has the workaround.

Pavel.

0 Kudos
Tatyana_B_Intel
Employee
540 Views

Also probably you can try to use our Platform Aware API to support big sizes.

Also Threading Layer API (based on OpenMP or TBB) can help you to achieve better performance.

Here is the link to documentation (Case 3 and Case 4):

https://software.intel.com/en-us/ipp-dev-reference-resizelinear ;

If you have any questions please let me know.

Best regards,

Tatyana 

0 Kudos
Reply