diff options
author | Stéphane Lenclud <github@lenclud.com> | 2019-04-14 10:05:23 +0200 |
---|---|---|
committer | Stéphane Lenclud <github@lenclud.com> | 2019-04-24 18:46:12 +0200 |
commit | 51436cc320670e033c69bc01d2178bd245234670 (patch) | |
tree | 1468e1fb6017166a95ca7ec17d81980cc2b51c05 /tracker-easy/tracker-easy.cpp | |
parent | 984f1c719a6636ec5e155a218bd69fec7da8b71c (diff) |
Kinect: IR camera now provides raw 16 bits buffer.
Easy Tracker: Support for 16 bits and RGB frame buffers.
Diffstat (limited to 'tracker-easy/tracker-easy.cpp')
-rw-r--r-- | tracker-easy/tracker-easy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tracker-easy/tracker-easy.cpp b/tracker-easy/tracker-easy.cpp index 42666677..083bd951 100644 --- a/tracker-easy/tracker-easy.cpp +++ b/tracker-easy/tracker-easy.cpp @@ -126,9 +126,9 @@ namespace EasyTracker if (new_frame) { - //TODO: We should not assume channel size of 1 byte - // Though in practice since cv::findContours needs CV_8U we would still need to convert our frame from 16 bits to 8 bits. - iMatFrame = cv::Mat(iFrame.height, iFrame.width, CV_MAKETYPE(CV_8U, iFrame.channels), iFrame.data, iFrame.stride); + // Create OpenCV matrix from our frame + // TODO: Assert channel size is one or two + iMatFrame = cv::Mat(iFrame.height, iFrame.width, CV_MAKETYPE((iFrame.channelSize == 2 ? CV_16U : CV_8U), iFrame.channels), iFrame.data, iFrame.stride); const bool preview_visible = check_is_visible(); |