opencv mat布局显示视频流

  • 采用Merge对mat进行定位,放置,并将数据copy到mat中,实现分块布局显示视频流。
	cv::Mat ori_img;
	cv::Mat  img_base_mode;
	cv::Mat  img_black_mode;
	cv::Mat img_firedanger_mode;
	cv::Mat img_rescue_mode;
	cv::Mat img_heat_mode;
	cv::Mat img_standard_mode;
	Mat Merge(3 * height, 2 * width, CV_8UC3);
	cv::Mat  img1 = Merge(Rect(0, 0, width, height));
	cv::Mat  img2 = Merge(Rect(width, 0, width, height));
	cv::Mat  img3 = Merge(Rect(0, height, width, height));
	cv::Mat  img4 = Merge(Rect(width, height, width, height));
	cv::Mat  img5 = Merge(Rect(0, height*2, width, height));
	cv::Mat  img6 = Merge(Rect(width, height*2, width, height));
	for (int m = 0; m < TotalFrames; m++)
	{
		DrcFireAdaptive2DifferentMode(instance, pus_src, puc_dst, width, height, Y650, Y150, BASE_FIRE_MODE, ITA_FIRE_FIRE);
		img_base_mode = cv::Mat( height, width, CV_8UC3, puc_dst);
		img_base_mode.copyTo(img1);
		cv::imshow("Merge", Merge);
		cv::waitKey(50);
	}
	cv::destroyAllWindows();

你可能感兴趣的:(C++,opencv)