[Solved] OpenCV: How do I make a Mat colorized where the Mask is white

I tried switching out and frame in and using frame.copyTo(out, mask) instead of Core.bitwise_and(frame, mask, out) It worked!! Here is my final code: // frame is input, out is output Scalar minValues = new Scalar(RFrom, GFrom, BFrom); Scalar maxValues = new Scalar(RTo, GTo, BTo); Mat mask = new Mat(); Core.inRange(frame, minValues, maxValues, mask); frame.copyTo(out, mask); … Read more

[Solved] Does anybody tell me what changes need to be done here if I want a triangle at the top not bottom?

Basically you need to change the positions of the various gradients. The first one’s vertical position should start at the “arrow width” var. Both the others vertical positions should be set to 0 instead of 100%. You also need to change the direction of the last two gradients from “to top” to “to bottom” so … Read more