OpenCV中文网站

 找回密码
 立即注册
搜索
热搜: 安装 配置
查看: 3578|回复: 0

EmguCV 改变视频某通道值得相关问题

[复制链接]
发表于 2012-6-20 11:45:03 | 显示全部楼层 |阅读模式
进行了如此定义: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;
               
    }
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|OpenCV中文网站

GMT+8, 2024-4-28 05:55 , Processed in 0.009507 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表