VisioForge

Last updated: November 2026

AForge.NET Alternative: Migration Guide to VisioForge .Net SDK

Replace abandoned AForge.NET with a modern, cross-platform .NET SDK

AForge.NET is an open-source C# framework for video capture, computer vision and image processing that has been abandoned since July 2013 and targets .NET Framework 2.0. This guide maps each AForge.NET namespace to VisioForge .Net SDK for .NET 6-10. AForge.Video classes move to VideoCaptureCoreX in Video Capture SDK .NET: VideoCaptureDevice becomes VideoCaptureDeviceSourceSettings, MJPEGStream becomes HTTPMJPEGSourceSettings, and ScreenCaptureStream becomes a screen source for Windows, macOS or Linux. AForge.Vision motion detection moves to MotionDetectionExSettings in VideoCaptureCoreX or to CVMotionCellsBlock in Media Blocks SDK. Additionally, AForge.NET never had face or pedestrian detection: VisioForge adds Haar cascade and DNN face detectors with privacy blur, plus a HOG-based pedestrian detector. AForge.Imaging filters map partly to VisioForge CV blocks such as Canny edge detection and histogram equalization, and the rest to OpenCvSharp. For example, a webcam recorder with motion alerts needs one VideoCaptureCoreX engine instead of a separate capture device, motion detector and file writer.

From €250/year · Lifetime from €900

Why Replace AForge.NET?

AForge.NET should be replaced because the framework has been abandoned since July 2013 and has received no updates, security patches or bug fixes since then. AForge.NET targets .NET Framework 2.0, so the code cannot run on .NET 6-10 without community forks of varying quality. Its video capture is built on DirectShow, a legacy Windows API that Microsoft has superseded with Media Foundation, so its capture runs only on Windows. Additionally, AForge.NET has no support for H.265, AV1 or VP9. For example, moving a .NET Framework webcam app to .NET 8 leaves two options: a community fork of AForge.Video that still runs only on Windows, or VideoCaptureCoreX, which covers Windows, macOS, Linux, iOS and Android with one API.

RiskImpact
No security patchesVulnerabilities in video/image processing remain unpatched
No .NET 6+ supportCannot use modern .NET features, AOT, or cross-platform deployment
No new codec supportNo H.265, AV1, VP9, or modern container formats
No communityForum closed April 2012, no active maintainers
DirectShow dependencyLegacy API, superseded by Media Foundation
Windows-onlyCannot target macOS, Linux, iOS, Android

AForge.Video → VisioForge Video Capture SDK .Net

Class Mapping

AForge.Video ComponentVisioForge Replacement
VideoCaptureDeviceVideoCaptureCoreX + VideoCaptureDeviceSourceSettings
MJPEGStreamVideoCaptureCoreX + HTTPMJPEGSourceSettings
JPEGStreamVideoCaptureCoreX + HTTPMJPEGSourceSettings for MJPEG streams; no direct equivalent for snapshot URLs
ScreenCaptureStreamVideoCaptureCoreX + ScreenCaptureD3D11SourceSettings (Windows), ScreenCaptureMacOSSourceSettings, ScreenCaptureXDisplaySourceSettings (Linux)
FileVideoSourceMediaPlayerCoreX (playback) or VideoEditCoreX (processing)
AsyncVideoSourceBuilt-in — all VisioForge sources are async by default
NewFrameEventArgsOnVideoFrameBuffer event

C# Webcam Capture

AForge.NET — webcam capture (before)

C#
// AForge: Manual device enumeration, callback-based, no recording
var videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
var videoSource = new VideoCaptureDevice(videoDevices[0].MonikerString);
videoSource.NewFrame += (sender, eventArgs) =>
{
    Bitmap frame = (Bitmap)eventArgs.Frame.Clone();
    pictureBox.Image = frame;
    // Manual recording requires separate code
};
videoSource.Start();

// Cleanup
videoSource.SignalToStop();
videoSource.WaitForStop();

