其他分享
首页 > 其他分享> > 访问cv::Mat数据

访问cv::Mat数据

作者:互联网

 

  将单通道数据值变成3通道

	cv::Mat mask_face(H, w, CV_8UC3, ppu8Plane[0]);
	for (int i = 0; i < mask_glass.rows; i++) {
		for (int j = 0; j < mask_glass.cols; j++) {
			mask_face.at<uchar>(i, j * 3 + 0) = mask_face0.at<uchar>(i, j);
			mask_face.at<uchar>(i, j * 3 + 1) = mask_face0.at<uchar>(i, j);
			mask_face.at<uchar>(i, j * 3 + 2) = mask_face0.at<uchar>(i, j);
		}
	}

  

标签:Mat,glass,int,mask,face,访问,face0,cv
来源: https://www.cnblogs.com/wjjcjj/p/14648988.html