Community
cancel
Showing results for 
Search instead for 
Did you mean: 
murali_523
Beginner
58 Views

Problem while replacing old ippiResizeCenter method with ippiResize<interpolation> method

Hi,

  We were using the resizeCenter method in our software which takes parameters to scaleX & scaleY and offsets in X & Y directions .

  Now we want to upgrade the software to 8.2 where this method is totally removed.

  I saw the resizeCubic method but this method doesn't take the scale in X & Y directions and also offset.

  But the new method considers only the ROI's of source and destination. 

  I really doesn't understand the concept behind the new resizeCubic method ,that how we can scale down/ up the source raster to fit  inside the

  destination raster.

   All i need is to perform both scaling and shift together like the methods ippiResizeCenter and ippiResizeSqrPixel.

   Unfortunately both these methods were depreciated and  ippiResizeCenter is totally remove.

   We have to perform the zoom and pan in the source image which we used to perform before using ippiResizeCenter using the new ippiresizeCubic

   We even have the source image with different aspect ration which we used to handle by setting the different scale X & ScaleY in resizeCenter    method. I didn' understand how to handle these kind of images and perform zoom and pan using the new method  ippiResize<interpolationtype>

   Can you please provide a small code snippet to perform the zoom and pan on the source image to display it in the destination buffer using the method    ippiResize<interpolationtype> method?

   

Thanks & Regards,

Muralidhar

 

  

 

  

   

0 Kudos
4 Replies
Valentin_K_Intel
Employee
58 Views

Hi Muralidhar,

The ippiResize<interpolationtype> method scales an image respecting (0,0) point. To implement an integer-valued shift of the scaled image you need to shift the destination image pointer that is passed to the processing function. Shifting the pointer you need to specify the destination ROI so that the shifted region does not exceed the destination image bounds.

You can used ippiWarpAffine<interpolationtype> method to implement image scaling with a real-valued shift.

Could you please provide the way of ippiResizeCenter usage to get me a base point to prepare a small code snippet with the ippiResize<interpolationtype> method.

Best regards,
Valentin

murali_523
Beginner
58 Views

Hello Valetin,

   Hope you received  the code snippet sent to you related to how we use the ippiResizeCenter method. 

   We would like to hear from you ASAP any way handle to same using the ippiResize<interpolation mode> methods including the aspect ration

   images for which we set different scale factors. We have a customized handling of setting the scale factors. But this looks to not possible with the new method ippiResize which tries to streach in both direction  uneqaully. Here we can't have possibility to inform to scale equally until two sides to the source ROI touches the destination ROI. Unfortunatly the other available method ippiResizeSqr is also got depreciated.

  We can't use the ippiWardAffine even though it works since it is a big elephant when it comes to performance compared with   ippiResizeCenter. 

   And our product cant afford a compromise in performance.

Thanks & Regards,

Muralidhar

 

  

  

murali_523
Beginner
58 Views

Hello Valetin,

   Hope you received  the code snippet sent to you related to how we use the ippiResizeCenter method. 

   We would like to hear from you ASAP any way handle to same using the ippiResize<interpolation mode> methods including the aspect ration

   images for which we set different scale factors. We have a customized handling of setting the scale factors. But this looks to not possible with the new method ippiResize which tries to streach in both direction  uneqaully. Here we can't have possibility to inform to scale equally until two sides to the source ROI touches the destination ROI. Unfortunatly the other available method ippiResizeSqr is also got depreciated.

  We can't use the ippiWardAffine even though it works since it is a big elephant when it comes to performance compared with   ippiResizeCenter. 

   And our product cant afford a compromise in performance.

Thanks & Regards,

Muralidhar

 

  

  

Chao_Y_Intel
Employee
58 Views


An update for others who is checking this problem:    the WarpAffine function in the IPP 8.2 update 2 provides the special optimization for the resize +  Shift  case in the release. so this function could be the option for such usage. 

thanks,
Chao