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.
| Risk | Impact |
|---|---|
| No security patches | Vulnerabilities in video/image processing remain unpatched |
| No .NET 6+ support | Cannot use modern .NET features, AOT, or cross-platform deployment |
| No new codec support | No H.265, AV1, VP9, or modern container formats |
| No community | Forum closed April 2012, no active maintainers |
| DirectShow dependency | Legacy API, superseded by Media Foundation |
| Windows-only | Cannot target macOS, Linux, iOS, Android |
AForge.Video → VisioForge Video Capture SDK .Net
Class Mapping
| AForge.Video Component | VisioForge Replacement |
|---|---|
| VideoCaptureDevice | VideoCaptureCoreX + VideoCaptureDeviceSourceSettings |
| MJPEGStream | VideoCaptureCoreX + HTTPMJPEGSourceSettings |
| JPEGStream | VideoCaptureCoreX + HTTPMJPEGSourceSettings for MJPEG streams; no direct equivalent for snapshot URLs |
| ScreenCaptureStream | VideoCaptureCoreX + ScreenCaptureD3D11SourceSettings (Windows), ScreenCaptureMacOSSourceSettings, ScreenCaptureXDisplaySourceSettings (Linux) |
| FileVideoSource | MediaPlayerCoreX (playback) or VideoEditCoreX (processing) |
| AsyncVideoSource | Built-in — all VisioForge sources are async by default |
| NewFrameEventArgs | OnVideoFrameBuffer 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 Component | VisioForge Replacement |
|---|---|
| MotionDetector | MotionDetectionExSettings + OnMotionDetection on VideoCaptureCoreX, or CVMotionCellsBlock in Media Blocks |
| TwoFramesDifferenceDetector | CVMotionCellsBlock — grid-based motion cells |
| SimpleBackgroundModelingDetector | ObjectDetector (VisioForge.Core.CV) — MOG2 background subtraction (history: 500 frames, variance threshold: 40) |
| CustomFrameDifferenceDetector | Configurable CVMotionCellsSettings |
| MotionAreaHighlighting | CVMotionCellsBlock with Display = true — draws the cells where motion was detected |
| GridMotionAreaProcessing | CVMotionCellsBlock — motion grid set through GridSize, 8 to 32 cells per axis |
| BlobCounter | CarCounter (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
| Feature | VisioForge Block |
|---|---|
| Haar cascade face detection | CascadeFaceDetectorBlock — frontal/profile face, eye, nose, mouth detection |
| DNN face detection | DNNFaceDetectorBlock — Caffe SSD model, confidence filtering |
| DLib face detection | FaceDetectorBlock (VisioForge.Core.CVD) — DLib HOG+SVM frontal face detector |
| Pedestrian detection | PedestrianDetector — built-in HOG+SVM people detector, added through Video_Processors |
| Lens obstruction detection | CameraCoveredDetector — 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 framesVisioForge — 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 implementationVisioForge — 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 classifierAForge.Imaging → VisioForge CV + OpenCvSharp
Class Mapping
| AForge.Imaging Feature | VisioForge Built-in | Standalone OpenCvSharp |
|---|---|---|
| GaussianBlur | CVSmoothBlock, or CVProcess.BlurRegion() for a region (kernel 23x23) | Cv2.GaussianBlur() |
| Pixellate | CVProcess.PixelateRegion() | Custom downscale/upscale |
| CannyEdgeDetector | CVEdgeDetectBlock | Cv2.Canny() |
| Erosion / Dilation | CVErodeBlock / CVDilateBlock | Cv2.Erode() / Cv2.Dilate() |
| BlobCounter | CarCounter — contour detection, area/aspect filtering, convex hull | Cv2.FindContours() |
| Grayscale | Built-in BGR→Gray conversion in all detectors | Cv2.CvtColor() |
| Threshold | Built-in binary thresholding in ObjectDetector and CarCounter | Cv2.Threshold() |
| ResizeBilinear | Built-in video scaling in all detector settings | Cv2.Resize() |
| HistogramEqualization | CVEqualizeHistogramBlock | Cv2.EqualizeHist() |
| HSLFiltering / color filters | — | Cv2.InRange() / Cv2.CvtColor() |
| HoughLineTransformation | — | Cv2.HoughLinesP() |
| SobelEdgeDetector | CVSobelBlock | Cv2.Sobel() |
| Template matching | CVTemplateMatchBlock | Cv2.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
| Capability | AForge.NET | After Migration |
|---|---|---|
| Framework | .NET Framework 2.0 | .NET 6-10 |
| Platforms | Windows only | Windows, macOS, Linux, iOS, Android |
| Video capture | Basic DirectShow | Professional SDK with async API |
| Recording | Manual implementation | Built-in (MP4, MKV, AVI, WebM) |
| Hardware encoding | None | NVENC, QSV, AMF, VideoToolbox |
| Streaming | None | RTMP, HLS, SRT, NDI |
| Audio effects | None | 40+ across both engines (EQ, reverb, chorus, 3D) |
| Video effects | None | GPU + CPU pipeline |
| Face detection | None | Haar + DNN (Caffe SSD) with blur/pixelate; DLib HOG detection only |
| Motion detection | Basic frame differencing | MOG2 background subtraction + object tracking with IDs |
| Pedestrian detection | None | Built-in HOG+SVM people detector |
| IP cameras | MJPEG only | RTSP, RTMP, HLS, ONVIF |
| Virtual camera | None | Output to Zoom/Teams/OBS |
| Maintenance | Abandoned (2013) | Active development |
| Security | Unpatched | Regular updates |
Frequently Asked Questions
Is AForge.NET still maintained?
What is the best AForge.NET alternative for C# video capture?
Does VisioForge replace AForge.Imaging filters?
Can I use VisioForge for C# face detection without AForge?
Does VisioForge support .NET 6, .NET 8, .NET 9, and .NET 10?
Can I migrate from AForge.NET incrementally?
From €250/year · Lifetime from €900
