hardware: samsung_slsi: libcamera2: Change FD filtering method
authorYounghwan Joo <yhwan.joo@samsung.com>
Tue, 2 Oct 2012 13:11:53 +0000 (22:11 +0900)
committerRebecca Schultz Zavin <rebecca@android.com>
Thu, 4 Oct 2012 05:07:34 +0000 (22:07 -0700)
This patch is to change FD filtering method of cameraHAL. By tuning
FD parameter, All IDs of face those have score above 0 are treated
as faces.

Bug: 7276572
Change-Id: Ideaa5c476397e0da47ee0f17b9c6a50cadf3ab0c
Signed-off-by: Younghwan Joo <yhwan.joo@samsung.com>
libcamera2/MetadataConverter.cpp

index 547d179c05e3b4d5846c9c1f349564f7f42dcaa9..c2e181af8eeb3196b9fb4e019392ec6823b859a1 100644 (file)
@@ -582,7 +582,7 @@ status_t MetadataConverter::ToDynamicMetadata(struct camera2_shot_ext * metadata
 
     int tempFaceCount = 0;
     for (int i = 0; i < CAMERA2_MAX_FACES; i++) {
-        if (metadata->dm.stats.faceScores[i] >= CAMERA2_FACE_DETECTION_THRESHOLD) {
+        if (metadata->dm.stats.faceIds[i] > 0) {
             mataFaceIds[tempFaceCount] = metadata->dm.stats.faceIds[i];
             metaFaceScores[tempFaceCount] = metadata->dm.stats.faceScores[i];