summaryrefslogtreecommitdiff
path: root/src/profile.cpp
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2026-07-15 10:13:10 +0200
committerNikita Kostovsky <nikita@kostovsky.me>2026-07-15 10:13:10 +0200
commit2aefb6902465c3c8a313f95bb1b7d9a80fe4c52a (patch)
tree525cafbc1a9f38df2f0d2ebe6fe9fd206e5f30d0 /src/profile.cpp
parent169ddcb09cd26fa0a685f691f63b49e70e1be93b (diff)
in the middle of non-linear pixels debuggingconflicting_master
Diffstat (limited to 'src/profile.cpp')
-rw-r--r--src/profile.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/profile.cpp b/src/profile.cpp
index 101ecf3..9a65730 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -5,10 +5,9 @@
#include <QDebug>
#include <QJsonArray>
-Profile::Profile(
- const Pixels& pixels,
- const CalibrationTablePtr calibrationTableZ,
- const CalibrationTablePtr calibrationTableX)
+Profile::Profile(const Pixels &pixels,
+ const op::CalibrationTablePtr calibrationTableZ,
+ const op::CalibrationTablePtr calibrationTableX)
: m_counters(pixels.counters)
{
// if (!calibrationTableZ || !calibrationTableX) {
@@ -41,7 +40,7 @@ Profile::Profile(
qt_noop();
}
const auto pixelDiscrete = pixel * discretesInRage / img_height;
- if (Q_UNLIKELY(pixel >= sizeof(CalibrationColumn) / sizeof(float))) {
+ if (Q_UNLIKELY(pixel >= sizeof(op::CalibrationColumn) / sizeof(float))) {
qWarning() << "got invalid calibration pixel at" << i << ":"
<< pixel;
m_counters = {};
@@ -49,7 +48,7 @@ Profile::Profile(
return;
}
- if (Q_UNLIKELY(pixel == sizeof(CalibrationColumn) - 1)) {
+ if (Q_UNLIKELY(pixel == sizeof(op::CalibrationColumn) - 1)) {
qDebug() << "Profile: got edge value";
const auto& z = calibrationTableZ->at(i).at(pixelDiscrete);
@@ -86,9 +85,9 @@ Profile::Profile(
continue;
}
- // const auto x = (leftMmX * (1 - fract) + rightMmX * fract);
+ const auto x = (leftMmX * (1 - fract) + rightMmX * fract);
// TODO: revert this debug shit
- const auto x = static_cast<double>(i) - img_width / 2;
+ // const auto x = static_cast<double>(i) - img_width / 2;
m_pointsMm.at(i) = {x, z};