OpenCV开发之矩阵通道分离与合并

OpenCV开发之矩阵通道分离与合并_第1张图片

演示代码:

//Mat通道分离与合并
    vector planes;
    split(mat3dims, planes);
    cout << planes.size() << endl;
    for (int i = 0; i < planes.size(); i++)
    {
        cout << planes[i] << endl;
    }
    //Mat通道合并
    Mat p1 = (Mat_(2, 2) << 1,2,3,4);
    Mat p2 = (Mat_(2, 2) << 5,6,7,8);
    Mat p3 = (Mat_(2, 2) <<

你可能感兴趣的:(C++,OpenCV开发,opencv,矩阵,计算机视觉)