Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zqpei/pybind11_cpp_python

cpp call python, or python call cpp, hybrid programming using pybind11, with and without numpy
https://github.com/zqpei/pybind11_cpp_python

cpp cpp-call-python mat-numpy numpy opencv-numpy pybind11 python python-call-cpp

Last synced: 29 days ago
JSON representation

cpp call python, or python call cpp, hybrid programming using pybind11, with and without numpy

Awesome Lists containing this project

README

        

# Pybind11 cpp python hybrid programming

## Introduction

This repository shows how to hybrid programming with cpp and python using pybind11.

It includes two main topic,

- extend python with c++ (python_call_cpp)
- extend c++ with python (cpp_call_python)

This repository contains several folders.

Each folder cooresponds to an specific topic with all source code privided and shows how to compile them.

**The hardest part is how to convert opencv Mat type in cpp to numpy ndarray and vice versa.**

## Dependencies
- GCC 4.x
- python 3.x
- opencv 2.x+
- eigen3
- numpy

## 1 extend python with c++

- python_call_cpp
- python_call_cpp_opencv_numpy

## 2 embed python in c++

- cpp_call_python
- cpp_call_python_numpy (eigen)
- cpp_call_python_opencv_numpy
- cpp_call_python_so

## References

- [pybind11](https://github.com/pybind/pybind11)
- [edmBernard/pybind11_opencv_numpy](https://github.com/edmBernard/pybind11_opencv_numpy)