From a2adafd5089065d44f82933c45cc4e7591141ed9 Mon Sep 17 00:00:00 2001 From: caorong Date: Thu, 16 May 2013 11:26:37 +0800 Subject: [PATCH] fix a bug(DetectorType never change) changed line281 -> line220 Presentation: because line 220 give the globle var mDetectorType,and in line 230 it will be compared with mDeteorType !!! it will never be unequal ~ fix: change mDetectorType(previous globle var) to a new local val tmpDetectorType --- .../src/org/opencv/samples/facedetect/FdActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java b/samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java index 23727739e4..b06b2cc1c5 100644 --- a/samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java +++ b/samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java @@ -215,9 +215,9 @@ public class FdActivity extends Activity implements CvCameraViewListener2 { else if (item == mItemFace20) setMinFaceSize(0.2f); else if (item == mItemType) { - mDetectorType = (mDetectorType + 1) % mDetectorName.length; - item.setTitle(mDetectorName[mDetectorType]); - setDetectorType(mDetectorType); + int tmpDetectorType = (mDetectorType + 1) % mDetectorName.length; + item.setTitle(mDetectorName[tmpDetectorType]); + setDetectorType(tmpDetectorType); } return true; }