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
7d7312a9
Commit
7d7312a9
authored
Oct 29, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
3e9ebc4b
94d1b9bc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
17 deletions
+33
-17
plane.cpp
modules/rgbd/src/plane.cpp
+2
-2
test_normal.cpp
modules/rgbd/test/test_normal.cpp
+11
-0
text_detectorCNN.cpp
modules/text/src/text_detectorCNN.cpp
+17
-14
sift.cpp
modules/xfeatures2d/src/sift.cpp
+3
-1
No files found.
modules/rgbd/src/plane.cpp
View file @
7d7312a9
...
@@ -555,8 +555,8 @@ private:
...
@@ -555,8 +555,8 @@ private:
plane
=
Ptr
<
PlaneBase
>
(
new
PlaneABC
(
plane_grid
.
m_
(
y
,
x
),
n
,
(
int
)
index_plane
,
plane
=
Ptr
<
PlaneBase
>
(
new
PlaneABC
(
plane_grid
.
m_
(
y
,
x
),
n
,
(
int
)
index_plane
,
(
float
)
sensor_error_a_
,
(
float
)
sensor_error_b_
,
(
float
)
sensor_error_c_
));
(
float
)
sensor_error_a_
,
(
float
)
sensor_error_b_
,
(
float
)
sensor_error_c_
));
Mat_
<
unsigned
char
>
plane_mask
=
Mat_
<
unsigned
char
>::
zeros
(
points3d
.
rows
/
block_size_
,
Mat_
<
unsigned
char
>
plane_mask
=
Mat_
<
unsigned
char
>::
zeros
(
divUp
(
points3d
.
rows
,
block_size_
)
,
points3d
.
cols
/
block_size_
);
divUp
(
points3d
.
cols
,
block_size_
)
);
std
::
set
<
TileQueue
::
PlaneTile
>
neighboring_tiles
;
std
::
set
<
TileQueue
::
PlaneTile
>
neighboring_tiles
;
neighboring_tiles
.
insert
(
front_tile
);
neighboring_tiles
.
insert
(
front_tile
);
plane_queue
.
remove
(
front_tile
.
y_
,
front_tile
.
x_
);
plane_queue
.
remove
(
front_tile
.
y_
,
front_tile
.
x_
);
...
...
modules/rgbd/test/test_normal.cpp
View file @
7d7312a9
...
@@ -441,4 +441,15 @@ TEST(Rgbd_Plane, compute)
...
@@ -441,4 +441,15 @@ TEST(Rgbd_Plane, compute)
test
.
safe_run
();
test
.
safe_run
();
}
}
TEST
(
Rgbd_Plane
,
regression_2309_valgrind_check
)
{
Mat
points
(
640
,
480
,
CV_32FC3
,
Scalar
::
all
(
0
));
rgbd
::
RgbdPlane
plane_detector
;
plane_detector
.
setBlockSize
(
9
);
// Note, 640%9 is 1 and 480%9 is 3
Mat
mask
;
std
::
vector
<
cv
::
Vec4f
>
planes
;
plane_detector
(
points
,
mask
,
planes
);
// Will corrupt memory; valgrind gets triggered
}
}}
// namespace
}}
// namespace
modules/text/src/text_detectorCNN.cpp
View file @
7d7312a9
...
@@ -29,26 +29,29 @@ protected:
...
@@ -29,26 +29,29 @@ protected:
{
{
for
(
int
k
=
0
;
k
<
nbrTextBoxes
;
k
++
)
for
(
int
k
=
0
;
k
<
nbrTextBoxes
;
k
++
)
{
{
float
x_min
=
buffer
[
k
*
nCol
+
3
]
*
inputShape
.
width
;
float
confidence_
=
buffer
[
k
*
nCol
+
2
]
;
float
y_min
=
buffer
[
k
*
nCol
+
4
]
*
inputShape
.
height
;
if
(
confidence_
<=
FLT_EPSILON
)
continue
;
float
x_m
ax
=
buffer
[
k
*
nCol
+
5
]
*
inputShape
.
width
;
float
x_m
in_f
=
buffer
[
k
*
nCol
+
3
]
*
inputShape
.
width
;
float
y_m
ax
=
buffer
[
k
*
nCol
+
6
]
*
inputShape
.
height
;
float
y_m
in_f
=
buffer
[
k
*
nCol
+
4
]
*
inputShape
.
height
;
CV_CheckLT
(
x_min
,
x_max
,
""
)
;
float
x_max_f
=
buffer
[
k
*
nCol
+
5
]
*
inputShape
.
width
;
CV_CheckLT
(
y_min
,
y_max
,
""
)
;
float
y_max_f
=
buffer
[
k
*
nCol
+
6
]
*
inputShape
.
height
;
x_min
=
std
::
max
(
0.
f
,
x_min
);
int
x_min
=
cvRound
(
std
::
max
(
0.
f
,
x_min_f
)
);
y_min
=
std
::
max
(
0.
f
,
y_min
);
int
y_min
=
cvRound
(
std
::
max
(
0.
f
,
y_min_f
)
);
x_max
=
std
::
min
(
inputShape
.
width
-
1.
f
,
x_max
);
int
x_max
=
std
::
min
(
inputShape
.
width
-
1
,
cvRound
(
x_max_f
)
);
y_max
=
std
::
min
(
inputShape
.
height
-
1.
f
,
y_max
);
int
y_max
=
std
::
min
(
inputShape
.
height
-
1
,
cvRound
(
y_max_f
)
);
i
nt
wd
=
cvRound
(
x_max
-
x_min
)
;
i
f
(
x_min
>=
x_max
)
continue
;
i
nt
ht
=
cvRound
(
y_max
-
y_min
)
;
i
f
(
y_min
>=
y_max
)
continue
;
Bbox
.
push_back
(
Rect
(
cvRound
(
x_min
),
cvRound
(
y_min
),
wd
,
ht
));
int
wd
=
x_max
-
x_min
;
confidence
.
push_back
(
buffer
[
k
*
nCol
+
2
]);
int
ht
=
y_max
-
y_min
;
Bbox
.
push_back
(
Rect
(
x_min
,
y_min
,
wd
,
ht
));
confidence
.
push_back
(
confidence_
);
}
}
}
}
...
...
modules/xfeatures2d/src/sift.cpp
View file @
7d7312a9
...
@@ -107,6 +107,8 @@
...
@@ -107,6 +107,8 @@
#include <stdarg.h>
#include <stdarg.h>
#include <opencv2/core/hal/hal.hpp>
#include <opencv2/core/hal/hal.hpp>
#include <opencv2/core/utils/tls.hpp>
namespace
cv
namespace
cv
{
{
namespace
xfeatures2d
namespace
xfeatures2d
...
@@ -709,7 +711,7 @@ void SIFT_Impl::findScaleSpaceExtrema( const std::vector<Mat>& gauss_pyr, const
...
@@ -709,7 +711,7 @@ void SIFT_Impl::findScaleSpaceExtrema( const std::vector<Mat>& gauss_pyr, const
const
int
threshold
=
cvFloor
(
0.5
*
contrastThreshold
/
nOctaveLayers
*
255
*
SIFT_FIXPT_SCALE
);
const
int
threshold
=
cvFloor
(
0.5
*
contrastThreshold
/
nOctaveLayers
*
255
*
SIFT_FIXPT_SCALE
);
keypoints
.
clear
();
keypoints
.
clear
();
TLSData
<
std
::
vector
<
KeyPoint
>
>
tls_kpts_struct
;
TLSData
Accumulator
<
std
::
vector
<
KeyPoint
>
>
tls_kpts_struct
;
for
(
int
o
=
0
;
o
<
nOctaves
;
o
++
)
for
(
int
o
=
0
;
o
<
nOctaves
;
o
++
)
for
(
int
i
=
1
;
i
<=
nOctaveLayers
;
i
++
)
for
(
int
i
=
1
;
i
<=
nOctaveLayers
;
i
++
)
...
...
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