VisioForge

Last updated: Gennaio 2026

Alternativa ad AForge.NET: Guida alla migrazione verso VisioForge .Net SDK

Sostituisci l'abbandonato AForge.NET con un SDK .NET moderno e multipiattaforma

Sviluppatori C# che migrano da AForge.NET (AForge.Video, AForge.Vision, AForge.Imaging) ad alternative moderne .NET 6-10

Perché sostituire AForge.NET?

AForge.NET è stato abbandonato dal luglio 2013 — oltre 12 anni senza aggiornamenti, patch di sicurezza o correzioni di bug. È orientato a .NET Framework 2.0 e non può funzionare su .NET 6-10 moderno senza fork della comunità di qualità variabile.

RischioImpatto
Nessuna patch di sicurezzaLe vulnerabilità nell'elaborazione video/immagini rimangono non corrette
Nessun supporto .NET 6+Impossibile utilizzare le funzionalità moderne di .NET, AOT o il deployment multipiattaforma
Nessun supporto nuovi codecNessun H.265, AV1, VP9 o formati contenitore moderni
Nessuna comunitàForum chiuso ad aprile 2012, nessun maintainer attivo
Dipendenza da DirectShowDeprecato da Microsoft a favore di Media Foundation
Solo WindowsImpossibile targetizzare macOS, Linux, iOS, Android

AForge.Video → VisioForge Video Capture SDK .Net

Mappatura delle classi

Componente AForge.VideoSostituto VisioForge
VideoCaptureDeviceVideoCaptureCoreX + VideoCaptureDeviceSourceSettings
MJPEGStreamVideoCaptureCoreX + RTSPSourceSettings or UniversalSourceBlock
JPEGStreamVideoCaptureCoreX + IPCameraSourceSettings
ScreenCaptureStreamVideoCaptureCoreX + ScreenCaptureSourceSettings
FileVideoSourceMediaPlayerCoreX (riproduzione) o VideoEditCoreX (elaborazione)
AsyncVideoSourceIntegrato — tutte le sorgenti VisioForge sono asincrone di default
NewFrameEventArgsEvento OnVideoFrameBuffer

C# Acquisizione webcam

AForge.NET — acquisizione webcam (prima)

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# acquisizione webcam (dopo)

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# Telecamera IP RTSP / MJPEG Streaming

AForge.NET — flusso MJPEG (prima)

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# acquisizione telecamera IP RTSP (dopo)

C#
// VisioForge: RTSP, RTMP, HLS, MJPEG — with auto-reconnection
var capture = new VideoCaptureCoreX(videoView);
capture.Video_Source = new RTSPSourceSettings(
    new Uri("rtsp://admin:pass@camera-ip/stream"));
capture.Outputs_Add(new MP4Output("recording.mp4"), true);
await capture.StartAsync();

C# Cattura e registrazione dello schermo

AForge.NET — cattura schermo (prima)

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# registratore schermo (dopo)

C#
// VisioForge: Region selection, cursor capture, hardware encoding
var capture = new VideoCaptureCoreX(videoView);
capture.Video_Source = new ScreenCaptureSourceSettings();
capture.Outputs_Add(new MP4Output("screen.mp4", new H264EncoderSettings()), true);
await capture.StartAsync();

AForge.Vision → Blocchi di visione artificiale VisioForge

Mappatura delle classi

Componente AForge.VisionSostituto VisioForge
MotionDetectorCVMotionCellsBlock — sottrazione di sfondo MOG2 con tracciamento oggetti e assegnazione ID
TwoFramesDifferenceDetectorCVMotionCellsBlock — MOG2 (history: 500 frames, variance threshold: 40)
SimpleBackgroundModelingDetectorCVMotionCellsBlock — modello di sfondo automatico con rilevamento basato su contorni
CustomFrameDifferenceDetectorCVMotionCellsSettings configurabile
MotionAreaHighlightingCVMotionCellsBlock con DrawEnabled = true — disegna riquadri di delimitazione con ID oggetti
GridMotionAreaProcessingRilevamento del movimento basato su zone tramite eventi del Video Capture SDK
BlobCounterCVMotionCellsBlock — tracciamento blob, rilevamento contorni, conteggio veicoli su una linea di tracciamento

