fix: selected pyramid level too small

This commit is contained in:
hyb1996
2018-01-27 13:50:30 +08:00
parent a683e84140
commit 0c042f7f07
6 changed files with 28 additions and 14 deletions

View File

@@ -95,7 +95,10 @@ module.exports = function(__runtime__, scope){
images.findImage = function(img, template, options){
options = options || {};
var threshold = options.threshold || 0.9;
var maxLevel = options.level || -1;
var maxLevel = -1;
if(typeof(options.level) == 'number'){
maxLevel = options.level;
}
var weakThreshold = options.weakThreshold || 0.7;
if(options.region){
return rtImages.findImage(img, template, weakThreshold, threshold, buildRegion(options, img), maxLevel);