Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
620d9282
Commit
620d9282
authored
Sep 11, 2013
by
Ozan Tonkal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide VizMap and VizPair from public interface
parent
98950935
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
15 deletions
+36
-15
viz.hpp
modules/viz/include/opencv2/viz.hpp
+3
-4
precomp.hpp
modules/viz/src/precomp.hpp
+10
-0
viz.cpp
modules/viz/src/viz.cpp
+23
-11
No files found.
modules/viz/include/opencv2/viz.hpp
View file @
620d9282
...
...
@@ -57,9 +57,6 @@ namespace cv
{
namespace
viz
{
typedef
std
::
map
<
String
,
Viz3d
>
VizMap
;
typedef
std
::
pair
<
String
,
Viz3d
>
VizPair
;
//! takes coordiante frame data and builds transfrom to global coordinate frame
CV_EXPORTS
Affine3f
makeTransformToGlobal
(
const
Vec3f
&
axis_x
,
const
Vec3f
&
axis_y
,
const
Vec3f
&
axis_z
,
const
Vec3f
&
origin
=
Vec3f
::
all
(
0
));
...
...
@@ -112,7 +109,9 @@ namespace cv
static
VizAccessor
*
instance_
;
static
bool
is_instantiated_
;
static
VizMap
viz_map_
;
struct
VizAccessorImpl
;
static
VizAccessorImpl
*
impl_
;
friend
class
Viz3d
;
};
...
...
modules/viz/src/precomp.hpp
View file @
620d9282
...
...
@@ -134,6 +134,16 @@ namespace cv
}
#include "viz3d_impl.hpp"
namespace
cv
{
namespace
viz
{
typedef
std
::
map
<
std
::
string
,
Viz3d
>
VizMap
;
typedef
std
::
pair
<
std
::
string
,
Viz3d
>
VizPair
;
}
}
#include <opencv2/core.hpp>
#include <opencv2/viz.hpp>
#include <opencv2/viz/types.hpp>
...
...
modules/viz/src/viz.cpp
View file @
620d9282
...
...
@@ -138,11 +138,23 @@ namespace cv
cv
::
viz
::
VizAccessor
*
cv
::
viz
::
VizAccessor
::
instance_
=
0
;
bool
cv
::
viz
::
VizAccessor
::
is_instantiated_
=
false
;
cv
::
viz
::
Viz
Map
cv
::
viz
::
VizAccessor
::
viz_map_
;
cv
::
viz
::
Viz
Accessor
::
VizAccessorImpl
*
cv
::
viz
::
VizAccessor
::
impl_
=
0
;
cv
::
viz
::
VizAccessor
::
VizAccessor
()
{}
struct
cv
::
viz
::
VizAccessor
::
VizAccessorImpl
{
cv
::
viz
::
VizMap
viz_map
;
};
cv
::
viz
::
VizAccessor
::
VizAccessor
()
{
impl_
=
new
cv
::
viz
::
VizAccessor
::
VizAccessorImpl
;}
cv
::
viz
::
VizAccessor
::~
VizAccessor
()
{}
cv
::
viz
::
VizAccessor
::~
VizAccessor
()
{
if
(
impl_
)
{
delete
impl_
;
impl_
=
0
;
}
}
cv
::
viz
::
VizAccessor
&
cv
::
viz
::
VizAccessor
::
getInstance
()
{
...
...
@@ -170,8 +182,8 @@ cv::viz::Viz3d cv::viz::VizAccessor::get(const String & window_name)
String
name
;
generateWindowName
(
window_name
,
name
);
VizMap
::
iterator
vm_itr
=
viz_map_
.
find
(
name
);
bool
exists
=
vm_itr
!=
viz_map_
.
end
();
VizMap
::
iterator
vm_itr
=
impl_
->
viz_map
.
find
(
name
);
bool
exists
=
vm_itr
!=
impl_
->
viz_map
.
end
();
if
(
exists
)
return
vm_itr
->
second
;
else
return
Viz3d
(
window_name
);
}
...
...
@@ -179,10 +191,10 @@ cv::viz::Viz3d cv::viz::VizAccessor::get(const String & window_name)
void
cv
::
viz
::
VizAccessor
::
add
(
Viz3d
window
)
{
String
window_name
=
window
.
getWindowName
();
VizMap
::
iterator
vm_itr
=
viz_map_
.
find
(
window_name
);
bool
exists
=
vm_itr
!=
viz_map_
.
end
();
VizMap
::
iterator
vm_itr
=
impl_
->
viz_map
.
find
(
window_name
);
bool
exists
=
vm_itr
!=
impl_
->
viz_map
.
end
();
if
(
exists
)
return
;
viz_map_
.
insert
(
VizPair
(
window_name
,
window
));
impl_
->
viz_map
.
insert
(
VizPair
(
window_name
,
window
));
}
void
cv
::
viz
::
VizAccessor
::
remove
(
const
String
&
window_name
)
...
...
@@ -191,10 +203,10 @@ void cv::viz::VizAccessor::remove(const String &window_name)
String
name
;
generateWindowName
(
window_name
,
name
);
VizMap
::
iterator
vm_itr
=
viz_map_
.
find
(
name
);
bool
exists
=
vm_itr
!=
viz_map_
.
end
();
VizMap
::
iterator
vm_itr
=
impl_
->
viz_map
.
find
(
name
);
bool
exists
=
vm_itr
!=
impl_
->
viz_map
.
end
();
if
(
!
exists
)
return
;
viz_map_
.
erase
(
vm_itr
);
impl_
->
viz_map
.
erase
(
vm_itr
);
}
void
cv
::
viz
::
VizAccessor
::
generateWindowName
(
const
String
&
window_name
,
String
&
output
)
...
...
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