File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1726,6 +1726,13 @@ void Miniscope::captureThread(void *msPtr)
1726
1726
// determine device position in space
1727
1727
std::vector<float > bnoVec (5 );
1728
1728
if (hasHeadOrientationSupport) {
1729
+ #ifdef Q_OS_WIN
1730
+ // on Windows, PAN/TILT is not properly recognized, so we use the legacy properties
1731
+ double w = static_cast <qint16>(d->cam .get (cv::CAP_PROP_SATURATION));
1732
+ double x = static_cast <qint16>(d->cam .get (cv::CAP_PROP_HUE));
1733
+ double y = static_cast <qint16>(d->cam .get (cv::CAP_PROP_GAIN));
1734
+ double z = static_cast <qint16>(d->cam .get (cv::CAP_PROP_BRIGHTNESS));
1735
+ #else
1729
1736
// unpack BNO quaternions
1730
1737
auto wx = static_cast <quint32>(d->cam .get (cv::CAP_PROP_PAN));
1731
1738
auto yz = static_cast <quint32>(d->cam .get (cv::CAP_PROP_TILT));
@@ -1734,6 +1741,7 @@ void Miniscope::captureThread(void *msPtr)
1734
1741
double x = (qint16)((wx >> 16 ) & 0xFFFF );
1735
1742
double y = (qint16)(yz & 0xFFFF );
1736
1743
double z = (qint16)((yz >> 16 ) & 0xFFFF );
1744
+ #endif
1737
1745
1738
1746
// BNO output is a unit quaternion after 2^14 division
1739
1747
double norm = sqrt (w * w + x * x + y * y + z * z);
You can’t perform that action at this time.
0 commit comments