Class WriteableBitmapConverter
Static class which provides conversion between System.Windows.Media.Imaging.WriteableBitmap and Mat
Inheritance
Inherited Members
Namespace: OpenCvSharp.WpfExtensions
Assembly: OpenCvSharp.WpfExtensions.dll
Syntax
public static class WriteableBitmapConverter
Methods
| Improve this Doc View SourceToMat(WriteableBitmap)
Converts WriteableBitmap to IplImage
Declaration
public static Mat ToMat(this WriteableBitmap src)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Imaging.WriteableBitmap | src | Input WriteableBitmap |
Returns
Type | Description |
---|---|
Mat | IplImage |
ToMat(WriteableBitmap, Mat)
Converts WriteableBitmap to Mat
Declaration
public static void ToMat(this WriteableBitmap src, Mat dst)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Imaging.WriteableBitmap | src | Input WriteableBitmap |
Mat | dst | Output Mat |
ToWriteableBitmap(Mat)
Converts Mat to WriteableBitmap (dpi=96, BitmapPalette=null)
Declaration
public static WriteableBitmap ToWriteableBitmap(this Mat src)
Parameters
Type | Name | Description |
---|---|---|
Mat | src | Input Mat |
Returns
Type | Description |
---|---|
System.Windows.Media.Imaging.WriteableBitmap | WriteableBitmap |
ToWriteableBitmap(Mat, Double, Double, PixelFormat, BitmapPalette)
Converts Mat to WriteableBitmap. The arguments of this method corresponds the consructor of WriteableBitmap.
Declaration
public static WriteableBitmap ToWriteableBitmap(this Mat src, double dpiX, double dpiY, PixelFormat pf, BitmapPalette bp)
Parameters
Type | Name | Description |
---|---|---|
Mat | src | Input Mat |
System.Double | dpiX | Horizontal dots per inch |
System.Double | dpiY | Vertical dots per inch |
System.Windows.Media.PixelFormat | pf | Pixel format of output WriteableBitmap |
System.Windows.Media.Imaging.BitmapPalette | bp | Bitmap palette |
Returns
Type | Description |
---|---|
System.Windows.Media.Imaging.WriteableBitmap | WriteableBitmap |
ToWriteableBitmap(Mat, WriteableBitmap)
Converts Mat to WriteableBitmap. This method is more efficient because new instance of WriteableBitmap is not allocated.
Declaration
public static void ToWriteableBitmap(Mat src, WriteableBitmap dst)
Parameters
Type | Name | Description |
---|---|---|
Mat | src | Input Mat |
System.Windows.Media.Imaging.WriteableBitmap | dst | Output WriteableBitmap |
ToWriteableBitmap(Mat, PixelFormat)
Converts Mat to WriteableBitmap (dpi=96, BitmapPalette=null)
Declaration
public static WriteableBitmap ToWriteableBitmap(this Mat src, PixelFormat pf)
Parameters
Type | Name | Description |
---|---|---|
Mat | src | Input Mat |
System.Windows.Media.PixelFormat | pf | Pixel format of output WriteableBitmap |
Returns
Type | Description |
---|---|
System.Windows.Media.Imaging.WriteableBitmap | WriteableBitmap |