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 /// <since_tizen> 3 </since_tizen>
25 public class ImageFillConfiguration : EngineConfiguration
27 private const string KeyScaleFactor = "MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR";
28 private const string KeyMaxKeypoints = "MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM";
31 /// A read-only field that represents the default value of <see cref="ObjectScaleFactor"/>.
33 /// <since_tizen> 3 </since_tizen>
34 public static readonly double DefaultScaleFactor = 1.2;
37 /// A read-only field that represents the default value of <see cref="ObjectMaxKeyPoints"/>.
39 /// <since_tizen> 3</since_tizen>
40 public static readonly int DefaultMaxKeypoints = 1000;
43 /// Initializes a new instance of the <see cref="ImageFillConfiguration"/> class.
45 /// <exception cref="NotSupportedException">The feature is not supported.</exception>
46 /// <since_tizen> 3 </since_tizen>
47 public ImageFillConfiguration() : base("image_recognition")
52 /// Gets or sets the scale factor the image to be recognized.\n
53 /// The value of the factor will be used for resizing of the images (objects) for recognition.
54 /// The default value is 1.2.
56 /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
57 /// <since_tizen> 3 </since_tizen>
58 public double ObjectScaleFactor
62 return GetDouble(KeyScaleFactor);
66 Set(KeyScaleFactor, value);
71 /// Gets or sets the maximum key points should be detected on the image.\n
72 /// The maximal number of key points can be selected on the image object to calculate descriptors.
73 /// This key points will be used for image (object) recognition and has to be specified as integer number.
74 /// The default value is 1000.
76 /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
77 /// <since_tizen> 3 </since_tizen>
78 public int ObjectMaxKeyPoints
82 return GetInt(KeyMaxKeypoints);
86 Set(KeyMaxKeypoints, value);