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

Commit e33ef8c

Browse files
committed
Merge branch 'develop'
2 parents cde4036 + 2587608 commit e33ef8c

Some content is hidden

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

49 files changed

+739
-182
lines changed

.gitignore

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
*.o
88
*.obj
99
build*/
10-
*/.build-rules/
11-
tests/*/.build-rules/
10+
*build-rules
1211
deploy
1312

1413
# Precompiled Headers
@@ -49,7 +48,11 @@ deploy
4948
*vcxproj.*
5049
x64/
5150
.vs/
52-
*.bat
51+
SolARModuleFBOW/*.bat
52+
SolARModuleFBOWCuda/*.bat
53+
tests/SolARTest_ModuleFBOW_ClosestKeyframeRetrieval/*.bat
54+
tests/SolARTest_ModuleFBOW_FeatureMatching/*.bat
55+
tests/SolARTest_ModuleFBOW_ClosestKeyframeRetrieval/*.aps
5356
*run.sh
5457
*remakeninfo.txt
5558
Debug/

JenkinsFile

-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ node("master") {
44
dirName="SolARBuild"
55
runTests=true
66
buildDir="SolARModuleFBOW"
7-
android=true
87
}
98

109
SolArModulePipeline {
1110
moduleName="SolARModuleFBOWCuda"
1211
dirName="SolARBuild"
1312
runTests=true
1413
buildDir="SolARModuleFBOWCuda"
15-
android=false
1614
}
1715
}

SolARModuleFBOW/SolARModuleFBOW.pro

+2-18
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ INSTALLSUBDIR = SolARBuild
99
TARGET = SolARModuleFBOW
1010

1111
FRAMEWORK = $$TARGET
12-
VERSION=0.11.0
12+
VERSION=1.0.0
1313

1414
DEFINES += MYVERSION=$${VERSION}
1515
DEFINES += TEMPLATE_LIBRARY
@@ -51,7 +51,7 @@ unix {
5151
QMAKE_POST_LINK += "make install install_deps"
5252
}
5353

54-
unix:!android {
54+
unix {
5555
QMAKE_CXXFLAGS += -Wignored-qualifiers
5656
}
5757

@@ -60,16 +60,6 @@ linux {
6060
LIBS += -L/home/linuxbrew/.linuxbrew/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc
6161
}
6262

63-
macx {
64-
DEFINES += _MACOS_TARGET_
65-
QMAKE_MAC_SDK= macosx
66-
QMAKE_CFLAGS += -mmacosx-version-min=10.7 -std=c11 #-x objective-c++
67-
QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c11 -std=c++11 -O3 -fPIC#-x objective-c++
68-
QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++
69-
LIBS += -lstdc++ -lc -lpthread
70-
LIBS += -L/usr/local/lib
71-
}
72-
7363
win32 {
7464

7565
DEFINES += WIN64 UNICODE _UNICODE
@@ -79,10 +69,6 @@ win32 {
7969
QMAKE_CXXFLAGS_DEBUG += /Od
8070
}
8171

82-
android {
83-
ANDROID_ABIS="arm64-v8a"
84-
}
85-
8672
header_files.path = $${PROJECTDEPLOYDIR}/interfaces
8773
header_files.files = $$files($${PWD}/../interfaces/*.h*)
8874

@@ -96,8 +82,6 @@ OTHER_FILES += \
9682
packagedependencies.txt \
9783
packagedependencies-win.txt \
9884
packagedependencies-linux.txt \
99-
packagedependencies-mac.txt \
100-
packagedependencies-android.txt \
10185
packageignoreinstall.txt
10286

10387
#NOTE : Must be placed at the end of the .pro

SolARModuleFBOW/bcom-SolARModuleFBOW.pc.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ libdir=${exec_prefix}/lib
55
includedir=${prefix}/interfaces
66
Name: SolARModuleFBOW
77
Description:
8-
Version: 0.11.0
8+
Version: 1.0.0
99
Requires:
1010
Libs: -L${libdir} -l${libname}
1111
Libs.private: ${libdir}/${pfx}${libname}.${lext}

SolARModuleFBOW/packagedependencies-android.txt

Whitespace-only changes.

SolARModuleFBOW/packagedependencies-mac.txt

Whitespace-only changes.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fbowSolAR|0.0.7|fbowSolAR|thirdParties@github|https://github.com/SolarFramework/fbow/releases/download
2-
SolARFramework|0.11.0|SolARFramework|SolARBuild@github|https://github.com/SolarFramework/SolarFramework/releases/download
1+
fbowSolAR|1.0.0|fbowSolAR|thirdParties@github|https://github.com/SolarFramework/fbow/releases/download
2+
SolARFramework|1.0.0|SolARFramework|SolARBuild@github|https://github.com/SolarFramework/SolarFramework/releases/download

SolARModuleFBOW/xpcf_SolARModuleFBOW_registry.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
22
<xpcf-registry>
3-
<module uuid="b81f0b90-bdbc-11e8-a355-529269fb1459" name="SolARModuleFBOW" description="SolARModuleFBOW" path="$XPCF_MODULE_ROOT/SolARBuild/SolARModuleFBOW/0.11.0/lib/x86_64/shared">
3+
<module uuid="b81f0b90-bdbc-11e8-a355-529269fb1459" name="SolARModuleFBOW" description="SolARModuleFBOW" path="$XPCF_MODULE_ROOT/SolARBuild/SolARModuleFBOW/1.0.0/lib/x86_64/shared">
44
<component uuid="9d1b1afa-bdbc-11e8-a355-529269fb1459" name="SolARKeyframeRetrieverFBOW" description="SolARKeyframeRetrieverFBOW">
55
<interface uuid="125f2007-1bf9-421d-9367-fbdc1210d006" name="IComponentIntrospect" description="IComponentIntrospect"/>
66
<interface uuid="f60980ce-bdbd-11e8-a355-529269fb1459" name="IKeyframeRetriever" description="IKeyframeRetriever"/>

SolARModuleFBOWCuda/SolARModuleFBOWCuda.pro

+2-18
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ QMAKE_PROJECT_DEPTH = 0
88
INSTALLSUBDIR = SolARBuild
99
TARGET = SolARModuleFBOWCuda
1010
FRAMEWORK = $$TARGET
11-
VERSION=0.11.0
11+
VERSION=1.0.0
1212

1313
DEFINES += MYVERSION=$${VERSION}
1414
DEFINES += TEMPLATE_LIBRARY
@@ -50,7 +50,7 @@ unix {
5050
QMAKE_POST_LINK += "make install install_deps"
5151
}
5252

53-
unix:!android {
53+
unix {
5454
QMAKE_CXXFLAGS += -Wignored-qualifiers
5555
}
5656

@@ -59,16 +59,6 @@ linux {
5959
LIBS += -L/home/linuxbrew/.linuxbrew/lib # temporary fix caused by grpc with -lre2 ... without -L in grpc.pc
6060
}
6161

62-
macx {
63-
DEFINES += _MACOS_TARGET_
64-
QMAKE_MAC_SDK= macosx
65-
QMAKE_CFLAGS += -mmacosx-version-min=10.7 -std=c11 #-x objective-c++
66-
QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -std=c11 -std=c++11 -O3 -fPIC#-x objective-c++
67-
QMAKE_LFLAGS += -mmacosx-version-min=10.7 -v -lstdc++
68-
LIBS += -lstdc++ -lc -lpthread
69-
LIBS += -L/usr/local/lib
70-
}
71-
7262
win32 {
7363

7464
DEFINES += WIN64 UNICODE _UNICODE
@@ -78,10 +68,6 @@ win32 {
7868
QMAKE_CXXFLAGS_DEBUG += /Od
7969
}
8070

81-
android {
82-
ANDROID_ABIS="arm64-v8a"
83-
}
84-
8571
header_files.path = $${PROJECTDEPLOYDIR}/interfaces
8672
header_files.files = $$files($${PWD}/../interfaces/*.h*)
8773

@@ -95,8 +81,6 @@ OTHER_FILES += \
9581
packagedependencies.txt \
9682
packagedependencies-win.txt \
9783
packagedependencies-linux.txt \
98-
packagedependencies-mac.txt \
99-
packagedependencies-android.txt \
10084
packageignoreinstall.txt
10185

10286
#NOTE : Must be placed at the end of the .pro

SolARModuleFBOWCuda/bcom-SolARModuleFBOWCuda.pc.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ libdir=${exec_prefix}/lib
55
includedir=${prefix}/interfaces
66
Name: SolARModuleFBOWCuda
77
Description:
8-
Version: 0.11.0
8+
Version: 1.0.0
99
Requires:
1010
Libs: -L${libdir} -l${libname}
1111
Libs.private: ${libdir}/${pfx}${libname}.${lext}

SolARModuleFBOWCuda/packagedependencies-android.txt

Whitespace-only changes.

SolARModuleFBOWCuda/packagedependencies-mac.txt

Whitespace-only changes.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fbowSolARCuda|0.0.7|fbowSolARCuda|thirdParties@github|https://github.com/SolarFramework/fbow/releases/download
2-
SolARFramework|0.11.0|SolARFramework|SolARBuild@github|https://github.com/SolarFramework/SolarFramework/releases/download
1+
fbowSolARCuda|1.0.0|fbowSolARCuda|thirdParties@github|https://github.com/SolarFramework/fbow/releases/download
2+
SolARFramework|1.0.0|SolARFramework|SolARBuild@github|https://github.com/SolarFramework/SolarFramework/releases/download

SolARModuleFBOWCuda/xpcf_SolARModuleFBOWCuda_registry.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
22
<xpcf-registry>
3-
<module uuid="0aa58e12-b5ac-11ec-b909-0242ac120002" name="SolARModuleFBOWCuda" description="SolARModuleFBOWCuda" path="$XPCF_MODULE_ROOT/SolARBuild/SolARModuleFBOWCuda/0.11.0/lib/x86_64/shared">
3+
<module uuid="0aa58e12-b5ac-11ec-b909-0242ac120002" name="SolARModuleFBOWCuda" description="SolARModuleFBOWCuda" path="$XPCF_MODULE_ROOT/SolARBuild/SolARModuleFBOWCuda/1.0.0/lib/x86_64/shared">
44
<component uuid="9d1b1afa-bdbc-11e8-a355-529269fb1459" name="SolARKeyframeRetrieverFBOW" description="SolARKeyframeRetrieverFBOW">
55
<interface uuid="125f2007-1bf9-421d-9367-fbdc1210d006" name="IComponentIntrospect" description="IComponentIntrospect"/>
66
<interface uuid="f60980ce-bdbd-11e8-a355-529269fb1459" name="IKeyframeRetriever" description="IKeyframeRetriever"/>

interfaces/SolARFBOWHelper.h

+15
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,27 @@ namespace SolAR {
2525
namespace MODULES {
2626
namespace FBOW {
2727

28+
// scoring type
29+
enum class ScoringType {
30+
L2_NORM = 0,
31+
L1_NORM = 1,
32+
CHI_SQUARE = 2,
33+
BHATTACHARYYA = 3,
34+
DOT_PRODUCT = 4,
35+
KLS = 5
36+
};
37+
2838
class SOLARFBOW_EXPORT_API SolARFBOWHelper
2939
{
3040
public:
3141
static datastructure::BoWFeature fbow2Solar(const fbow::fBow& fbow);
3242
static datastructure::BoWLevelFeature fbow2Solar(const fbow::fBow2& fbow2);
3343
static double distanceBoW(const datastructure::BoWFeature& bow1, const datastructure::BoWFeature& bow2);
44+
static double distanceL1BoW(const datastructure::BoWFeature& bow1, const datastructure::BoWFeature& bow2);
45+
static double distanceChiSquareBoW(const datastructure::BoWFeature& bow1, const datastructure::BoWFeature& bow2);
46+
static double distanceKLSBoW(const datastructure::BoWFeature& bow1, const datastructure::BoWFeature& bow2);
47+
static double distanceBhattacharyyaBoW(const datastructure::BoWFeature& bow1, const datastructure::BoWFeature& bow2);
48+
static double distanceDotProductBoW(const datastructure::BoWFeature& bow1, const datastructure::BoWFeature& bow2);
3449
};
3550

3651
}

interfaces/SolARKeyframeRetrieverFBOW.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ class SOLARFBOW_EXPORT_API SolARKeyframeRetrieverFBOW : public org::bcom::xpcf::
6262

6363
/// @brief Add a keyframe to the retrieval model
6464
/// @param[in] keyframe: the keyframe to add to the retrieval model
65+
/// @param[in] useMatchedDescriptor: if true bow feature will be computed merely from descriptors which are matched to other frames, by default is set to false meaning that all descriptors will be used
6566
/// @return FrameworkReturnCode::_SUCCESS if the keyfram adding succeed, else FrameworkReturnCode::_ERROR_
66-
FrameworkReturnCode addKeyframe(const SRef<datastructure::Keyframe> keyframe) override;
67+
FrameworkReturnCode addKeyframe(const SRef<datastructure::Keyframe> keyframe, bool useMatchedDescriptor=false) override;
6768

6869
/// @brief Suppress a keyframe from the retrieval model
6970
/// @param[in] keyframe_id: the keyframe to supress from the retrieval model
@@ -121,6 +122,10 @@ class SOLARFBOW_EXPORT_API SolARKeyframeRetrieverFBOW : public org::bcom::xpcf::
121122
/// @brief This method is to set the keyframe retrieval
122123
/// @param[in] keyframeRetrieval the keyframe retrieval of map
123124
void setKeyframeRetrieval(const SRef<datastructure::KeyframeRetrieval> keyframeRetrieval) override;
125+
126+
/// @brief This method is to reset keyframe retrieval contents
127+
void resetKeyframeRetrieval() override;
128+
124129
private:
125130
/// @brief Match a feature to a set of features
126131
/// @param[in] feature1: a feature
@@ -150,6 +155,9 @@ class SOLARFBOW_EXPORT_API SolARKeyframeRetrieverFBOW : public org::bcom::xpcf::
150155

151156
/// @brief distance max used to keep good matches.
152157
float m_distanceMax = 100.f;
158+
159+
/// @brief distance metric
160+
int m_distanceMetricId = 0;
153161
};
154162

155163
}

0 commit comments

Comments
 (0)