2014-04-16 20:52:37 -0600 | answered a question | Java API : loading image from any Java InputStream Highgui.imencode(ext, img, buf); maybe what you want |
2014-04-16 04:38:57 -0600 | received badge | ● Student (source) |
2014-04-16 04:34:49 -0600 | asked a question | question about template matching with single color image public static boolean isSame(String src, String template, boolean partSameTrue){ boolean flag = partSameTrue; IplImage img, tpl, res; CvPoint minloc = new CvPoint(); CvPoint maxloc = new CvPoint(); // cvNormalize(res, res, 0, 1,NORM_MINMAX,null); cvMinMaxLoc(res, minval, maxval, minloc, maxloc, null); My purpose is to judge weather the two image are total same,or is part of the image correspond by the src, and I use template matching, but when I passing the parameters with two images which are total black with different size, I got the print result: res_width: 122 res_height:82 minloc.x(): 0 minloc.y(): 0 maxloc.x(): 0 maxloc.y(): 0 maxval: 0.0 Is it means that the smaller black image is not part of the bigger black image? How can i solve the problem? |