- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all, I am trying to calculate the average of two images, is there any IPP function for this purpose?
thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Massaro,
do you mean
pDstImage = pSrcImage1* alpha + pSrcImage2*(1- alpha). when alpha=0.5 ?
ippiAddWeighted_32f_C1R can do this.
You may check the function list in ippi.pdf and see if there are something you needed. http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-documentation
Regards,
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ying, thanks for the help. I checked the defintion for AddWeighted, but it seems that the destination can only be floating-point arrays. For image processing, I feel it makes more sense to support an output type of 8u. I am not sure the cost of converting FP data to integer type for a large data array. Currently, I found an alternative ippsInterpolateC_NR_16s(). Luckily, the two images I need to average are 16-bits.
Anyway, thanks again for the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For 8u images the most simplest way is to use
IPPAPI(IppStatus, ippiAdd_8u_C1RSfs, (const Ipp8u* pSrc1, int src1Step, const Ipp8u* pSrc2,
int src2Step, Ipp8u* pDst, int dstStep, IppiSize roiSize,
int scaleFactor))
with scaleFactor == 1 (note - saturation is performed after applying scale factor - so result will be correct)
regards, Igor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page