VisioForge — C# webcam capture (after)

C#
// VisioForge: Typed API, async, preview + recording built-in
var capture = new VideoCaptureCoreX(videoView);  // Preview automatic
var devices = await DeviceEnumerator.Shared.VideoSourcesAsync();
capture.Video_Source = new VideoCaptureDeviceSourceSettings(devices[0]);
capture.Outputs_Add(new MP4Output("recording.mp4"), true);
await capture.StartAsync();

// Stop
await capture.StopAsync();

C# IP Camera RTSP / MJPEG Streaming

AForge.NET — MJPEG stream (before)

C#
// AForge: MJPEG only, no RTSP, no reconnection
var stream = new MJPEGStream("http://camera-ip/mjpg/video.mjpg");
stream.NewFrame += (sender, eventArgs) =>
{
    pictureBox.Image = (Bitmap)eventArgs.Frame.Clone();
};
stream.Start();

VisioForge — C# RTSP IP camera capture (after)

C#
// VisioForge: RTSP, RTMP, HLS, MJPEG
// Reconnection is opt-in: configure FallbackSwitch on the source settings
var capture = new VideoCaptureCoreX(videoView);
// RTSPSourceSettings uses a static factory (private constructor)
capture.Video_Source = await RTSPSourceSettings.CreateAsync(
    new Uri("rtsp://camera-ip/stream"), "admin", "pass", audioEnabled: true);
capture.Outputs_Add(new MP4Output("recording.mp4"), true);
await capture.StartAsync();

C# Screen Capture and Recording

AForge.NET — screen capture (before)

C#
// AForge: Basic, CPU-intensive, no recording
var screenStream = new ScreenCaptureStream(Screen.PrimaryScreen.Bounds);
screenStream.NewFrame += (sender, eventArgs) =>
{
    pictureBox.Image = (Bitmap)eventArgs.Frame.Clone();
    // Must manually encode and write frames to create a recording
};
screenStream.Start();

VisioForge — C# screen recorder (after)

C#
// VisioForge: monitor selection, cursor capture, automatic H.264 encoder
var capture = new VideoCaptureCoreX(videoView);
// Windows source; macOS and Linux have their own settings classes
capture.Video_Source = new ScreenCaptureD3D11SourceSettings
{
    MonitorIndex = 0,
    CaptureCursor = true,
    FrameRate = new VideoFrameRate(25)
};
capture.Outputs_Add(new MP4Output("screen.mp4"), true);
await capture.StartAsync();

AForge.Vision → VisioForge Computer Vision Blocks

Class Mapping

AForge.Vision ComponentVisioForge Replacement
MotionDetectorMotionDetectionExSettings + OnMotionDetection on VideoCaptureCoreX, or CVMotionCellsBlock in Media Blocks
TwoFramesDifferenceDetectorCVMotionCellsBlock — grid-based motion cells
SimpleBackgroundModelingDetectorObjectDetector (VisioForge.Core.CV) — MOG2 background subtraction (history: 500 frames, variance threshold: 40)
CustomFrameDifferenceDetectorConfigurable CVMotionCellsSettings
MotionAreaHighlightingCVMotionCellsBlock with Display = true — draws the cells where motion was detected
GridMotionAreaProcessingCVMotionCellsBlock — motion grid set through GridSize, 8 to 32 cells per axis
BlobCounterCarCounter (VisioForge.Core.CV) — blob tracking, contour detection, vehicle counting across a tracking line

C# Motion and Object Detection

AForge.NET — motion detection (before)

C#
// AForge: Manual frame processing, no recording integration
var detector = new MotionDetector(
    new TwoFramesDifferenceDetector(),
    new MotionAreaHighlighting());

videoSource.NewFrame += (sender, eventArgs) =>
{
    float motionLevel = detector.ProcessFrame((Bitmap)eventArgs.Frame.Clone());
    if (motionLevel > 0.02f)
        Console.WriteLine($"Motion: {motionLevel * 100:F1}%");
};

