Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  1. use inRange to make a binary mask from your image. (wherever your image is red, the mask should be white, else black)
  2. Mat.setTo() , using this mask, to update the color, wherever the mask is white.
  1. use inRange to make a binary mask from your image. (wherever your image is red, the mask should be white, else black)
  2. Mat.setTo() , using this mask, to update the color, wherever the mask is white.

(and yes, please forget about iterating over pixels in general, especially from java)