GrayU8 expected = grayU8.createSameShape().setTo(grayU8);
...
ImageMiscOps.filter(expected, ( x, y, d ) -> scores.get(x, y) >= threshold ? maxRange : d);
GrayF32 inverseDepth = new GrayF32(width, height);
var scores = new GrayF32(grayU8.width, grayU8.height);
...
ImageMiscOps.findAndProcess(inverseDepth, ( v ) -> v > 0, ( int x, int y ) -> {inverseDepth.data[inverseDepth.getIndex(x, y)] += tolerance - 0.0001f; return false; });
--
You received this message because you are subscribed to a topic in the Google Groups "BoofCV" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/boofcv/j3H-8JhGZVA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to boofcv+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/boofcv/07dad52a-0fec-4c5e-8aae-28fae734b630n%40googlegroups.com.
...Planar<GrayU8> image2 = image.clone();
GrayU8 submask = mask.getImage();
GrayU8 red = image2.getBand(0);
GrayU8 green = image2.getBand(1);
GrayU8 blue = image2.getBand(2);
ImageMiscOps.filter(red, (x, y, d) -> submask.get(x, y) > 0 ? red.get(x, y) : 0);
ImageMiscOps.filter(green, (x, y, d) -> submask.get(x, y) > 0 ? green.get(x, y) : 0);
ImageMiscOps.filter(blue, (x, y, d) -> submask.get(x, y) > 0 ? blue.get(x, y) : 0);
return image2;