Fixing some errors.

This commit is contained in:
Daniel
2024-09-11 14:51:53 +02:00
parent 244f46559c
commit 3e3a5194e2
5 changed files with 2190 additions and 21 deletions

View File

@ -49,3 +49,21 @@ namespace std {
// Parse the header file to generate wrappers
%include "../spt/camera.hpp"
%include "../spt/interface.hpp"
// Add additional Python code to the module
%pythoncode %{
def convert_cameras(cameras):
"""Convert cameras from Python to C++."""
c_cameras = []
for cam in cameras:
camera = Camera()
camera.name = cam["name"]
camera.K = cam["K"]
camera.DC = cam["DC"]
camera.R = cam["R"]
camera.T = cam["T"]
camera.width = cam["width"]
camera.height = cam["height"]
c_cameras.append(camera)
return c_cameras
%}