Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
8f15a8ab
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
8f15a8ab
编写于
1月 19, 2014
作者:
A
Anatoly Baksheev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
disabled Ubuntu workaround code for Windows
上级
0d12fb03
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
6 deletion
+18
-6
modules/viz/src/vizimpl.cpp
modules/viz/src/vizimpl.cpp
+15
-6
modules/viz/test/tests_simple.cpp
modules/viz/test/tests_simple.cpp
+3
-0
未找到文件。
modules/viz/src/vizimpl.cpp
浏览文件 @
8f15a8ab
...
...
@@ -57,6 +57,7 @@ cv::viz::Viz3d::VizImpl::VizImpl(const String &name) : spin_once_state_(false),
window_
=
vtkSmartPointer
<
vtkRenderWindow
>::
New
();
cv
::
Vec2i
window_size
=
cv
::
Vec2i
(
window_
->
GetScreenSize
())
/
2
;
window_
->
SetSize
(
window_size
.
val
);
window_
->
AddRenderer
(
renderer_
);
// Create the interactor style
style_
=
vtkSmartPointer
<
InteractorStyle
>::
New
();
...
...
@@ -107,6 +108,7 @@ void cv::viz::Viz3d::VizImpl::close()
void
cv
::
viz
::
Viz3d
::
VizImpl
::
recreateRenderWindow
()
{
#if !defined _MSC_VER
//recreating is workaround for Ubuntu -- a crash in x-server
Vec2i
window_size
(
window_
->
GetSize
());
int
fullscreen
=
window_
->
GetFullScreen
();
...
...
@@ -118,12 +120,7 @@ void cv::viz::Viz3d::VizImpl::recreateRenderWindow()
window_
->
SetSize
(
window_size
.
val
);
window_
->
SetFullScreen
(
fullscreen
);
window_
->
AddRenderer
(
renderer_
);
window_
->
AlphaBitPlanesOff
();
window_
->
PointSmoothingOff
();
window_
->
LineSmoothingOff
();
window_
->
PolygonSmoothingOff
();
window_
->
SwapBuffersOn
();
window_
->
SetStereoTypeToAnaglyph
();
#endif
}
...
...
@@ -134,6 +131,12 @@ void cv::viz::Viz3d::VizImpl::spin()
interactor_
=
vtkSmartPointer
<
vtkRenderWindowInteractor
>::
New
();
interactor_
->
SetRenderWindow
(
window_
);
interactor_
->
SetInteractorStyle
(
style_
);
window_
->
AlphaBitPlanesOff
();
window_
->
PointSmoothingOff
();
window_
->
LineSmoothingOff
();
window_
->
PolygonSmoothingOff
();
window_
->
SwapBuffersOn
();
window_
->
SetStereoTypeToAnaglyph
();
window_
->
Render
();
window_
->
SetWindowName
(
window_name_
.
c_str
());
interactor_
->
Start
();
...
...
@@ -152,6 +155,12 @@ void cv::viz::Viz3d::VizImpl::spinOnce(int time, bool force_redraw)
interactor_
->
SetInteractorStyle
(
style_
);
interactor_
->
AddObserver
(
vtkCommand
::
TimerEvent
,
timer_callback_
);
interactor_
->
AddObserver
(
vtkCommand
::
ExitEvent
,
exit_callback_
);
window_
->
AlphaBitPlanesOff
();
window_
->
PointSmoothingOff
();
window_
->
LineSmoothingOff
();
window_
->
PolygonSmoothingOff
();
window_
->
SwapBuffersOn
();
window_
->
SetStereoTypeToAnaglyph
();
window_
->
Render
();
window_
->
SetWindowName
(
window_name_
.
c_str
());
}
...
...
modules/viz/test/tests_simple.cpp
浏览文件 @
8f15a8ab
...
...
@@ -316,6 +316,8 @@ TEST(Viz, show_overlay_image)
viz
.
getWidget
(
"img1"
).
cast
<
WImageOverlay
>
().
setImage
(
lena
*
pow
(
sin
(
i
*
10
*
CV_PI
/
180
)
*
0.5
+
0.5
,
1.0
));
viz
.
spinOnce
(
1
,
true
);
}
viz
.
showWidget
(
"text2d"
,
WText
(
"Overlay images (stopped)"
,
Point
(
20
,
20
),
20
,
Color
::
green
()));
viz
.
spin
();
}
...
...
@@ -356,6 +358,7 @@ TEST(Viz, show_image_3d)
viz
.
getWidget
(
"img0"
).
cast
<
WImage3D
>
().
setImage
(
lena
*
pow
(
sin
(
i
++*
7.5
*
CV_PI
/
180
)
*
0.5
+
0.5
,
1.0
));
viz
.
spinOnce
(
1
,
true
);
}
viz
.
showWidget
(
"text2d"
,
WText
(
"Images in 3D (stopped)"
,
Point
(
20
,
20
),
20
,
Color
::
green
()));
viz
.
spin
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录