c_cpp 启用BUILD_WITH_OPENMP时如何解决高CPU使用率问题

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp 启用BUILD_WITH_OPENMP时如何解决高CPU使用率问题相关的知识,希望对你有一定的参考价值。

// Set Color Stream format to YUYV insted of BGR8
rs2::config config;
config.enable_stream( rs2_stream::RS2_STREAM_COLOR, width, height, rs2_format::RS2_FORMAT_YUYV, fps );

// Start Pipline
const rs2::pipeline_profile pipeline_profile = pipeline.start( config );

// Retrieve Frameset
const rs2::frameset frameset = pipeline.wait_for_frames();

// Retrieve Color Frame from Frameset
const rs2::video_frame frame = aligned_frameset.get_color_frame();
const uint32_t width = frame.get_width();
const uint32_t height = frame.get_height();

// Retrieve cv::Mat from Color Frame, and Convert Color Space to BGR from YUYV using OpenCV.
cv::Mat image = cv::Mat( height, width, CV_8UC2, const_cast<void*>( frame.get_data() ) );
cv::cvtColor( image, image, cv::COLOR_YUV2BGR_YUYV );

以上是关于c_cpp 启用BUILD_WITH_OPENMP时如何解决高CPU使用率问题的主要内容,如果未能解决你的问题,请参考以下文章

c_cpp 在UISearchBar上使用空值启用键盘上的搜索按钮

c_cpp 在UISearchBar上使用空值启用键盘上的搜索按钮

c_cpp 在UISearchBar上使用空值启用键盘上的搜索按钮

c_cpp 在UISearchBar上使用空值启用键盘上的搜索按钮

c_cpp 在UISearchBar上使用空值启用键盘上的搜索按钮

c_cpp 在UISearchBar上使用空值启用键盘上的搜索按钮