Giri Kishore
Giri Kishore

Reputation: 87

How to convert white pixels black background to black pixels white background?

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

Answers (1)

Piotr Siekański
Piotr Siekański

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

Related Questions