|
进行了如此定义:Capture inputVideo = new Capture(source);
VideoWriter outputVideo = new VideoWriter("F:\\out.mp4" , ex, 24, w1, h1, true);
MCvMat src,src2;
Matrix<MCvMat> spl,spl2;
问题一:
如何spl2中的R通道值存储到spl对应的R通道中?
问题二:
在OpenCV中的merge(合并三通道值),在EmguCV中对应的是什么?
问题三:
如何将处理完的MCvMat格式的数据保存到outputVideo?
谢谢~
我想做的是改变视频某通道的颜色,参照着OpenCV写的,但在EmguCV改写时遇到了很多问题。请问还有其他办法改写视频中某通道的颜色么?以下是OpenCV中的代码:
Mat src,src2,res,res2;
vector<Mat> spl,spl2;
while( true) //Show the image captured in the window and repeat
{
inputVideo >> src;
inputVideo2 >> src2;
if( src.empty()) break; // check if at end
split(src, spl);
split(src2, spl2);
for( int i =0; i < 3; ++i)
if (i == 2) spl = spl2;
merge(spl, res);
outputVideo << res;
} |
|