Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
e39065bf
Commit
e39065bf
authored
Aug 20, 2014
by
biagio montesano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created nested namespace. Modified interface classes.
parent
92761997
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
52 additions
and
13 deletions
+52
-13
descriptor.hpp
...descriptor/include/opencv2/line_descriptor/descriptor.hpp
+8
-5
perf_descriptors.cpp
modules/line_descriptor/perf/perf_descriptors.cpp
+1
-0
perf_detection.cpp
modules/line_descriptor/perf/perf_detection.cpp
+1
-0
perf_matching.cpp
modules/line_descriptor/perf/perf_matching.cpp
+1
-0
compute_descriptors.cpp
modules/line_descriptor/samples/compute_descriptors.cpp
+4
-0
knn_matching.cpp
modules/line_descriptor/samples/knn_matching.cpp
+2
-3
lines_extraction.cpp
modules/line_descriptor/samples/lines_extraction.cpp
+1
-0
lsd_lines_extraction.cpp
modules/line_descriptor/samples/lsd_lines_extraction.cpp
+1
-0
matching.cpp
modules/line_descriptor/samples/matching.cpp
+4
-1
radius_matching.cpp
modules/line_descriptor/samples/radius_matching.cpp
+1
-0
LSDDetector.cpp
modules/line_descriptor/src/LSDDetector.cpp
+8
-3
binary_descriptor.cpp
modules/line_descriptor/src/binary_descriptor.cpp
+3
-0
binary_descriptor_matcher.cpp
modules/line_descriptor/src/binary_descriptor_matcher.cpp
+7
-1
draw.cpp
modules/line_descriptor/src/draw.cpp
+3
-0
line_descriptor_init.cpp
modules/line_descriptor/src/line_descriptor_init.cpp
+3
-0
precomp.hpp
modules/line_descriptor/src/precomp.hpp
+1
-0
test_descriptors_regression.cpp
modules/line_descriptor/test/test_descriptors_regression.cpp
+1
-0
test_detector_regression.cpp
modules/line_descriptor/test/test_detector_regression.cpp
+1
-0
test_matcher_regression.cpp
modules/line_descriptor/test/test_matcher_regression.cpp
+1
-0
No files found.
modules/line_descriptor/include/opencv2/line_descriptor/descriptor.hpp
View file @
e39065bf
...
...
@@ -55,8 +55,10 @@
namespace
cv
{
namespace
line_descriptor
{
CV_EXPORTS
bool
initModule_line_descriptor
();
//
CV_EXPORTS bool initModule_line_descriptor();
struct
CV_EXPORTS
KeyLine
{
...
...
@@ -421,14 +423,15 @@ struct CV_EXPORTS DrawLinesMatchesFlags
/* draw matches between two images */
CV_EXPORTS
void
drawLineMatches
(
const
Mat
&
img1
,
const
std
::
vector
<
KeyLine
>&
keylines1
,
const
Mat
&
img2
,
const
std
::
vector
<
KeyLine
>&
keylines2
,
const
std
::
vector
<
DMatch
>&
matches1to2
,
Mat
&
outImg
,
const
Scalar
&
matchColor
=
Scalar
::
all
(
-
1
),
const
Scalar
&
singleLineColor
=
Scalar
::
all
(
-
1
),
const
std
::
vector
<
char
>&
matchesMask
=
std
::
vector
<
char
>
(),
int
flags
=
DrawLinesMatchesFlags
::
DEFAULT
);
const
std
::
vector
<
DMatch
>&
matches1to2
,
Mat
&
outImg
,
const
Scalar
&
matchColor
=
Scalar
::
all
(
-
1
),
const
Scalar
&
singleLineColor
=
Scalar
::
all
(
-
1
),
const
std
::
vector
<
char
>&
matchesMask
=
std
::
vector
<
char
>
(),
int
flags
=
DrawLinesMatchesFlags
::
DEFAULT
);
/* draw extracted lines on original image */
CV_EXPORTS
void
drawKeylines
(
const
Mat
&
image
,
const
std
::
vector
<
KeyLine
>&
keylines
,
Mat
&
outImage
,
const
Scalar
&
color
=
Scalar
::
all
(
-
1
),
int
flags
=
DrawLinesMatchesFlags
::
DEFAULT
);
int
flags
=
DrawLinesMatchesFlags
::
DEFAULT
);
}
}
#endif
modules/line_descriptor/perf/perf_descriptors.cpp
View file @
e39065bf
...
...
@@ -42,6 +42,7 @@
#include "perf_precomp.hpp"
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
using
namespace
std
;
using
namespace
perf
;
using
std
::
tr1
::
make_tuple
;
...
...
modules/line_descriptor/perf/perf_detection.cpp
View file @
e39065bf
...
...
@@ -42,6 +42,7 @@
#include "perf_precomp.hpp"
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
using
namespace
std
;
using
namespace
perf
;
using
std
::
tr1
::
make_tuple
;
...
...
modules/line_descriptor/perf/perf_matching.cpp
View file @
e39065bf
...
...
@@ -42,6 +42,7 @@
#include "perf_precomp.hpp"
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
using
namespace
std
;
using
namespace
perf
;
using
std
::
tr1
::
make_tuple
;
...
...
modules/line_descriptor/samples/compute_descriptors.cpp
View file @
e39065bf
...
...
@@ -50,6 +50,8 @@
#include <iostream>
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
static
const
char
*
keys
=
{
"{@image_path | | Image path }"
};
...
...
@@ -96,3 +98,5 @@ int main( int argc, char** argv )
bd
->
compute
(
imageMat
,
keylines
,
descriptors
);
}
modules/line_descriptor/samples/knn_matching.cpp
View file @
e39065bf
...
...
@@ -52,6 +52,7 @@
#include <time.h>
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
static
const
char
*
keys
=
{
"{@image_path1 | | Image path 1 }"
...
...
@@ -192,8 +193,6 @@ int main( int argc, char** argv )
/* require knn match */
bdm
->
knnMatch
(
descr1
,
descr2
,
matches
,
6
);
}
modules/line_descriptor/samples/lines_extraction.cpp
View file @
e39065bf
...
...
@@ -50,6 +50,7 @@
#include <iostream>
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
using
namespace
std
;
static
const
char
*
keys
=
...
...
modules/line_descriptor/samples/lsd_lines_extraction.cpp
View file @
e39065bf
...
...
@@ -50,6 +50,7 @@
#include <iostream>
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
using
namespace
std
;
static
const
char
*
keys
=
...
...
modules/line_descriptor/samples/matching.cpp
View file @
e39065bf
...
...
@@ -52,6 +52,7 @@
#define MATCHES_DIST_THRESHOLD 25
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
static
const
char
*
keys
=
{
"{@image_path1 | | Image path 1 }"
...
...
@@ -146,7 +147,7 @@ int main( int argc, char** argv )
imshow
(
"Matches"
,
outImg
);
waitKey
();
imwrite
(
"/home/ubisum/Desktop/images/matches.jpg"
,
outImg
);
imwrite
(
"/home/ubisum/Desktop/images/
env_match/
matches.jpg"
,
outImg
);
/* create an LSD detector */
Ptr
<
LSDDetector
>
lsd
=
LSDDetector
::
createLSDDetector
();
...
...
@@ -203,5 +204,7 @@ int main( int argc, char** argv )
imshow
(
"LSD matches"
,
lsd_outImg
);
waitKey
();
}
modules/line_descriptor/samples/radius_matching.cpp
View file @
e39065bf
...
...
@@ -51,6 +51,7 @@
#include <vector>
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
static
const
std
::
string
images
[]
=
{
"cameraman.jpg"
,
"church.jpg"
,
"church2.png"
,
"einstein.jpg"
,
"stuff.jpg"
};
...
...
modules/line_descriptor/src/LSDDetector.cpp
View file @
e39065bf
...
...
@@ -41,8 +41,11 @@
#include "precomp.hpp"
using
namespace
cv
;
//using namespace cv;
namespace
cv
{
namespace
line_descriptor
{
Ptr
<
LSDDetector
>
LSDDetector
::
createLSDDetector
()
{
return
Ptr
<
LSDDetector
>
(
new
LSDDetector
()
);
...
...
@@ -199,10 +202,12 @@ void LSDDetector::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& keyline
for
(
size_t
keyCounter
=
0
;
keyCounter
<
keylines
.
size
();
keyCounter
++
)
{
KeyLine
kl
=
keylines
[
keyCounter
];
if
(
mask
.
at
<
uchar
>
(
(
int
)
kl
.
startPointY
,
(
int
)
kl
.
startPointX
)
==
0
&&
mask
.
at
<
uchar
>
(
(
int
)
kl
.
endPointY
,
(
int
)
kl
.
endPointX
)
==
0
)
if
(
mask
.
at
<
uchar
>
(
(
int
)
kl
.
startPointY
,
(
int
)
kl
.
startPointX
)
==
0
&&
mask
.
at
<
uchar
>
(
(
int
)
kl
.
endPointY
,
(
int
)
kl
.
endPointX
)
==
0
)
keylines
.
erase
(
keylines
.
begin
()
+
keyCounter
);
}
}
}
}
}
modules/line_descriptor/src/binary_descriptor.cpp
View file @
e39065bf
...
...
@@ -46,6 +46,8 @@
//using namespace cv;
namespace
cv
{
namespace
line_descriptor
{
/* combinations of internal indeces for binary descriptor extractor */
static
const
int
combinations
[
32
][
2
]
=
...
...
@@ -1345,3 +1347,4 @@ int BinaryDescriptor::computeLBD( ScaleLines &keyLines, bool useDetectionData )
}
}
}
modules/line_descriptor/src/binary_descriptor_matcher.cpp
View file @
e39065bf
...
...
@@ -41,7 +41,11 @@
#include "precomp.hpp"
using
namespace
cv
;
//using namespace cv;
namespace
cv
{
namespace
line_descriptor
{
/* constructor */
BinaryDescriptorMatcher
::
BinaryDescriptorMatcher
()
...
...
@@ -583,3 +587,5 @@ void BinaryDescriptorMatcher::radiusMatch( const Mat& queryDescriptors, std::vec
delete
numres
;
}
}
}
modules/line_descriptor/src/draw.cpp
View file @
e39065bf
...
...
@@ -43,6 +43,8 @@
namespace
cv
{
namespace
line_descriptor
{
/* draw matches between two images */
void
drawLineMatches
(
const
Mat
&
img1
,
const
std
::
vector
<
KeyLine
>&
keylines1
,
const
Mat
&
img2
,
const
std
::
vector
<
KeyLine
>&
keylines2
,
const
std
::
vector
<
DMatch
>&
matches1to2
,
Mat
&
outImg
,
const
Scalar
&
matchColor
,
const
Scalar
&
singleLineColor
,
...
...
@@ -185,3 +187,4 @@ void drawKeylines( const Mat& image, const std::vector<KeyLine>& keylines, Mat&
}
}
}
modules/line_descriptor/src/line_descriptor_init.cpp
View file @
e39065bf
...
...
@@ -43,6 +43,8 @@
namespace
cv
{
namespace
line_descriptor
{
CV_INIT_ALGORITHM
(
BinaryDescriptor
,
"BINARY.DESCRIPTOR"
,
);
CV_INIT_ALGORITHM
(
BinaryDescriptorMatcher
,
"BINARY.DESCRIPTOR.MATCHER"
,
);
...
...
@@ -59,3 +61,4 @@ bool initModule_line_descriptor( void )
}
}
}
modules/line_descriptor/src/precomp.hpp
View file @
e39065bf
...
...
@@ -66,6 +66,7 @@
#include <time.h>
#include <stdexcept>
#include <sstream>
#include <vector>
#include "opencv2/line_descriptor.hpp"
...
...
modules/line_descriptor/test/test_descriptors_regression.cpp
View file @
e39065bf
...
...
@@ -42,6 +42,7 @@
#include "test_precomp.hpp"
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
/****************************************************************************************\
* Regression tests for line detector comparing keylines. *
...
...
modules/line_descriptor/test/test_detector_regression.cpp
View file @
e39065bf
...
...
@@ -42,6 +42,7 @@
#include "test_precomp.hpp"
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
/****************************************************************************************\
* Regression tests for line detector comparing keylines. *
...
...
modules/line_descriptor/test/test_matcher_regression.cpp
View file @
e39065bf
...
...
@@ -42,6 +42,7 @@
#include "test_precomp.hpp"
using
namespace
cv
;
using
namespace
cv
::
line_descriptor
;
class
CV_BinaryDescriptorMatcherTest
:
public
cvtest
::
BaseTest
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment