Emgucv不完整图像分割试验(六)——通道

说好的不做图像处理了,没想到麦穗的图像识别那么难,最后还是降到了图像处理的阶段。

最终结果如下:

细节不便透露,主要用到的通道的过滤。

            VectorOfMat channels = new VectorOfMat(); //创建vectorOfmat类型存储分离后的图像
            CvInvoke.Split(tempImage, channels); //通道分离
            InputOutputArray mix_channel_RGB = channels.GetInputOutputArray(); //获得数组
            Mat channelG = mix_channel_RGB.GetMat(1);
            Mat channelB = mix_channel_RGB.GetMat(0);
            Mat channelR = mix_channel_RGB.GetMat(2);
            Image<Gray, byte> newImage = channelG.ToImage<Gray, byte>();

初开博客,目的是交流与合作,本人QQ:273651820。

猜你喜欢

转载自blog.csdn.net/qq_26996385/article/details/85211973