First time here? Check out the FAQ!
answered 2018-04-02 04:41:18 -0600
you can use bitwise_not or the even shorter ~ operator:
~
Mat inverted = ~mat;