Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
d8600d3d
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
d8600d3d
编写于
11月 16, 2013
作者:
A
Anatoly Baksheev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed all Viz warnings
moved some headers to precomp.hpp
上级
5c624800
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
31 addition
and
27 deletion
+31
-27
modules/highgui/src/cap_openni.cpp
modules/highgui/src/cap_openni.cpp
+3
-1
modules/viz/src/interactor_style.cpp
modules/viz/src/interactor_style.cpp
+20
-15
modules/viz/src/interactor_style.h
modules/viz/src/interactor_style.h
+4
-2
modules/viz/src/precomp.hpp
modules/viz/src/precomp.hpp
+3
-3
modules/viz/src/viz3d.cpp
modules/viz/src/viz3d.cpp
+1
-2
modules/viz/src/viz3d_impl.cpp
modules/viz/src/viz3d_impl.cpp
+0
-1
modules/viz/src/viz3d_impl.hpp
modules/viz/src/viz3d_impl.hpp
+0
-3
未找到文件。
modules/highgui/src/cap_openni.cpp
浏览文件 @
d8600d3d
...
...
@@ -105,7 +105,9 @@ public:
context
(
_context
),
depthGenerator
(
_depthGenerator
),
imageGenerator
(
_imageGenerator
),
maxBufferSize
(
_maxBufferSize
),
isCircleBuffer
(
_isCircleBuffer
),
maxTimeDuration
(
_maxTimeDuration
)
{
#ifdef HAVE_TBB
task
=
0
;
#endif
CV_Assert
(
depthGenerator
.
IsValid
()
);
CV_Assert
(
imageGenerator
.
IsValid
()
);
...
...
@@ -150,7 +152,7 @@ public:
task
=
new
(
tbb
::
task
::
allocate_root
()
)
TBBApproximateSynchronizerTask
(
*
this
);
tbb
::
task
::
enqueue
(
*
task
);
#else
task
=
new
ApproximateSynchronizer
(
*
this
);
task
->
reset
(
new
ApproximateSynchronizer
(
*
this
)
);
#endif
}
...
...
modules/viz/src/interactor_style.cpp
浏览文件 @
d8600d3d
...
...
@@ -47,7 +47,7 @@
//M*/
#include "precomp.hpp"
#include "interactor_style.h"
using
namespace
cv
;
...
...
@@ -193,6 +193,11 @@ void cv::viz::InteractorStyle::registerKeyboardCallback(void (*callback)(const K
keyboard_callback_cookie_
=
cookie
;
}
//////////////////////////////////////////////////////////////////////////////////////////////
bool
cv
::
viz
::
InteractorStyle
::
getAltKey
()
{
return
Interactor
->
GetAltKey
()
!=
0
;
}
bool
cv
::
viz
::
InteractorStyle
::
getShiftKey
()
{
return
Interactor
->
GetShiftKey
()
!=
0
;
}
bool
cv
::
viz
::
InteractorStyle
::
getControlKey
()
{
return
Interactor
->
GetControlKey
()
!=
0
;
}
//////////////////////////////////////////////////////////////////////////////////////////////
void
cv
::
viz
::
InteractorStyle
::
OnKeyDown
()
...
...
@@ -216,9 +221,9 @@ cv::viz::InteractorStyle::OnKeyDown()
// Get the status of special keys (Cltr+Alt+Shift)
bool
shift
=
Interactor
->
G
etShiftKey
();
bool
ctrl
=
Interactor
->
G
etControlKey
();
bool
alt
=
Interactor
->
G
etAltKey
();
bool
shift
=
g
etShiftKey
();
bool
ctrl
=
g
etControlKey
();
bool
alt
=
g
etAltKey
();
bool
keymod
=
false
;
switch
(
modifier_
)
...
...
@@ -538,7 +543,7 @@ cv::viz::InteractorStyle::OnKeyDown()
}
}
KeyboardEvent
event
(
true
,
Interactor
->
GetKeySym
(),
Interactor
->
GetKeyCode
(),
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
KeyboardEvent
event
(
true
,
Interactor
->
GetKeySym
(),
Interactor
->
GetKeyCode
(),
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
// Check if there is a keyboard callback registered
if
(
keyboardCallback_
)
keyboardCallback_
(
event
,
keyboard_callback_cookie_
);
...
...
@@ -550,7 +555,7 @@ cv::viz::InteractorStyle::OnKeyDown()
//////////////////////////////////////////////////////////////////////////////////////////////
void
cv
::
viz
::
InteractorStyle
::
OnKeyUp
()
{
KeyboardEvent
event
(
false
,
Interactor
->
GetKeySym
(),
Interactor
->
GetKeyCode
(),
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
KeyboardEvent
event
(
false
,
Interactor
->
GetKeySym
(),
Interactor
->
GetKeyCode
(),
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
// Check if there is a keyboard callback registered
if
(
keyboardCallback_
)
keyboardCallback_
(
event
,
keyboard_callback_cookie_
);
...
...
@@ -562,7 +567,7 @@ void cv::viz::InteractorStyle::OnKeyUp()
void
cv
::
viz
::
InteractorStyle
::
OnMouseMove
()
{
Vec2i
p
(
Interactor
->
GetEventPosition
());
MouseEvent
event
(
MouseEvent
::
MouseMove
,
MouseEvent
::
NoButton
,
p
,
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
MouseEvent
event
(
MouseEvent
::
MouseMove
,
MouseEvent
::
NoButton
,
p
,
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
if
(
mouseCallback_
)
mouseCallback_
(
event
,
mouse_callback_cookie_
);
Superclass
::
OnMouseMove
();
...
...
@@ -573,7 +578,7 @@ void cv::viz::InteractorStyle::OnLeftButtonDown()
{
Vec2i
p
(
Interactor
->
GetEventPosition
());
MouseEvent
::
Type
type
=
(
Interactor
->
GetRepeatCount
()
==
0
)
?
MouseEvent
::
MouseButtonPress
:
MouseEvent
::
MouseDblClick
;
MouseEvent
event
(
type
,
MouseEvent
::
LeftButton
,
p
,
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
MouseEvent
event
(
type
,
MouseEvent
::
LeftButton
,
p
,
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
if
(
mouseCallback_
)
mouseCallback_
(
event
,
mouse_callback_cookie_
);
Superclass
::
OnLeftButtonDown
();
...
...
@@ -583,7 +588,7 @@ void cv::viz::InteractorStyle::OnLeftButtonDown()
void
cv
::
viz
::
InteractorStyle
::
OnLeftButtonUp
()
{
Vec2i
p
(
Interactor
->
GetEventPosition
());
MouseEvent
event
(
MouseEvent
::
MouseButtonRelease
,
MouseEvent
::
LeftButton
,
p
,
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
MouseEvent
event
(
MouseEvent
::
MouseButtonRelease
,
MouseEvent
::
LeftButton
,
p
,
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
if
(
mouseCallback_
)
mouseCallback_
(
event
,
mouse_callback_cookie_
);
Superclass
::
OnLeftButtonUp
();
...
...
@@ -595,7 +600,7 @@ void cv::viz::InteractorStyle::OnMiddleButtonDown()
Vec2i
p
(
Interactor
->
GetEventPosition
());
MouseEvent
::
Type
type
=
(
Interactor
->
GetRepeatCount
()
==
0
)
?
MouseEvent
::
MouseButtonPress
:
MouseEvent
::
MouseDblClick
;
MouseEvent
event
(
type
,
MouseEvent
::
MiddleButton
,
p
,
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
MouseEvent
event
(
type
,
MouseEvent
::
MiddleButton
,
p
,
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
if
(
mouseCallback_
)
mouseCallback_
(
event
,
mouse_callback_cookie_
);
Superclass
::
OnMiddleButtonDown
();
...
...
@@ -605,7 +610,7 @@ void cv::viz::InteractorStyle::OnMiddleButtonDown()
void
cv
::
viz
::
InteractorStyle
::
OnMiddleButtonUp
()
{
Vec2i
p
(
Interactor
->
GetEventPosition
());
MouseEvent
event
(
MouseEvent
::
MouseButtonRelease
,
MouseEvent
::
MiddleButton
,
p
,
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
MouseEvent
event
(
MouseEvent
::
MouseButtonRelease
,
MouseEvent
::
MiddleButton
,
p
,
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
if
(
mouseCallback_
)
mouseCallback_
(
event
,
mouse_callback_cookie_
);
Superclass
::
OnMiddleButtonUp
();
...
...
@@ -617,7 +622,7 @@ void cv::viz::InteractorStyle::OnRightButtonDown()
Vec2i
p
(
Interactor
->
GetEventPosition
());
MouseEvent
::
Type
type
=
(
Interactor
->
GetRepeatCount
()
==
0
)
?
MouseEvent
::
MouseButtonPress
:
MouseEvent
::
MouseDblClick
;
MouseEvent
event
(
type
,
MouseEvent
::
RightButton
,
p
,
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
MouseEvent
event
(
type
,
MouseEvent
::
RightButton
,
p
,
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
if
(
mouseCallback_
)
mouseCallback_
(
event
,
mouse_callback_cookie_
);
Superclass
::
OnRightButtonDown
();
...
...
@@ -627,7 +632,7 @@ void cv::viz::InteractorStyle::OnRightButtonDown()
void
cv
::
viz
::
InteractorStyle
::
OnRightButtonUp
()
{
Vec2i
p
(
Interactor
->
GetEventPosition
());
MouseEvent
event
(
MouseEvent
::
MouseButtonRelease
,
MouseEvent
::
RightButton
,
p
,
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
MouseEvent
event
(
MouseEvent
::
MouseButtonRelease
,
MouseEvent
::
RightButton
,
p
,
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
if
(
mouseCallback_
)
mouseCallback_
(
event
,
mouse_callback_cookie_
);
Superclass
::
OnRightButtonUp
();
...
...
@@ -637,7 +642,7 @@ void cv::viz::InteractorStyle::OnRightButtonUp()
void
cv
::
viz
::
InteractorStyle
::
OnMouseWheelForward
()
{
Vec2i
p
(
Interactor
->
GetEventPosition
());
MouseEvent
event
(
MouseEvent
::
MouseScrollUp
,
MouseEvent
::
VScroll
,
p
,
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
MouseEvent
event
(
MouseEvent
::
MouseScrollUp
,
MouseEvent
::
VScroll
,
p
,
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
// If a mouse callback registered, call it!
if
(
mouseCallback_
)
mouseCallback_
(
event
,
mouse_callback_cookie_
);
...
...
@@ -669,7 +674,7 @@ void cv::viz::InteractorStyle::OnMouseWheelForward()
void
cv
::
viz
::
InteractorStyle
::
OnMouseWheelBackward
()
{
Vec2i
p
(
Interactor
->
GetEventPosition
());
MouseEvent
event
(
MouseEvent
::
MouseScrollDown
,
MouseEvent
::
VScroll
,
p
,
Interactor
->
GetAltKey
(),
Interactor
->
GetControlKey
(),
Interactor
->
G
etShiftKey
());
MouseEvent
event
(
MouseEvent
::
MouseScrollDown
,
MouseEvent
::
VScroll
,
p
,
getAltKey
(),
getControlKey
(),
g
etShiftKey
());
// If a mouse callback registered, call it!
if
(
mouseCallback_
)
mouseCallback_
(
event
,
mouse_callback_cookie_
);
...
...
modules/viz/src/interactor_style.h
浏览文件 @
d8600d3d
...
...
@@ -49,8 +49,6 @@
#ifndef __OPENCV_VIZ_INTERACTOR_STYLE_H__
#define __OPENCV_VIZ_INTERACTOR_STYLE_H__
#include "precomp.hpp"
namespace
cv
{
namespace
viz
...
...
@@ -145,6 +143,10 @@ namespace cv
void
(
*
mouseCallback_
)(
const
MouseEvent
&
,
void
*
);
void
*
mouse_callback_cookie_
;
bool
getAltKey
();
bool
getControlKey
();
bool
getShiftKey
();
};
}
}
...
...
modules/viz/src/precomp.hpp
浏览文件 @
d8600d3d
...
...
@@ -126,6 +126,8 @@
#endif
#include <opencv2/core.hpp>
#include <opencv2/viz.hpp>
#include <opencv2/viz/widget_accessor.hpp>
namespace
cv
{
...
...
@@ -135,6 +137,7 @@ namespace cv
}
}
#include "interactor_style.h"
#include "viz3d_impl.hpp"
namespace
cv
...
...
@@ -146,8 +149,5 @@ namespace cv
}
}
#include <opencv2/viz.hpp>
#include <opencv2/viz/types.hpp>
#include "opencv2/viz/widget_accessor.hpp"
#endif
modules/viz/src/viz3d.cpp
浏览文件 @
d8600d3d
...
...
@@ -46,8 +46,7 @@
//
//M*/
#include <opencv2/viz/viz3d.hpp>
#include "viz3d_impl.hpp"
#include "precomp.hpp"
cv
::
viz
::
Viz3d
::
Viz3d
(
const
String
&
window_name
)
:
impl_
(
0
)
{
create
(
window_name
);
}
...
...
modules/viz/src/viz3d_impl.cpp
浏览文件 @
d8600d3d
...
...
@@ -47,7 +47,6 @@
//M*/
#include "precomp.hpp"
#include "viz3d_impl.hpp"
#include "opencv2/core/utility.hpp"
#include <vtkRenderWindowInteractor.h>
...
...
modules/viz/src/viz3d_impl.hpp
浏览文件 @
d8600d3d
...
...
@@ -49,9 +49,6 @@
#ifndef __OPENCV_VIZ_VIZ3D_IMPL_HPP__
#define __OPENCV_VIZ_VIZ3D_IMPL_HPP__
#include <opencv2/viz.hpp>
#include "interactor_style.h"
struct
cv
::
viz
::
Viz3d
::
VizImpl
{
public:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录