forked from zivid/zivid-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReleasableCamera.cpp
More file actions
29 lines (25 loc) · 1.09 KB
/
ReleasableCamera.cpp
File metadata and controls
29 lines (25 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <ZividPython/ReleasableCamera.h>
#include <ZividPython/ReleasableFrame.h>
#include <pybind11/pybind11.h>
#include <variant>
#include <vector>
namespace py = pybind11;
namespace ZividPython
{
void wrapClass(pybind11::class_<ReleasableCamera> pyClass)
{
pyClass.def(py::init())
.def(py::self == py::self) // NOLINT
.def(py::self != py::self) // NOLINT
.def("disconnect", &ReleasableCamera::disconnect)
.def("connect", &ReleasableCamera::connect)
.def("capture", py::overload_cast<const Zivid::Settings &>(&ReleasableCamera::capture), py::arg("settings"))
.def("capture",
py::overload_cast<const Zivid::Settings2D &>(&ReleasableCamera::capture),
py::arg("settings_2d"))
.def_property_readonly("state", &ReleasableCamera::state)
.def_property_readonly("info", &ReleasableCamera::info)
.def("write_user_data", &ReleasableCamera::writeUserData)
.def_property_readonly("user_data", &ReleasableCamera::userData);
}
} // namespace ZividPython