Show / Hide Table of Contents

Class WriteableBitmapConverter

Static class which provides conversion between System.Windows.Media.Imaging.WriteableBitmap and Mat

Inheritance
System.Object
WriteableBitmapConverter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OpenCvSharp.WpfExtensions
Assembly: OpenCvSharp.WpfExtensions.dll
Syntax
public static class WriteableBitmapConverter

Methods

| Improve this Doc View Source

ToMat(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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX