In OpenCV, it's possible to create a cv::Mat representing a sub-rectangle of an existing cv::Mat, with cv::Mat::operator() functions. This is made possible by the Mat step parameter which enables non contiguous data, allowing padding bytes in each axis.
Is it possible to have a single channel shallow copy selected in an RGB image, the same way? I can't find whether cv::split is a shallow or deep copy.
What I need to do is applying gaussian blur on the G channel of a RGB image. Do I necessarily have to deep copy the G channel to a single channel image first?
cv::Mat GreenCH = SrcImg.reshape( 1, SrcImg.rows * SrcImg.cols ).col(1);, you can obtainMatto access only green ch, but shape is not good... So, very simple process likes "fill green ch whole with same value" can be perfomed, but blurring is...