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
8acc8aaf
Commit
8acc8aaf
authored
Jun 21, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
5b434d3c
fc979a85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
edgeboxes.hpp
modules/ximgproc/include/opencv2/ximgproc/edgeboxes.hpp
+2
-1
edgeboxes.cpp
modules/ximgproc/src/edgeboxes.cpp
+19
-3
No files found.
modules/ximgproc/include/opencv2/ximgproc/edgeboxes.hpp
View file @
8acc8aaf
...
...
@@ -74,8 +74,9 @@ public:
@param edge_map edge image.
@param orientation_map orientation map.
@param boxes proposal boxes.
@param scores of the proposal boxes, provided a vector of float types.
*/
CV_WRAP
virtual
void
getBoundingBoxes
(
InputArray
edge_map
,
InputArray
orientation_map
,
CV_OUT
std
::
vector
<
Rect
>
&
boxes
)
=
0
;
CV_WRAP
virtual
void
getBoundingBoxes
(
InputArray
edge_map
,
InputArray
orientation_map
,
CV_OUT
std
::
vector
<
Rect
>
&
boxes
,
OutputArray
scores
=
noArray
()
)
=
0
;
/** @brief Returns the step size of sliding window search.
*/
...
...
modules/ximgproc/src/edgeboxes.cpp
View file @
8acc8aaf
...
...
@@ -48,7 +48,6 @@ OpenCV port by: Leonardo Lontra <lhe dot lontra at gmail dot com>
*/
#include "precomp.hpp"
using
namespace
cv
;
using
namespace
std
;
...
...
@@ -79,7 +78,7 @@ public:
float
gamma
,
float
kappa
);
virtual
void
getBoundingBoxes
(
InputArray
edge_map
,
InputArray
orientation_map
,
std
::
vector
<
Rect
>
&
boxes
)
CV_OVERRIDE
;
virtual
void
getBoundingBoxes
(
InputArray
edge_map
,
InputArray
orientation_map
,
std
::
vector
<
Rect
>
&
boxes
,
OutputArray
scores
=
noArray
()
)
CV_OVERRIDE
;
float
getAlpha
()
const
CV_OVERRIDE
{
return
_alpha
;
}
void
setAlpha
(
float
value
)
CV_OVERRIDE
...
...
@@ -910,13 +909,14 @@ void EdgeBoxesImpl::boxesNms(Boxes &boxes, float thr, float eta, int maxBoxes)
}
void
EdgeBoxesImpl
::
getBoundingBoxes
(
InputArray
edge_map
,
InputArray
orientation_map
,
std
::
vector
<
Rect
>
&
boxes
)
void
EdgeBoxesImpl
::
getBoundingBoxes
(
InputArray
edge_map
,
InputArray
orientation_map
,
std
::
vector
<
Rect
>
&
boxes
,
OutputArray
scores
)
{
CV_Assert
(
edge_map
.
depth
()
==
CV_32F
);
CV_Assert
(
orientation_map
.
depth
()
==
CV_32F
);
Mat
E
=
edge_map
.
getMat
().
t
();
Mat
O
=
orientation_map
.
getMat
().
t
();
std
::
vector
<
float
>
_scores
;
h
=
E
.
cols
;
w
=
E
.
rows
;
...
...
@@ -931,9 +931,25 @@ void EdgeBoxesImpl::getBoundingBoxes(InputArray edge_map, InputArray orientation
// create output boxes
int
n
=
(
int
)
b
.
size
();
boxes
.
resize
(
n
);
if
(
scores
.
needed
())
{
_scores
.
resize
(
n
);
}
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
boxes
[
i
]
=
Rect
((
int
)
b
[
i
].
x
+
1
,
(
int
)
b
[
i
].
y
+
1
,
(
int
)
b
[
i
].
w
,
(
int
)
b
[
i
].
h
);
if
(
scores
.
needed
())
{
_scores
[
i
]
=
b
[
i
].
score
;
}
}
// return scores if asked for
if
(
scores
.
needed
())
{
Mat
(
_scores
).
copyTo
(
scores
);
}
}
...
...
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