opencv multi channel element access

前端 未结 5 1882
长情又很酷
长情又很酷 2020-11-28 03:08

I\'m trying to learn how to use openCV\'s new c++ interface.

How do I access elements of a multi channel matrix. for example:

Mat myMat(size(3, 3), C         


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-28 03:48

    Vic you must use Vec3b instead of Vec3i:

    for (int i=0; i(i,j)[0] = 0;
                image.at(i,j)[1] = 0;
                image.at(i,j)[2] = 0;
            }
        }
    }
    

提交回复
热议问题