Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.

how to invert mask values

Kadir_Kirtac
Beginner
139 Views
Hello, I have a mask image which contains 1s and 0s, I want to invert, namely apply a bitwise NOT operation, but ippiNot just subtracts values from 255, this is not what I need. Also I tried ippiThreshold_LTValGTVal with values
const Ipp8u threshLT[] = {1,1,1};
const Ipp8u valueLT[] = {1,1,1};
const Ipp8u threshGT[] = {0,0,0};
const Ipp8u valueGT[] = {0,0,0};
ippiThreshold_LTValGTVal_8u_C3R(roiMaskC3, 3*srcWidth, roiMaskNotC3, 3*srcWidth, roiSize, threshLT, valueLT, threshGT, valueGT);

but I get a weird result, filled with repeating quadruple values of 13 240 173 186...
Would you please suggest a solution?
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
139 Views
Hello, may be you can try ippiXor function for that purpose?

Vladimir
Kadir_Kirtac
Beginner
139 Views
hello, its ok Thank you, I have XoRed the mask with an array of 1s in the same size with source, than I get the inverted result.
Reply