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
12036fd6
Commit
12036fd6
authored
Jul 29, 2014
by
biagio montesano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error on Mac corrected
parent
43f3eb9f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
bitops.hpp
...ine_descriptor/include/opencv2/line_descriptor/bitops.hpp
+0
-1
descriptor.hpp
...descriptor/include/opencv2/line_descriptor/descriptor.hpp
+1
-0
knn_matching.cpp
modules/line_descriptor/samples/knn_matching.cpp
+2
-0
binary_descriptor.cpp
modules/line_descriptor/src/binary_descriptor.cpp
+8
-8
No files found.
modules/line_descriptor/include/opencv2/line_descriptor/bitops.hpp
View file @
12036fd6
...
...
@@ -46,7 +46,6 @@
#define popcntll __builtin_popcountll
#define popcnt __builtin_popcount
#include "precomp.hpp"
/* LUT */
const
int
lookup
[]
=
...
...
modules/line_descriptor/include/opencv2/line_descriptor/descriptor.hpp
View file @
12036fd6
...
...
@@ -51,6 +51,7 @@
#include "sparse_hashtable.hpp"
#include "types.hpp"
#include "ed_line_detector.hpp"
#include <map>
namespace
cv
{
...
...
modules/line_descriptor/samples/knn_matching.cpp
View file @
12036fd6
...
...
@@ -63,6 +63,8 @@ static void help()
}
uchar
invertSingleBits
(
uchar
dividend_char
,
int
numBits
);
/* invert numBits bits in input char */
uchar
invertSingleBits
(
uchar
dividend_char
,
int
numBits
)
{
...
...
modules/line_descriptor/src/binary_descriptor.cpp
View file @
12036fd6
...
...
@@ -158,7 +158,7 @@ BinaryDescriptor::BinaryDescriptor( const BinaryDescriptor::Params ¶meters )
edLineVec_
.
resize
(
params
.
numOfOctave_
);
images_sizes
.
resize
(
params
.
numOfOctave_
);
for
(
unsigned
int
i
=
0
;
i
<
params
.
numOfOctave_
;
i
++
)
for
(
int
i
=
0
;
i
<
params
.
numOfOctave_
;
i
++
)
edLineVec_
[
i
]
=
new
EDLineDetector
;
/* prepare a vector to host local weights F_l*/
...
...
@@ -888,7 +888,7 @@ int BinaryDescriptor::computeLBD( ScaleLines &keyLines )
float
*
dL
=
new
float
[
2
];
//line direction cos(dir), sin(dir)
float
*
dO
=
new
float
[
2
];
//the clockwise orthogonal vector of line direction.
short
heightOfLSP
=
params
.
widthOfBand_
*
NUM_OF_BANDS
;
//the height of line support region;
short
descriptor
S
ize
=
NUM_OF_BANDS
*
8
;
//each band, we compute the m( pgdL, ngdL, pgdO, ngdO) and std( pgdL, ngdL, pgdO, ngdO);
short
descriptor
_s
ize
=
NUM_OF_BANDS
*
8
;
//each band, we compute the m( pgdL, ngdL, pgdO, ngdO) and std( pgdL, ngdL, pgdO, ngdO);
float
pgdLRowSum
;
//the summation of {g_dL |g_dL>0 } for each row of the region;
float
ngdLRowSum
;
//the summation of {g_dL |g_dL<0 } for each row of the region;
float
pgdL2RowSum
;
//the summation of {g_dL^2 |g_dL>0 } for each row of the region;
...
...
@@ -1086,7 +1086,7 @@ int BinaryDescriptor::computeLBD( ScaleLines &keyLines )
return 0; */
/* construct line descriptor */
pSingleLine
->
descriptor
.
resize
(
descriptor
S
ize
);
pSingleLine
->
descriptor
.
resize
(
descriptor
_s
ize
);
desVec
=
pSingleLine
->
descriptor
.
data
();
short
desID
;
...
...
@@ -1162,7 +1162,7 @@ int BinaryDescriptor::computeLBD( ScaleLines &keyLines )
* vector no larger than this threshold. In Z.Wang's work, a value of 0.4 is found
* empirically to be a proper threshold.*/
desVec
=
pSingleLine
->
descriptor
.
data
();
for
(
short
i
=
0
;
i
<
descriptor
S
ize
;
i
++
)
for
(
short
i
=
0
;
i
<
descriptor
_s
ize
;
i
++
)
{
if
(
desVec
[
i
]
>
0.4
)
{
...
...
@@ -1172,13 +1172,13 @@ int BinaryDescriptor::computeLBD( ScaleLines &keyLines )
//re-normalize desVec;
temp
=
0
;
for
(
short
i
=
0
;
i
<
descriptor
S
ize
;
i
++
)
for
(
short
i
=
0
;
i
<
descriptor
_s
ize
;
i
++
)
{
temp
+=
desVec
[
i
]
*
desVec
[
i
];
}
temp
=
1
/
sqrt
(
temp
);
for
(
short
i
=
0
;
i
<
descriptor
S
ize
;
i
++
)
for
(
short
i
=
0
;
i
<
descriptor
_s
ize
;
i
++
)
{
desVec
[
i
]
=
desVec
[
i
]
*
temp
;
}
...
...
@@ -1190,8 +1190,8 @@ int BinaryDescriptor::computeLBD( ScaleLines &keyLines )
for
(
int
g
=
0
;
g
<
32
;
g
++
)
{
/* get LBD data */
float
*
desVec
=
keyLines
[
lineIDInScaleVec
][
0
].
descriptor
.
data
();
*
pointerToRow
=
desVec
[
g
];
float
*
des
_
Vec
=
keyLines
[
lineIDInScaleVec
][
0
].
descriptor
.
data
();
*
pointerToRow
=
des
_
Vec
[
g
];
pointerToRow
++
;
}
...
...
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