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.
17 namespace Tizen.Multimedia.Vision
20 /// Represents a configuration of fill operations of <see cref="ImageObject"/> instances.
22 /// <since_tizen> 3</since_tizen>
23 public class ImageFillConfiguration : EngineConfiguration
25 private const string KeyScaleFactor = "MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR";
26 private const string KeyMaxKeypoints = "MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM";
29 /// A read-only field that represents the default value of <see cref="ObjectScaleFactor"/>.
31 /// <since_tizen> 3</since_tizen>
32 public static readonly double DefaultScaleFactor = 1.2;
35 /// A read-only field that represents the default value of <see cref="ObjectMaxKeyPoints"/>.
37 /// <since_tizen> 3</since_tizen>
38 public static readonly int DefaultMaxKeypoints = 1000;
41 /// Initializes a new instance of the <see cref="ImageFillConfiguration"/> class.
43 /// <exception cref="System.NotSupportedException">The feature is not supported.</exception>
44 /// <since_tizen> 3</since_tizen>
45 public ImageFillConfiguration() : base("image_recognition")
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.
54 /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
55 /// <since_tizen> 3</since_tizen>
56 public double ObjectScaleFactor
60 return GetDouble(KeyScaleFactor);
64 Set(KeyScaleFactor, value);
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.
74 /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
75 /// <since_tizen> 3</since_tizen>
76 public int ObjectMaxKeyPoints
80 return GetInt(KeyMaxKeypoints);
84 Set(KeyMaxKeypoints, value);