* @file FUixVision.h
* @brief This is the header file for the %Vision namespace.
*
- * This header file contains the declarations and descriptions of the %Vision namespace.
+ * This header file contains the declarations and descriptions of the %Tizen::Uix::Vision namespace.
*/
#ifndef _FUIX_VISION_H_
#include <FUixVisionFaceRecognizer.h>
#include <FUixVisionFaceBuffer.h>
#include <FUixVisionFaceComponentsPosition.h>
-#include <FUixVisionImageFeatureInfo.h>
-#include <FUixVisionImageObject.h>
-#include <FUixVisionImageFeatureManager.h>
-#include <FUixVisionImageRecognizer.h>
-#include <FUixVisionQrCodeGenerator.h>
-#include <FUixVisionQrCodeObject.h>
-#include <FUixVisionQrCodeRecognizer.h>
-#include <FUixVisionQrCodeTypes.h>
/**
* @namespace Tizen::Uix::Vision
- * @brief This namespace contains the classes for the vision and its related functions.
+ * @brief This namespace contains the classes for the face and its related functions.
* @since 2.0
*
* @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-face @b osp-vision
+ * @b Library : @b osp-face
*
- * The %Vision namespace provides the ability to automatically detect and trace natural objects including faces, image and QR Code in a still image or a video stream.
+ * The %Vision namespace provides the ability to automatically detect and trace faces in a still image or a video stream.
* @n
- * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/face_detector_recognizer.htm">Face Detector and Recognizer</a>, <a href="../org.tizen.native.appprogramming/html/guide/uix/recognize_2d_image.htm">Image recognizer and feature manager</a> and <a href="../org.tizen.native.appprogramming/html/guide/uix/recognize_qr_code.htm">QR code recognizer and generator</a>
+ * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/face_detector_recognizer.htm">Face Detector and Recognizer</a>.
*
* The following diagram illustrates the relationships between the classes belonging to the %Vision namespace.
* @image html uix_vision_namespace_classdiagram.png
*
* The %FaceComponentsPosition class encapsulates the extracted face component's information that is processed by the FaceDetector class.
*
- * This class provides the following functionalities:
+ * This class provides the following functionalities: @n
* - Getting/Setting the position of a face.
* - Getting/Setting the position of the eyes.
* - Getting/Setting the position of the mouth.
- *
- * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/face_detector_recognizer.htm">Face Detector and Recognizer</a>.
+ * <p> For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/face_detector_recognizer.htm">Face Detector and Recognizer</a>. </p>
*/
class _OSP_EXPORT_ FaceComponentsPosition
public:
/**
* This is the default constructor for this class. @n
- * All values of the attributes are set to @c -1 when this instance is initialized.
+ * Initializes this instance of %FaceComponentsPosition with all its attributes set to @c -1.
*
* @since 2.0
*/
* This position can be obtained using the FaceDetector::ExtractFaceComponentsN() method.
* @param[in] rightEyePos The eye position on the right @n
* This position can be obtained using the FaceDetector::ExtractFaceComponentsN() method. @n
- * The position of the right eye must be greater than or equal to @c 0, and must be greater than the position of @c leftEyePos.
+ * The position of the eyes must be greater than or equal to @c 0. @n
+ * The position of @c rightEyePos must be greater than the position of @c leftEyePos.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
*/
/**
* This is the copy constructor for the %FaceComponentsPosition class. @n
- * Initializes this instance of %FaceComponentsPosition with the specified parameter. @n
+ * Initializes this instance of %FaceComponentsPosition with the specified parameter.
* Copying of objects using this copy constructor is allowed.
*
* @since 2.0
// Lifecycle
public:
/**
- * This is the default constructor for this class. @n
+ * This is the default constructor for this class.
* The object is not fully constructed after this constructor is called.
* For full construction, the Construct() method must be called right after calling this constructor.
*
*
* @since 2.0
*
- * @feature %http://tizen.org/feature/vision.face_recognition
* @return An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the face detection feature. @b Since: @b 2.1
- * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
- * @remarks Before calling this method, check whether the feature is supported by
- * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result Construct(void);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FAILURE A system error has occurred.
- * @remarks
- * - The specific error code can be accessed using the GetLastResult() method.
- * - BitmapPixelFormat::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - BitmapPixelFormat::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
* @endif
*/
Tizen::Base::Collection::IList* DetectFacesFromStillImageN(const Tizen::Graphics::Bitmap& bitmap);
* @param[in] byteBuffer The buffer containing the input image data
* @param[in] dim The width and height of the input image @n
* Both the width and height must be greater than @c 0.
- * @param[in] format The color format @n
- * @c BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
+ * @param[in] format The color format defined by Tizen::Graphics::BitmapPixelFormat
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FAILURE A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - BitmapPixelFormat::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
*/
Tizen::Base::Collection::IList* DetectFacesFromStillImageN(const Tizen::Base::ByteBuffer& byteBuffer, const Tizen::Graphics::Dimension& dim, Tizen::Graphics::BitmapPixelFormat format);
/**
* Gets the position difference of the face. @n
- * The %GetFaceMovement() method can be used for tracking the face from a sequential video data.
+ * This can be used for tracking the face from a sequential video data.
*
* @since 2.0
*
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OPERATION_FAILED The method has failed to get the position difference of the specified region, but there is no error reported. @n
- * In this case, @c xDiff and @c yDiff are returned with @c 0. @n
+ * In this case, @c xDiff and @c yDiff will be returned with @c 0. @n
* It can happen when the detected faces are too small or two video data are different even if they contain the same face.
* This is the result of a normal operation.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* The %FaceRecognitionInfo class encapsulates the information of a face recognized using the FaceRecognizer class by:
* - Getting the position of a recognized face.
* - Getting the facial features of a recognized face.
- *
- * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/face_detector_recognizer.htm">Face Detector and Recognizer</a>.
+ * <p> For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/face_detector_recognizer.htm">Face Detector and Recognizer</a>. </p>
*/
class _OSP_EXPORT_ FaceRecognitionInfo
{
public:
/**
- * This is the default constructor for this class. @n
+ * This is the default constructor for this class.
* The object is not fully constructed after this constructor is called.
* For full construction, the Construct() method must be called right after calling this constructor.
*
*
* @since 2.0
*
- * @feature %http://tizen.org/feature/vision.face_recognition
* @return An error code
* @exception E_SUCCESS The method is successful.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the face detection feature. @b Since: @b 2.1
- * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
- * @remarks Before calling this method, check whether the feature is supported by
- * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
*/
result Construct(void);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FAILURE A system error has occurred.
- * @remarks
- * - The specific error code can be accessed using the GetLastResult() method.
- * - BitmapPixelFormat::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - BitmapPixelFormat::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
* @endif
*/
Tizen::Base::Collection::IList* ExtractFaceInfoFromStillImageN(const Tizen::Graphics::Bitmap& bitmap);
* @param[in] byteBuffer The buffer containing the input image data
* @param[in] dim The width and height of the input image @n
* Both the width and height must be greater than @c 0.
- * @param[in] format The color format @n
- * @c BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
+ * @param[in] format The color format defined by Tizen::Graphics::BitmapPixelFormat
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_FAILURE A system error has occurred.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - BitmapPixelFormat::BITMAP_PIXEL_FORMAT_R8G8B8A8 is not applicable for this method.
*/
Tizen::Base::Collection::IList* ExtractFaceInfoFromStillImageN(const Tizen::Base::ByteBuffer& byteBuffer, const Tizen::Graphics::Dimension& dim, Tizen::Graphics::BitmapPixelFormat format);
* @param[in] preprocessedFaceBuffer The preprocessed data
* @param[in] faceComponentPos The facial information that is obtained from the
* FaceDetector::ExtractFaceComponentsN() method @n
- * The specified facial information must contain the eye position. @n
+ * The @c faceComponentPos parameter must contain the eye position.
* The position of the eyes must be greater than or equal to @c 0.
- * The position of the eyes must be within @c preprocessedFaceBuffer. @n
- * If there are wrong values in the specified facial information, the result cannot be guaranteed even if it returns @c E_SUCCESS. @n
- * Therefore, be sure not to change the value of facial information after getting it from FaceDetector::ExtractFaceComponentsN().
+ * The position of the eyes must be within @c preprocessedFaceBuffer.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_OPERATION_FAILED The method has failed to extract the facial information but there is no error reported. @n
* This can happen when the detected faces are too small or the input data is not clear.
* This is the result of a normal operation.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - If there are wrong values in the @c faceComponentPos, the result cannot be guaranteed even if it returns @c E_SUCCESS. Therefore, be sure not to change the value of @c faceComponentPos after getting it from FaceDetector::ExtractFaceComponentsN().
* @see FaceDetector::PreprocessDataN()
- * @see FaceDetector::ExtractFaceComponentsN()
*/
Tizen::Base::ByteBuffer* ExtractFeatureN(const FaceBuffer& preprocessedFaceBuffer, const FaceComponentsPosition& faceComponentPos);
* else @c EYE_STATE_NONE if an exception occurs
* @param[in] preprocessedFaceBuffer The preprocessed data
* @param[in] faceComponentPos The facial information that is obtained from the FaceDetector::ExtractFaceComponentsN() method @n
- * The specified facial information must contain the eye position. @n
+ * The @c faceComponentPos parameter must contain the eye position.
* The position of the eyes must be greater than or equal to @c 0.
- * The position of the eyes must be within @c preprocessedFaceBuffer. @n
- * If there are wrong values in the specified facial information, the result cannot be guaranteed even if it returns @c E_SUCCESS. @n
- * Therefore, be sure not to change the value of facial information after getting it from FaceDetector::ExtractFaceComponentsN().
+ * The position of the eyes must be within @c preprocessedFaceBuffer.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_OPERATION_FAILED The method has failed to detect the eye state but there is no error reported. @n
* This can happen when the detected faces are too small or the input data is not clear.
* This is the result of a normal operation.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - If there are wrong values in the @c faceComponentPos, the result cannot be guaranteed even if it returns @c E_SUCCESS.
+ * Therefore, be sure not to change the value of @c faceComponentPos after getting it from FaceDetector::ExtractFaceComponentsN().
* @see FaceDetector::PreprocessDataN()
*/
EyeState GetEyeState(const FaceBuffer& preprocessedFaceBuffer, const FaceComponentsPosition& faceComponentPos);
* else @c FACIAL_EXPRESSION_NONE if an exception occurs
* @param[in] preprocessedFaceBuffer The preprocessed data
* @param[in] faceComponentPos The facial information that is obtained from the FaceDetector::ExtractFaceComponentsN() method @n
- * The specified facial information must contain the eye position. @n
+ * The @c faceComponentPos parameter must contain the eye position.
* The position of the eyes must be greater than or equal to @c 0.
- * The position of the eyes must be within @c preprocessedFaceBuffer. @n
- * If there are wrong values in the specified facial information, the result cannot be guaranteed even if it returns @c E_SUCCESS. @n
- * Therefore, be sure not to change the value of facial information after getting it from FaceDetector::ExtractFaceComponentsN().
+ * The position of the eyes must be within @c preprocessedFaceBuffer.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* This can happen when the detected faces are too small or the input data is not clear.
* This is the result of a normal operation.
* @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks If there are wrong values in the @c faceComponentPos, the result cannot be guaranteed even if it returns @c E_SUCCESS. Therefore,
+ * be sure not to change the value of @c faceComponentPos after getting it from FaceDetector::ExtractFaceComponentsN().
* @see FaceDetector::PreprocessDataN()
*/
FacialExpression RecognizeExpression(const FaceBuffer& preprocessedFaceBuffer, const FaceComponentsPosition& faceComponentPos);
/**
* @file FUixVisionFaceTypes.h
- * @brief This is the header file for the declarations of the Vision namespace.
+ * @brief This is the header file for the declarations of the Tizen::Uix::Vision namespace.
*
- * This header file contains the declarations of the Vision namespace.
+ * This header file contains the declarations of the Tizen::Uix::Vision namespace.
*/
#ifndef _FUIX_VISION_FACE_TYPES_H_
{
/**
* The maximum number of faces to detect from a video stream. @n
- * This is used when FaceDetector::DetectFacesFromVideoStreamN() is called.
+ * This will be used when FaceDetector::DetectFacesFromVideoStreamN() is called.
*/
FACEDETECTOR_MAXNUMBER_VIDEO,
/**
* The maximum number of faces to detect from a still image. @n
- * This is used when FaceDetector::DetectFacesFromStillImageN(const Tizen::Base::ByteBuffer&, const Tizen::Graphics::Dimension&, Tizen::Graphics::BitmapPixelFormat) is called.
+ * This will be used when FaceDetector::DetectFacesFromStillImageN() is called.
*/
FACEDETECTOR_MAXNUMBER_IMAGE,
* The value @c 3 is used when FaceDetector::DetectFacesFromVideoStreamN() is called unless it has been changed earlier
* using the FaceDetector::SetProperty() method. @n
*
- * This is used when %FaceDetector::DetectFacesFromVideoStreamN() is called.
+ * This will be used when %FaceDetector::DetectFacesFromVideoStreamN() is called.
*/
FACEDETECTOR_SCALE_VIDEO,
* The range is from values @c 1 to @c 3, where the value @c 1 has the longest execution time and @c 3 has
* the shortest execution time. The value @c 1 detects small faces.
* Therefore, for an application handling images, the value @c 1 is an appropriate option.
- * The value @c 1 is used when FaceDetector::DetectFacesFromStillImageN(const Tizen::Base::ByteBuffer&, const Tizen::Graphics::Dimension&, Tizen::Graphics::BitmapPixelFormat) is called unless it has been changed
+ * The value @c 1 is used when FaceDetector::DetectFacesFromStillImageN() is called unless it has been changed
* earlier using the FaceDetector::SetProperty() method. @n
*
- * This is used when %FaceDetector::DetectFacesFromStillImageN(const %Tizen::Base::ByteBuffer&, const %Tizen::Graphics::Dimension&, %Tizen::Graphics::BitmapPixelFormat) is called.
+ * This will be used when %FaceDetector::DetectFacesFromStillImageN() is called.
*/
FACEDETECTOR_SCALE_IMAGE,
/**
* The maximum number of faces to detect. @n
- * The value @c 1 is used when FaceDetector::DetectFacesN() is called unless it has been changed earlier
+ * The value @c 1 is used when DetectFacesN() is called unless it has been changed earlier
* using the FaceDetector::SetProperty() method. @n
- * This is used when %FaceDetector::DetectFacesN() is called.
+ * This will be used when FaceDetector::DetectFacesN() is called.
*/
FACEDETECTOR_MAXNUMBER_FACES,
* The value @c 3 is used when FaceDetector::DetectFacesN() is called unless it has been changed earlier using
* the FaceDetector::SetProperty() method. @n
*
- * This is used when %FaceDetector::DetectFacesN() is called.
+ * This will be used when %FaceDetector::DetectFacesN() is called.
*/
FACEDETECTOR_SCALE_FACTOR,
};
{
/**
* The maximum number of faces to extract face information from a video stream. @n
- * This is used when FaceRecognizer::ExtractFaceInfoFromVideoStreamN() is called.
+ * This will be used when FaceRecognizer::ExtractFaceInfoFromVideoStreamN() is called.
*/
FACERECOGNIZER_MAXNUMBER_VIDEO,
/**
* The maximum number of faces to extract face information from a still image. @n
- * This is used when FaceRecognizer::ExtractFaceInfoFromStillImageN(const Tizen::Base::ByteBuffer&, const Tizen::Graphics::Dimension&, Tizen::Graphics::BitmapPixelFormat) is called.
+ * This will be used when FaceRecognizer::ExtractFaceInfoFromStillImageN() is called.
*/
FACERECOGNIZER_MAXNUMBER_IMAGE,
* The range is from values @c 1 to @c 3, where the value @c 1 has the longest execution time and @c 3 has
* the shortest execution time. The value @c 1 detects small faces.
* Therefore, for an application using a camera or a video file, the value @c 3 is an appropriate option.
- * The value @c 3 is used when FaceRecognizer::ExtractFaceInfoFromVideoStreamN() is called unless it has been changed
+ * The value @c 3 is used when ExtractFaceInfoFromVideoStreamN() is called unless it has been changed
* earlier using the FaceDetector::SetProperty() method. @n
*
- * This is used when %FaceRecognizer::ExtractFaceInfoFromVideoStreamN() is called.
+ * This will be used when FaceRecognizer::ExtractFaceInfoFromVideoStreamN() is called.
*/
FACERECOGNIZER_SCALE_VIDEO,
* the shortest execution time.
* The value @c 1 detects small faces.
* Therefore, for an application handling images, the value @c 1 is an appropriate option.
- * The value @c 1 is used when FaceRecognizer::ExtractFaceInfoFromStillImageN(const Tizen::Base::ByteBuffer&, const Tizen::Graphics::Dimension&, Tizen::Graphics::BitmapPixelFormat) is called unless it has been changed
+ * The value @c 1 is used when ExtractFaceInfoFromStillImageN() is called unless it has been changed
* earlier using the FaceDetector::SetProperty() method. @n
*
- * This is used when %FaceRecognizer::ExtractFaceInfoFromStillImageN(const %Tizen::Base::ByteBuffer&, const %Tizen::Graphics::Dimension&, %Tizen::Graphics::BitmapPixelFormat) is called.
+ * This will be used when FaceRecognizer::ExtractFaceInfoFromStillImageN() is called.
*/
FACERECOGNIZER_SCALE_IMAGE,
};
__faceRect.height = faceRect.height;
}
-FaceComponentsPosition::FaceComponentsPosition(const Tizen::Graphics::Rectangle& faceRect, const Tizen::Graphics::Point& eyeLeft, const Tizen::Graphics::Point& eyeRight)
+FaceComponentsPosition::FaceComponentsPosition(const Tizen::Graphics::Rectangle& faceRect, const Tizen::Graphics::Point& eyeRight, const Tizen::Graphics::Point& eyeLeft)
: __mouthRect(-1, -1, -1, -1)
{
__faceRect.x = faceRect.x;
pGrayBuf = __pFaceDetectorImpl->ConvertToGrayN(byteBuffer, dim, format);
pProcessedData = std::unique_ptr<FaceBuffer>(new (std::nothrow) FaceBuffer(*pGrayBuf, dim));
- SysTryCatch(NID_UIX, pProcessedData.get() != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed."
+ SysTryCatch(NID_UIX, pProcessedData != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed."
, GetErrorMessage(E_OUT_OF_MEMORY));
delete pGrayBuf;
r = E_OPERATION_FAILED, E_OPERATION_FAILED, "[%s] Fail to extract the facial information.", GetErrorMessage(E_OPERATION_FAILED));
}
- return __pFaceRecognizerImpl->ExtractFeatureN(*(preprocessedFaceBuffer.GetBuffer()), resolution, faceRect, eyeLeft, eyeRight);
+ return __pFaceRecognizerImpl->ExtractFeatureN(*(preprocessedFaceBuffer.GetBuffer()), resolution, faceRect);
CATCH:
SetLastResult(r);
std::unique_ptr< FaceEngineInfo > pFaceEngineInfo(new (std::nothrow) FaceEngineInfo);
SysTryReturn(NID_UIX, pFaceEngineInfo != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ __pFaceEngineInfo = pFaceEngineInfo.release();
+
std::unique_ptr< _FaceUtil > pFaceUtil(new (std::nothrow) _FaceUtil);
SysTryReturn(NID_UIX, pFaceUtil != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- __pFaceEngineInfo = pFaceEngineInfo.release();
__pFaceUtil = pFaceUtil.release();
return r;
result r = E_SUCCESS;
int retValue = 0;
unsigned char* pImageBuffer = null;
- Tizen::Graphics::Rectangle* pRect = null;
ClearLastResult();
{
for (int i = 0; i < __pFaceEngineInfo->g_iFaceDetectNum; i++)
{
- pRect =
+ Tizen::Graphics::Rectangle* pRect =
new (std::nothrow) Tizen::Graphics::Rectangle(__pFaceEngineInfo->g_FaceROI[i].x, __pFaceEngineInfo->g_FaceROI[i].y,
__pFaceEngineInfo->g_FaceROI[i].width, __pFaceEngineInfo->g_FaceROI[i].height);
return pDetectList.release();
CATCH:
- if (pRect != null)
- {
- delete pRect;
- }
SetLastResult(r);
- pDetectList->RemoveAll(true);
+ pDetectList->RemoveAll();
return pDetectList.release();
}
BufferInfo bitmapInfo;
unsigned char* pImageBuffer = null;
int retValue = 0;
- Tizen::Graphics::Rectangle* pRect = null;
ClearLastResult();
{
for (int i = 0; i < __pFaceEngineInfo->g_iFaceDetectNum; i++)
{
- //The null assingment is to avoid possible memory leak
- pRect = null;
- pRect =
+ Tizen::Graphics::Rectangle* pRect =
new (std::nothrow) Tizen::Graphics::Rectangle(__pFaceEngineInfo->g_FaceROI[i].x, __pFaceEngineInfo->g_FaceROI[i].y,
__pFaceEngineInfo->g_FaceROI[i].width, __pFaceEngineInfo->g_FaceROI[i].height);
return pDetectList.release();
CATCH:
- if (pRect)
- {
- delete pRect;
- }
+ SysLogException(NID_UIX, r, "XXXX - CATCH: _FaceDetectorImpl::DetectFacesFromBitmapN");
ReleaseFaceEngine();
SetLastResult(r);
- pDetectList->RemoveAll(true);
+ pDetectList->RemoveAll();
return pDetectList.release();
}
result r = E_SUCCESS;
int retValue = 0;
unsigned char* pImageBuffer = null;
- Tizen::Graphics::Rectangle* pRect = null;
std::unique_ptr< unsigned char[] > pBuffer(new (std::nothrow) unsigned char[resolution.width * resolution.height]);
SysTryReturn(NID_UIX, pBuffer != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed."
{
for (int i = 0; i < __pFaceEngineInfo->g_iFaceDetectNum; i++)
{
- //The null assingment is to avoid possible memory leak
- pRect = null;
- pRect =
+ Tizen::Graphics::Rectangle* pRect =
new (std::nothrow) Tizen::Graphics::Rectangle(__pFaceEngineInfo->g_FaceROI[i].x, __pFaceEngineInfo->g_FaceROI[i].y,
__pFaceEngineInfo->g_FaceROI[i].width, __pFaceEngineInfo->g_FaceROI[i].height);
return pDetectList.release();
CATCH:
- if (pRect)
- {
- delete pRect;
- }
SetLastResult(r);
ReleaseFaceEngine();
- pDetectList->RemoveAll(true);
+ pDetectList->RemoveAll();
return pDetectList.release();
}
{
result r = E_SUCCESS;
ClearLastResult();
- int capacity = 0;
std::unique_ptr< Tizen::Base::ByteBuffer > pGrayBuf(new (std::nothrow) Tizen::Base::ByteBuffer());
SysTryReturn(NID_UIX, pGrayBuf != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed."
, GetErrorMessage(E_OUT_OF_MEMORY));
- capacity = byteBuffer.GetCapacity();
- r = pGrayBuf->Construct(capacity);
+ r = pGrayBuf->Construct(resolution.width * resolution.height);
SysTryReturn(NID_UIX, r == E_SUCCESS, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(r));
switch (format)
break;
case PIXEL_FORMAT_YCbCr420_PLANAR:
- memcpy((unsigned char*)(pGrayBuf->GetPointer()), (unsigned char*)(byteBuffer.GetPointer()), capacity);
+ memcpy((unsigned char*) (pGrayBuf->GetPointer()),
+ (unsigned char*) byteBuffer.GetPointer(), sizeof(unsigned char) * resolution.width * resolution.height);
break;
default:
int retValue = 0;
result r = E_SUCCESS;
unsigned char* pImageBuffer = null;
- Tizen::Graphics::Rectangle* pRect = null;
ClearLastResult();
{
for (int i = 0; i < __pFaceEngineInfo->g_iFaceDetectNum; i++)
{
- //The null assingment is to avoid possible memory leak
- pRect = null;
- pRect =
+ Tizen::Graphics::Rectangle* pRect =
new (std::nothrow) Tizen::Graphics::Rectangle(__pFaceEngineInfo->g_FaceROI[i].x, __pFaceEngineInfo->g_FaceROI[i].y,
__pFaceEngineInfo->g_FaceROI[i].width, __pFaceEngineInfo->g_FaceROI[i].height);
ReleaseFaceEngine();
return pDetectList.release();
CATCH:
- if (pRect)
- {
- delete pRect;
- }
+ SysLogException(NID_UIX, r, "XXXX - CATCH _FaceDetectorImpl::DetectFacesN");
SetLastResult(r);
- pDetectList->RemoveAll(true);
+ pDetectList->RemoveAll();
return pDetectList.release();
}
Tizen::Graphics::Point& eyeLeft, Tizen::Graphics::Rectangle& mouthRect)
{
result r = E_SUCCESS;
+ int index = -1;
int retVal = 0;
FaceEngineInfo* pFaceEngineInfo = null;
std::unique_ptr< FaceEngineInfo > pFaceEngineInfo(new (std::nothrow) FaceEngineInfo);
SysTryReturn(NID_UIX, pFaceEngineInfo != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ __pFaceEngineInfo = pFaceEngineInfo.release();
+
+ //int retValue = caApp_FaceEngineInit(__pFaceEngineInfo, FD_MODE_ROLo_YAWo, FD_SIZE_COVERAGE_HIGH,__maxFacesImage, _FT_INTERVAL_DEFAULT);
+ //SysTryReturn(NID_UIX, retValue == _FACEENGINE_INIT_SUCCESS, E_FAILURE, E_FAILURE, "[%s] Face Engine Init failed.", GetErrorMessage(E_FAILURE));
+
std::unique_ptr< _FaceUtil > pFaceUtil(new (std::nothrow) _FaceUtil);
SysTryReturn(NID_UIX, pFaceUtil != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- __pFaceEngineInfo = pFaceEngineInfo.release();
__pFaceUtil = pFaceUtil.release();
return res;
int featureLength = 0;
unsigned char* pImageBuffer = null;
ByteBuffer buffer;
+ int isValidFREngine = 0;
std::unique_ptr< FaceRecognitionInfo > pFaceInfo;
, GetErrorMessage(E_FAILURE));
}
- caApp_FtsExInit(FR_MODE_MPL2, _FACE_ENGINE_BIN_PATH);
+ //isValidFREngine = caApp_FtsExInit(FR_MODE_MPL2, "/usr/share/face-engine/data/");
+ isValidFREngine = caApp_FtsExInit(FR_MODE_MPL2, _FACE_ENGINE_BIN_PATH);
+
+ //SysTryCatch(NID_UIX, isValidFREngine == _FACEENGINE_RETURN_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed caApp_FtsExInit", GetErrorMessage(E_FAILURE));
featureLength = caApp_FtsExVecLength();
SysTryCatch(NID_UIX, featureLength > 0, r = E_FAILURE, E_FAILURE, "[%s] Failed caApp_FtsExInit", GetErrorMessage(E_FAILURE));
CATCH:
SetLastResult(r);
caApp_FtsExRelease();
- pDetectList->RemoveAll(true);
+ pDetectList->RemoveAll();
return pDetectList.release();
}
result r = E_SUCCESS;
unsigned char* pImageBuffer = null;
int retValue = 0;
+ int isValidFREngine = 0;
int featureLength = 0;
std::unique_ptr< FaceRecognitionInfo > pFaceInfo;
, GetErrorMessage(E_FAILURE));
}
- caApp_FtsExInit(FR_MODE_MPL2, _FACE_ENGINE_BIN_PATH);
+ //isValidFREngine = caApp_FtsExInit(FR_MODE_MPL2,"/usr/share/face-engine/data/");
+ isValidFREngine = caApp_FtsExInit(FR_MODE_MPL2, _FACE_ENGINE_BIN_PATH);
+ //SysTryCatch(NID_UIX, isValidFREngine == _FACEENGINE_RETURN_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed caApp_FtsExInit", GetErrorMessage(E_FAILURE));
featureLength = caApp_FtsExVecLength();
SysTryCatch(NID_UIX, featureLength > 0, r = E_FAILURE, E_FAILURE, "[%s] Failed caApp_FtsExInit", GetErrorMessage(E_FAILURE));
SetLastResult(r);
caApp_FtsExRelease();
ReleaseFaceEngine();
- pDetectList->RemoveAll(true);
+ pDetectList->RemoveAll();
return pDetectList.release();
}
result r = E_SUCCESS;
unsigned char* pImageBuffer = null;
int retValue = 0;
+ int isValidFREngine = 0;
int featureLength = 0;
std::unique_ptr< FaceRecognitionInfo > pFaceInfo;
, GetErrorMessage(E_FAILURE));
}
- caApp_FtsExInit(FR_MODE_MPL2, _FACE_ENGINE_BIN_PATH);
+ //isValidFREngine = caApp_FtsExInit(FR_MODE_MPL2,"/usr/share/face-engine/data/");
+ isValidFREngine = caApp_FtsExInit(FR_MODE_MPL2, _FACE_ENGINE_BIN_PATH);
+ //SysTryCatch(NID_UIX, isValidFREngine == _FACEENGINE_RETURN_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed caApp_FtsExInit", GetErrorMessage(E_FAILURE));
featureLength = caApp_FtsExVecLength();
SysTryCatch(NID_UIX, featureLength > 0, r = E_FAILURE, E_FAILURE, "[%s] Failed caApp_FtsExInit", GetErrorMessage(E_FAILURE));
pFaceInfo->SetFacePosition(pRect->x, pRect->y, pRect->width, pRect->height);
- delete pRect;
-
r = pDetectList->Add(*(pFaceInfo.release()));
SysTryCatch(NID_UIX, r == E_SUCCESS, r = E_FAILURE, r, "[%s] Failed to add the FaceRecognitionInfo.", GetErrorMessage(E_FAILURE));
+
+ delete pRect;
}
caApp_FtsExRelease();
SetLastResult(r);
caApp_FtsExRelease();
ReleaseFaceEngine();
- pDetectList->RemoveAll(true);
+ pDetectList->RemoveAll();
return pDetectList.release();
}
pDetectList(new (std::nothrow) HashMapT< Tizen::Graphics::Rectangle, EyeState >);
SysTryReturn(NID_UIX, pDetectList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- std::unique_ptr< unsigned char[] > pBuffer(new (std::nothrow) unsigned char[resolution.width * resolution.height]);
+ std::unique_ptr< unsigned char > pBuffer(new (std::nothrow) unsigned char[resolution.width * resolution.height]);
SysTryCatch(NID_UIX, pBuffer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pImageBuffer = pBuffer.get();
return pDetectList.release();
CATCH:
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX - CATCH _FaceRecognizerImpl::DetectBlinksFromBitmapN-");
SetLastResult(r);
ReleaseFaceEngine();
pDetectList->RemoveAll();
pDetectList(new (std::nothrow) HashMapT< Tizen::Graphics::Rectangle, FacialExpression >);
SysTryReturn(NID_UIX, pDetectList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- std::unique_ptr< unsigned char[] > pBuffer(new (std::nothrow) unsigned char[resolution.width * resolution.height]);
+ std::unique_ptr< unsigned char > pBuffer(new (std::nothrow) unsigned char[resolution.width * resolution.height]);
SysTryCatch(NID_UIX, pBuffer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
pImageBuffer = pBuffer.get();
SysTryCatch(NID_UIX, pImageBuffer != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Failed to create the Buffer.",
return pDetectList.release();
CATCH:
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX - CATCH _FaceRecognizerImpl::RecognizeExpressionsFromBitmapN-");
ReleaseFaceEngine();
SetLastResult(r);
pDetectList->RemoveAll();
, GetErrorMessage(E_FAILURE));
}
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX - REACH 001");
+
retValue = caApp_RunFaceDetection(pImageBuffer, resolution.width, resolution.height, __pFaceEngineInfo);
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX - REACH 002 __pFaceEngineInfo->g_iFaceDetectNum = %d", __pFaceEngineInfo->g_iFaceDetectNum);
+
SysTryCatch(NID_UIX, retValue == _FACEENGINE_RETURN_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to create the Buffer."
, GetErrorMessage(E_FAILURE));
for (int i = 0; i < __pFaceEngineInfo->g_iFaceDetectNum; i++)
SysTryCatch(NID_UIX, retValue == _FACEENGINE_RETURN_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to create the Buffer."
, GetErrorMessage(E_FAILURE));
+ //SysLogException(NID_UIX, E_SUCCESS, "XXXX - Entering RecognizeExpressionsFromBufferN faces= %d",__pFaceEngineInfo->g_iFaceDetectNum);
for (int i = 0; i < __pFaceEngineInfo->g_iFaceDetectNum; i++)
{
retValue = caApp_RunEyeDetection(pImageBuffer, resolution.width, resolution.height, __pFaceEngineInfo, i);
SysTryCatch(NID_UIX, retValue == _FACEENGINE_RETURN_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to create the Buffer."
, GetErrorMessage(E_FAILURE));
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX - REACH 003");
retValue = caApp_RunMouthDetection(pImageBuffer, resolution.width, resolution.height, __pFaceEngineInfo, i);
SysTryCatch(NID_UIX, retValue == _FACEENGINE_RETURN_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to create the Buffer."
, GetErrorMessage(E_FAILURE));
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX - REACH 004");
retValue = caApp_RunFERDetection(pImageBuffer, resolution.width, resolution.height, __pFaceEngineInfo, true);
SysTryCatch(NID_UIX, retValue == _FACEENGINE_RETURN_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to create the Buffer."
, GetErrorMessage(E_FAILURE));
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX - REACH 005");
FacialExpression expression = FACIAL_EXPRESSION_NONE;
switch (*(__pFaceEngineInfo->g_Expression[i]))
return pDetectList.release();
CATCH:
+ //SysLogException(NID_UIX, r, "XXXX -CATCH _FaceRecognizerImpl::RecognizeExpressionsFromBufferN-");
pDetectList->RemoveAll();
SetLastResult(r);
return pDetectList.release();
Tizen::Base::ByteBuffer*
_FaceRecognizerImpl::ExtractFeatureN(const Tizen::Base::ByteBuffer& grayBuffer, const Tizen::Graphics::Dimension& resolution,
- const Tizen::Graphics::Rectangle& faceRect, Tizen::Graphics::Point eyeLeft,
- Tizen::Graphics::Point eyeRight)
+ const Tizen::Graphics::Rectangle& faceRect)
{
ClearLastResult();
result r = E_SUCCESS;
int featureLength = 0;
int retValue = 0;
+ int isValidFREngine = 0;
long* pFaceData = null;
FaceEngineInfo* __pFaceEngineInfoTemp = null;
SysTryReturn(NID_UIX, pBuffer != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
std::unique_ptr< FaceEngineInfo > pFaceEngineInfo(new (std::nothrow) FaceEngineInfo);
- SysTryReturn(NID_UIX, pFaceEngineInfo != null, null, E_OUT_OF_MEMORY, "[%s] Failed to create the Buffer.", GetErrorMessage(E_OUT_OF_MEMORY));
- __pFaceEngineInfoTemp = pFaceEngineInfo.get();
- SysTryReturn(NID_UIX, __pFaceEngineInfoTemp != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ __pFaceEngineInfoTemp = pFaceEngineInfo.release();
retValue = caApp_FaceEngineInit(__pFaceEngineInfoTemp, FD_MODE_ROLx_YAWx, FD_SIZE_COVERAGE_HIGH, __maxFacesImage, 20);
SysTryCatch(NID_UIX, retValue == _FACEENGINE_INIT_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to create the Buffer."
__pFaceEngineInfoTemp->g_FaceROI[0].y = faceRect.y;
__pFaceEngineInfoTemp->g_FaceROI[0].width = faceRect.width;
__pFaceEngineInfoTemp->g_FaceROI[0].height = faceRect.height;
- __pFaceEngineInfoTemp->g_EyeROI[0].lx = eyeLeft.x;
- __pFaceEngineInfoTemp->g_EyeROI[0].ly = eyeLeft.y;
- __pFaceEngineInfoTemp->g_EyeROI[0].rx = eyeRight.x;
- __pFaceEngineInfoTemp->g_EyeROI[0].ry = eyeRight.y;
- caApp_FtsExInit(FR_MODE_MPL2, _FACE_ENGINE_BIN_PATH);
+ //caApp_RunFaceDetection((unsigned char*)grayBuffer, resolution.width, resolution.height, __pFaceEngineInfoTemp);
+ //isValidFREngine = caApp_FtsExInit(FR_MODE_MPL2,"/usr/share/face-engine/data/");
+ isValidFREngine = caApp_FtsExInit(FR_MODE_MPL2, _FACE_ENGINE_BIN_PATH);
+ //SysTryCatch(NID_UIX, isValidFREngine == _FACEENGINE_RETURN_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed caApp_FtsExInit", GetErrorMessage(E_FAILURE));
featureLength = caApp_FtsExVecLength();
SysTryCatch(NID_UIX, featureLength > 0, r = E_FAILURE, E_FAILURE, "[%s] Failed caApp_FtsExInit", GetErrorMessage(E_FAILURE));
SysTryCatch(NID_UIX, retValue == _FACEENGINE_INIT_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to delete FaceEngine.", GetErrorMessage(E_FAILURE));
return pBuffer.release();
-
CATCH:
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX - CATCH _FaceRecognizerImpl::ExtractFeatureN-");
caApp_FtsExRelease();
caApp_FaceEngineRelease(__pFaceEngineInfoTemp);
SetLastResult(r);
//Way to get the index is to loop for all rects and get the index..
std::unique_ptr< FaceEngineInfo > pFaceEngineInfo(new (std::nothrow) FaceEngineInfo);
- SysTryReturn(NID_UIX, pFaceEngineInfo != null, eyeState, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- __pFaceEngineInfoTemp = pFaceEngineInfo.get();
- SysTryReturn(NID_UIX, __pFaceEngineInfoTemp != null, eyeState, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ __pFaceEngineInfoTemp = pFaceEngineInfo.release();
- retVal = caApp_FaceEngineInit(__pFaceEngineInfoTemp, FD_MODE_ROLx_YAWx, FD_SIZE_COVERAGE_HIGH,__maxFacesImage, 20);
- SysTryCatch(NID_UIX, retVal == _FACEENGINE_INIT_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to create the Buffer."
- , GetErrorMessage(E_FAILURE));
+ caApp_FaceEngineInit(__pFaceEngineInfoTemp, FD_MODE_ROLx_YAWx, FD_SIZE_COVERAGE_HIGH, __maxFacesImage, 20);
__pFaceEngineInfoTemp->g_FaceROI[0].x = faceRect.x;
__pFaceEngineInfoTemp->g_FaceROI[0].y = faceRect.y;
SysTryCatch(NID_UIX, retVal == _FACEENGINE_INIT_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to delete FaceEngine.", GetErrorMessage(E_FAILURE));
return eyeState;
-
CATCH:
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX - CATCH _FaceRecognizerImpl::DetectEyeState");
caApp_FaceEngineRelease(__pFaceEngineInfoTemp);
SetLastResult(r);
return EYE_STATE_NONE;
FaceEngineInfo* __pFaceEngineInfoTemp = null;
std::unique_ptr< FaceEngineInfo > pFaceEngineInfo(new (std::nothrow) FaceEngineInfo);
- SysTryReturn(NID_UIX, pFaceEngineInfo != null, expression, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- __pFaceEngineInfoTemp = pFaceEngineInfo.get();
- SysTryReturn(NID_UIX, __pFaceEngineInfoTemp != null, expression, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ __pFaceEngineInfoTemp = pFaceEngineInfo.release();
- retVal = caApp_FaceEngineInit(__pFaceEngineInfoTemp, FD_MODE_ROLx_YAWx, FD_SIZE_COVERAGE_HIGH,__maxFacesImage, 20);
- SysTryCatch(NID_UIX, retVal == _FACEENGINE_INIT_SUCCESS, r = E_FAILURE, E_FAILURE, "[%s] Failed to create the Buffer."
- , GetErrorMessage(E_FAILURE));
+ caApp_FaceEngineInit(__pFaceEngineInfoTemp, FD_MODE_ROLx_YAWx, FD_SIZE_COVERAGE_HIGH, __maxFacesImage, 20);
__pFaceEngineInfoTemp->g_FaceROI[0].x = faceRect.x;
__pFaceEngineInfoTemp->g_FaceROI[0].y = faceRect.y;
return expression;
CATCH:
+ SysLogException(NID_UIX, E_SUCCESS, "XXXX -CATCH _FaceRecognizerImpl::RecognizeExpression");
caApp_FaceEngineRelease(__pFaceEngineInfoTemp);
SetLastResult(r);
return FACIAL_EXPRESSION_NONE;
* It can be happened when the detected faces are too small or the image is not clear. @n
* This is the result of a normal operation. @n
*/
- Tizen::Base::ByteBuffer* ExtractFeatureN(const Tizen::Base::ByteBuffer& grayBuffer, const Tizen::Graphics::Dimension& resolution, const Tizen::Graphics::Rectangle& faceRect,
- Tizen::Graphics::Point eyeLeft, Tizen::Graphics::Point eyeRight);
+ Tizen::Base::ByteBuffer* ExtractFeatureN(const Tizen::Base::ByteBuffer& grayBuffer, const Tizen::Graphics::Dimension& resolution, const Tizen::Graphics::Rectangle& faceRect);
/**
* Extracts the eye state.
void
_FaceUtil::ConvertArgb8888ToGray(const unsigned char& buf, unsigned char* pGrayBuf, int width, int height)
{
+ SysAssert(pGrayBuf != null);
if (pGrayBuf == null)
{
return;
-//\r
-// Open Service Platform\r
-// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.\r
-//\r
-// Licensed under the Flora License, Version 1.1 (the License);\r
-// you may not use this file except in compliance with the License.\r
-// You may obtain a copy of the License at\r
-//\r
-// http://floralicense.org/license/\r
-//\r
-// Unless required by applicable law or agreed to in writing, software\r
-// distributed under the License is distributed on an AS IS BASIS,\r
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-// See the License for the specific language governing permissions and\r
-// limitations under the License.\r
-// \r
-\r
#ifndef _CA_BASIC_INFO_DEF_H_\r
#define _CA_BASIC_INFO_DEF_H_\r
\r
-//\r
-// Open Service Platform\r
-// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.\r
-//\r
-// Licensed under the Flora License, Version 1.1 (the License);\r
-// you may not use this file except in compliance with the License.\r
-// You may obtain a copy of the License at\r
-//\r
-// http://floralicense.org/license/\r
-//\r
-// Unless required by applicable law or agreed to in writing, software\r
-// distributed under the License is distributed on an AS IS BASIS,\r
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-// See the License for the specific language governing permissions and\r
-// limitations under the License.\r
-// \r
-\r
#ifndef _CA_BASIC_INFO_DEF_ENUM_H_\r
#define _CA_BASIC_INFO_DEF_ENUM_H_\r
\r
-//\r
-// Open Service Platform\r
-// Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.\r
-//\r
-// Licensed under the Flora License, Version 1.1 (the License);\r
-// you may not use this file except in compliance with the License.\r
-// You may obtain a copy of the License at\r
-//\r
-// http://floralicense.org/license/\r
-//\r
-// Unless required by applicable law or agreed to in writing, software\r
-// distributed under the License is distributed on an AS IS BASIS,\r
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-// See the License for the specific language governing permissions and\r
-// limitations under the License.\r
-// \r
-\r
#ifndef _CA_FACE_APP_INTERFACE_H_\r
#define _CA_FACE_APP_INTERFACE_H_\r
\r