Skip to content

Commit 3807d56

Browse files
Merge pull request #324 from luxonis/develop
Release v2.8.0.0
2 parents 6301f0f + 197cc88 commit 3807d56

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

docs/source/components/pipeline.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The reason behind this is that OpenVINO doesn't provide version inside the blob.
4343
4444
pipeline = depthai.Pipeline()
4545
# Set the correct version:
46-
pipeline.setOpenVINOVersion(depthai.OpenVINO.Version.VERSION_2020_1)
46+
pipeline.setOpenVINOVersion(depthai.OpenVINO.Version.VERSION_2021_4)
4747
4848
How to place it
4949
###############

examples/imu_rotation_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def timeDeltaToMilliS(delta) -> float:
5353
print(f"Rotation vector timestamp: {tsF.format(timeDeltaToMilliS(rvTs))} ms")
5454
print(f"Quaternion: i: {imuF.format(rVvalues.i)} j: {imuF.format(rVvalues.j)} "
5555
f"k: {imuF.format(rVvalues.k)} real: {imuF.format(rVvalues.real)}")
56-
print(f"Accuracy (rad): {imuF.format(rVvalues.accuracy)}")
56+
print(f"Accuracy (rad): {imuF.format(rVvalues.rotationVectorAccuracy)}")
5757

5858

5959
if cv2.waitKey(1) == ord('q'):

src/DatatypeBindings.cpp

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ void DatatypeBindings::bind(pybind11::module& m){
8080
o.ts.nsec = (ts - o.ts.sec) * 1000000000.0;
8181
}
8282
)
83+
.def_property("tsDevice",
84+
[](const RawImgFrame& o){
85+
double ts = o.tsDevice.sec + o.tsDevice.nsec / 1000000000.0;
86+
return ts;
87+
},
88+
[](RawImgFrame& o, double ts){
89+
o.tsDevice.sec = ts;
90+
o.tsDevice.nsec = (ts - o.tsDevice.sec) * 1000000000.0;
91+
}
92+
)
8393
;
8494

8595
py::enum_<RawImgFrame::Type>(rawImgFrame, "Type")
@@ -304,11 +314,11 @@ void DatatypeBindings::bind(pybind11::module& m){
304314
.def_readwrite("timestamp", &IMUReport::timestamp)
305315
;
306316

307-
py::enum_<IMUReport::IMUReportAccuracy>(imureport, "IMUReportAccuracy")
308-
.value("UNRELIABLE", IMUReport::IMUReportAccuracy::UNRELIABLE)
309-
.value("LOW", IMUReport::IMUReportAccuracy::LOW)
310-
.value("MEDIUM", IMUReport::IMUReportAccuracy::MEDIUM)
311-
.value("HIGH", IMUReport::IMUReportAccuracy::HIGH)
317+
py::enum_<IMUReport::Accuracy>(imureport, "Accuracy")
318+
.value("UNRELIABLE", IMUReport::Accuracy::UNRELIABLE)
319+
.value("LOW", IMUReport::Accuracy::LOW)
320+
.value("MEDIUM", IMUReport::Accuracy::MEDIUM)
321+
.value("HIGH", IMUReport::Accuracy::HIGH)
312322
;
313323

314324
py::class_<IMUReportAccelerometer, IMUReport, std::shared_ptr<IMUReportAccelerometer>>(m, "IMUReportAccelerometer", DOC(dai, IMUReportAccelerometer))
@@ -338,7 +348,7 @@ void DatatypeBindings::bind(pybind11::module& m){
338348
.def_readwrite("j", &IMUReportRotationVectorWAcc::j)
339349
.def_readwrite("k", &IMUReportRotationVectorWAcc::k)
340350
.def_readwrite("real", &IMUReportRotationVectorWAcc::real)
341-
.def_readwrite("accuracy", &IMUReportRotationVectorWAcc::accuracy)
351+
.def_readwrite("rotationVectorAccuracy", &IMUReportRotationVectorWAcc::rotationVectorAccuracy)
342352
;
343353

344354
#if 0
@@ -521,6 +531,7 @@ void DatatypeBindings::bind(pybind11::module& m){
521531
.def(py::init<>())
522532
// getters
523533
.def("getTimestamp", &ImgFrame::getTimestamp, DOC(dai, ImgFrame, getTimestamp))
534+
.def("getTimestampDevice", &ImgFrame::getTimestampDevice, DOC(dai, ImgFrame, getTimestampDevice))
524535
.def("getInstanceNum", &ImgFrame::getInstanceNum, DOC(dai, ImgFrame, getInstanceNum))
525536
.def("getCategory", &ImgFrame::getCategory, DOC(dai, ImgFrame, getCategory))
526537
.def("getSequenceNum", &ImgFrame::getSequenceNum, DOC(dai, ImgFrame, getSequenceNum))

src/openvino/OpenVINOBindings.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,18 @@ void OpenVINOBindings::bind(pybind11::module& m){
1919
;
2020

2121
// not strongly typed enum OpenVINO::Version
22-
// previous step defined class 'OpenVINO' (variable 'openvino')
22+
// previous step defined class 'OpenVINO' (variable 'openvino')
2323
// which is used in defining the following enum (its scope)
24-
// and that the values are available directly under OpenVINO.VERSION_2020_1, ...
24+
// and that the values are available directly under OpenVINO.VERSION_2021_4, ...
2525
// they are exported
26-
// By default, pybind creates strong typed enums, eg: OpenVINO::Version::VERSION_2020_1
26+
// By default, pybind creates strong typed enums, eg: OpenVINO::Version::VERSION_2021_4
2727
py::enum_<OpenVINO::Version>(openvino, "Version", DOC(dai, OpenVINO, Version))
28-
.value("VERSION_2020_1", OpenVINO::Version::VERSION_2020_1)
29-
.value("VERSION_2020_2", OpenVINO::Version::VERSION_2020_2)
3028
.value("VERSION_2020_3", OpenVINO::Version::VERSION_2020_3)
3129
.value("VERSION_2020_4", OpenVINO::Version::VERSION_2020_4)
3230
.value("VERSION_2021_1", OpenVINO::Version::VERSION_2021_1)
3331
.value("VERSION_2021_2", OpenVINO::Version::VERSION_2021_2)
3432
.value("VERSION_2021_3", OpenVINO::Version::VERSION_2021_3)
33+
.value("VERSION_2021_4", OpenVINO::Version::VERSION_2021_4)
3534
.export_values()
3635
;
3736

0 commit comments

Comments
 (0)