- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In matlab, I usually search for NaN's and set it to zero. In some cases a divide by zero is
unavoidable, like dividing 2 images. What is generally done in Ipp? I am trying to transcode some
Matlab routines to IPP based versions, and wanted to know what the experts use in such cases?
Thanks,
Sid.
unavoidable, like dividing 2 images. What is generally done in Ipp? I am trying to transcode some
Matlab routines to IPP based versions, and wanted to know what the experts use in such cases?
Thanks,
Sid.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As I know IPP will not check not a number (NaN), this library is specifically for performance oriented functions. Better to check before applying IPP functions in your application.
Please check these two documents, how IPP handles NaN and other arithmetic operations
Regards,
Naveen Gv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Naveen,
Thanks. What I want is that I can set the divide by zeros to zero in the result per iteration. Since the image regions are zero, they are featureless and uninteresting for the application that I am implementing. If I can set them to zero, then I can ensure that these pixels will not be a part of my calculations, and further, not propogate due to an intended neighborhood operation in subsequent iterations.
In Matlab, I would just have done Image(find(isnan(Image))) = 0 and carried on. How can I do something similar in IPP ?
Based on the documentation, It seems that a hack could be to represent images as 16sc vectors, and divide, as with 16sc format, x/0 = 0. This seems to be the most vectorized way for me to do this, for now.
Thanks again,
Sid.
Thanks. What I want is that I can set the divide by zeros to zero in the result per iteration. Since the image regions are zero, they are featureless and uninteresting for the application that I am implementing. If I can set them to zero, then I can ensure that these pixels will not be a part of my calculations, and further, not propogate due to an intended neighborhood operation in subsequent iterations.
In Matlab, I would just have done Image(find(isnan(Image))) = 0 and carried on. How can I do something similar in IPP ?
Based on the documentation, It seems that a hack could be to represent images as 16sc vectors, and divide, as with 16sc format, x/0 = 0. This seems to be the most vectorized way for me to do this, for now.
Thanks again,
Sid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Isnan() is not in IPP, you can use it from Intel compiler and add
Another interesting way to find NaN in the below forum thread.
http://software.intel.com/en-us/forums/showpost.php?p=146248
Regards,
Naveen Gv

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