Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1117

How to use setTo() in JAVA

$
0
0
Mat gray = new Mat(); Utils.bitmapToMat(grayBitmap,gray); Mat blocks = new Mat(gray.size(),gray.type()); Core.randu(blocks,0,1); blocks.setTo(0,blocks<0.3); blocks.setTo(1,blocks>0.3); I use android studio to build the code, but it told me that "Operator '>' cannot be applied to 'org.opencv.core.Mat', 'double' " for blocks >/<0.3 parts, is that mean I cant use this method in Java or I need to add something else?

Viewing all articles
Browse latest Browse all 1117

Trending Articles