C# Class OpenCvSharp.Extensions.WriteableBitmapConverter

A static class which provides conversion between System.Windows.Media.Imaging.WriteableBitmap and IplImage
显示文件 Open project: shimat/opencvsharp Class Usage Examples

Public Methods

Method Description
ToWriteableBitmap ( this src ) : System.Windows.Media.Imaging.WriteableBitmap

Converts Mat to WriteableBitmap (dpi=96, BitmapPalette=null)

ToWriteableBitmap ( this src, System.Windows.Media.PixelFormat pf ) : System.Windows.Media.Imaging.WriteableBitmap

Converts Mat to WriteableBitmap (dpi=96, BitmapPalette=null)

ToWriteableBitmap ( this src, double dpiX, double dpiY, System.Windows.Media.PixelFormat pf, System.Windows.Media.Imaging.BitmapPalette bp ) : System.Windows.Media.Imaging.WriteableBitmap

Converts Mat to WriteableBitmap. The arguments of this method corresponds the consructor of WriteableBitmap.

ToWriteableBitmap ( OpenCvSharp.CPlusPlus.Mat src, System.Windows.Media.Imaging.WriteableBitmap dst ) : void

Converts Mat to WriteableBitmap. This method is more efficient because new instance of WriteableBitmap is not allocated.

Private Methods

Method Description
GetOptimumChannels ( System.Windows.Media.PixelFormat f ) : int

指定したPixelFormatに適合するIplImageのチャンネル数を返す

GetOptimumPixelFormats ( MatType type ) : System.Windows.Media.PixelFormat

指定したIplImageのビット深度・チャンネル数に適合するPixelFormatを返す

GetOptimumType ( System.Windows.Media.PixelFormat f ) : MatType

指定したPixelFormatに適合するMatTypeを返す

WriteableBitmapConverter ( ) : System

Method Details

ToWriteableBitmap() public static method

Converts Mat to WriteableBitmap (dpi=96, BitmapPalette=null)
public static ToWriteableBitmap ( this src ) : System.Windows.Media.Imaging.WriteableBitmap
src this Input Mat
return System.Windows.Media.Imaging.WriteableBitmap

ToWriteableBitmap() public static method

Converts Mat to WriteableBitmap (dpi=96, BitmapPalette=null)
public static ToWriteableBitmap ( this src, System.Windows.Media.PixelFormat pf ) : System.Windows.Media.Imaging.WriteableBitmap
src this Input Mat
pf System.Windows.Media.PixelFormat Pixel format of output WriteableBitmap
return System.Windows.Media.Imaging.WriteableBitmap

ToWriteableBitmap() public static method

Converts Mat to WriteableBitmap. The arguments of this method corresponds the consructor of WriteableBitmap.
public static ToWriteableBitmap ( this src, double dpiX, double dpiY, System.Windows.Media.PixelFormat pf, System.Windows.Media.Imaging.BitmapPalette bp ) : System.Windows.Media.Imaging.WriteableBitmap
src this Input Mat
dpiX double Horizontal dots per inch
dpiY double Vertical dots per inch
pf System.Windows.Media.PixelFormat Pixel format of output WriteableBitmap
bp System.Windows.Media.Imaging.BitmapPalette Bitmap pallette
return System.Windows.Media.Imaging.WriteableBitmap

ToWriteableBitmap() public static method

Converts Mat to WriteableBitmap. This method is more efficient because new instance of WriteableBitmap is not allocated.
public static ToWriteableBitmap ( OpenCvSharp.CPlusPlus.Mat src, System.Windows.Media.Imaging.WriteableBitmap dst ) : void
src OpenCvSharp.CPlusPlus.Mat Input Mat
dst System.Windows.Media.Imaging.WriteableBitmap Output WriteableBitmap
return void