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
ce46db94
Commit
ce46db94
authored
Nov 08, 2016
by
Patrik Huber
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'python-bindings' into devel
parents
6d5f252b
2a02e50c
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
619 additions
and
41 deletions
+619
-41
3rdparty/pybind11
3rdparty/pybind11
+1
-1
utils/CMakeLists.txt
utils/CMakeLists.txt
+4
-3
utils/create-python-bindings.cpp
utils/create-python-bindings.cpp
+0
-37
utils/generate-python-bindings.cpp
utils/generate-python-bindings.cpp
+266
-0
utils/pybind11_glm.hpp
utils/pybind11_glm.hpp
+348
-0
No files found.
pybind11
@
fe40dfe6
Subproject commit
29b5064e9c80be7034fc9d6ac15dbb7ebe304fc5
Subproject commit
fe40dfe67d2c7d31673ee8d41794897f839eb530
utils/CMakeLists.txt
View file @
ce46db94
...
@@ -43,9 +43,10 @@ add_executable(json-to-cereal-binary json-to-cereal-binary.cpp)
...
@@ -43,9 +43,10 @@ add_executable(json-to-cereal-binary json-to-cereal-binary.cpp)
target_link_libraries
(
json-to-cereal-binary
${
OpenCV_LIBS
}
${
Boost_LIBRARIES
}
)
target_link_libraries
(
json-to-cereal-binary
${
OpenCV_LIBS
}
${
Boost_LIBRARIES
}
)
# Generate python bindings using pybind11:
# Generate python bindings using pybind11:
if
(
GENERATE_PYTHON_BINDINGS
)
if
(
GENERATE_PYTHON_BINDINGS
)
pybind11_add_module
(
eos_py create-python-bindings.cpp
)
pybind11_add_module
(
python-bindings generate-python-bindings.cpp pybind11_glm.hpp
)
target_link_libraries
(
eos_py PRIVATE
${
OpenCV_LIBS
}
${
Boost_LIBRARIES
}
)
target_link_libraries
(
python-bindings PRIVATE
${
OpenCV_LIBS
}
${
Boost_LIBRARIES
}
)
install
(
TARGETS eos_py DESTINATION bin
)
set_target_properties
(
python-bindings PROPERTIES OUTPUT_NAME eos
)
install
(
TARGETS python-bindings DESTINATION bin
)
endif
()
endif
()
# install target:
# install target:
...
...
utils/create-python-bindings.cpp
deleted
100644 → 0
View file @
6d5f252b
/*
* eos - A 3D Morphable Model fitting library written in modern C++11/14.
*
* File: utils/create-python-bindings.cpp
*
* Copyright 2016 Patrik Huber
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "eos/morphablemodel/PcaModel.hpp"
#include "pybind11/pybind11.h"
namespace
py
=
pybind11
;
/**
* Create python bindings for the eos library using pybind11.
*/
PYBIND11_PLUGIN
(
eos_py
)
{
py
::
module
m
(
"eos_py"
,
"Python bindings to the 3D Morphable Face Model fitting library"
);
py
::
class_
<
eos
::
morphablemodel
::
PcaModel
>
(
m
,
"PcaModel"
)
.
def
(
py
::
init
<>
())
.
def
(
"get_mean_at_point"
,
&
eos
::
morphablemodel
::
PcaModel
::
get_mean_at_point
);
return
m
.
ptr
();
};
utils/generate-python-bindings.cpp
0 → 100644
View file @
ce46db94
This diff is collapsed.
Click to expand it.
utils/pybind11_glm.hpp
0 → 100644
View file @
ce46db94
This diff is collapsed.
Click to expand it.
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