1 /*
2  * Copyright (C) 2014,2015 Thundersoft Corporation
3  * All rights Reserved
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __TS_MAKEUP_ENGINI_H__
19 #define __TS_MAKEUP_ENGINI_H__
20 #include "ts_makeup_data.h"
21 #include "ts_makeup_image.h"
22 
23 
24     /*
25      * FUNCTION   : ts_makeup_get_supported_face_num
26      *
27      * DESCRIPTION: get supported face number
28      *
29      * RETURN    : The supported face number
30      *
31      */
32     int ts_makeup_get_supported_face_num();
33 
34 
35     /*
36      * FUNCTION   : ts_makeup_skin_beauty
37      *
38      * DESCRIPTION: skin beauty method.
39      *
40      * PARAMETERS :
41      *   @param[in] pInData : The TSMakeupData pointer.MUST not NULL.
42      *   @param[out] pOutData : The TSMakeupData pointer.MUST not NULL.
43      *   @param[in] pFaceRect : The face rect.MUST not NULL.
44      *   @param[in] cleanLevel : Skin clean level, value range [0,100].
45      *   @param[in] whiteLevel : Skin white level, value range [0,100].
46      * RETURN    : TS_OK if success, otherwise failed.
47      *
48      */
49     int ts_makeup_skin_beauty(TSMakeupData *pInData, TSMakeupData *pOutData, const TSRect *pFaceRect, int cleanLevel,int whiteLevel);
50     /*
51      * FUNCTION   : ts_makeup_skin_beautyEx
52      *
53      * DESCRIPTION: skin beauty method.
54      *
55      * PARAMETERS :
56      *   @param[in] pInData : The TSMakeupDataEx pointer.MUST not NULL.
57      *   @param[out] pOutData : The TSMakeupDataEx pointer.MUST not NULL.
58      *   @param[in] pFaceRect : The face rect.MUST not NULL.
59      *   @param[in] cleanLevel : Skin clean level, value range [0,100].
60      *   @param[in] whiteLevel : Skin white level, value range [0,100].
61      * RETURN    : TS_OK if success, otherwise failed.
62      *
63      */
64     int ts_makeup_skin_beautyEx(TSMakeupDataEx *pInData, TSMakeupDataEx *pOutData, const TSRect *pFaceRect, int cleanLevel, int whiteLevel);
65     /*
66      * FUNCTION   : ts_makeup_finish
67      *
68      * DESCRIPTION: Finish makeup,call this method at last time.
69      * This method MUST be called After ts_makeup_skin_clean and ts_makeup_skin_whiten
70      *
71      */
72     void ts_makeup_finish();
73 
74 
75     /*
76      * FUNCTION   : ts_makeup_warp_face
77      *
78      * DESCRIPTION: do warp face.
79      *
80      * PARAMETERS :
81      *   @param[in] pInData : The TSMakeupData pointer.MUST not NULL.
82      *   @param[out] pOutData : The TSMakeupData pointer.MUST not NULL.
83      *   @param[in] pLeftEye : The left eye rect pointer.MUST not NULL.
84      *   @param[in] pRightEye : The right eye rect pointer.MUST not NULL.
85      *   @param[in] pMouth : The mouth rect pointer.MUST not NULL.
86      *   @param[in] bigEyeLevel : The big eye level, value range [0,100].
87      *   @param[in] trimFaceLevel : The trim face level, value range [0,100].
88      *
89      * RETURN    : TS_OK if success, otherwise failed.
90      *
91      */
92     int ts_makeup_warp_face(TSMakeupData *pInData, TSMakeupData *pOutData,
93             const TSRect *pLeftEye, const TSRect *pRightEye, const TSRect *pMouth, int bigEyeLevel, int trimFaceLevel);
94 
95 #endif // __TS_MAKEUP_ENGINI_H__
96