Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
fa11b988
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fa11b988
编写于
9月 02, 2020
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18255 from alalek:backport_18243
上级
64c67a93
1f2c8384
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
42 addition
and
22 deletion
+42
-22
modules/calib3d/src/calibinit.cpp
modules/calib3d/src/calibinit.cpp
+5
-0
modules/calib3d/src/calibration.cpp
modules/calib3d/src/calibration.cpp
+10
-4
modules/dnn/src/layers/convolution_layer.cpp
modules/dnn/src/layers/convolution_layer.cpp
+3
-0
modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp
modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp
+1
-1
modules/flann/include/opencv2/flann/result_set.h
modules/flann/include/opencv2/flann/result_set.h
+4
-1
modules/flann/include/opencv2/flann/timer.h
modules/flann/include/opencv2/flann/timer.h
+1
-0
modules/highgui/src/window_w32.cpp
modules/highgui/src/window_w32.cpp
+16
-16
modules/objdetect/src/cascadedetect_convert.cpp
modules/objdetect/src/cascadedetect_convert.cpp
+2
-0
未找到文件。
modules/calib3d/src/calibinit.cpp
浏览文件 @
fa11b988
...
...
@@ -791,6 +791,7 @@ int ChessBoardDetector::orderFoundConnectedQuads(std::vector<ChessBoardQuad*>& q
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
CV_DbgAssert
(
q
);
ChessBoardQuad
*
neighbor
=
q
->
neighbors
[
i
];
switch
(
i
)
// adjust col, row for this quad
{
// start at top left, go clockwise
...
...
@@ -1271,6 +1272,7 @@ int ChessBoardDetector::cleanFoundConnectedQuads(std::vector<ChessBoardQuad*>& q
for
(
int
i
=
0
;
i
<
quad_count
;
++
i
)
{
ChessBoardQuad
*
q
=
quad_group
[
i
];
CV_DbgAssert
(
q
);
for
(
int
j
=
0
;
j
<
4
;
++
j
)
{
if
(
q
->
neighbors
[
j
]
==
q0
)
...
...
@@ -1328,6 +1330,7 @@ void ChessBoardDetector::findConnectedQuads(std::vector<ChessBoardQuad*>& out_gr
stack
.
pop
();
for
(
int
k
=
0
;
k
<
4
;
k
++
)
{
CV_DbgAssert
(
q
);
ChessBoardQuad
*
neighbor
=
q
->
neighbors
[
k
];
if
(
neighbor
&&
neighbor
->
count
>
0
&&
neighbor
->
group_idx
<
0
)
{
...
...
@@ -1716,6 +1719,7 @@ void ChessBoardDetector::findQuadNeighbors()
int
k
=
0
;
for
(;
k
<
4
;
k
++
)
{
CV_DbgAssert
(
q
);
if
(
!
q
->
neighbors
[
k
])
{
if
(
normL2Sqr
<
float
>
(
closest_corner
.
pt
-
q
->
corners
[
k
]
->
pt
)
<
min_dist
)
...
...
@@ -2090,6 +2094,7 @@ void drawChessboardCorners( InputOutputArray image, Size patternSize,
return
;
Mat
corners
=
_corners
.
getMat
();
const
Point2f
*
corners_data
=
corners
.
ptr
<
Point2f
>
(
0
);
CV_DbgAssert
(
corners_data
);
int
nelems
=
corners
.
checkVector
(
2
,
CV_32F
,
true
);
CV_Assert
(
nelems
>=
0
);
...
...
modules/calib3d/src/calibration.cpp
浏览文件 @
fa11b988
...
...
@@ -978,9 +978,9 @@ CV_IMPL void cvFindExtrinsicCameraParams2( const CvMat* objectPoints,
int
i
,
count
;
double
a
[
9
],
ar
[
9
]
=
{
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
},
R
[
9
];
double
MM
[
9
]
,
U
[
9
],
V
[
9
],
W
[
3
]
;
double
MM
[
9
]
=
{
0
},
U
[
9
]
=
{
0
},
V
[
9
]
=
{
0
},
W
[
3
]
=
{
0
}
;
cv
::
Scalar
Mc
;
double
param
[
6
];
double
param
[
6
]
=
{
0
}
;
CvMat
matA
=
cvMat
(
3
,
3
,
CV_64F
,
a
);
CvMat
_Ar
=
cvMat
(
3
,
3
,
CV_64F
,
ar
);
CvMat
matR
=
cvMat
(
3
,
3
,
CV_64F
,
R
);
...
...
@@ -1199,8 +1199,9 @@ CV_IMPL void cvInitIntrinsicParams2D( const CvMat* objectPoints,
CvMat
matH
=
cvMat
(
3
,
3
,
CV_64F
,
H
);
CvMat
_f
=
cvMat
(
2
,
1
,
CV_64F
,
f
);
assert
(
CV_MAT_TYPE
(
npoints
->
type
)
==
CV_32SC1
&&
CV_IS_MAT_CONT
(
npoints
->
type
)
);
CV_Assert
(
npoints
);
CV_Assert
(
CV_MAT_TYPE
(
npoints
->
type
)
==
CV_32SC1
);
CV_Assert
(
CV_IS_MAT_CONT
(
npoints
->
type
));
nimages
=
npoints
->
rows
+
npoints
->
cols
-
1
;
if
(
(
CV_MAT_TYPE
(
objectPoints
->
type
)
!=
CV_32FC3
&&
...
...
@@ -1221,6 +1222,9 @@ CV_IMPL void cvInitIntrinsicParams2D( const CvMat* objectPoints,
// extract vanishing points in order to obtain initial value for the focal length
for
(
i
=
0
,
pos
=
0
;
i
<
nimages
;
i
++
,
pos
+=
ni
)
{
CV_DbgAssert
(
npoints
->
data
.
i
);
CV_DbgAssert
(
matA
&&
matA
->
data
.
db
);
CV_DbgAssert
(
_b
&&
_b
->
data
.
db
);
double
*
Ap
=
matA
->
data
.
db
+
i
*
4
;
double
*
bp
=
_b
->
data
.
db
+
i
*
2
;
ni
=
npoints
->
data
.
i
[
i
];
...
...
@@ -1231,6 +1235,7 @@ CV_IMPL void cvInitIntrinsicParams2D( const CvMat* objectPoints,
cvGetCols
(
imagePoints
,
&
_m
,
pos
,
pos
+
ni
);
cvFindHomography
(
&
matM
,
&
_m
,
&
matH
);
CV_DbgAssert
(
_allH
&&
_allH
->
data
.
db
);
memcpy
(
_allH
->
data
.
db
+
i
*
9
,
H
,
sizeof
(
H
)
);
H
[
0
]
-=
H
[
6
]
*
a
[
2
];
H
[
1
]
-=
H
[
7
]
*
a
[
2
];
H
[
2
]
-=
H
[
8
]
*
a
[
2
];
...
...
@@ -3828,6 +3833,7 @@ static void adjust3rdMatrix(InputArrayOfArrays _imgpt1_0,
double
y1_
=
0
,
y2_
=
0
,
y1y1_
=
0
,
y1y2_
=
0
;
size_t
n
=
imgpt1
.
size
();
CV_DbgAssert
(
n
>
0
);
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
{
...
...
modules/dnn/src/layers/convolution_layer.cpp
浏览文件 @
fa11b988
...
...
@@ -546,6 +546,8 @@ public:
std
::
vector
<
size_t
>
dims
=
ieInpNode
->
get_shape
();
CV_Assert
(
dims
.
size
()
==
4
||
dims
.
size
()
==
5
);
std
::
shared_ptr
<
ngraph
::
Node
>
ieWeights
=
nodes
.
size
()
>
1
?
nodes
[
1
].
dynamicCast
<
InfEngineNgraphNode
>
()
->
node
:
nullptr
;
if
(
nodes
.
size
()
>
1
)
CV_Assert
(
ieWeights
);
// dynamic_cast should not fail
const
int
inpCn
=
dims
[
1
];
const
int
inpGroupCn
=
nodes
.
size
()
>
1
?
ieWeights
->
get_shape
()[
1
]
:
blobs
[
0
].
size
[
1
];
const
int
group
=
inpCn
/
inpGroupCn
;
...
...
@@ -653,6 +655,7 @@ public:
ParallelConv
()
:
input_
(
0
),
weights_
(
0
),
output_
(
0
),
ngroups_
(
0
),
nstripes_
(
0
),
biasvec_
(
0
),
reluslope_
(
0
),
activ_
(
0
),
is1x1_
(
false
),
useAVX
(
false
),
useAVX2
(
false
),
useAVX512
(
false
)
,
blk_size_cn
(
0
)
{}
static
void
run
(
const
Mat
&
input
,
Mat
&
output
,
const
Mat
&
weights
,
...
...
modules/dnn/src/ocl4dnn/include/ocl4dnn.hpp
浏览文件 @
fa11b988
...
...
@@ -433,7 +433,7 @@ class OCL4DNNInnerProduct
UMat
&
top_data
);
private:
OCL4DNNInnerProductConfig
config_
;
int32_t
axis_
;
//
int32_t axis_;
int32_t
num_output_
;
int32_t
M_
;
int32_t
N_
;
...
...
modules/flann/include/opencv2/flann/result_set.h
浏览文件 @
fa11b988
...
...
@@ -160,7 +160,8 @@ class KNNResultSet : public ResultSet<DistanceType>
DistanceType
worst_distance_
;
public:
KNNResultSet
(
int
capacity_
)
:
capacity
(
capacity_
),
count
(
0
)
KNNResultSet
(
int
capacity_
)
:
indices
(
NULL
),
dists
(
NULL
),
capacity
(
capacity_
),
count
(
0
),
worst_distance_
(
0
)
{
}
...
...
@@ -186,6 +187,8 @@ public:
void
addPoint
(
DistanceType
dist
,
int
index
)
CV_OVERRIDE
{
CV_DbgAssert
(
indices
);
CV_DbgAssert
(
dists
);
if
(
dist
>=
worst_distance_
)
return
;
int
i
;
for
(
i
=
count
;
i
>
0
;
--
i
)
{
...
...
modules/flann/include/opencv2/flann/timer.h
浏览文件 @
fa11b988
...
...
@@ -60,6 +60,7 @@ public:
* Constructor.
*/
StartStopTimer
()
:
startTime
(
0
)
{
reset
();
}
...
...
modules/highgui/src/window_w32.cpp
浏览文件 @
fa11b988
...
...
@@ -429,6 +429,7 @@ icvSaveWindowPos( const char* name, CvRect rect )
CvRect
cvGetWindowRect_W32
(
const
char
*
name
)
{
RECT
rect
=
{
0
};
CvRect
result
=
cvRect
(
-
1
,
-
1
,
-
1
,
-
1
);
CV_FUNCNAME
(
"cvGetWindowRect_W32"
);
...
...
@@ -443,7 +444,6 @@ CvRect cvGetWindowRect_W32(const char* name)
if
(
!
window
)
EXIT
;
// keep silence here
RECT
rect
;
GetClientRect
(
window
->
hwnd
,
&
rect
);
{
POINT
pt
=
{
rect
.
left
,
rect
.
top
};
...
...
@@ -513,7 +513,7 @@ void cvSetModeWindow_W32( const char* name, double prop_value)//Yannick Verdie
if
(
window
->
status
==
CV_WINDOW_NORMAL
&&
prop_value
==
CV_WINDOW_FULLSCREEN
)
{
//save dimension
RECT
rect
;
RECT
rect
=
{
0
}
;
GetWindowRect
(
window
->
frame
,
&
rect
);
CvRect
RectCV
=
cvRect
(
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
);
icvSaveWindowPos
(
window
->
name
,
RectCV
);
...
...
@@ -1106,7 +1106,7 @@ static void icvScreenToClient( HWND hwnd, RECT* rect )
static
RECT
icvCalcWindowRect
(
CvWindow
*
window
)
{
const
int
gutter
=
1
;
RECT
crect
,
trect
,
rect
;
RECT
crect
=
{
0
},
trect
=
{
0
}
,
rect
=
{
0
}
;
assert
(
window
);
...
...
@@ -1162,7 +1162,7 @@ static bool icvGetBitmapData( CvWindow* window, SIZE* size, int* channels, void*
static
void
icvUpdateWindowPos
(
CvWindow
*
window
)
{
RECT
rect
;
RECT
rect
=
{
0
}
;
assert
(
window
);
if
(
(
window
->
flags
&
CV_WINDOW_AUTOSIZE
)
&&
window
->
image
)
...
...
@@ -1175,7 +1175,7 @@ static void icvUpdateWindowPos( CvWindow* window )
// toolbar may resize too
for
(
i
=
0
;
i
<
(
window
->
toolbar
.
toolbar
?
2
:
1
);
i
++
)
{
RECT
rmw
,
rw
=
icvCalcWindowRect
(
window
);
RECT
rmw
=
{
0
}
,
rw
=
icvCalcWindowRect
(
window
);
MoveWindow
(
window
->
hwnd
,
rw
.
left
,
rw
.
top
,
rw
.
right
-
rw
.
left
,
rw
.
bottom
-
rw
.
top
,
FALSE
);
GetClientRect
(
window
->
hwnd
,
&
rw
);
...
...
@@ -1362,7 +1362,7 @@ CV_IMPL void cvResizeWindow(const char* name, int width, int height )
int
i
;
CvWindow
*
window
;
RECT
rmw
,
rw
,
rect
;
RECT
rmw
=
{
0
},
rw
=
{
0
},
rect
=
{
0
}
;
if
(
!
name
)
CV_ERROR
(
CV_StsNullPtr
,
"NULL name"
);
...
...
@@ -1401,7 +1401,7 @@ CV_IMPL void cvMoveWindow( const char* name, int x, int y )
__BEGIN__
;
CvWindow
*
window
;
RECT
rect
;
RECT
rect
=
{
0
}
;
if
(
!
name
)
CV_ERROR
(
CV_StsNullPtr
,
"NULL name"
);
...
...
@@ -1441,7 +1441,7 @@ MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
if
(
!
(
window
->
flags
&
CV_WINDOW_AUTOSIZE
)
)
{
MINMAXINFO
*
minmax
=
(
MINMAXINFO
*
)
lParam
;
RECT
rect
;
RECT
rect
=
{
0
}
;
LRESULT
retval
=
DefWindowProc
(
hwnd
,
uMsg
,
wParam
,
lParam
);
minmax
->
ptMinTrackSize
.
y
=
100
;
...
...
@@ -1464,7 +1464,7 @@ MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
// Update the toolbar pos/size
if
(
window
->
toolbar
.
toolbar
)
{
RECT
rect
;
RECT
rect
=
{
0
}
;
GetWindowRect
(
window
->
toolbar
.
toolbar
,
&
rect
);
MoveWindow
(
window
->
toolbar
.
toolbar
,
0
,
0
,
pos
->
cx
,
rect
.
bottom
-
rect
.
top
,
TRUE
);
}
...
...
@@ -1480,7 +1480,7 @@ MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
// Snap window to screen edges with multi-monitor support. // Adi Shavit
LPWINDOWPOS
pos
=
(
LPWINDOWPOS
)
lParam
;
RECT
rect
;
RECT
rect
=
{
0
}
;
GetWindowRect
(
window
->
frame
,
&
rect
);
HMONITOR
hMonitor
;
...
...
@@ -1531,7 +1531,7 @@ MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
pt
.
y
=
GET_Y_LPARAM
(
lParam
);
::
ScreenToClient
(
hwnd
,
&
pt
);
// Convert screen coordinates to client coordinates.
RECT
rect
;
RECT
rect
=
{
0
}
;
GetClientRect
(
window
->
hwnd
,
&
rect
);
SIZE
size
=
{
0
,
0
};
...
...
@@ -1558,7 +1558,7 @@ MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
case
WM_ERASEBKGND
:
{
RECT
cr
,
tr
,
wrc
;
RECT
cr
=
{
0
},
tr
=
{
0
},
wrc
=
{
0
}
;
HRGN
rgn
,
rgn1
,
rgn2
;
int
ret
;
HDC
hdc
=
(
HDC
)
wParam
;
...
...
@@ -1738,7 +1738,7 @@ static LRESULT CALLBACK HighGUIProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
window
->
on_mouse
(
event
,
pt
.
x
,
pt
.
y
,
flags
,
window
->
on_mouse_param
);
}
else
{
// Full window is displayed using different size. Scale coordinates to match underlying positions.
RECT
rect
;
RECT
rect
=
{
0
}
;
SIZE
size
=
{
0
,
0
};
GetClientRect
(
window
->
hwnd
,
&
rect
);
...
...
@@ -1798,7 +1798,7 @@ static LRESULT CALLBACK HighGUIProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
}
else
{
RECT
rect
;
RECT
rect
=
{
0
}
;
GetClientRect
(
window
->
hwnd
,
&
rect
);
StretchBlt
(
hdc
,
0
,
0
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
window
->
dc
,
0
,
0
,
size
.
cx
,
size
.
cy
,
SRCCOPY
);
...
...
@@ -1955,7 +1955,7 @@ static LRESULT CALLBACK HGToolbarProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPAR
for
(
;
trackbar
!=
0
;
trackbar
=
trackbar
->
next
)
{
RECT
rect
;
RECT
rect
=
{
0
}
;
SendMessage
(
window
->
toolbar
.
toolbar
,
TB_GETITEMRECT
,
(
WPARAM
)
trackbar
->
id
,
(
LPARAM
)
&
rect
);
MoveWindow
(
trackbar
->
hwnd
,
rect
.
left
+
HG_BUDDY_WIDTH
,
rect
.
top
,
...
...
@@ -2180,7 +2180,7 @@ icvCreateTrackbar( const char* trackbar_name, const char* window_name,
{
TBBUTTON
tbs
=
{};
TBBUTTONINFO
tbis
=
{};
RECT
rect
;
RECT
rect
=
{
0
}
;
int
bcount
;
int
len
=
(
int
)
strlen
(
trackbar_name
);
...
...
modules/objdetect/src/cascadedetect_convert.cpp
浏览文件 @
fa11b988
...
...
@@ -107,6 +107,8 @@ struct HaarClassifier
struct
HaarStageClassifier
{
HaarStageClassifier
()
:
threshold
(
0
)
{}
double
threshold
;
std
::
vector
<
HaarClassifier
>
weaks
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录