- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Scenario: make two images, initialise with Jaehne pattern, apply gaussian to one image, then find quality index. Code shown below. This can also easily be replicated using the IPPI demo program.
Code ->
void main()
{
const int width = 640;
const int height = 480;
Ipp8u pSrc1[width * height];
Ipp8u pSrc2[width * height];
int step = width * sizeof(Ipp8u);
IppiSize wholeImageROI = { width, height };
ippiImageJaehne_8u_C1R(pSrc1, step, wholeImageROI);
ippiImageJaehne_8u_C1R(pSrc2, step, wholeImageROI);
// Gaussian with 1-pixel border taken off
//IppiSize gaussRoiSize = {638, 478};
IppiSize gaussRoiSize = {width - 2, height - 2};
ippiFilterGauss_8u_C1R(
pSrc2 + step + 1,
step,
pSrc1 + step + 1,
step,
gaussRoiSize,
ippMskSize3x3);
Ipp32f pQIndex = -999;
IppStatus ippStatus;
// First call fails with ippStsQualityIndexErr
ippStatus = ippiQualityIndex_8u32f_C1R(pSrc1, step, pSrc2, step, wholeImageROI, &pQIndex);
ippStatus = ippiQualityIndex_8u32f_C1R(pSrc1, step, pSrc2, step, wholeImageROI, &pQIndex);
ippStatus = ippiQualityIndex_8u32f_C1R(pSrc1, step, pSrc2, step, wholeImageROI, &pQIndex);
}
Any thoughts on this appreciated!
Jon.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Scenario: make two images, initialise with Jaehne pattern, apply gaussian to one image, then find quality index. Code shown below. This can also easily be replicated using the IPPI demo program.
Code ->
void main()
{
const int width = 640;
const int height = 480;
Ipp8u pSrc1[width * height];
Ipp8u pSrc2[width * height];
int step = width * sizeof(Ipp8u);
IppiSize wholeImageROI = { width, height };
ippiImageJaehne_8u_C1R(pSrc1, step, wholeImageROI);
ippiImageJaehne_8u_C1R(pSrc2, step, wholeImageROI);
// Gaussian with 1-pixel border taken off
//IppiSize gaussRoiSize = {638, 478};
IppiSize gaussRoiSize = {width - 2, height - 2};
ippiFilterGauss_8u_C1R(
pSrc2 + step + 1,
step,
pSrc1 + step + 1,
step,
gaussRoiSize,
ippMskSize3x3);
Ipp32f pQIndex = -999;
IppStatus ippStatus;
// First call fails with ippStsQualityIndexErr
ippStatus = ippiQualityIndex_8u32f_C1R(pSrc1, step, pSrc2, step, wholeImageROI, &pQIndex);
ippStatus = ippiQualityIndex_8u32f_C1R(pSrc1, step, pSrc2, step, wholeImageROI, &pQIndex);
ippStatus = ippiQualityIndex_8u32f_C1R(pSrc1, step, pSrc2, step, wholeImageROI, &pQIndex);
}
Any thoughts on this appreciated!
Jon.
Additional info: this may be related to the Gauss function. If, in the above example, I insert a duplicate call to the Gauss function above the final QualityIndex function call, then the following QualityFunction call again fails.
As I mentioned this can be replicated using the IPPI demo program. (Create a 640*480 1C image with Jaehne, do a 3*3 Gauss which produces a new image using reduced ROI, then run quality index on the two images and the first time it will fail).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Additional info: this may be related to the Gauss function. If, in the above example, I insert a duplicate call to the Gauss function above the final QualityIndex function call, then the following QualityFunction call again fails.
As I mentioned this can be replicated using the IPPI demo program. (Create a 640*480 1C image with Jaehne, do a 3*3 Gauss which produces a new image using reduced ROI, then run quality index on the two images and the first time it will fail).
Hello Jon,
Thank you a lot for the catch. We can reproduce the problem. It is really a bug in IPP function, - not in ippiQualityIndex, but in ippiFilterGauss_8u_C1R function (in dynamic and threaded static libraries only, no such bug in non-threaded static version, see static linkage mode here <http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-for-windows-find-the-intel-ipp-libraries-needed-by-your-application/> We will fix it in next release.
There are several possible workarounds , you maytry them temporarily
for example, use no-threaded static library or disable the thread inippiFilterGuass
int n;
ippGetNumThreads( &n );
ippSetNumThreads( 1 );
ippiFilterGauss_8u_C1R();
ippSetNumThreads( n );
......................
ThanksYing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
Ying

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page