VisioForge — event-based motion detection (Video Capture SDK)

C#
// Integrated detection during capture + recording
var capture = new VideoCaptureCoreX(videoView);
capture.Video_Source = new VideoCaptureDeviceSourceSettings(devices[0]);
capture.Outputs_Add(new MP4Output("recording.mp4"), true);

capture.Motion_Detection = new MotionDetectionExSettings();
capture.OnMotionDetection += (s, e) =>
{
    if (e.LevelPercent > 30)
        Console.WriteLine($"Motion: {e.LevelPercent}%");
};

await capture.StartAsync();

VisioForge — CVMotionCellsBlock (MediaBlocks pipeline)

C#
// Motion cells grid: raises MotionDetected as cells change
var settings = new CVMotionCellsSettings
{
    Display = true,
    GridSize = new Size(16, 16)
};
var detector = new CVMotionCellsBlock(settings);
detector.MotionDetected += (s, e) => Console.WriteLine("Motion");

C# Face Detection and Pedestrian Detection (Not Available in AForge)

Class Mapping

FeatureVisioForge Block
Haar cascade face detectionCascadeFaceDetectorBlock — frontal/profile face, eye, nose, mouth detection
DNN face detectionDNNFaceDetectorBlock — Caffe SSD model, confidence filtering
DLib face detectionFaceDetectorBlock (VisioForge.Core.CVD) — DLib HOG+SVM frontal face detector
Pedestrian detectionPedestrianDetector — built-in HOG+SVM people detector, added through Video_Processors
Lens obstruction detectionCameraCoveredDetector — Canny edge detection

C# Face Detection

AForge.NET (before)

C#
// AForge had no built-in face detection — required manual Haar cascade code
// or using Accord.NET's HaarObjectDetector on top of AForge frames

VisioForge — Haar cascade face detection

C#
var settings = new CascadeFaceDetectorSettings
{
    DetectFrontalFace = true,
    DetectProfileFace = true,
    DetectEyes = true,
    DetectNose = true,
    DetectMouth = true,
    MinFaceSize = new Size(30, 30),
    ScaleFactor = 1.1f,
    DrawEnabled = true,
    Blur = false,    // set true for privacy blur
    Pixelate = false // set true for privacy pixelation
};
var detector = new CascadeFaceDetectorBlock(settings);

VisioForge — DNN face detector

C#
var settings = new DNNFaceDetectorSettings
{
    Confidence = 0.25f,
    DrawEnabled = true,
    Blur = true  // built-in privacy blur
};
var detector = new DNNFaceDetectorBlock(settings);

VisioForge — DLib face detector

C#
var settings = new FaceDetectorSettings
{
    DrawEnabled = true,
    MinFaceSize = new Size(30, 30)
};
var detector = new FaceDetectorBlock(settings);

C# Pedestrian Detection

AForge.NET (before)

C#
// AForge had no pedestrian detection — required manual HOG+SVM implementation

VisioForge — pedestrian detection (after)

C#
var detector = new PedestrianDetector
{
    DrawEnabled = true,
    VideoScale = 1.0,
    FramesToSkip = 2
};
detector.Init();
detector.OnPedestrianDetected += OnPedestrianDetected;
capture.Video_Processors.Add(detector);
// HOG descriptors + SVM classifier

AForge.Imaging → VisioForge CV + OpenCvSharp

Class Mapping

