Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
12 Views

How to substitute IPL API iplCreateROI using IPP?

Jump to solution
Dear All,

I am migrating the legacy code to VS2008 and removing all the dependencies on IPL library. I did not find any direct IPP APIs as a replacement for iplCreateROI and iplDeleteROI.

I have gone through the ipl-ipp migration document and sample code but no details are available regarding this. If anyone can provide the steps to create ROI using IPP;will appreciate any help or suggestion.

Thanks,
Vikash
0 Kudos

Accepted Solutions
Highlighted
12 Views

Hi Vikash,

The IplROI structure in IPL library used toaddresssubimage region in bigger image.There is no magick in that, just a way to specify particular offsets in bigger image and sise of your region of interest. In IPP there is nospecial data type to represent ROI. Instead you have access to pointer of your original data, you know number of bytes in your image row and you can access to submimage by shifting pointer to desired numer of rows and columns andspecy size of subimage with IppiSize structure.I would recommend you to check IPP documentation, volume 2 (image processing, especially charter "IPP Concept, Region of Interest in Intel IPP"

Regards,
Vladimir

View solution in original post

0 Kudos
3 Replies
Highlighted
13 Views

Hi Vikash,

The IplROI structure in IPL library used toaddresssubimage region in bigger image.There is no magick in that, just a way to specify particular offsets in bigger image and sise of your region of interest. In IPP there is nospecial data type to represent ROI. Instead you have access to pointer of your original data, you know number of bytes in your image row and you can access to submimage by shifting pointer to desired numer of rows and columns andspecy size of subimage with IppiSize structure.I would recommend you to check IPP documentation, volume 2 (image processing, especially charter "IPP Concept, Region of Interest in Intel IPP"

Regards,
Vladimir

View solution in original post

0 Kudos
Highlighted
Beginner
12 Views
Hello Vladimir,

Thanks foryour support and descriptive reply, I could solve the problem.I have got one more query and need your help. I want to replace IPL API iplSubtractS() with IPP API ippiSubC.

iplSubtractS() will subtract a constant value from pixel values, or pixel values from a constant based on the value of boolean flip parameter passed to the function. But the ippiSubC() subtracts a constant from image pixel values, the reverse subtraction is not supported (i.e. subtract pixel value from a constant).

I want to know how to achieve the reverse subtraction using IPP APIs. Any suggestion is welcome.

Thanks,
Vikash
0 Kudos
Highlighted
Employee
12 Views

Hello,


you can check the IPP-IPL sample on how to map the IPL to IPP: \ipp-samples\image-processing\ipl-ipp:

For example for 8u image, it can use the following code:

ippiConvert_8u16s_C1R(pSrc, src->widthStep, (Ipp16s*)pTmp16, step, roi);
ippiMulC_16s_C1IRSfs(-1, (Ipp16s*)pTmp16, step, roi,0);
ippiAddC_16s_C1IRSfs(val, (Ipp16s*)pTmp16, step, roi, 0);
ippiConvert_16s8u_C1R((Ipp16s*)pTmp16, step, pTmp, dst->widthStep, roi);
ippiCopy_8u_C1MR((Ipp8u*)pTmp, dst->widthStep,(Ipp8u*)pDst, dst->widthStep, roi, pMask, roi.width);

Thanks,
Chao

0 Kudos