Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Richard Torenvliet
eos
Commits
c72b0f3d
Commit
c72b0f3d
authored
Dec 18, 2016
by
Patrik Huber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove conversion to glm in estimate_orthographic_projection_linear() binding
parent
1c3b0113
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
python/generate-python-bindings.cpp
python/generate-python-bindings.cpp
+2
-7
No files found.
python/generate-python-bindings.cpp
View file @
c72b0f3d
...
...
@@ -147,14 +147,9 @@ PYBIND11_PLUGIN(eos) {
.
def
(
"get_projection"
,
&
fitting
::
RenderingParameters
::
get_projection
,
"Returns the 4x4 projection matrix."
)
;
fitting_module
.
def
(
"estimate_orthographic_projection_linear"
,
[](
std
::
vector
<
glm
::
vec2
>
image_points
,
std
::
vector
<
glm
::
vec4
>
model_points
,
bool
is_viewport_upsidedown
,
int
viewport_height
)
{
// We take glm vec's (transparent conversion in python) and convert them to OpenCV vec's for now:
std
::
vector
<
cv
::
Vec2f
>
image_points_cv
;
std
::
for_each
(
std
::
begin
(
image_points
),
std
::
end
(
image_points
),
[
&
image_points_cv
](
auto
&&
p
)
{
image_points_cv
.
push_back
({
p
.
x
,
p
.
y
});
});
std
::
vector
<
cv
::
Vec4f
>
model_points_cv
;
std
::
for_each
(
std
::
begin
(
model_points
),
std
::
end
(
model_points
),
[
&
model_points_cv
](
auto
&&
p
)
{
model_points_cv
.
push_back
({
p
.
x
,
p
.
y
,
p
.
z
,
p
.
w
});
});
fitting_module
.
def
(
"estimate_orthographic_projection_linear"
,
[](
std
::
vector
<
cv
::
Vec2f
>
image_points
,
std
::
vector
<
cv
::
Vec4f
>
model_points
,
bool
is_viewport_upsidedown
,
int
viewport_height
)
{
const
boost
::
optional
<
int
>
viewport_height_opt
=
viewport_height
==
0
?
boost
::
none
:
boost
::
optional
<
int
>
(
viewport_height
);
return
fitting
::
estimate_orthographic_projection_linear
(
image_points
_cv
,
model_points_cv
,
is_viewport_upsidedown
,
viewport_height_opt
);
return
fitting
::
estimate_orthographic_projection_linear
(
image_points
,
model_points
,
is_viewport_upsidedown
,
viewport_height_opt
);
},
"This algorithm estimates the parameters of a scaled orthographic projection, given a set of corresponding 2D-3D points."
,
py
::
arg
(
"image_points"
),
py
::
arg
(
"model_points"
),
py
::
arg
(
"is_viewport_upsidedown"
),
py
::
arg
(
"viewport_height"
)
=
0
)
;
...
...
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