AForge.Imaging FeatureVisioForge Built-inStandalone OpenCvSharp
GaussianBlurCVSmoothBlock, or CVProcess.BlurRegion() for a region (kernel 23x23)Cv2.GaussianBlur()
PixellateCVProcess.PixelateRegion()Custom downscale/upscale
CannyEdgeDetectorCVEdgeDetectBlockCv2.Canny()
Erosion / DilationCVErodeBlock / CVDilateBlockCv2.Erode() / Cv2.Dilate()
BlobCounterCarCounter — contour detection, area/aspect filtering, convex hullCv2.FindContours()
GrayscaleBuilt-in BGR→Gray conversion in all detectorsCv2.CvtColor()
ThresholdBuilt-in binary thresholding in ObjectDetector and CarCounterCv2.Threshold()
ResizeBilinearBuilt-in video scaling in all detector settingsCv2.Resize()
HistogramEqualizationCVEqualizeHistogramBlockCv2.EqualizeHist()
HSLFiltering / color filters—Cv2.InRange() / Cv2.CvtColor()
HoughLineTransformation—Cv2.HoughLinesP()
SobelEdgeDetectorCVSobelBlockCv2.Sobel()
Template matchingCVTemplateMatchBlockCv2.MatchTemplate()

Migration Checklist

  • Inventory AForge references — Find all `using AForge.*` in your project
  • Install VisioForge NuGet packages
  • Replace video source classes
  • Replace motion detection
  • Replace face detection
  • Replace blob/object detection
  • Remove manual frame loops
  • Add recording/streaming
  • Target modern .NET — .NET 6-10
  • Test cross-platform
  • For image processing — VisioForge CV covers blur, pixelate, Canny, Sobel, morphology, template matching; use OpenCvSharp for additional filters

What You Gain After Migration

CapabilityAForge.NETAfter Migration
Framework.NET Framework 2.0.NET 6-10
PlatformsWindows onlyWindows, macOS, Linux, iOS, Android
Video captureBasic DirectShowProfessional SDK with async API
RecordingManual implementationBuilt-in (MP4, MKV, AVI, WebM)
Hardware encodingNoneNVENC, QSV, AMF, VideoToolbox
StreamingNoneRTMP, HLS, SRT, NDI
Audio effectsNone40+ across both engines (EQ, reverb, chorus, 3D)
Video effectsNoneGPU + CPU pipeline
Face detectionNoneHaar + DNN (Caffe SSD) with blur/pixelate; DLib HOG detection only
Motion detectionBasic frame differencingMOG2 background subtraction + object tracking with IDs
Pedestrian detectionNoneBuilt-in HOG+SVM people detector
IP camerasMJPEG onlyRTSP, RTMP, HLS, ONVIF
Virtual cameraNoneOutput to Zoom/Teams/OBS
MaintenanceAbandoned (2013)Active development
SecurityUnpatchedRegular updates

Frequently Asked Questions

Is AForge.NET still maintained?
No. AForge.NET has been abandoned since July 2013 with no updates, security patches, or .NET 6+ support. Community forks exist but vary in quality and maintenance. Use VisioForge .Net SDK as a modern AForge.NET alternative.
What is the best AForge.NET alternative for C# video capture?
VisioForge Video Capture SDK .Net replaces AForge.Video with a modern async API supporting webcams, IP cameras (RTSP/ONVIF), screen capture, and output to MP4, WebM, and other formats on .NET 6-10.
Does VisioForge replace AForge.Imaging filters?
Partially. VisioForge CV includes blur, pixelation, Canny and Sobel edge detection, morphological operations, grayscale conversion, histogram equalization, and template matching. For the rest of the image filters (Hough, color filtering), use OpenCvSharp alongside VisioForge.
Can I use VisioForge for C# face detection without AForge?
Yes. VisioForge .Net SDK includes three built-in face detection engines — Haar cascade, DNN-based, and DLib-based; the Haar and DNN engines can also blur or pixelate detected faces for privacy. No AForge or Accord.NET dependency needed.
Does VisioForge support .NET 6, .NET 8, .NET 9, and .NET 10?
Yes. All VisioForge .Net SDK packages support .NET 6 through .NET 10, including cross-platform deployment on Windows, macOS, Linux, iOS, and Android.
Can I migrate from AForge.NET incrementally?
Yes. VisioForge SDKs can coexist with AForge.NET packages during migration. Replace one component at a time — start with video capture, then detection, then imaging — and remove AForge NuGet packages as each step completes.

From €250/year · Lifetime from €900

Start Your Migration

Related Migration Guides