Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
5e80bd3c
O
Opencv
项目概览
Greenplum
/
Opencv
9 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
5e80bd3c
编写于
6月 30, 2021
作者:
A
APrigarina
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix samples 3.4
上级
828304d5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
9 addition
and
9 deletion
+9
-9
samples/python/camera_calibration_show_extrinsics.py
samples/python/camera_calibration_show_extrinsics.py
+1
-1
samples/python/gaussian_mix.py
samples/python/gaussian_mix.py
+1
-1
samples/python/hist.py
samples/python/hist.py
+1
-1
samples/python/lk_homography.py
samples/python/lk_homography.py
+3
-3
samples/python/lk_track.py
samples/python/lk_track.py
+1
-1
samples/python/video_v4l2.py
samples/python/video_v4l2.py
+2
-2
未找到文件。
samples/python/camera_calibration_show_extrinsics.py
浏览文件 @
5e80bd3c
...
...
@@ -188,7 +188,7 @@ def main():
fig
=
plt
.
figure
()
ax
=
fig
.
gca
(
projection
=
'3d'
)
ax
.
set_aspect
(
"
equal
"
)
ax
.
set_aspect
(
"
auto
"
)
cam_width
=
args
.
cam_width
cam_height
=
args
.
cam_height
...
...
samples/python/gaussian_mix.py
浏览文件 @
5e80bd3c
...
...
@@ -32,7 +32,7 @@ def draw_gaussain(img, mean, cov, color):
w
,
u
,
_vt
=
cv
.
SVDecomp
(
cov
)
ang
=
np
.
arctan2
(
u
[
1
,
0
],
u
[
0
,
0
])
*
(
180
/
np
.
pi
)
s1
,
s2
=
np
.
sqrt
(
w
)
*
3.0
cv
.
ellipse
(
img
,
(
x
,
y
),
(
s1
,
s2
),
ang
,
0
,
360
,
color
,
1
,
cv
.
LINE_AA
)
cv
.
ellipse
(
img
,
(
int
(
x
),
int
(
y
)),
(
int
(
s1
),
int
(
s2
)
),
ang
,
0
,
360
,
color
,
1
,
cv
.
LINE_AA
)
def
main
():
...
...
samples/python/hist.py
浏览文件 @
5e80bd3c
...
...
@@ -48,7 +48,7 @@ def hist_lines(im):
cv
.
normalize
(
hist_item
,
hist_item
,
0
,
255
,
cv
.
NORM_MINMAX
)
hist
=
np
.
int32
(
np
.
around
(
hist_item
))
for
x
,
y
in
enumerate
(
hist
):
cv
.
line
(
h
,(
x
,
0
),(
x
,
y
),(
255
,
255
,
255
))
cv
.
line
(
h
,(
x
,
0
),(
x
,
y
[
0
]
),(
255
,
255
,
255
))
y
=
np
.
flipud
(
h
)
return
y
...
...
samples/python/lk_homography.py
浏览文件 @
5e80bd3c
...
...
@@ -77,8 +77,8 @@ class App:
for
(
x0
,
y0
),
(
x1
,
y1
),
good
in
zip
(
self
.
p0
[:,
0
],
self
.
p1
[:,
0
],
status
[:,
0
]):
if
good
:
cv
.
line
(
vis
,
(
x0
,
y0
),
(
x1
,
y1
),
(
0
,
128
,
0
))
cv
.
circle
(
vis
,
(
x1
,
y1
),
2
,
(
red
,
green
)[
good
],
-
1
)
cv
.
line
(
vis
,
(
int
(
x0
),
int
(
y0
)),
(
int
(
x1
),
int
(
y1
)
),
(
0
,
128
,
0
))
cv
.
circle
(
vis
,
(
int
(
x1
),
int
(
y1
)
),
2
,
(
red
,
green
)[
good
],
-
1
)
draw_str
(
vis
,
(
20
,
20
),
'track count: %d'
%
len
(
self
.
p1
))
if
self
.
use_ransac
:
draw_str
(
vis
,
(
20
,
40
),
'RANSAC'
)
...
...
@@ -86,7 +86,7 @@ class App:
p
=
cv
.
goodFeaturesToTrack
(
frame_gray
,
**
feature_params
)
if
p
is
not
None
:
for
x
,
y
in
p
[:,
0
]:
cv
.
circle
(
vis
,
(
x
,
y
),
2
,
green
,
-
1
)
cv
.
circle
(
vis
,
(
int
(
x
),
int
(
y
)
),
2
,
green
,
-
1
)
draw_str
(
vis
,
(
20
,
20
),
'feature count: %d'
%
len
(
p
))
cv
.
imshow
(
'lk_homography'
,
vis
)
...
...
samples/python/lk_track.py
浏览文件 @
5e80bd3c
...
...
@@ -65,7 +65,7 @@ class App:
if
len
(
tr
)
>
self
.
track_len
:
del
tr
[
0
]
new_tracks
.
append
(
tr
)
cv
.
circle
(
vis
,
(
x
,
y
),
2
,
(
0
,
255
,
0
),
-
1
)
cv
.
circle
(
vis
,
(
int
(
x
),
int
(
y
)
),
2
,
(
0
,
255
,
0
),
-
1
)
self
.
tracks
=
new_tracks
cv
.
polylines
(
vis
,
[
np
.
int32
(
tr
)
for
tr
in
self
.
tracks
],
False
,
(
0
,
255
,
0
))
draw_str
(
vis
,
(
20
,
20
),
'track count: %d'
%
len
(
self
.
tracks
))
...
...
samples/python/video_v4l2.py
浏览文件 @
5e80bd3c
...
...
@@ -30,7 +30,7 @@ def main():
color
=
(
0
,
255
,
0
)
cap
=
cv
.
VideoCapture
(
0
)
cap
.
set
(
cv
.
CAP_PROP_AUTOFOCUS
,
False
)
# Known bug: https://github.com/opencv/opencv/pull/5474
cap
.
set
(
cv
.
CAP_PROP_AUTOFOCUS
,
0
)
# Known bug: https://github.com/opencv/opencv/pull/5474
cv
.
namedWindow
(
"Video"
)
...
...
@@ -67,7 +67,7 @@ def main():
break
elif
k
==
ord
(
'g'
):
convert_rgb
=
not
convert_rgb
cap
.
set
(
cv
.
CAP_PROP_CONVERT_RGB
,
convert_rgb
)
cap
.
set
(
cv
.
CAP_PROP_CONVERT_RGB
,
1
if
convert_rgb
else
0
)
print
(
'Done'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录