summaryrefslogtreecommitdiffstats
path: root/camera/OMXCameraAdapter
diff options
context:
space:
mode:
authorEmilian Peev <epeev@mm-sol.com>2012-09-21 14:47:12 +0300
committerDaniel Levin <dendy@ti.com>2012-10-10 18:55:50 +0300
commit2c972b6d5469e5833e2229bc3d9cacf1be9dca98 (patch)
treedabea309807aacdc478bf185adc95d37dea2412d /camera/OMXCameraAdapter
parent49d015ee726b19d1b3ee8cc877d2398ce9416d1f (diff)
downloadhardware_ti_omap4-2c972b6d5469e5833e2229bc3d9cacf1be9dca98.zip
hardware_ti_omap4-2c972b6d5469e5833e2229bc3d9cacf1be9dca98.tar.gz
hardware_ti_omap4-2c972b6d5469e5833e2229bc3d9cacf1be9dca98.tar.bz2
CameraHal: Disable filtering of FD coordinates
- Currently filtering of the FD coordinates was done at the HAL level, which doesn't seem to be longer needed as similar mechanism is employed at the OMX Camera component layer. Change-Id: Ie096b9eca5435caa4098a9a3a9baa0e60782fc3e Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r--camera/OMXCameraAdapter/OMXFD.cpp30
1 files changed, 7 insertions, 23 deletions
diff --git a/camera/OMXCameraAdapter/OMXFD.cpp b/camera/OMXCameraAdapter/OMXFD.cpp
index 08e5a60..1a482b2 100644
--- a/camera/OMXCameraAdapter/OMXFD.cpp
+++ b/camera/OMXCameraAdapter/OMXFD.cpp
@@ -24,13 +24,6 @@
#include "CameraHal.h"
#include "OMXCameraAdapter.h"
-// constants used for face smooth filtering
-static const int HorizontalFilterThreshold = 40;
-static const int VerticalFilterThreshold = 40;
-static const int HorizontalFaceSizeThreshold = 30;
-static const int VerticalFaceSizeThreshold = 30;
-
-
namespace Ti {
namespace Camera {
@@ -463,24 +456,15 @@ status_t OMXCameraAdapter::encodeFaceCoordinates(const OMX_FACEDETECTIONTYPE *fa
int tempSizeY = (faceDetectionLastOutput[j].rect[trans_bot] -
faceDetectionLastOutput[j].rect[trans_top] ) ;
- if ( (abs(tempCenterX - centerX) < HorizontalFilterThreshold) &&
- (abs(tempCenterY - centerY) < VerticalFilterThreshold) )
- {
- // Found Face. It did not move too far.
- // Now check size of rectangle compare to last output
- if ( (abs (tempSizeX -sizeX) < HorizontalFaceSizeThreshold) &&
- (abs (tempSizeY -sizeY) < VerticalFaceSizeThreshold) )
- {
- // Rectangle is almost same as last time
- // Output exactly what was done for this face last time.
- faces[i] = faceDetectionLastOutput[j];
+ if ( ( tempCenterX == centerX) &&
+ ( tempCenterY == centerY) ) {
+ // Found Face.
+ // Now check size of rectangle
+ // compare to last output.
+ if ( ( tempSizeX == sizeX ) &&
+ ( tempSizeY == sizeY ) ) {
faceChanged = false;
}
- else
- {
- // TODO(XXX): Rectangle size changed but position is same.
- // Possibly we can apply just positional correctness.
- }
}
}
// Send face detection data after some face coordinate changes