Skip to content
Snippets Groups Projects
Commit 88d02993 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix thumbnail channel bug

parent 3b7cdd4e
No related branches found
No related tags found
1 merge request!212Major refactor of frame streaming
Pipeline #18159 failed
...@@ -240,7 +240,6 @@ void ftl::gui::Camera::update(ftl::rgbd::FrameSet &fs) { ...@@ -240,7 +240,6 @@ void ftl::gui::Camera::update(ftl::rgbd::FrameSet &fs) {
auto &channel1 = frame->get<GpuMat>(Channel::Colour); auto &channel1 = frame->get<GpuMat>(Channel::Colour);
im1_.create(channel1.size(), channel1.type()); im1_.create(channel1.size(), channel1.type());
channel1.download(im1_); channel1.download(im1_);
LOG(INFO) << "IM1 type = " << im1_.type();
// OpenGL (0,0) bottom left // OpenGL (0,0) bottom left
cv::flip(im1_, im1_, 0); cv::flip(im1_, im1_, 0);
...@@ -461,7 +460,7 @@ cv::Mat ftl::gui::Camera::visualizeActiveChannel() { ...@@ -461,7 +460,7 @@ cv::Mat ftl::gui::Camera::visualizeActiveChannel() {
bool ftl::gui::Camera::thumbnail(cv::Mat &thumb) { bool ftl::gui::Camera::thumbnail(cv::Mat &thumb) {
UNIQUE_LOCK(mutex_, lk); UNIQUE_LOCK(mutex_, lk);
/*src_->grab(1,9);*/ /*src_->grab(1,9);*/
cv::Mat sel = (channel_ != Channel::None && !im2_.empty()) ? visualizeActiveChannel() : im1_; cv::Mat sel = (channel_ != Channel::None && channel_ != Channel::Colour && !im2_.empty()) ? visualizeActiveChannel() : im1_;
if (sel.empty()) return false; if (sel.empty()) return false;
cv::resize(sel, thumb, cv::Size(320,180)); cv::resize(sel, thumb, cv::Size(320,180));
cv::flip(thumb, thumb, 0); cv::flip(thumb, thumb, 0);
...@@ -525,10 +524,7 @@ const GLTexture &ftl::gui::Camera::captureFrame() { ...@@ -525,10 +524,7 @@ const GLTexture &ftl::gui::Camera::captureFrame() {
Eigen::Affine3d t(trans); Eigen::Affine3d t(trans);
Eigen::Matrix4d viewPose = t.matrix() * rotmat_; Eigen::Matrix4d viewPose = t.matrix() * rotmat_;
//if (src_->hasCapabilities(ftl::rgbd::kCapMovable)) src_->setPose(viewPose); if (isVirtual()) state_.setPose(viewPose);
//if (fid_ < 0) src_->setPose(viewPose);
if (fid_ == 255) state_.setPose(viewPose);
//src_->grab(); //src_->grab();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment