Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

ippiQualityIndex returning NaN

Adriaan_van_Os
New Contributor I
1,198 Views

I noticed that ippiQualityIndex may return a NaN for parameter pQualityIndex, even with comparing images that don't contain a NaN themselves. The result code is ippStsNoErr.  I guess the cause is division by zero.

I suggest to return 0.0 rather than NaN in concerning cases.

Regards,

Adriaan van Os

 

0 Kudos
4 Replies
Ruqiu_C_Intel
Moderator
1,198 Views

Hello Adriaan van Os,

I can't understand what do you mean return a NaN for parameter pQualityIndex. The range of values for the index Q is [-1, 1]. The best value 1 is achieved if and only if the images are identical.

BRs,

Ruqiu

0 Kudos
Adriaan_van_Os
New Contributor I
1,198 Views

Ruqiu,

I hope you understand what a NaN is and how they occur in software. If not, please read the IEEE-754 standard. As I already noted, the cause of the NaN is probably that the software is dividing by zero internally. But it could be something else.

To reproduce, I can provide two images for which ippiQualityIndex returns a NaN.

Regards,

Adriaan van Os

0 Kudos
Ruqiu_C_Intel
Moderator
1,049 Views

Adriaan van Os,

Thanks for your explanation. And so sorry didn't back to your question for a long time because our website changed from Forum to Community.

Anyway, have you tested with our latest IPP version (2021.2)? If still have any question with our latest version, how about sending us your simple reproducer if you don't mind? Then it will help us investigate the issue. 

 

Regards,

Ruqiu

0 Kudos
Ruqiu_C_Intel
Moderator
1,011 Views

We are closing the thread now and will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only. Thanks.

0 Kudos
Reply