C# Rilevamento di movimento e oggetti

AForge.NET — rilevamento del movimento (prima)

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 — rilevamento del movimento basato su eventi (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.OnMotionDetection += (s, e) =>
{
    if (e.Level > 30)
        Console.WriteLine($"Motion: {e.Level}%");
};

await capture.StartAsync();

VisioForge — CVMotionCellsBlock (pipeline MediaBlocks)

C#
// MOG2 background subtraction with automatic object tracking and IDs
var settings = new CVMotionCellsSettings
{
    DrawEnabled = true
};
var detector = new CVMotionCellsBlock(settings);
// Tracks objects with unique IDs using Euclidean distance matching

C# Rilevamento facciale e rilevamento pedoni (non disponibile in AForge)

Mappatura delle classi

FunzionalitàBlocco VisioForge
Rilevamento facciale con cascata HaarCVFaceDetectBlock — rilevamento viso frontale/profilo, occhi, naso, bocca
Rilevamento facciale DNNCVFaceDetectBlock — modello Caffe SSD, filtraggio per confidenza, accelerazione GPU
Rilevamento facciale DLibCVFaceDetectBlock (CVD) — rilevatore facciale frontale DLib HOG+SVM
Rilevamento pedoniCVFaceDetectBlock — rilevatore di persone HOG+SVM integrato
Rilevamento ostruzione obiettivoCameraCoveredDetectorBlock — rilevamento bordi Canny

C# Rilevamento facciale

AForge.NET (prima)

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 — rilevamento facciale con cascata Haar

C#
var settings = new CVFaceDetectSettings
{
    DetectFrontalFace = true,
    DetectProfileFace = true,
    DetectEyes = true,
    DetectNose = true,
    DetectMouth = true,
    MinFaceSize = new Size(30, 30),
    ScaleFactor = 1.1,
    DrawEnabled = true,
    BlurFaces = false,    // set true for privacy blur
    PixelateFaces = false // set true for privacy pixelation
};
var detector = new CVFaceDetectBlock(settings);

VisioForge — rilevatore facciale DNN (maggiore precisione, supporto GPU)

C#
var settings = new CVFaceDetectSettings
{
    Confidence = 0.25,
    DrawEnabled = true,
    BlurFaces = true  // built-in privacy blur
};
var detector = new CVFaceDetectBlock(settings);

VisioForge — rilevatore facciale DLib

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

C# Rilevamento pedoni

AForge.NET (prima)

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

VisioForge — rilevamento pedoni (dopo)

C#
var settings = new CVFaceDetectSettings
{
    DrawEnabled = true,
    VideoScale = 1.0,
    FramesToSkip = 2
};
var detector = new CVFaceDetectBlock(settings);
// Built-in HOG descriptors + SVM classifier, multi-scale detection

AForge.Imaging → VisioForge CV + OpenCvSharp

Mappatura delle classi

Funzionalità AForge.ImagingVisioForge integratoOpenCvSharp autonomo
GaussianBlurCVProcess.BlurRegion() (kernel 23x23)Cv2.GaussianBlur()
PixellateCVProcess.PixelateRegion()Riduzione/ingrandimento personalizzato
CannyEdgeDetectorCameraCoveredDetector (thresholds 100/200)Cv2.Canny()
Erosion / DilationUtilizzato internamente da CVMotionCellsBlock (elemento strutturante 5x5)Cv2.Erode() / Cv2.Dilate()
BlobCounterCVMotionCellsBlock — rilevamento contorni, filtraggio area/rapporto d'aspetto, involucro convessoCv2.FindContours()
GrayscaleConversione BGR→Gray integrata in tutti i rilevatoriCv2.CvtColor()
ThresholdSoglia binaria integrata nella pipeline di movimentoCv2.Threshold()
ResizeBilinearRidimensionamento video integrato in tutte le impostazioni dei rilevatoriCv2.Resize()
HistogramEqualizationUtilizzato in CVFaceDetect per migliorare il rilevamentoCv2.EqualizeHist()
HSLFiltering / filtri coloreCv2.InRange() / Cv2.CvtColor()
HoughLineTransformationCv2.HoughLinesP()
SobelEdgeDetectorCv2.Sobel()
Template matchingCv2.MatchTemplate()

Checklist di migrazione

  • Inventariare i riferimenti AForge — Trovare tutti i `using AForge.*` nel progetto
  • Installare i pacchetti NuGet di VisioForge
  • Sostituire le classi delle sorgenti video
  • Sostituire il rilevamento del movimento
  • Sostituire il rilevamento facciale
  • Sostituire il rilevamento blob/oggetti
  • Rimuovere i cicli manuali dei frame
  • Aggiungere registrazione/streaming
  • Targetizzare .NET moderno — .NET 6-10
  • Testare il multipiattaforma
  • Per l'elaborazione immagini — VisioForge CV copre sfocatura, pixelizzazione, Canny, morfologia; usare OpenCvSharp per filtri aggiuntivi

Cosa si ottiene dopo la migrazione

CapacitàAForge.NETDopo la migrazione
Framework.NET Framework 2.0.NET 6-10
PiattaformeSolo WindowsWindows, macOS, Linux, iOS, Android
Acquisizione videoDirectShow baseSDK professionale con API asincrona
RegistrazioneImplementazione manualeIntegrata (MP4, MKV, AVI, WebM)
Codifica hardwareNessunaNVENC, QSV, AMF, VideoToolbox
StreamingNessunoRTMP, HLS, SRT, NDI
Effetti audioNessuno40+ (EQ, reverb, chorus, 3D)
Effetti videoNessunoPipeline GPU + CPU
Rilevamento faccialeNessunoHaar + DNN (Caffe SSD) + DLib HOG, con sfocatura/pixelizzazione
Rilevamento movimentoDifferenza frame baseSottrazione sfondo MOG2 + tracciamento oggetti con ID
Rilevamento pedoniNessunoRilevatore persone HOG+SVM integrato
Telecamere IPSolo MJPEGRTSP, RTMP, HLS, ONVIF
Telecamera virtualeNessunaOutput verso Zoom/Teams/OBS
ManutenzioneAbbandonato (2013)Sviluppo attivo
SicurezzaNon aggiornatoAggiornamenti regolari

Frequently Asked Questions

AForge.NET è ancora mantenuto?
No. AForge.NET è stato abbandonato dal luglio 2013 senza aggiornamenti, patch di sicurezza o supporto .NET 6+. Esistono fork della comunità ma variano in qualità e manutenzione. Usa VisioForge .Net SDK come alternativa moderna ad AForge.NET.
Qual è la migliore alternativa ad AForge.NET per l'acquisizione video in C#?
VisioForge Video Capture SDK .Net sostituisce AForge.Video con un'API asincrona moderna che supporta webcam, telecamere IP (RTSP/ONVIF), cattura schermo e output in MP4, WebM e altri formati su .NET 6-10.
VisioForge sostituisce i filtri di AForge.Imaging?
Parzialmente. VisioForge CV include sfocatura, pixelizzazione, rilevamento bordi Canny, operazioni morfologiche, conversione in scala di grigi ed equalizzazione dell'istogramma. Per la gamma completa di filtri immagine (Sobel, Hough, filtraggio colore, template matching), usa OpenCvSharp insieme a VisioForge.
Posso usare VisioForge per il rilevamento facciale in C# senza AForge?
Sì. VisioForge .Net SDK include tre motori di rilevamento facciale integrati — cascata Haar, basato su DNN e basato su DLib — con sfocatura e pixelizzazione per la privacy integrati. Nessuna dipendenza da AForge o Accord.NET necessaria.
VisioForge supporta .NET 6, .NET 8, .NET 9 e .NET 10?
Sì. Tutti i pacchetti VisioForge .Net SDK supportano da .NET 6 a .NET 10, incluso il deployment multipiattaforma su Windows, macOS, Linux, iOS e Android.
Posso migrare da AForge.NET in modo incrementale?
Sì. Gli SDK VisioForge possono coesistere con i pacchetti AForge.NET durante la migrazione. Sostituisci un componente alla volta — inizia con l'acquisizione video, poi il rilevamento, poi l'elaborazione immagini — e rimuovi i pacchetti NuGet di AForge al completamento di ogni passaggio.

Inizia la tua migrazione

Guide di migrazione correlate