- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I would like to divide results from ippiMulPackConj by the results from ippiMagnitudePack.
The first ones are formated in RCPack2D, but it is not the case of the magnitude (is it?).
Sofor eachvalueof my RCPack2D,Iget the correspondent one in the magnitude... but it seems I'm wrong.
Anyone already did it?
Thank's
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
there is comment from our expert:
Result of ippiMulPackConj function is still in pack format, while result of ippiMagnitudePack is a real image (it is easy to understand Pack format represents complex image, while result of Magnitude is always real). So direct division of these two images is incorrect, as they have different data representation. The desired result may be obtained by different ways the most efficient one (from the performance of view) is to do division point-by-point according to RCPack2D format description in the manual. The next one is to transform result of Magnitude back to the complex format (ipps function RealToCplx in the loop by height should be used as there is no corresponding ip function), then transform it to RCPack2D format (CplExtendToPack) and only then perform division. Also probably this operation may be shifted to the time domain, not frequency?
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir,
I can't find the function "CplExtendToPack" you reference in ippi or ipps. Is this not part of IPP 5.1?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right, itwas added in our the latest version, IPP 5.2 beta
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
time because i did not expect MagnitudePack to provide
my with real data, as there is no hint in the documents
and i do not see the point in giving back real data,
i still have the problem if the result of MagnitudePack
respects roi/scanlines?
in this delphi-code, at least theoretically dstStep might
be bigger than dstRoi.width, so after MagnitudePack
am i left with data "respecting scanlines" or not?
actually my question is: is the code ok or not ;)
(sorry for the bad variable names)
// now calculate source |target x source*|
ippiMulPackConj_32f_C1R (pBufTpl32, dstStep, pBufSrc32, dstStep, pBufDenom32, dstStep, dstRoi);
ippiMagnitudePack_32f_C1R (pBufDenom32, dstStep, pBufTmp32, dstStep, dstRoi);
// convert real magnitude into complex
ippiSet_32f_C1R (0.0, pBufDst32, dstStep, dstRoi);
ippsRealToCplx_32f (pBufTmp32, pBufDst32, pBufTmp32fc, dstRoi.Width*dstRoi.Height);
thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is piece of code suggested by our expert:
ippiMulPackConj_32f_C1R (pBufTpl32, dstStep, pBufSrc32, dstStep, pBufDenom32, dstStep, dstRoi);
ippiMagnitudePack_32f_C1R (pBufDenom32, dstStep, pBufTmp32, dstStep, dstRoi);
// convert real magnitude into pack
// ippiSet_32f_C1R (0.0, pBufDst32, dstStep, dstRoi);
// ippsRealToCplx_32f (pBufTmp32, pBufDst32, pBufTmp32fc, dstRoi.Width*dstRoi.Height);
int i, outlen, phase = 0, dstStep_32fc = /* step for output complex image must be defined */;
Ipp32f *pBufT32f, *pBufT32fc;
for( i = 0; i < dstRoi.height; i++ ){
pBufT32f = (Ipp32f*)((Ipp8u*)p BufTmp32 + i * dstStep );
pBufT32fc = (Ipp32fc*)((Ipp8u*)pBufTmp32fc + i * dstStep_32fc );
ippsSampleUp_32f ( pBufT32f, dstRoi.width, pBufT32fc, &outlen, 2, &phase);
}
Regards,
Vladimir
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page