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
9110ccb2
Commit
9110ccb2
authored
Oct 16, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
parents
3901fb76
f58493d0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
16 deletions
+24
-16
aruco.cpp
modules/aruco/src/aruco.cpp
+1
-1
charuco.cpp
modules/aruco/src/charuco.cpp
+1
-1
omnidir.cpp
modules/ccalib/src/omnidir.cpp
+1
-1
mace.cpp
modules/face/src/mace.cpp
+11
-3
TrackingFunctionPF.hpp
modules/tracking/src/TrackingFunctionPF.hpp
+1
-1
disparity_filters.cpp
modules/ximgproc/src/disparity_filters.cpp
+1
-1
grayworld_white_balance.cpp
modules/xphoto/src/grayworld_white_balance.cpp
+8
-8
No files found.
modules/aruco/src/aruco.cpp
View file @
9110ccb2
...
...
@@ -1767,7 +1767,7 @@ void drawMarker(const Ptr<Dictionary> &dictionary, int id, int sidePixels, Outpu
void
_drawPlanarBoardImpl
(
Board
*
_board
,
Size
outSize
,
OutputArray
_img
,
int
marginSize
,
int
borderBits
)
{
CV_Assert
(
outSize
.
area
()
>
0
);
CV_Assert
(
!
outSize
.
empty
()
);
CV_Assert
(
marginSize
>=
0
);
_img
.
create
(
outSize
,
CV_8UC1
);
...
...
modules/aruco/src/charuco.cpp
View file @
9110ccb2
...
...
@@ -53,7 +53,7 @@ using namespace std;
*/
void
CharucoBoard
::
draw
(
Size
outSize
,
OutputArray
_img
,
int
marginSize
,
int
borderBits
)
{
CV_Assert
(
outSize
.
area
()
>
0
);
CV_Assert
(
!
outSize
.
empty
()
);
CV_Assert
(
marginSize
>=
0
);
_img
.
create
(
outSize
,
CV_8UC1
);
...
...
modules/ccalib/src/omnidir.cpp
View file @
9110ccb2
...
...
@@ -532,7 +532,7 @@ void cv::omnidir::initUndistortRectifyMap(InputArray K, InputArray D, InputArray
void
cv
::
omnidir
::
undistortImage
(
InputArray
distorted
,
OutputArray
undistorted
,
InputArray
K
,
InputArray
D
,
InputArray
xi
,
int
flags
,
InputArray
Knew
,
const
Size
&
new_size
,
InputArray
R
)
{
Size
size
=
new_size
.
area
()
!=
0
?
new_size
:
distorted
.
size
()
;
Size
size
=
new_size
.
empty
()
?
distorted
.
size
()
:
new_size
;
cv
::
Mat
map1
,
map2
;
omnidir
::
initUndistortRectifyMap
(
K
,
D
,
xi
,
R
,
Knew
,
size
,
CV_16SC2
,
map1
,
map2
,
flags
);
...
...
modules/face/src/mace.cpp
View file @
9110ccb2
...
...
@@ -135,14 +135,22 @@ struct MACEImpl CV_FINAL : MACE {
}
}
Mat
sq
;
cv
::
sqrt
(
D
,
sq
);
Mat_
<
Vec2d
>
DINV
=
TOTALPIXEL
*
size
/
sq
;
#if 0 // https://github.com/opencv/opencv_contrib/issues/1848
// FIXIT What is expected here? complex numbers math?
// D(,)[1] is 0 (always)
Mat sq; cv::sqrt(D, sq); // Per-element sqrt(): sq(,)[1] is 0 (always)
Mat_<Vec2d> DINV = TOTALPIXEL * size / sq; // "per-element" division which provides "Inf"
#else
Mat
sq
;
cv
::
sqrt
(
D
.
reshape
(
1
).
col
(
0
),
sq
);
Mat_
<
Vec2d
>
DINV
(
TOTALPIXEL
,
1
,
Vec2d
(
0
,
0
));
DINV
.
reshape
(
1
).
col
(
0
)
=
TOTALPIXEL
*
size
/
sq
;
#endif
Mat_
<
Vec2d
>
DINV_S
(
TOTALPIXEL
,
size
,
0.0
);
Mat_
<
Vec2d
>
SPLUS_DINV
(
size
,
TOTALPIXEL
,
0.0
);
for
(
int
l
=
0
;
l
<
size
;
l
++
)
{
for
(
int
m
=
0
;
m
<
TOTALPIXEL
;
m
++
)
{
SPLUS_DINV
(
l
,
m
)[
0
]
=
SPLUS
(
l
,
m
)[
0
]
*
DINV
(
m
,
0
)[
0
];
SPLUS_DINV
(
l
,
m
)[
1
]
=
SPLUS
(
l
,
m
)[
1
]
*
DINV
(
m
,
0
)[
1
];
SPLUS_DINV
(
l
,
m
)[
1
]
=
SPLUS
(
l
,
m
)[
1
]
*
DINV
(
m
,
0
)[
1
];
// FIXIT: DINV(,)[1] is 0 (always)
DINV_S
(
m
,
l
)[
0
]
=
S
(
m
,
l
)[
0
]
*
DINV
(
m
,
0
)[
0
];
DINV_S
(
m
,
l
)[
1
]
=
S
(
m
,
l
)[
1
]
*
DINV
(
m
,
0
)[
1
];
}
...
...
modules/tracking/src/TrackingFunctionPF.hpp
View file @
9110ccb2
...
...
@@ -66,7 +66,7 @@ namespace cv{
}
double
TrackingFunctionPF
::
calc
(
const
double
*
x
)
const
{
Rect
rect
=
rectFromRow
(
x
);
if
(
rect
.
area
()
==
0
){
if
(
rect
.
empty
()
){
return
2.0
;
}
return
_origHist
.
dist
(
TrackingHistogram
(
_image
(
rect
),
_nh
,
_ns
,
_nv
));
...
...
modules/ximgproc/src/disparity_filters.cpp
View file @
9110ccb2
...
...
@@ -261,7 +261,7 @@ void DisparityWLSFilterImpl::filter_(InputArray disparity_map_left, InputArray l
resize_factor
=
disparity_map_left
.
cols
()
/
(
float
)
left_view
.
cols
();
else
resize_factor
=
1.0
;
if
(
ROI
.
area
()
!=
0
)
/* user provided a ROI */
if
(
!
ROI
.
empty
()
)
/* user provided a ROI */
valid_disp_ROI
=
ROI
;
else
valid_disp_ROI
=
Rect
(
left_offset
,
top_offset
,
...
...
modules/xphoto/src/grayworld_white_balance.cpp
View file @
9110ccb2
...
...
@@ -130,8 +130,8 @@ void calculateChannelSums(uint &sumB, uint &sumG, uint &sumR, uchar *src_data, i
v_expand
(
v_max_val
,
v_max1
,
v_max2
);
// Calculate masks
v_m1
=
~
(
(
v_max1
-
v_min1
)
*
v_255
>
v_thresh
*
v_max1
);
v_m2
=
~
(
(
v_max2
-
v_min2
)
*
v_255
>
v_thresh
*
v_max2
);
v_m1
=
~
(
v_mul_wrap
(
v_max1
-
v_min1
,
v_255
)
>
v_mul_wrap
(
v_thresh
,
v_max1
)
);
v_m2
=
~
(
v_mul_wrap
(
v_max2
-
v_min2
,
v_255
)
>
v_mul_wrap
(
v_thresh
,
v_max2
)
);
// Apply masks
v_iB1
=
(
v_iB1
&
v_m1
)
+
(
v_iB2
&
v_m2
);
...
...
@@ -282,12 +282,12 @@ void applyChannelGains(InputArray _src, OutputArray _dst, float gainB, float gai
v_expand
(
v_inR
,
v_sR1
,
v_sR2
);
// Multiply by gains
v_sB1
=
(
v_sB1
*
v_gainB
)
>>
8
;
v_sB2
=
(
v_sB2
*
v_gainB
)
>>
8
;
v_sG1
=
(
v_sG1
*
v_gainG
)
>>
8
;
v_sG2
=
(
v_sG2
*
v_gainG
)
>>
8
;
v_sR1
=
(
v_sR1
*
v_gainR
)
>>
8
;
v_sR2
=
(
v_sR2
*
v_gainR
)
>>
8
;
v_sB1
=
v_mul_wrap
(
v_sB1
,
v_gainB
)
>>
8
;
v_sB2
=
v_mul_wrap
(
v_sB2
,
v_gainB
)
>>
8
;
v_sG1
=
v_mul_wrap
(
v_sG1
,
v_gainG
)
>>
8
;
v_sG2
=
v_mul_wrap
(
v_sG2
,
v_gainG
)
>>
8
;
v_sR1
=
v_mul_wrap
(
v_sR1
,
v_gainR
)
>>
8
;
v_sR2
=
v_mul_wrap
(
v_sR2
,
v_gainR
)
>>
8
;
// Pack into vectors of v_uint8x16
v_store_interleave
(
&
dst_data
[
i
],
v_pack
(
v_sB1
,
v_sB2
),
v_pack
(
v_sG1
,
v_sG2
),
v_pack
(
v_sR1
,
v_sR2
));
...
...
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