Reputation: 87
I have an image with white pixels and black background. I want to convert it to white background and black pixels using opencv
Upvotes: 0
Views: 129
Reputation: 1715
bitwise_not
is the function that you're looking for. It negates each bit of each value in the matrix resulting in negation of the colors. So white pixels turns black and black pixels turns white. See documentation for details
Upvotes: 1