summaryrefslogtreecommitdiff
path: root/mv_face/face
diff options
context:
space:
mode:
authorTae-Young Chung <ty83.chung@samsung.com>2015-12-07 18:43:12 +0900
committerTae-Young Chung <ty83.chung@samsung.com>2015-12-07 18:44:24 +0900
commit973b06c23ed5871967646e3451a3d33c8c9decb2 (patch)
tree877cc3dd012da4c8bb0fc0cc91437154e1a25da3 /mv_face/face
parentf17f579e5ff90af5193047584801729e12836a74 (diff)
downloadmediavision-973b06c23ed5871967646e3451a3d33c8c9decb2.tar.gz
mediavision-973b06c23ed5871967646e3451a3d33c8c9decb2.tar.bz2
mediavision-973b06c23ed5871967646e3451a3d33c8c9decb2.zip
Fixed a bug and remained Svace issues in barcode, face, image modules
1. Fixed the bug of setTolerantError() 2. Fixed remained Svace issues Change-Id: I8db590814dbd28b32cfadcc3c0f0ed6c89113aab Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
Diffstat (limited to 'mv_face/face')
-rw-r--r--mv_face/face/src/FaceEyeCondition.cpp8
-rw-r--r--mv_face/face/src/FaceRecognitionModel.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/mv_face/face/src/FaceEyeCondition.cpp b/mv_face/face/src/FaceEyeCondition.cpp
index 53c835ba..22039405 100644
--- a/mv_face/face/src/FaceEyeCondition.cpp
+++ b/mv_face/face/src/FaceEyeCondition.cpp
@@ -64,13 +64,13 @@ void FaceEyeCondition::splitEyes(
const double xRightEyeCenter = (2 * eyeAreaRight.x + eyeAreaRight.width) / 2.;
const double yRightEyeCenter = (2 * eyeAreaRight.y + eyeAreaRight.height) / 2.;
- const cv::Rect leftEyeRect(xLeftEyeCenter - eyeAreaLeft.width / 4,
- yLeftEyeCenter - eyeAreaLeft.height / 4,
+ const cv::Rect leftEyeRect((int)(xLeftEyeCenter - (double)eyeAreaLeft.width / 4),
+ (int)(yLeftEyeCenter - (double)eyeAreaLeft.height / 4),
eyeAreaLeft.width / 2,
eyeAreaLeft.height / 2);
- const cv::Rect rightEyeRect(xRightEyeCenter - eyeAreaRight.width / 4,
- yRightEyeCenter - eyeAreaRight.height / 4,
+ const cv::Rect rightEyeRect((int)(xRightEyeCenter - (double)eyeAreaRight.width / 4),
+ (int)(yRightEyeCenter - (double)eyeAreaRight.height / 4),
eyeAreaRight.width / 2,
eyeAreaRight.height / 2);
diff --git a/mv_face/face/src/FaceRecognitionModel.cpp b/mv_face/face/src/FaceRecognitionModel.cpp
index 1c0c55c4..394e067a 100644
--- a/mv_face/face/src/FaceRecognitionModel.cpp
+++ b/mv_face/face/src/FaceRecognitionModel.cpp
@@ -38,7 +38,7 @@ int CopyOpenCVAlgorithmParameters(const cv::Ptr<cv::FaceRecognizer>& srcAlg,
{
char tempPath[1024];
- sprintf(tempPath, "/tmp/alg_copy_%p_%p", srcAlg.obj, dstAlg.obj);
+ snprintf(tempPath, 1024, "/tmp/alg_copy_%p_%p", srcAlg.obj, dstAlg.obj);
srcAlg->save(tempPath);
dstAlg->load(tempPath);