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
477ca067
Commit
477ca067
authored
Sep 06, 2013
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compilation for macos
parent
eed7bf69
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
CMakeLists.txt
modules/viz/CMakeLists.txt
+1
-1
viz3d_impl.cpp
modules/viz/src/viz3d_impl.cpp
+3
-1
test_viz3d.cpp
modules/viz/test/test_viz3d.cpp
+5
-5
No files found.
modules/viz/CMakeLists.txt
View file @
477ca067
...
...
@@ -12,7 +12,7 @@ macro(find_qvtk)
endmacro
()
macro
(
find_vtk
)
find_package
(
VTK 5.
8
.0 REQUIRED
)
find_package
(
VTK 5.
10
.0 REQUIRED
)
if
(
VTK_FOUND
)
if
(
BUILD_SHARED_LIBS
OR
(
NOT BUILD_SHARED_LIBS AND NOT VTK_BUILD_SHARED_LIBS
))
find_qvtk
()
...
...
modules/viz/src/viz3d_impl.cpp
View file @
477ca067
#include "precomp.hpp"
#include "viz3d_impl.hpp"
#ifndef __APPLE__
#include <vtkRenderWindowInteractor.h>
#if 1 || !defined __APPLE__
vtkRenderWindowInteractor
*
vtkRenderWindowInteractorFixNew
()
{
return
vtkRenderWindowInteractor
::
New
();
...
...
modules/viz/test/test_viz3d.cpp
View file @
477ca067
...
...
@@ -54,7 +54,7 @@ using namespace cv;
cv
::
Mat
cvcloud_load
()
{
cv
::
Mat
cloud
(
1
,
20000
,
CV_32FC3
);
std
::
ifstream
ifs
(
"
d:
/cloud_dragon.ply"
);
std
::
ifstream
ifs
(
"
/Users/nerei
/cloud_dragon.ply"
);
std
::
string
str
;
for
(
size_t
i
=
0
;
i
<
11
;
++
i
)
...
...
@@ -72,7 +72,7 @@ TEST(Viz_viz3d, accuracy)
cv
::
Mat
cloud
=
cvcloud_load
();
cv
::
Mat
colors
(
cloud
.
size
(),
CV_8UC3
,
cv
::
Scalar
(
0
,
255
,
0
));
cv
::
Mat
normals
(
cloud
.
size
(),
cloud
.
type
(),
cv
::
Scalar
(
0
,
10
,
0
));
//cv::viz::Mesh3d::Ptr mesh = cv::viz::Mesh3d::mesh_load("
d:
/horse.ply");
//cv::viz::Mesh3d::Ptr mesh = cv::viz::Mesh3d::mesh_load("
/Users/nerei
/horse.ply");
const
Vec4d
data
[]
=
{
Vec4d
(
0.0
,
0.0
,
0.0
,
0.0
),
Vec4d
(
1.0
,
1.0
,
1.0
,
1.0
),
cv
::
Vec4d
(
0.0
,
2.0
,
0.0
,
0.0
),
cv
::
Vec4d
(
3.0
,
4.0
,
1.0
,
1.0
)
};
cv
::
Mat
points
(
1
,
sizeof
(
data
)
/
sizeof
(
data
[
0
]),
CV_64FC4
,
(
void
*
)
data
);
...
...
@@ -133,7 +133,7 @@ TEST(Viz_viz3d, accuracy)
// viz.showWidget("polyline", plw);
// lw = v.getWidget("polyline").cast<viz::LineWidget>();
viz
::
Mesh3d
mesh
=
cv
::
viz
::
Mesh3d
::
loadMesh
(
"horse.ply"
);
viz
::
Mesh3d
mesh
=
cv
::
viz
::
Mesh3d
::
loadMesh
(
"
/Users/nerei/
horse.ply"
);
viz
::
MeshWidget
mw
(
mesh
);
// viz.showWidget("mesh", mw);
...
...
@@ -146,7 +146,7 @@ TEST(Viz_viz3d, accuracy)
0
,
657
,
240
,
0
,
0
,
1
);
viz
::
CameraPositionWidget
cpw
(
Vec3f
(
0.5
,
0.5
,
3.0
),
Vec3f
(
0.0
,
0.0
,
0.0
),
Vec3f
(
0.0
,
-
1.0
,
0.0
),
0.5
);
//
viz::CameraPositionWidget cpw(Vec3f(0.5, 0.5, 3.0), Vec3f(0.0,0.0,0.0), Vec3f(0.0,-1.0,0.0), 0.5);
viz
::
CameraPositionWidget
cpw2
(
0.5
);
viz
::
CameraPositionWidget
frustum
(
K
,
2.0
,
viz
::
Color
::
green
());
// viz::CameraPositionWidget frustum2(K, 4.0, viz::Color::red());
...
...
@@ -170,7 +170,7 @@ TEST(Viz_viz3d, accuracy)
trajectory
.
push_back
(
Affine3f
().
translate
(
Vec3f
(
2.0
,
0.5
,
0.0
)));
trajectory
.
push_back
(
Affine3f
(
0.5
,
0.0
,
0.0
,
Vec3f
(
1.0
,
0.0
,
1.0
)));
//
viz
.
showWidget
(
"trajectory1"
,
viz
::
TrajectoryWidget
(
trajectory
,
viz
::
Color
(
0
,
255
,
255
),
true
,
0.5
));
//
viz.showWidget("trajectory1", viz::TrajectoryWidget(trajectory, viz::Color(0,255,255), true, 0.5));
viz
.
showWidget
(
"trajectory2"
,
viz
::
TrajectoryWidget
(
trajectory
,
K
,
1.0
,
viz
::
Color
(
255
,
0
,
255
)));
...
...
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