Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kadir_Kirtac
Beginner
31 Views

how to invert mask values

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
31 Views

Hello, may be you can try ippiXor function for that purpose?

Vladimir
Kadir_Kirtac
Beginner
31 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.