diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93966ccf5d060acde6e8445b46d8ad940fbeb19a..a3befbf2a3a67cb00914dbc48594473891f48262 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,6 +20,7 @@ linux: - linux variables: FTL_LIB: ../../build/SDK/C/libftl-dev.so + LD_LIBRARY_PATH: /opt/pylon/lib/ # before_script: # - export DEBIAN_FRONTEND=noninteractive # - apt-get update -qq && apt-get install -y -qq g++ cmake git @@ -27,8 +28,9 @@ linux: script: - mkdir build - cd build - - cmake .. -DWITH_OPTFLOW=TRUE -DUSE_CPPCHECK=FALSE -DBUILD_CALIBRATION=TRUE -DWITH_CERES=TRUE -DCMAKE_BUILD_TYPE=Release + - cmake .. -DWITH_OPTFLOW=TRUE -DUSE_CPPCHECK=FALSE -DBUILD_CALIBRATION=TRUE -DWITH_CERES=TRUE -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB - make + - make package - ctest --output-on-failure - cd ../SDK/Python - python3 -m unittest discover test diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f2c96fb1656f40babca3c38cf2808f8906455c6..96fb65323bbab37cd9bc4c9ad3b99b28bc0466ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ project (ftl.utu.fi VERSION 0.0.4) include(GNUInstallDirs) include(CTest) + enable_testing() option(WITH_OPTFLOW "Use NVIDIA Optical Flow if available" OFF) @@ -119,7 +120,7 @@ endif() if (WITH_OPUS) find_library( OPUS_LIBRARY NAMES opus PATHS ${OPUS_DIR} PATH_SUFFIXES lib) - + if (OPUS_LIBRARY) find_path( OPUS_INCLUDE NAMES opus/opus.h) @@ -184,7 +185,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.12.0") cmake_policy(SET CMP0074 NEW) endif() -set(CMAKE_CXX_STANDARD 17) # For PCL/VTK https://github.com/PointCloudLibrary/pcl/issues/2686 +set(CMAKE_CXX_STANDARD 17) set(HAVE_OPENCV TRUE) # Readline library is not required on Windows @@ -487,17 +488,9 @@ configure_file(${CMAKE_SOURCE_DIR}/components/common/cpp/src/config.cpp.in ${CMAKE_SOURCE_DIR}/components/common/cpp/src/config.cpp ) -# For issue #17 -# https://gitlab.kitware.com/cmake/cmake/issues/16915#note_456382 -if ( TARGET Qt5::Core ) - get_property( core_options TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_OPTIONS ) - string( REPLACE "-fPIC" "" new_core_options "${core_options}" ) - set_property( TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_OPTIONS ${new_core_options} ) - set_property( TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE "ON" ) - set( CMAKE_CXX_COMPILE_OPTIONS_PIE "-fPIC" ) -endif() - if (WIN32) # TODO(nick) Should do based upon compiler (VS) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${VS_STARTUP_PROJECT}) set_property(TARGET ftl-vision PROPERTY VS_DEBUGGER_WORKING_DIRECTORY ${VS_DEBUG_WORKING_DIRECTORY}) endif() + +include(ftl_CPack) diff --git a/applications/gui/CMakeLists.txt b/applications/gui/CMakeLists.txt index 8cd06d328bef06845dd5626feeaff340d6a26529..8b552cb9368844a2d4c5ef7776de9d8adc8d22a4 100644 --- a/applications/gui/CMakeLists.txt +++ b/applications/gui/CMakeLists.txt @@ -28,6 +28,7 @@ add_definitions(${NANOGUI_EXTRA_DEFS}) include_directories(${NANOGUI_EXTRA_INCS}) add_executable(ftl-gui ${GUISRC}) +install(TARGETS ftl-gui DESTINATION bin COMPONENT gui) target_include_directories(ftl-gui PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> diff --git a/applications/vision/CMakeLists.txt b/applications/vision/CMakeLists.txt index a40126b95f7cc9234078528a0f59263eecf0f802..4c2674d8da075a997792027591260e5bd09bd5b1 100644 --- a/applications/vision/CMakeLists.txt +++ b/applications/vision/CMakeLists.txt @@ -10,6 +10,7 @@ set(CVNODESRC ) add_executable(ftl-vision ${CVNODESRC}) +install(TARGETS ftl-vision DESTINATION bin COMPONENT vision) target_include_directories(ftl-vision PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> diff --git a/applications/vision/src/main.cpp b/applications/vision/src/main.cpp index d855dd93500b79f66a5cd2cf92a48ef2adb13930..2ed9ed444081614a9e8a8a01910f65672155ec12 100644 --- a/applications/vision/src/main.cpp +++ b/applications/vision/src/main.cpp @@ -197,6 +197,19 @@ static void run(ftl::Configurable *root) { delete net; } +static void threadSetCUDADevice() { + // Ensure all threads have correct cuda device + std::atomic<int> ijobs = 0; + for (int i=0; i<ftl::pool.size(); ++i) { + ftl::pool.push([&ijobs](int id) { + ftl::cuda::setDevice(); + ++ijobs; + while (ijobs < ftl::pool.size()) std::this_thread::sleep_for(std::chrono::milliseconds(10)); + }); + } + while (ijobs < ftl::pool.size()) std::this_thread::sleep_for(std::chrono::milliseconds(10)); +} + int main(int argc, char **argv) { #ifdef HAVE_PYLON Pylon::PylonAutoInitTerm autoInitTerm; @@ -207,6 +220,9 @@ int main(int argc, char **argv) { #endif std::cout << "FTL Vision Node " << FTL_VERSION_LONG << std::endl; auto root = ftl::configure(argc, argv, "vision_default"); + + // Use other GPU if available. + //ftl::cuda::setDevice(ftl::cuda::deviceCount()-1); std::cout << "Loading..." << std::endl; run(root); diff --git a/cmake/ftl_CPack.cmake b/cmake/ftl_CPack.cmake new file mode 100644 index 0000000000000000000000000000000000000000..b496c30bee1bb4a6cfcbe0eecd8c04db3ba3708e --- /dev/null +++ b/cmake/ftl_CPack.cmake @@ -0,0 +1,32 @@ +# use build date as patch version +string(TIMESTAMP BUILD_TIME "%Y%m%d") +set(CPACK_PACKAGE_VERSION_PATCH "${BUILD_TIME}") + +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "UTU Future Tech Lab") +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) +set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") +set(CPACK_DEB_PACKAGE_COMPONENT ON) +set(CPACK_DEBIAN_PACKAGE_SECTION "Miscellaneous") + +macro(deb_append_dependency DEPENDS) + if ("${CPACK_DEBIAN_PACKAGE_DEPENDS}" STREQUAL "") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${DEPENDS}") + else() + set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, ${DEPENDS}") + endif() +endmacro() + +if (HAVE_PYLON) + deb_append_dependency("pylon (>= 6.1.1)") + set(ENV{LD_LIBRARY_PATH} "=/opt/pylon/lib/") +endif() + +if(WIN32) + message(INFO "Copying DLLs: OpenCV") + file(GLOB WINDOWS_LIBS "${OpenCV_INSTALL_PATH}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/bin/*.dll") + install(FILES ${WINDOWS_LIBS} DESTINATION bin) + set(CPACK_GENERATOR "WiX") +endif() + +include(CPack) diff --git a/components/codecs/src/depth_convert.cu b/components/codecs/src/depth_convert.cu index 8b6bef8b5bf78fa8691a4ec0710b036fd3313554..81dc7d3bb731342d792036f7b97cdb1a94977947 100644 --- a/components/codecs/src/depth_convert.cu +++ b/components/codecs/src/depth_convert.cu @@ -80,8 +80,8 @@ __global__ void depth_to_nv12_10_kernel(cv::cuda::PtrStepSz<float> depth, ushort luminance[(y+1)*pitch+x] = ushort(yuv3.x*255.0f) << 8; luminance[(y+1)*pitch+x+1] = ushort(yuv4.x*255.0f) << 8; - chroma[(y/2)*pitch+x] = ushort(Hb) << 8; - chroma[(y/2)*pitch+x+1] = ushort(Ha) << 8; + chroma[(y/2)*pitch+x] = ushort(Ha) << 8; + chroma[(y/2)*pitch+x+1] = ushort(Hb) << 8; } } diff --git a/components/codecs/src/nvidia_decoder.cpp b/components/codecs/src/nvidia_decoder.cpp index 3bda2c25b253f402d900956a089e6ffab2b49875..0901e518804ecf874005d7351ad56d53387ba6f4 100644 --- a/components/codecs/src/nvidia_decoder.cpp +++ b/components/codecs/src/nvidia_decoder.cpp @@ -177,7 +177,7 @@ bool NvidiaDecoder::decode(const ftl::codecs::Packet &pkt, cv::cuda::GpuMat &out height_ = nv_decoder_->GetHeight(); if (out.cols != ((is_float_frame && islossless) ? width_/2 : width_) || out.rows != height_) { - LOG(ERROR) << "Decoded frame not same size as buffer"; + LOG(ERROR) << "Decoded frame not same size as buffer: " << width_ << "x" << height_ << " -> " << out.cols << "x" << out.rows; return false; } diff --git a/components/common/cpp/src/cuda_common.cpp b/components/common/cpp/src/cuda_common.cpp index 2eb5d19f829c999c04cf4ec1e5c28bbd699f0521..ede4a998a4a104539d1b13ce32f6f278c2f3a8b2 100644 --- a/components/common/cpp/src/cuda_common.cpp +++ b/components/common/cpp/src/cuda_common.cpp @@ -10,6 +10,8 @@ static int dev_count = 0; static std::vector<cudaDeviceProp> properties; bool ftl::cuda::initialise() { + if (dev_count > 0) return true; + // Do an initial CUDA check cudaSafeCall(cudaGetDeviceCount(&dev_count)); CHECK_GE(dev_count, 1) << "No CUDA devices found"; @@ -50,6 +52,7 @@ void ftl::cuda::setDevice(int id) { } void ftl::cuda::setDevice() { + LOG(INFO) << "Using CUDA Device " << dev_to_use; cudaSafeCall(cudaSetDevice(dev_to_use)); } diff --git a/components/common/cpp/src/timer.cpp b/components/common/cpp/src/timer.cpp index 7d1cc2b5f315558ec282bfea7c7253948f72d732..bc8f97e2d6a49b192abc34a3bb8793242f87c900 100644 --- a/components/common/cpp/src/timer.cpp +++ b/components/common/cpp/src/timer.cpp @@ -168,7 +168,7 @@ static void trigger_jobs() { j.job(ts); } const int64_t after = get_time(); - if (after - before > 0) LOG(WARNING) << "Precision jobs took too long (" << (after-before) << "ms)"; + if (after - before > 1) LOG(WARNING) << "Precision jobs took too long (" << (after-before) << "ms)"; // Then do also non-blocking swap callbacks for (auto &j : jobs[kTimerSwap]) { diff --git a/components/operators/src/colours.cpp b/components/operators/src/colours.cpp index 8ca2c62bf8613e77df8100f6781ec5c36f47427e..6109120764568c430a5ee3d66ece862b8abc05b4 100644 --- a/components/operators/src/colours.cpp +++ b/components/operators/src/colours.cpp @@ -49,7 +49,7 @@ bool ColourChannels::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStre in.createTexture<uchar4>(Channel::Right, true); } - if (in.hasChannel(Channel::Depth)) { + /*if (in.hasChannel(Channel::Depth)) { auto &depth = in.get<cv::cuda::GpuMat>(Channel::Depth); if (depth.size() != col.size()) { auto cvstream = cv::cuda::StreamAccessor::wrapStream(stream); @@ -71,7 +71,7 @@ bool ColourChannels::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStre throw FTL_Error("Depth and colour channels and different resolutions: " << depth.size() << " vs " << right.size()); } } - } + }*/ return true; } diff --git a/components/operators/src/depth.cpp b/components/operators/src/depth.cpp index 24597a23312f53ca1bb233e7daa3cc7fd6cdedde..19696f67f35ea02946cbd8bfd4f3c792ce55141b 100644 --- a/components/operators/src/depth.cpp +++ b/components/operators/src/depth.cpp @@ -135,8 +135,10 @@ void DepthChannel::_createPipeline(size_t size) { if (pipe_ != nullptr) return; pipe_ = ftl::config::create<ftl::operators::Graph>(config(), "depth"); - depth_size_ = cv::Size( config()->value("width", 1280), - config()->value("height", 720)); + //depth_size_ = cv::Size( config()->value("width", 1280), + // config()->value("height", 720)); + + depth_size_ = cv::Size(0,0); pipe_->append<ftl::operators::ColourChannels>("colour"); // Convert BGR to BGRA pipe_->append<ftl::operators::CrossSupport>("cross"); @@ -168,6 +170,12 @@ bool DepthChannel::apply(ftl::rgbd::FrameSet &in, ftl::rgbd::FrameSet &out, cuda rbuf_.resize(in.frames.size()); + if (in.frames.size() > 0) { + if (depth_size_.width == 0) { + depth_size_ = in.firstFrame().get<cv::cuda::GpuMat>(Channel::Colour).size(); + } + } + for (size_t i=0; i<in.frames.size(); ++i) { if (!in.hasFrame(i)) continue; auto &f = in.frames[i]; diff --git a/components/rgbd-sources/src/group.cpp b/components/rgbd-sources/src/group.cpp index f1bc55a62405896f22236e4c765fd8ce02a8d159..55fd3c411fcbd0f51f8bdfc319a9fa4e7e4804f6 100644 --- a/components/rgbd-sources/src/group.cpp +++ b/components/rgbd-sources/src/group.cpp @@ -118,11 +118,12 @@ void Group::onFrameSet(const ftl::rgbd::VideoCallback &cb) { for (auto s : sources_) { jobs_++; - ftl::pool.push([this,s,ts](int id) { + //ftl::pool.push([this,s,ts](int id) { _retrieveJob(s); + //LOG(INFO) << "Retrieve latency: " << ftl::timer::get_time()-ts; --jobs_; _dispatchJob(s, ts); - }); + //}); } return true; }); diff --git a/components/rgbd-sources/src/source.cpp b/components/rgbd-sources/src/source.cpp index 37cff385a3cc29e5fedb69632d206f4b22e4ea53..2a9af58891810e3434416406b3fded6aef35c80c 100644 --- a/components/rgbd-sources/src/source.cpp +++ b/components/rgbd-sources/src/source.cpp @@ -195,7 +195,10 @@ bool Source::retrieve() { bool Source::dispatch(int64_t ts) { if (!callback_) return false; - if (is_dispatching || is_retrieving) return false; + if (is_dispatching || is_retrieving) { + LOG(WARNING) << "Previous distance not completed"; + return false; + } is_dispatching = true; _swap(); ftl::pool.push([this,ts](int id) { diff --git a/components/rgbd-sources/src/sources/stereovideo/pylon.cpp b/components/rgbd-sources/src/sources/stereovideo/pylon.cpp index 80abb14636ebc51b060ba099cf113294e482b269..b8155489ed9f1a32aa1e7abbc297357398da2070 100644 --- a/components/rgbd-sources/src/sources/stereovideo/pylon.cpp +++ b/components/rgbd-sources/src/sources/stereovideo/pylon.cpp @@ -4,6 +4,7 @@ #include <loguru.hpp> #include <ftl/threads.hpp> #include <ftl/rgbd/source.hpp> +#include <ftl/profiler.hpp> #include <pylon/PylonIncludes.h> #include <pylon/BaslerUniversalInstantCamera.h> @@ -49,6 +50,7 @@ PylonDevice::PylonDevice(nlohmann::json &config) if (rcam_) _configureCamera(rcam_); lcam_->StartGrabbing( Pylon::GrabStrategy_OneByOne); + if (rcam_) rcam_->StartGrabbing( Pylon::GrabStrategy_OneByOne); ready_ = true; } catch (const Pylon::GenericException &e) { @@ -56,8 +58,12 @@ PylonDevice::PylonDevice(nlohmann::json &config) LOG(ERROR) << "Pylon: An exception occurred - " << e.GetDescription(); } - width_ = value("depth_width", fullwidth_); - height_ = value("depth_height", fullheight_); + // Choose a good default depth res + width_ = value("depth_width", std::min(1280u,fullwidth_)) & 0xFFFe; + float aspect = float(fullheight_) / float(fullwidth_); + height_ = value("depth_height", std::min(uint32_t(aspect*float(width_)), fullheight_)) & 0xFFFe; + + LOG(INFO) << "Depth resolution: " << width_ << "x" << height_; // Allocate page locked host memory for fast GPU transfer left_hm_ = cv::cuda::HostMem(height_, width_, CV_8UC4); @@ -118,9 +124,14 @@ void PylonDevice::_configureCamera(CBaslerUniversalInstantCamera *cam) { bool PylonDevice::grab() { if (!isReady()) return false; + //int dev; + //cudaGetDevice(&dev); + //LOG(INFO) << "Current cuda device = " << dev; + try { - lcam_->WaitForFrameTriggerReady( 30, Pylon::TimeoutHandling_ThrowException); + FTL_Profile("Frame Capture", 0.001); if (rcam_) rcam_->WaitForFrameTriggerReady( 30, Pylon::TimeoutHandling_ThrowException); + else lcam_->WaitForFrameTriggerReady( 30, Pylon::TimeoutHandling_ThrowException); lcam_->ExecuteSoftwareTrigger(); if (rcam_) rcam_->ExecuteSoftwareTrigger(); @@ -145,15 +156,56 @@ bool PylonDevice::get(cv::cuda::GpuMat &l_out, cv::cuda::GpuMat &r_out, cv::cuda Mat &lfull = (!hasHigherRes()) ? l : hres; Mat &rfull = (!hasHigherRes()) ? r : rtmp_; + //ftl::cuda::setDevice(); + + //int dev; + //cudaGetDevice(&dev); + //LOG(INFO) << "Current cuda device = " << dev; + try { - Pylon::CGrabResultPtr result_left; - Pylon::CGrabResultPtr result_right; + FTL_Profile("Frame Retrieve", 0.005); + std::future<bool> future_b; + if (rcam_) { + future_b = std::move(ftl::pool.push([this,&rfull,&r,&l,c,&r_out,&h_r,&stream](int id) { + Pylon::CGrabResultPtr result_right; + int rcount = 0; + if (rcam_ && rcam_->RetrieveResult(0, result_right, Pylon::TimeoutHandling_Return)) ++rcount; + + if (rcount == 0 || !result_right->GrabSucceeded()) { + LOG(ERROR) << "Retrieve failed"; + return false; + } - int lcount = 0; - if (lcam_->RetrieveResult(0, result_left, Pylon::TimeoutHandling_Return)) ++lcount; + cv::Mat wrap_right( + result_right->GetHeight(), + result_right->GetWidth(), + CV_8UC1, + (uint8_t*)result_right->GetBuffer()); + + cv::cvtColor(wrap_right, rfull, cv::COLOR_BayerBG2BGRA); + + if (isStereo()) { + c->rectifyRight(rfull); + + if (hasHigherRes()) { + cv::resize(rfull, r, r.size(), 0.0, 0.0, cv::INTER_CUBIC); + h_r = rfull; + } + else { + h_r = Mat(); + } + } + + r_out.upload(r, stream); + return true; + })); + } - int rcount = 0; - if (rcam_ && rcam_->RetrieveResult(0, result_right, Pylon::TimeoutHandling_Return)) ++rcount; + Pylon::CGrabResultPtr result_left; + int lcount = 0; + { + if (lcam_->RetrieveResult(0, result_left, Pylon::TimeoutHandling_Return)) ++lcount; + } if (lcount == 0 || !result_left->GrabSucceeded()) { LOG(ERROR) << "Retrieve failed"; @@ -173,7 +225,6 @@ bool PylonDevice::get(cv::cuda::GpuMat &l_out, cv::cuda::GpuMat &r_out, cv::cuda } if (hasHigherRes()) { - //FTL_Profile("Frame Resize", 0.01); cv::resize(lfull, l, l.size(), 0.0, 0.0, cv::INTER_CUBIC); h_l.upload(hres, stream); } else { @@ -182,32 +233,8 @@ bool PylonDevice::get(cv::cuda::GpuMat &l_out, cv::cuda::GpuMat &r_out, cv::cuda l_out.upload(l, stream); - // TODO Perhaps multithread this as for OpenCV device - if (rcount > 0 && result_right->GrabSucceeded()) { - cv::Mat wrap_right( - result_right->GetHeight(), - result_right->GetWidth(), - CV_8UC1, - (uint8_t*)result_right->GetBuffer()); - - cv::cvtColor(wrap_right, rfull, cv::COLOR_BayerBG2BGRA); - - if (isStereo()) { - c->rectifyRight(rfull); - - if (hasHigherRes()) { - // TODO: Use threads? - cv::resize(rfull, r, r.size(), 0.0, 0.0, cv::INTER_CUBIC); - h_r = rfull; - } - else { - h_r = Mat(); - } - } - - r_out.upload(r, stream); - - //frame.create<cv::cuda::GpuMat>(ftl::codecs::Channel::Colour2).upload(tmp_); + if (rcam_) { + future_b.wait(); } } catch (const GenericException &e) { diff --git a/components/streams/src/parsers.cpp b/components/streams/src/parsers.cpp index 29a3350ec1550f26a38856cfe3137758998c1032..1a8add33dca4a397e329eeb1c3b9d2cdeb06ae30 100644 --- a/components/streams/src/parsers.cpp +++ b/components/streams/src/parsers.cpp @@ -10,11 +10,11 @@ ftl::rgbd::Camera ftl::stream::parseCalibration(const ftl::codecs::Packet &pkt) auto unpacked = msgpack::unpack((const char*)pkt.data.data(), pkt.data.size()); unpacked.get().convert(params); - //LOG(INFO) << "Got Calibration: " - // << std::get<0>(params).width << "x" << std::get<0>(params).height - // << ", fx: " << std::get<0>(params).fx - // << ", cx: " << std::get<0>(params).cx - // << ", cy: " << std::get<0>(params).cy; + LOG(INFO) << "Got Calibration: " + << std::get<0>(params).width << "x" << std::get<0>(params).height + << ", fx: " << std::get<0>(params).fx + << ", cx: " << std::get<0>(params).cx + << ", cy: " << std::get<0>(params).cy; return std::get<0>(params); } diff --git a/components/streams/src/sender.cpp b/components/streams/src/sender.cpp index aff7cd9a186968904bfa15be030983a9e480874b..37f23525c50458bc2ea524a9e80d033379896d5c 100644 --- a/components/streams/src/sender.cpp +++ b/components/streams/src/sender.cpp @@ -229,8 +229,8 @@ void Sender::post(ftl::rgbd::FrameSet &fs) { for (auto c : frame.getChannels()) { if (selected.has(c)) { // FIXME: Sends high res colour, but receive end currently broken - auto cc = (c == Channel::Colour && frame.hasChannel(Channel::ColourHighRes)) ? Channel::ColourHighRes : c; - //auto cc = c; + //auto cc = (c == Channel::Colour && frame.hasChannel(Channel::ColourHighRes)) ? Channel::ColourHighRes : c; + auto cc = c; StreamPacket spkt; spkt.version = 4; @@ -300,14 +300,14 @@ void Sender::_encodeChannel(ftl::rgbd::FrameSet &fs, Channel c, bool reset) { uint32_t offset = 0; while (offset < fs.frames.size()) { Channel cc = c; - if ((cc == Channel::Colour) && fs.firstFrame().hasChannel(Channel::ColourHighRes)) { - cc = Channel::ColourHighRes; - } + //if ((cc == Channel::Colour) && fs.firstFrame().hasChannel(Channel::ColourHighRes)) { + // cc = Channel::ColourHighRes; + //} - if ((cc == Channel::Right) && fs.firstFrame().hasChannel(Channel::RightHighRes)) { - cc = Channel::RightHighRes; - fs.frames[offset].upload(cc); - } + //if ((cc == Channel::Right) && fs.firstFrame().hasChannel(Channel::RightHighRes)) { + // cc = Channel::RightHighRes; + // fs.frames[offset].upload(cc); + //} StreamPacket spkt; spkt.version = 4; diff --git a/lib/libsgm/src/CMakeLists.txt b/lib/libsgm/src/CMakeLists.txt index 89e5035877010c146dd4d0d988b263a9ccddf9df..a338f8380db8656ca4c3f1d84a9a8d119b834df4 100644 --- a/lib/libsgm/src/CMakeLists.txt +++ b/lib/libsgm/src/CMakeLists.txt @@ -31,12 +31,12 @@ install( ) install( - DIRECTORY ${CMAKE_SOURCE_DIR}/include + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../include DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" ) install( - FILES ${CMAKE_SOURCE_DIR}/FindLibSGM.cmake + FILES ${CMAKE_CURRENT_SOURCE_DIR}/../FindLibSGM.cmake DESTINATION ${CMAKE_INSTALL_PREFIX} )