コード例 #1
0
        public static void ImageToOpenCVIm()
        {
            var img = new Image<Bgr, int>(640, 480);

            IplImage iplImage = img.AsOpenCvImage();
            Console.WriteLine("Image<,> to IplImage: Color {0} is transformed into IplImage depth: {1}.", img.ColorInfo, iplImage.ChannelDepth);
        }
コード例 #2
0
        public static void OpenCVImToImage()
        {
            var img = new Image<Bgr, float>(640, 480);
            IplImage iplImage = img.AsOpenCvImage();

            var convertedImg = iplImage.AsImage(); //define destructor optionally
            Console.WriteLine("IplImage to Image<,> automatically: IplImage depth {0} is transformed into: {1}.",  iplImage.ChannelDepth, convertedImg.ColorInfo);
        }