summaryrefslogtreecommitdiffhomepage
path: root/cv
diff options
context:
space:
mode:
Diffstat (limited to 'cv')
-rw-r--r--cv/affine.cpp5
-rw-r--r--cv/affine.hpp8
-rw-r--r--cv/translation-calibrator.cpp2
-rw-r--r--cv/video-property-page.cpp2
-rw-r--r--cv/video-widget.cpp4
5 files changed, 10 insertions, 11 deletions
diff --git a/cv/affine.cpp b/cv/affine.cpp
index 4ec63e57..66e21aa6 100644
--- a/cv/affine.cpp
+++ b/cv/affine.cpp
@@ -9,9 +9,8 @@
namespace affine_impl {
-Affine::Affine() : R(mat33::eye()), t(0,0,0) {}
-
-Affine::Affine(const mat33& R, const vec3& t) : R(R),t(t) {}
+Affine::Affine() = default;
+Affine::Affine(const mat33& R, const vec3& t) : R(R), t(t) {}
Affine operator*(const Affine& X, const Affine& Y)
{
diff --git a/cv/affine.hpp b/cv/affine.hpp
index 3bc85c95..5d344138 100644
--- a/cv/affine.hpp
+++ b/cv/affine.hpp
@@ -20,8 +20,8 @@ public:
Affine();
Affine(const mat33& R, const vec3& t);
- mat33 R;
- vec3 t;
+ mat33 R { mat33::eye() };
+ vec3 t { 0, 0, 0 };
};
Affine operator*(const Affine& X, const Affine& Y);
@@ -31,5 +31,5 @@ vec3 operator*(const Affine& X, const vec3& v);
} // ns affine_impl
-using affine_impl::Affine;
-using affine_impl::operator *;
+using Affine = affine_impl::Affine;
+//using affine_impl::operator *;
diff --git a/cv/translation-calibrator.cpp b/cv/translation-calibrator.cpp
index 708cc593..9ead888e 100644
--- a/cv/translation-calibrator.cpp
+++ b/cv/translation-calibrator.cpp
@@ -94,7 +94,7 @@ bool TranslationCalibrator::check_bucket(const cv::Matx33d& R_CM_k)
const euler_t ypr = rmat_to_euler(r) * r2d;
auto array_index = [](double val, double spacing) {
- return iround((val + 180)/spacing);
+ return (unsigned)iround((val + 180)/spacing);
};
const unsigned yaw_k = array_index(ypr(yaw_rdof), yaw_spacing_in_degrees);
diff --git a/cv/video-property-page.cpp b/cv/video-property-page.cpp
index e76f8bc3..e6177c5c 100644
--- a/cv/video-property-page.cpp
+++ b/cv/video-property-page.cpp
@@ -48,7 +48,7 @@ struct prop_settings_worker final : QThread
prop_settings_worker::prop_settings_worker(int idx)
{
- int ret = cap.get(cv::CAP_PROP_SETTINGS);
+ int ret = (int)cap.get(cv::CAP_PROP_SETTINGS);
if (ret != 0)
run_in_thread_async(qApp, [] {
diff --git a/cv/video-widget.cpp b/cv/video-widget.cpp
index d93429cb..c80bd96b 100644
--- a/cv/video-widget.cpp
+++ b/cv/video-widget.cpp
@@ -53,7 +53,7 @@ void cv_video_widget::update_image(const cv::Mat& frame)
else
img = &_frame2;
- const unsigned nbytes = 4 * img->rows * img->cols;
+ const unsigned nbytes = unsigned(4 * img->rows * img->cols);
vec.resize(nbytes);
@@ -70,7 +70,7 @@ void cv_video_widget::update_image(const QImage& img)
if (freshp)
return;
- const unsigned nbytes = img.bytesPerLine() * img.height();
+ const unsigned nbytes = unsigned(img.bytesPerLine() * img.height());
vec.resize(nbytes);