2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 namespace Tizen.Multimedia.Vision
22 /// Represents a configuration of fill operations of <see cref="ImageObject"/> instances.
24 /// <feature>http://tizen.org/feature/vision.image_recognition</feature>
25 /// <since_tizen> 4 </since_tizen>
26 public class ImageFillConfiguration : EngineConfiguration
28 private const string KeyScaleFactor = "MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR";
29 private const string KeyMaxKeypoints = "MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM";
32 /// A read-only field that represents the default value of <see cref="ObjectScaleFactor"/>.
34 /// <since_tizen> 4 </since_tizen>
35 public static readonly double DefaultScaleFactor = 1.2;
38 /// A read-only field that represents the default value of <see cref="ObjectMaxKeyPoints"/>.
40 /// <since_tizen> 4</since_tizen>
41 public static readonly int DefaultMaxKeypoints = 1000;
44 /// Initializes a new instance of the <see cref="ImageFillConfiguration"/> class.
46 /// <exception cref="NotSupportedException">The feature is not supported.</exception>
47 /// <since_tizen> 4 </since_tizen>
48 public ImageFillConfiguration() : base("image_recognition")
53 /// Gets or sets the scale factor the image to be recognized.<br/>
54 /// The value of the factor will be used for resizing of the images (objects) for recognition.
55 /// The default value is 1.2.
57 /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
58 /// <since_tizen> 4 </since_tizen>
59 public double ObjectScaleFactor
63 return GetDouble(KeyScaleFactor);
67 Set(KeyScaleFactor, value);
72 /// Gets or sets the maximum key points should be detected on the image.<br/>
73 /// The maximal number of key points can be selected on the image object to calculate descriptors.
74 /// This key points will be used for image (object) recognition and has to be specified as integer number.
75 /// The default value is 1000.
77 /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
78 /// <since_tizen> 4 </since_tizen>
79 public int ObjectMaxKeyPoints
83 return GetInt(KeyMaxKeypoints);
87 Set(KeyMaxKeypoints, value);