Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit 8fe0a7a

Browse files
JeromeJerome
authored andcommitted
Merge branch 'feature/XPCF2.5.0' into develop
2 parents 869e25c + 0006a49 commit 8fe0a7a

File tree

99 files changed

+853
-717
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+853
-717
lines changed

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ Release/
5555
*-packagedependencies-unix.*
5656
*-packagedependencies-android.*
5757
*.pc
58-
*-Debug*
59-
*-Release*
60-
*_Debug*
61-
*_Release*
58+
*-Debug
59+
*-Release
60+
*-debug.bat
61+
*-release.bat
62+
*_debug.bat
63+
*_release.bat
6264

6365
# Executables
6466
*.exe

SolARModuleOpenCV.pri

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ HEADERS += interfaces/SolAR2D3DcorrespondencesFinderOpencv.h \
3434
interfaces/SolARKeypointDetectorOpencv.h \
3535
interfaces/SolARKeypointDetectorRegionOpencv.h \
3636
interfaces/SolARMapFusionOpencv.h \
37-
interfaces/SolARMarker2DNaturalImageOpencv.h \
38-
interfaces/SolARMarker2DSquaredBinaryOpencv.h \
37+
interfaces/SolARImageMarkerLoaderOpencv.h \
3938
interfaces/SolARMatchesOverlayOpencv.h \
4039
interfaces/SolARModuleOpencv_traits.h \
4140
interfaces/SolAROpencvAPI.h \
@@ -60,6 +59,7 @@ HEADERS += interfaces/SolAR2D3DcorrespondencesFinderOpencv.h \
6059
src/AKAZE2/utils.h
6160

6261
SOURCES += src/AKAZE2/akaze.cpp \
62+
$$PWD/src/SolARImageMarkerLoaderOpencv.cpp \
6363
src/AKAZE2/AKAZEFeatures.cpp \
6464
src/AKAZE2/fed.cpp \
6565
src/AKAZE2/nldiffusion_functions.cpp \
@@ -99,8 +99,6 @@ SOURCES += src/AKAZE2/akaze.cpp \
9999
src/SolARKeypointDetectorOpencv.cpp \
100100
src/SolARKeypointDetectorRegionOpencv.cpp \
101101
src/SolARMapFusionOpencv.cpp \
102-
src/SolARMarker2DNaturalImageOpencv.cpp \
103-
src/SolARMarker2DSquaredBinaryOpencv.cpp \
104102
src/SolARMatchesOverlayOpencv.cpp \
105103
src/SolARModuleOpencv.cpp \
106104
src/SolAROpenCVHelper.cpp \

SolARModuleOpenCV.pro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CONFIG -= qt
66
INSTALLSUBDIR = SolARBuild
77
TARGET = SolARModuleOpenCV
88
FRAMEWORK = $$TARGET
9-
VERSION=0.9.1
9+
VERSION=0.10.0
1010

1111
DEFINES += MYVERSION=$${VERSION}
1212
DEFINES += TEMPLATE_LIBRARY
@@ -47,13 +47,19 @@ unix:!android {
4747
# QMAKE_CXX = clang++
4848
}
4949

50+
linux {
51+
QMAKE_LFLAGS += -ldl
52+
LIBS += -L/home/linuxbrew/.linuxbrew/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc
53+
}
54+
5055
macx {
5156
DEFINES += _MACOS_TARGET_
5257
QMAKE_MAC_SDK= macosx
5358
QMAKE_CFLAGS += -mmacosx-version-min=10.7 -std=c11 #-x objective-c++
5459
QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c11 -std=c++11 -O3 -fPIC#-x objective-c++
5560
QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++
5661
LIBS += -lstdc++ -lc -lpthread
62+
LIBS += -L/usr/local/lib
5763
}
5864

5965
win32 {

bcom-SolARModuleOpenCV.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ libdir=${exec_prefix}/lib
55
includedir=${prefix}/interfaces
66
Name: SolARModuleOpenCV
77
Description:
8-
Version: 0.9.1
8+
Version: 0.10.0
99
Requires:
1010
Libs: -L${libdir} -l${libname}
1111
Libs.private: ${libdir}/${pfx}${libname}.${lext}

interfaces/SolARDescriptorsExtractorAKAZE2Opencv.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "features2d_akaze2.hpp" // Define AKAZE2;
3030
#include "datastructure/DescriptorBuffer.h"
3131
#include "datastructure/Keypoint.h"
32+
#include "SolARImageConvertorOpencv.h"
3233

3334
namespace SolAR {
3435
namespace MODULES {
@@ -66,8 +67,8 @@ class SOLAROPENCV_EXPORT_API SolARDescriptorsExtractorAKAZE2Opencv : public org:
6667
SRef<datastructure::DescriptorBuffer> & descriptors) override;
6768
private:
6869
cv::Ptr<cv::AKAZE2> m_extractor;
69-
7070
double m_threshold = 3e-4;
71+
SolARImageConvertorOpencv m_convertor;
7172
};
7273

7374
}

interfaces/SolARDescriptorsExtractorAKAZEOpencv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "opencv2/features2d.hpp"
3030
#include "datastructure/DescriptorBuffer.h"
3131
#include "datastructure/Keypoint.h"
32+
#include "SolARImageConvertorOpencv.h"
3233

