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
df38bca3
Commit
df38bca3
authored
Aug 01, 2014
by
biagio montesano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correction of some warnings
parent
8ee8a2d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
descriptor.hpp
...descriptor/include/opencv2/line_descriptor/descriptor.hpp
+1
-1
binary_descriptor.cpp
modules/line_descriptor/src/binary_descriptor.cpp
+7
-12
No files found.
modules/line_descriptor/include/opencv2/line_descriptor/descriptor.hpp
View file @
df38bca3
...
...
@@ -75,7 +75,7 @@ struct CV_EXPORTS KeyLine
/* coordinates of the middlepoint */
CV_PROP_RW
Point
pt
;
Point
2f
pt
;
/* the response, by which the strongest keylines have been selected.
It's represented by the ratio between line's length and maximum between
...
...
modules/line_descriptor/src/binary_descriptor.cpp
View file @
df38bca3
...
...
@@ -39,19 +39,14 @@
//
//M*/
#include "precomp.hpp"
#define NUM_OF_BANDS 9
//using namespace cv;
namespace
cv
{
/* combinations of internal indeces for binary descriptor extractor */
static
const
int
combinations
[
32
][
2
]
=
{
...
...
@@ -265,7 +260,7 @@ int BinaryDescriptor::descriptorSize() const
static
inline
int
get2Pow
(
int
i
)
{
if
(
i
>=
0
&&
i
<=
7
)
return
pow
(
2
,
i
);
return
pow
(
2
,
(
double
)
i
);
else
{
...
...
@@ -372,7 +367,7 @@ void BinaryDescriptor::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& ke
kl
.
octave
=
osl
.
octaveCount
;
kl
.
size
=
(
osl
.
endPointX
-
osl
.
startPointX
)
*
(
osl
.
endPointY
-
osl
.
startPointY
);
kl
.
response
=
osl
.
lineLength
/
max
(
images_sizes
[
osl
.
octaveCount
].
width
,
images_sizes
[
osl
.
octaveCount
].
height
);
kl
.
pt
=
Point
(
(
osl
.
endPointX
+
osl
.
startPointX
)
/
2
,
(
osl
.
endPointY
+
osl
.
startPointY
)
/
2
);
kl
.
pt
=
Point
2f
(
(
osl
.
endPointX
+
osl
.
startPointX
)
/
2
,
(
osl
.
endPointY
+
osl
.
startPointY
)
/
2
);
/* store KeyLine */
keylines
.
push_back
(
kl
);
...
...
@@ -386,7 +381,7 @@ void BinaryDescriptor::detectImpl( const Mat& imageSrc, std::vector<KeyLine>& ke
for
(
size_t
keyCounter
=
0
;
keyCounter
<
keylines
.
size
();
keyCounter
++
)
{
KeyLine
kl
=
keylines
[
keyCounter
];
if
(
mask
.
at
<
uchar
>
(
kl
.
startPointY
,
kl
.
startPointX
)
==
0
&&
mask
.
at
<
uchar
>
(
kl
.
endPointY
,
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
);
}
}
...
...
@@ -504,9 +499,9 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k
descriptors
=
cv
::
Mat
(
keylines
.
size
(),
NUM_OF_BANDS
*
8
,
CV_32FC1
);
/* fill output matrix with descriptors */
for
(
int
k
=
0
;
k
<
(
int
)
sl
.
size
();
k
++
)
for
(
int
k
=
0
;
k
<
(
int
)
sl
.
size
();
k
++
)
{
for
(
int
lineC
=
0
;
lineC
<
(
int
)
sl
[
k
].
size
();
lineC
++
)
for
(
int
lineC
=
0
;
lineC
<
(
int
)
sl
[
k
].
size
();
lineC
++
)
{
/* get original index of keypoint */
int
lineOctave
=
(
sl
[
k
][
lineC
]
).
octaveCount
;
...
...
@@ -530,14 +525,14 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k
else
{
std
::
cout
<<
"Descrittori float"
<<
std
::
endl
;
std
::
cout
<<
"Descrittori float"
<<
std
::
endl
;
/* get a pointer to correspondent row in output matrix */
float
*
pointerToRow
=
descriptors
.
ptr
<
float
>
(
originalIndex
);
/* get LBD data */
std
::
vector
<
float
>
desVec
=
sl
[
k
][
lineC
].
descriptor
;
for
(
int
count
=
0
;
count
<
(
int
)
desVec
.
size
();
count
++
)
for
(
int
count
=
0
;
count
<
(
int
)
desVec
.
size
();
count
++
)
{
*
pointerToRow
=
desVec
[
count
];
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