用 OpenCVSharp 4.5 跑一遍 OpenCV官方教程
原官方教程链接:OpenCV: Creating a video with OpenCV
using System;
using OpenCvSharp;
namespace ConsoleApp1
{
class tutorial35 : ITutorial
{
public void Run()
{
string inputVideofile = @"I:\csharp\videos\Megamind.avi";
string outputVideofile = @"I:\csharp\videos\Megamind_output.avi";
int channel = 2; // Red Channel
VideoCapture inputVideo = new VideoCapture(inputVideofile);
if (!inputVideo.IsOpened())
{
Console.WriteLine("Could not open video file {0}", inputVideofile);
return;
}
//string::size_type pAt = source.find_last_of('.'); // Find extension point
//const string NAME = source.substr(0, pAt) + argv[2][0] + ".avi"; //
OpenCVSharp 4.5实战:跟随OpenCV官方教程创建视频

本文档详细介绍了如何使用OpenCVSharp 4.5实现OpenCV官方教程中的视频处理,包括读取视频、处理特定通道、调整分辨率并保存为新文件。适合初学者理解OpenCV在C#中的应用。
最低0.47元/天 解锁文章
4696

被折叠的 条评论
为什么被折叠?