3334
namespace SolAR {
3435
namespace MODULES {
@@ -68,6 +69,7 @@ class SOLAROPENCV_EXPORT_API SolARDescriptorsExtractorAKAZEOpencv : public org::
6869
private:
6970
cv::Ptr<cv::AKAZE> m_extractor;
7071
double m_threshold = 3e-4;
72+
SolARImageConvertorOpencv m_convertor;
7173
};
7274

7375
}

interfaces/SolARDescriptorsExtractorORBOpencv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "opencv2/features2d.hpp"
3131
#include "datastructure/DescriptorBuffer.h"
3232
#include "datastructure/Keypoint.h"
33+
#include "SolARImageConvertorOpencv.h"
3334

3435
namespace SolAR {
3536
namespace MODULES {
@@ -107,6 +108,7 @@ class SOLAROPENCV_EXPORT_API SolARDescriptorsExtractorORBOpencv : public org::bc
107108
std::string m_scoreType = "Harris"; // Accepted values: Harris or Fast
108109
int m_patchSize = 31;
109110
int m_fastThreshold = 20;
111+
SolARImageConvertorOpencv m_convertor;
110112
};
111113

112114
}

interfaces/SolARDescriptorsExtractorSIFTOpencv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include "SolAROpencvAPI.h"
2525
#include <string>
26+
#include "SolARImageConvertorOpencv.h"
2627

2728
//opencv headers
2829
#include "opencv2/opencv.hpp"
@@ -88,6 +89,7 @@ class SOLAROPENCV_EXPORT_API SolARDescriptorsExtractorSIFTOpencv : public org::b
8889
double m_contrastThreshold = 0.04;
8990
double m_edgeThreshold = 10.0;
9091
double m_sigma = 1.6;
92+
SolARImageConvertorOpencv m_convertor;
9193
};
9294

9395
}

interfaces/SolARFiducialMarkerLoaderOpencv.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@
1919

2020
#include "xpcf/component/ConfigurableBase.h"
2121
#include "SolAROpencvAPI.h"
22-
2322
#include "api/input/files/ITrackableLoader.h"
24-
#include "datastructure/Trackable.h"
25-
#include "datastructure/FiducialMarker.h"
26-
27-
#include "opencv2/opencv.hpp"
2823

2924
namespace SolAR {
3025
namespace MODULES {
@@ -54,9 +49,9 @@ class SOLAROPENCV_EXPORT_API SolARFiducialMarkerLoaderOpencv : public org::bcom:
5449
void unloadComponent () override;
5550

5651
/// @brief Loads a specific trackable object and its features.
57-
/// @return SRef<Trackable> : the trackable object created from the description file
58-
/// or 0 if an error occurs
59-
virtual SRef<datastructure::Trackable> loadTrackable() override;
52+
/// @param [in,out] trackable: the loaded trackable loaded
53+
/// @return FrameworkReturnCode::_SUCCESS if load succeed, else FrameworkReturnCode::_ERROR_
54+
virtual FrameworkReturnCode loadTrackable(SRef<datastructure::Trackable>& trackable) override;
6055

6156
private:
6257
/// @brief the path to the file describing the fiducial marker
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/**
2+
* @copyright Copyright (c) 2017 B-com http://www.b-com.com/
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+
#ifndef SOLARIMAGEMARKERLOADEROPENCV_H
18+
#define SOLARIMAGEMARKERLOADEROPENCV_H
19+
20+
#include <api/input/files/ITrackableLoader.h>
21+
#include <xpcf/component/ConfigurableBase.h>
22+
#include <SolAROpencvAPI.h>
23+
24+
namespace SolAR {
25+
namespace MODULES {
26+
namespace OPENCV {
27+
28+
/**
29+
* @class SolARImageMarkerLoaderOpencv
30+
* @brief <B>Loads a 2D natural image marker from a file.</B>
31+
* <TT>UUID: aae41002-8e5b-11eb-8dcd-0242ac130003</TT>
32+
*
33+
* @SolARComponentPropertiesBegin
34+
* @SolARComponentProperty{ filePath,
35+
* the path to the file describing the 2D natural image marker,
36+
* @SolARComponentPropertyDescString{ "" }}
37+
* @SolARComponentPropertiesEnd
38+
*/
39+
40+
class SOLAROPENCV_EXPORT_API SolARImageMarkerLoaderOpencv : public org::bcom::xpcf::ConfigurableBase,
41+
public api::input::files::ITrackableLoader {
42+
public:
43+
SolARImageMarkerLoaderOpencv();
44+
45+
~SolARImageMarkerLoaderOpencv() override = default;
46+
void unloadComponent () override final;
47+
48+
/// @brief Loads a specific trackable object and its features.
49+
/// @param [in,out] trackable: the loaded trackable loaded
50+
/// @return FrameworkReturnCode::_SUCCESS if load succeed, else FrameworkReturnCode::_ERROR_
51+
virtual FrameworkReturnCode loadTrackable(SRef<datastructure::Trackable>& trackable) override;
52+
53+
private:
54+
/// @brief the path to the file describing the 2D natural image marker
55+
std::string m_filePath ="";
56+
};
57+
58+
}
59+
}
60+
}
61+
62+
#endif

0 commit comments

Comments
 (0)