How to change color of all non transparent pixels to black?

asked 2020-11-06 03:42:02 -0600

RegisAG gravatar image

updated 2020-11-06 03:57:20 -0600

I use OpenCV (Java) and I want to change color of all the non transparent pixels in my Mat to black (colors defined in ARGB_8888 but could be another format)

How can I do that ?

    Mat mat = new Mat();
    bmp32 = bitmap.copy(Bitmap.Config.ARGB_8888, true);
    Utils.bitmapToMat(bmp32, mat);
    // and then ????

Thanks !

edit retag flag offensive close merge delete