Access to each separate channel in OpenCV

后端 未结 5 1101
执念已碎
执念已碎 2021-01-01 10:06

I have an image with 3 channels (img) and another one with a single channel (ch1).

    Mat img(5,5,CV_64FC3);
    Mat ch1 (5,5,CV_64FC1);

I

5条回答
  •  盖世英雄少女心
    2021-01-01 11:02

    A simpler one if you have a RGB with 3 channels is cvSplit() if i'm not wrong, you have less to configure... (and i think it is also well optimized).

    I would use cvMixChannel() for "harder" tasks... :p (i know i am lazy).

    here is the documentation for cvSplit()

提交回复
热议问题