Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Vision / MediaVision / ImageFillConfiguration.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 namespace Tizen.Multimedia
18 {
19     /// <summary>
20     /// Represents a configuration of fill operations of <see cref="ImageObject"/> instances.
21     /// </summary>
22     /// <since_tizen> 3</since_tizen>
23     public class ImageFillConfiguration : EngineConfiguration
24     {
25         private const string KeyScaleFactor = "MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR";
26         private const string KeyMaxKeypoints = "MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM";
27
28         /// <summary>
29         /// A read-only field that represents the default value of <see cref="ObjectScaleFactor"/>.
30         /// </summary>
31         /// <since_tizen> 3</since_tizen>
32         public static readonly double DefaultScaleFactor = 1.2;
33
34         /// <summary>
35         /// A read-only field that represents the default value of <see cref="ObjectMaxKeyPoints"/>.
36         /// </summary>
37         /// <since_tizen> 3</since_tizen>
38         public static readonly int DefaultMaxKeypoints = 1000;
39
40         /// <summary>
41         /// Initializes a new instance of the <see cref="ImageFillConfiguration"/> class.
42         /// </summary>
43         /// <exception cref="System.NotSupportedException">The feature is not supported.</exception>
44         /// <since_tizen> 3</since_tizen>
45         public ImageFillConfiguration() : base("image_recognition")
46         {
47         }
48
49         /// <summary>
50         /// Gets or sets the scale factor the image to be recognized.\n
51         /// The value of the factor will be used for resizing of the images (objects) for recognition.
52         /// The default value is 1.2.
53         /// </summary>
54         /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
55         /// <since_tizen> 3</since_tizen>
56         public double ObjectScaleFactor
57         {
58             get
59             {
60                 return GetDouble(KeyScaleFactor);
61             }
62             set
63             {
64                 Set(KeyScaleFactor, value);
65             }
66         }
67
68         /// <summary>
69         /// Gets or sets the maximum key points should be detected on the image.\n
70         /// The maximal number of key points can be selected on the image object to calculate descriptors.
71         /// This key points will be used for image (object) recognition and has to be specified as integer number.
72         /// The default value is 1000.
73         /// </summary>
74         /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
75         /// <since_tizen> 3</since_tizen>
76         public int ObjectMaxKeyPoints
77         {
78             get
79             {
80                 return GetInt(KeyMaxKeypoints);
81             }
82             set
83             {
84                 Set(KeyMaxKeypoints, value);
85             }
86         }
87     }
88 }