summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tracker-easy/preview.cpp2
-rw-r--r--tracker-pt/module/frame.cpp2
-rw-r--r--tracker-wii/wii_frame.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/tracker-easy/preview.cpp b/tracker-easy/preview.cpp
index 218fca43..198f838b 100644
--- a/tracker-easy/preview.cpp
+++ b/tracker-easy/preview.cpp
@@ -120,7 +120,7 @@ namespace EasyTracker
void Preview::ensure_size(cv::Mat& frame, int w, int h, int type)
{
- if (frame.cols != w || frame.rows != h)
+ if (frame.cols != w || frame.rows != h || frame.type() != type)
frame = cv::Mat(h, w, type);
}
diff --git a/tracker-pt/module/frame.cpp b/tracker-pt/module/frame.cpp
index a045b783..ab110871 100644
--- a/tracker-pt/module/frame.cpp
+++ b/tracker-pt/module/frame.cpp
@@ -73,7 +73,7 @@ void Preview::draw_head_center(f x, f y)
void Preview::ensure_size(cv::Mat& frame, int w, int h, int type)
{
- if (frame.cols != w || frame.rows != h)
+ if (frame.cols != w || frame.rows != h || frame.type() != type)
frame = cv::Mat(h, w, type);
}
diff --git a/tracker-wii/wii_frame.cpp b/tracker-wii/wii_frame.cpp
index d6628f00..8f18f4b8 100644
--- a/tracker-wii/wii_frame.cpp
+++ b/tracker-wii/wii_frame.cpp
@@ -97,6 +97,6 @@ void WIIPreview::draw_head_center(f x, f y)
void WIIPreview::ensure_size(cv::Mat& frame, int w, int h, int type)
{
- if (frame.cols != w || frame.rows != h)
+ if (frame.cols != w || frame.rows != h || frame.type() != type)
frame = cv::Mat(h, w, type);
}