java - Finding best match by minMaxLoc returned values OpenCV with a specific level of thershold -


i want find best match level of threshold.

here did values staying @ 0.

cvmatchtemplate(src, tmp, result, cv_tm_ccorr_normed); cvpoint minloc = new cvpoint(); cvpoint maxloc = new cvpoint(); doublepointer min_val = new doublepointer(); doublepointer max_val = new doublepointer();  cvminmaxloc(result,min_val, max_val, minloc, maxloc, null); 

i don't double pointers required mothode. min_value , max_value staying @ 0 cant find best matches.

thanks in advanced.using javacv.

in example here used primitive doubles, not double type , defined arrays, not objects. so, why don't give shot , let know if make difference.

cvmatchtemplate(src, tmp, result, cv_tm_ccorr_normed);  double[] min_val = new double[2]; double[] max_val = new double[2]; cvpoint minloc = new cvpoint(); cvpoint maxloc = new cvpoint();  cvminmaxloc(result, min_val, max_val, minloc, maxloc,null); 

__update__

i found following code here

// match template function opencv cvmatchtemplate(src, tmp, result, cv_tm_ccorr_normed);  // double[] min_val = new double[2]; // double[] max_val = new double[2]; doublepointer min_val = new doublepointer(); doublepointer max_val = new doublepointer();  cvpoint minloc = new cvpoint(); cvpoint maxloc = new cvpoint();  cvminmaxloc(result, min_val, max_val, minloc, maxloc, null); 

pay attention how instantiated doublepointer() without params. if not help, not sure thing about. hope works.


Comments

Popular posts from this blog

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

javascript - Create websocket without connecting -

sharepoint - Accessing files across a shared directory using a Windows service -