Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The hint in the comments led into the right direction. With a bit of additional decoration the problem could be solved with . Give are matrices a and b and their numerical ids id_a and id_b (id_b>id_a):

Mat id_a_mat = new Mat(a.size(),CvType.CV8UC1);
Core.add(id_a_mat,new Scalar(id_a),id_a_mat);
Mat bigger = new Mat();,b,bigger,Core.CMP_LT);  // <----
Mat bigger_id_b = new Mat();
Mat d = new Mat();
Mat c = new Mat();

[NB: The tone around here seems quite rough...]