61364f5f95f1171ec1b34f0ac606acfc96ed3251
[platform/core/api/mediavision.git] / mv_image / image / src / Features / FeaturePack.cpp
1 /**
2  * Copyright (c) 2015 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 #include "Features/FeaturePack.h"
18
19 #include <opencv/cv.h>
20
21 namespace MediaVision {
22 namespace Image {
23
24 FeaturePack::FeaturePack() :
25                 m_keypointsType(KT_INVALID),
26                 m_objectKeypoints(),
27                 m_descriptorsType(DT_INVALID),
28                 m_objectDescriptors(),
29                 m_recognitionRate(0.f)
30 {
31         ; /* NULL */
32 }
33
34 FeaturePack::FeaturePack(const FeaturePack& copy) :
35                 m_keypointsType(copy.m_keypointsType),
36                 m_objectKeypoints(copy.m_objectKeypoints),
37                 m_descriptorsType(copy.m_descriptorsType),
38                 m_objectDescriptors(copy.m_objectDescriptors.clone()),
39                 m_recognitionRate(copy.m_recognitionRate)
40 {
41         ; /* NULL */
42 }
43
44 FeaturePack& FeaturePack::operator= (const FeaturePack& copy)
45 {
46         if (this != &copy) {
47                 m_keypointsType = copy.m_keypointsType;
48                 m_objectKeypoints = copy.m_objectKeypoints;
49                 m_descriptorsType = copy.m_descriptorsType;
50                 m_objectDescriptors = copy.m_objectDescriptors.clone();
51                 m_recognitionRate = copy.m_recognitionRate;
52         }
53
54         return *this;
55 }
56
57 } /* Image */
58 } /* MediaVision */