public boolean hasNext() { resultMinMax = Core.minMaxLoc(result); currentScore = resultMinMax.maxVal; currentX = (int) resultMinMax.maxLoc.x; currentY = (int) resultMinMax.maxLoc.y; if (firstScore < 0) { firstScore = currentScore; } double targetScore = target.getScore(); double scoreMin = firstScore - scoreMaxDiff; if (currentScore > targetScore && currentScore > scoreMin) { return true; } return false; }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
public static MinMaxLocResult minMaxLoc(Mat src) { return minMaxLoc(src, null); }
mMinMax = Core.minMaxLoc(mResult); downSizeWantedScore = ((int) ((target.getWantedScore() - downSimDiff) * 100)) / 100.0; downSizeScore = mMinMax.maxVal; Rect rectSub = new Rect(rSub.x, rSub.y, rSub.width, rSub.height); mResult = doFindMatch(target, mBase.submat(rectSub), null); mMinMax = Core.minMaxLoc(mResult); if (mMinMax.maxVal > target.getWantedScore()) { findResult = new FindResult(mResult, target, new int[]{rectSub.x, rectSub.y}); begin_t = new Date().getTime(); mResult = doFindMatch(target, mBase, null); mMinMax = Core.minMaxLoc(mResult); if (!isCheckLastSeen) { log.trace("doFind: search in original: %%%.2f(?%%%.2f) %d msec",
public static MinMaxLocResult minMaxLoc(RenderedImage source, Rectangle area) { Mat srcImg = ImageConversion.toMat(Objects.requireNonNull(source), area); return Core.minMaxLoc(srcImg); }
public double getDoseMax() { // Initialise max dose once dose images are available if (!this.images.isEmpty() && doseMax < 0.01) { for (MediaElement me : this.images) { Core.MinMaxLocResult minMaxLoc = minMaxLoc(((ImageElement) me).getImage().toMat()); if (doseMax < minMaxLoc.maxVal) { doseMax = minMaxLoc.maxVal; } } } return doseMax; }
private MinMaxLocResult getBestTemplateMatching(int matchMethod, Mat sceneImageMat, Mat objectImageMat) { // / Create the result matrix int resultCols = sceneImageMat.cols() - objectImageMat.cols() + 1; int resultRows = sceneImageMat.rows() - objectImageMat.rows() + 1; Mat result = new Mat(resultRows, resultCols, CvType.CV_32FC1); // / Do the Matching and Normalize Imgproc.matchTemplate(sceneImageMat, objectImageMat, result, matchMethod); // / Localizing the best match with minMaxLoc return Core.minMaxLoc(result); }
private Core.MinMaxLocResult doFindMatch(Mat base, Mat probe) { Mat res = new Mat(); Mat bi = new Mat(); Mat pi = new Mat(); if (!isPlainColor) { Imgproc.matchTemplate(base, probe, res, Imgproc.TM_CCOEFF_NORMED); } else { if (isBlack) { Core.bitwise_not(base, bi); Core.bitwise_not(probe, pi); } else { bi = base; pi = probe; } Imgproc.matchTemplate(bi, pi, res, Imgproc.TM_SQDIFF_NORMED); Core.subtract(Mat.ones(res.size(), CvType.CV_32F), res, res); } return Core.minMaxLoc(res); }