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
62c969dd
Commit
62c969dd
authored
Nov 16, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2349 from alalek:fix_contrib_2346
parents
10828884
ad8f0001
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
11 deletions
+21
-11
structured_edge_detection.cpp
modules/ximgproc/src/structured_edge_detection.cpp
+16
-6
test_edgeboxes.cpp
modules/ximgproc/test/test_edgeboxes.cpp
+1
-1
test_structured_edge_detection.cpp
modules/ximgproc/test/test_structured_edge_detection.cpp
+1
-1
test_thinning.cpp
modules/ximgproc/test/test_thinning.cpp
+2
-2
training.markdown
modules/ximgproc/tutorials/training.markdown
+1
-1
No files found.
modules/ximgproc/src/structured_edge_detection.cpp
View file @
62c969dd
...
...
@@ -37,16 +37,24 @@
//
//M*/
#include "precomp.hpp"
#include <vector>
#include <algorithm>
#include <iterator>
#include <iostream>
#include <cmath>
#include "precomp.hpp"
#include "advanced_types.hpp"
#ifdef CV_CXX11
#define CV_USE_PARALLEL_PREDICT_EDGES_1 1
#define CV_USE_PARALLEL_PREDICT_EDGES_2 0 //1, see https://github.com/opencv/opencv_contrib/issues/2346
#else
#define CV_USE_PARALLEL_PREDICT_EDGES_1 0
#define CV_USE_PARALLEL_PREDICT_EDGES_2 0
#endif
/********************* Helper functions *********************/
/*!
...
...
@@ -730,7 +738,7 @@ protected:
}
// lookup tables for mapping linear index to offset pairs
#if
def CV_CXX1
1
#if
CV_USE_PARALLEL_PREDICT_EDGES_
1
parallel_for_
(
cv
::
Range
(
0
,
height
),
[
&
](
const
cv
::
Range
&
range
)
#else
const
cv
::
Range
range
(
0
,
height
);
...
...
@@ -779,7 +787,7 @@ protected:
}
}
}
#if
def CV_CXX1
1
#if
CV_USE_PARALLEL_PREDICT_EDGES_
1
);
#endif
...
...
@@ -788,8 +796,10 @@ protected:
dstM
.
setTo
(
0
);
float
step
=
2.0
f
*
CV_SQR
(
stride
)
/
CV_SQR
(
ipSize
)
/
nTreesEval
;
#if
def CV_CXX11
#if
CV_USE_PARALLEL_PREDICT_EDGES_2
parallel_for_
(
cv
::
Range
(
0
,
height
),
[
&
](
const
cv
::
Range
&
range
)
#elif CV_USE_PARALLEL_PREDICT_EDGES_1
const
cv
::
Range
range
(
0
,
height
);
#endif
{
for
(
int
i
=
range
.
start
;
i
<
range
.
end
;
++
i
)
...
...
@@ -814,7 +824,7 @@ protected:
}
}
}
#if
def CV_CXX11
#if
CV_USE_PARALLEL_PREDICT_EDGES_2
);
#endif
...
...
modules/ximgproc/test/test_edgeboxes.cpp
View file @
62c969dd
...
...
@@ -5,7 +5,7 @@
namespace
opencv_test
{
namespace
{
TEST
(
xim
pg
roc_Edgeboxes
,
regression
)
TEST
(
xim
gp
roc_Edgeboxes
,
regression
)
{
//Testing Edgeboxes implementation by asking for one proposal
//on a simple test image from the PASCAL VOC 2012 dataset.
...
...
modules/ximgproc/test/test_structured_edge_detection.cpp
View file @
62c969dd
...
...
@@ -5,7 +5,7 @@
namespace
opencv_test
{
namespace
{
TEST
(
xim
pg
roc_StructuredEdgeDetection
,
regression
)
TEST
(
xim
gp
roc_StructuredEdgeDetection
,
regression
)
{
cv
::
String
subfolder
=
"cv/ximgproc/"
;
cv
::
String
dir
=
cvtest
::
TS
::
ptr
()
->
get_data_path
()
+
subfolder
;
...
...
modules/ximgproc/test/test_thinning.cpp
View file @
62c969dd
...
...
@@ -18,7 +18,7 @@ static int createTestImage(Mat& src)
return
src_pixels
;
}
TEST
(
xim
pg
roc_Thinning
,
simple_ZHANGSUEN
)
TEST
(
xim
gp
roc_Thinning
,
simple_ZHANGSUEN
)
{
Mat
src
;
int
src_pixels
=
createTestImage
(
src
);
...
...
@@ -33,7 +33,7 @@ TEST(ximpgroc_Thinning, simple_ZHANGSUEN)
#endif
}
TEST
(
xim
pg
roc_Thinning
,
simple_GUOHALL
)
TEST
(
xim
gp
roc_Thinning
,
simple_GUOHALL
)
{
Mat
src
;
int
src_pixels
=
createTestImage
(
src
);
...
...
modules/ximgproc/tutorials/training.markdown
View file @
62c969dd
...
...
@@ -103,7 +103,7 @@ Training pipeline
-# The final step is converting trained model from Matlab binary format to YAML which you can use
with our ocv::StructuredEdgeDetection. For this purpose run
opencv_contrib/xim
pg
roc/tutorials/scripts/modelConvert(model, "model.yml")
opencv_contrib/xim
gp
roc/tutorials/scripts/modelConvert(model, "model.yml")
How to use your model
---------------------
...
...
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