本文整理了Java中org.opencv.core.Core.minMaxLoc()
方法的一些代码示例,展示了Core.minMaxLoc()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Core.minMaxLoc()
方法的具体详情如下:
包路径:org.opencv.core.Core
类名称:Core
方法名:minMaxLoc
[英]Finds the global minimum and maximum in an array.
The functions minMaxLoc
find the minimum and maximum element values and their positions. The extremums are searched across the whole array or, if mask
is not an empty array, in the specified array region.
The functions do not work with multi-channel arrays. If you need to find minimum or maximum elements across all the channels, use "Mat.reshape" first to reinterpret the array as single-channel. Or you may extract the particular channel using either "extractImageCOI", or "mixChannels", or "split".
[中]查找数组中的全局最小值和最大值。
函数minMaxLoc
查找最小和最大元素值及其位置。在整个数组中搜索极值,如果mask
不是空数组,则在指定的数组区域中搜索极值。
这些函数不适用于多通道阵列。如果需要在所有通道中查找最小或最大元素,请首先使用“Mat.Reforme”将阵列重新解释为单个通道。或者,您可以使用“extractImageCOI”或“MixChannel”或“split”提取特定通道。
代码示例来源:origin: RaiMan/SikuliX2
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;
}
代码示例来源:origin: imistyrain/EasyPR4Android
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: kongqw/OpenCVForAndroid
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: akshika47/OpencvAndroid
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: farkam135/GoIV
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: tz28/Chinese-number-gestures-recognition
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: leadrien/opencv_native_androidstudio
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: DuckDeck/AndroidDemo
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: hschott/Camdroid
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: raulh82vlc/Image-Detection-Samples
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: SouvDc/face-detection
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: InnoFang/Android-Code-Demos
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: nroduit/Weasis
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: ctodobom/OpenCV-3.1.0-Android
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: SOFTPOWER1991/OpenCVCheck
public static MinMaxLocResult minMaxLoc(Mat src) {
return minMaxLoc(src, null);
}
代码示例来源:origin: RaiMan/SikuliX2
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",
代码示例来源:origin: nroduit/Weasis
public static MinMaxLocResult minMaxLoc(RenderedImage source, Rectangle area) {
Mat srcImg = ImageConversion.toMat(Objects.requireNonNull(source), area);
return Core.minMaxLoc(srcImg);
}
代码示例来源:origin: nroduit/Weasis
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;
}
代码示例来源:origin: com.infotel.seleniumRobot/core
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);
}
代码示例来源:origin: com.sikulix/sikulixapi
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);
}
内容来源于网络,如有侵权,请联系作者删除!