Community
cancel
Showing results for 
Search instead for 
Did you mean: 
royvm101
Beginner
47 Views

Is there an IPP threshold function which does not keep the original value if test failed ?

Is there a threshold function which takes a gray image and threshold it such that the output is binary according to the rule:
outVal = (imageVal>=threshold) ? 255 : 0


I found an IPP function Threshold_LTValGTVal, however this function seems to test the function against two values, but what I need is testing against one value, which should be faster.
All other threshold functions seems to ouput the source image value in case the threshold condition failed.
I am looking for a function that will test against one value, and will result in only two output values.


0 Kudos
2 Replies
Chao_Y_Intel
Employee
47 Views

Hello,

Another choice is use ippiCompareC_ function, which will output the value into 0, or 255, according the threshold data.

thanks,
Chao

OKohl
Beginner
47 Views

Hi Chao,

I've encountered a simillar problem in the past.
The problem with ippiCompareC is that it only outputs an 8 bit image result,
while I needed the result in the same format as the input image 16 bit.
For this purpose you can only use thresholdLtGt, or use a combination of other IPP functions.

Thanks
Offir
Reply