api(app, globals): app.autojs, app.versionCode, app.versionName, requiresApi, requiresAutojsVersion
This commit is contained in:
@@ -63,7 +63,6 @@ public class TemplateMatching {
|
||||
if (!isFirstMatching && !shouldContinueMatching(level, maxLevel)) {
|
||||
break;
|
||||
}
|
||||
// FIXME: 2018/3/31 此处的matchResult.release()某些情况下会导致currentTemplate被释放?
|
||||
OpenCVHelper.release(matchResult);
|
||||
matchResult = matchTemplate(src, currentTemplate, matchMethod);
|
||||
Pair<Point, Double> bestMatched = getBestMatched(matchResult, matchMethod, weakThreshold);
|
||||
@@ -171,9 +170,7 @@ public class TemplateMatching {
|
||||
public static Mat matchTemplate(Mat img, Mat temp, int match_method) {
|
||||
int result_cols = img.cols() - temp.cols() + 1;
|
||||
int result_rows = img.rows() - temp.rows() + 1;
|
||||
Log.d(LOG_TAG, String.format("matchTemplate: rows = %d, cols = %d", result_rows, result_cols));
|
||||
Mat result = new Mat(result_rows, result_cols, CvType.CV_32FC1);
|
||||
Log.d(LOG_TAG, String.format("matchTemplate: img = %s, temp = %s, result = %s", img.toString(), temp.toString(), result.toString()));
|
||||
Imgproc.matchTemplate(img, temp, result, match_method);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package com.stardust.autojs.runtime;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Looper;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import com.stardust.app.GlobalAppContext;
|
||||
import com.stardust.autojs.BuildConfig;
|
||||
import com.stardust.autojs.R;
|
||||
import com.stardust.autojs.ScriptEngineService;
|
||||
import com.stardust.autojs.annotation.ScriptVariable;
|
||||
@@ -57,6 +59,8 @@ import java.lang.ref.WeakReference;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import javax.microedition.khronos.opengles.GL;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Stardust on 2017/1/27.
|
||||
|
||||
Reference in New Issue
Block a user