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
e639c8ef
Commit
e639c8ef
authored
Oct 25, 2019
by
Pavel Rojtberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ovis: correctly destroy additional windows
parent
20dbe789
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
ovis_demo.py
modules/ovis/samples/ovis_demo.py
+3
-0
ovis.cpp
modules/ovis/src/ovis.cpp
+18
-0
No files found.
modules/ovis/samples/ovis_demo.py
View file @
e639c8ef
...
...
@@ -31,3 +31,5 @@ iwin.setCameraIntrinsics(K, imsize)
while
cv
.
ovis
.
waitKey
(
1
)
!=
27
:
R
,
t
=
iwin
.
getCameraPose
()
owin
.
setEntityPose
(
"cam"
,
t
,
R
)
del
iwin
# must be destroyed in reverse creation order
\ No newline at end of file
modules/ovis/src/ovis.cpp
View file @
e639c8ef
...
...
@@ -238,6 +238,20 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
return
ret
;
}
#if OGRE_VERSION < ((1 << 16) | (12 << 8) | 3)
void
destroyWindow
(
const
Ogre
::
String
&
name
)
{
for
(
auto
it
=
mWindows
.
begin
();
it
!=
mWindows
.
end
();
++
it
)
{
if
(
it
->
render
->
getName
()
!=
name
)
continue
;
mRoot
->
destroyRenderTarget
(
it
->
render
);
mWindows
.
erase
(
it
);
return
;
}
}
#endif
size_t
numWindows
()
const
{
return
mWindows
.
size
();
}
void
locateResources
()
CV_OVERRIDE
...
...
@@ -371,6 +385,10 @@ public:
_app
->
closeApp
();
_app
.
release
();
}
else
{
_app
->
destroyWindow
(
title
);
}
}
void
setBackground
(
InputArray
image
)
CV_OVERRIDE
...
...
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