C# Class OpenCvSharp.VideoWriter

AVI Video File Writer
Inheritance: OpenCvSharp.DisposableCvObject
Afficher le fichier Open project: shimat/opencvsharp Class Usage Examples

Méthodes publiques

Méthode Description
FourCC ( char c1, char c2, char c3, char c4 ) : int

Concatenates 4 chars to a fourcc code. This static method constructs the fourcc code of the codec to be used in the constructor VideoWriter::VideoWriter or VideoWriter::open.

FourCC ( string code ) : int

Concatenates 4 chars to a fourcc code. This static method constructs the fourcc code of the codec to be used in the constructor VideoWriter::VideoWriter or VideoWriter::open.

IsOpened ( ) : bool

Returns true if video writer has been successfully initialized.

Open ( string fileName, FourCC fourcc, double fps, Size frameSize, bool isColor = true ) : void

Creates video writer structure.

Open ( string fileName, int fourcc, double fps, Size frameSize, bool isColor = true ) : void

Creates video writer structure.

Open ( string fileName, string fourcc, double fps, Size frameSize, bool isColor = true ) : void

Creates video writer structure.

Release ( ) : void

VideoWriter ( ) : System

VideoWriter ( string fileName, FourCC fourcc, double fps, Size frameSize, bool isColor = true ) : System

Creates video writer structure.

VideoWriter ( string fileName, int fourcc, double fps, Size frameSize, bool isColor = true ) : System

Creates video writer structure.

VideoWriter ( string fileName, string fourcc, double fps, Size frameSize, bool isColor = true ) : System

Creates video writer structure.

Write ( OpenCvSharp.Mat image ) : void

Writes/appends one frame to video file.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Méthode Description
VideoWriter ( IntPtr ptr ) : System

Initializes from native pointer

Method Details

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. ///
Résultat void

FourCC() public static méthode

Concatenates 4 chars to a fourcc code. This static method constructs the fourcc code of the codec to be used in the constructor VideoWriter::VideoWriter or VideoWriter::open.
public static FourCC ( char c1, char c2, char c3, char c4 ) : int
c1 char
c2 char
c3 char
c4 char
Résultat int

FourCC() public static méthode

Concatenates 4 chars to a fourcc code. This static method constructs the fourcc code of the codec to be used in the constructor VideoWriter::VideoWriter or VideoWriter::open.
public static FourCC ( string code ) : int
code string
Résultat int

IsOpened() public méthode

Returns true if video writer has been successfully initialized.
public IsOpened ( ) : bool
Résultat bool

Open() public méthode

Creates video writer structure.
public Open ( string fileName, FourCC fourcc, double fps, Size frameSize, bool isColor = true ) : void
fileName string Name of the output video file.
fourcc FourCC 4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. /// Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fps double Framerate of the created video stream.
frameSize Size Size of video frames.
isColor bool If it is true, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).
Résultat void

Open() public méthode

Creates video writer structure.
public Open ( string fileName, int fourcc, double fps, Size frameSize, bool isColor = true ) : void
fileName string Name of the output video file.
fourcc int 4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. /// Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fps double Framerate of the created video stream.
frameSize Size Size of video frames.
isColor bool If it is true, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).
Résultat void

Open() public méthode

Creates video writer structure.
public Open ( string fileName, string fourcc, double fps, Size frameSize, bool isColor = true ) : void
fileName string Name of the output video file.
fourcc string 4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. /// Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fps double Framerate of the created video stream.
frameSize Size Size of video frames.
isColor bool If it is true, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).
Résultat void

Release() public méthode

public Release ( ) : void
Résultat void

VideoWriter() public méthode

public VideoWriter ( ) : System
Résultat System

VideoWriter() public méthode

Creates video writer structure.
public VideoWriter ( string fileName, FourCC fourcc, double fps, Size frameSize, bool isColor = true ) : System
fileName string Name of the output video file.
fourcc FourCC 4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. /// Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fps double Framerate of the created video stream.
frameSize Size Size of video frames.
isColor bool If it is true, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).
Résultat System

VideoWriter() public méthode

Creates video writer structure.
public VideoWriter ( string fileName, int fourcc, double fps, Size frameSize, bool isColor = true ) : System
fileName string Name of the output video file.
fourcc int 4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. /// Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fps double Framerate of the created video stream.
frameSize Size Size of video frames.
isColor bool If it is true, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).
Résultat System

VideoWriter() public méthode

Creates video writer structure.
public VideoWriter ( string fileName, string fourcc, double fps, Size frameSize, bool isColor = true ) : System
fileName string Name of the output video file.
fourcc string 4-character code of codec used to compress the frames. For example, "PIM1" is MPEG-1 codec, "MJPG" is motion-jpeg codec etc. /// Under Win32 it is possible to pass null in order to choose compression method and additional compression parameters from dialog.
fps double Framerate of the created video stream.
frameSize Size Size of video frames.
isColor bool If it is true, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only).
Résultat System

Write() public méthode

Writes/appends one frame to video file.
public Write ( OpenCvSharp.Mat image ) : void
image OpenCvSharp.Mat the written frame.
Résultat void