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
20 /// Represents a configuration of fill operations of <see cref="ImageObject"/> instances.
22 public class ImageFillConfiguration : EngineConfiguration
24 private const string KeyScaleFactor = "MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR";
25 private const string KeyMaxKeypoints = "MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM";
28 /// A read-only field that represents the default value of <see cref="ObjectScaleFactor"/>.
30 public static readonly double DefaultScaleFactor = 1.2;
33 /// A read-only field that represents the default value of <see cref="ObjectMaxKeyPoints"/>.
35 public static readonly int DefaultMaxKeypoints = 1000;
38 /// Initializes a new instance of the <see cref="ImageFillConfiguration"/> class.
40 /// <exception cref="System.NotSupportedException">The feature is not supported.</exception>
41 public ImageFillConfiguration() : base("image_recognition")
46 /// Gets or sets the scale factor the image to be recognized.\n
47 /// The value of the factor will be used for resizing of the images (objects) for recognition.
48 /// The default value is 1.2.
50 /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
51 public double ObjectScaleFactor
55 return GetDouble(KeyScaleFactor);
59 Set(KeyScaleFactor, value);
64 /// Gets or sets the maximum key points should be detected on the image.\n
65 /// The maximal number of key points can be selected on the image object to calculate descriptors.
66 /// This key points will be used for image (object) recognition and has to be specified as integer number.
67 /// The default value is 1000.
69 /// <exception cref="ObjectDisposedException">The <see cref="ImageFillConfiguration"/> already has been disposed of.</exception>
70 public int ObjectMaxKeyPoints
74 return GetInt(KeyMaxKeypoints);
78 Set(KeyMaxKeypoints, value);