Image grab and process with UVC camera - OfficinaTurini

Go to content
UVC
Image grab and process with UVC camera
I wrote this application when I first tested an ArduCam IMX662 Ultra Low Light camera: a compact USB device designed to perform well when there’s very little light.
At first, as usual, I did a quick test with AMCap. But it didn’t take long to realize it wasn’t what I wanted: I needed something that stayed simple and immediate, yet felt more “lab-grade” — a tool that helps you really understand what you’re seeing and lets you save it properly, consistently, and repeatably.
That’s how the idea was born: a small, dedicated application built around one clear goal — see better, control better, save better.


What is a UVC camera (and why it’s so convenient)
UVC stands for USB Video Class. It’s a standard that defines how a video device presents itself to a computer over USB, so the operating system can recognize it as a camera without proprietary drivers, and applications can access it through standard interfaces.
In practical terms: if a camera is UVC, it’s typically plug-and-play. That makes these cameras extremely handy for quick setups, experiments, and integration into different workflows.


The real engine: why the Sony IMX662 is so interesting
The real strength of this camera is the sensor: Sony IMX662.
This is a sensor designed for “security / low-light” applications, in a Type 1/2.8" format, with 2.9 μm pixels and a Full HD–class active area (commonly used as 1920×1080 output).
1) STARVIS 2: sensitivity and image quality in the dark
IMX662 belongs to Sony’s STARVIS 2 family: a back-illuminated (BSI) technology aimed at high sensitivity and low noise in low-light conditions. Sony also highlights good performance in the near-infrared (NIR) region, which is especially useful for night scenes and IR illumination.
2) Low dark current and “clean” images
Another aspect that matters in low light is the sensor’s behavior when exposure increases: dark current and related noise become critical. IMX662 is positioned with low dark current and “no smear” characteristics, addressing both noise and typical artifacts that can appear in harsh lighting situations.
3) Dynamic range and HDR options
IMX662 also supports HDR-oriented modes (for example, approaches like overlap-based HDR), helping to preserve detail both in shadows and highlights without destroying the scene’s structure.

The ArduCam IMX662 “Ultra Low Light” in practice
The ArduCam UVC concept is simple: take these sensor capabilities and package them into something extremely easy to use — plug it into USB and capture.
Depending on the specific model/version, you’ll find UVC-friendly output formats (like MJPEG/YUV/H.264) and, on some higher-bandwidth variants, support for long exposures, which becomes very interesting if you want to push sensitivity further.

Why AMCap wasn’t enough for me
AMCap is great to answer one question: “Does the camera work?”
But when you want to measure, repeat, compare, and save with control, you need more:
  • a clear separation between raw and processed views,
  • tools to stabilize visibility under heavy noise,
  • structured capture modes (timelapse, burst, event-based capture),
  • verification workflows (bias/dark/flat, hot pixels, linearity),
  • and easy access to camera controls.





My application: what it does
The app is meant to cover the entire process: live view, recording, and quality testing.
RAW and AVG: two ways to look at the same scene
  • RAW: the camera output as-is, frame by frame.
  • AVG: an averaged/optimized view, useful when noise dominates.
Averaging to “see through” the noise
As light decreases, noise increases. The app can combine multiple frames (fixed N-frame averaging or progressive averaging) to produce a more stable and readable image — accepting the natural trade-off: less noise at the cost of more latency.
Tone controls designed for low-light work
Beyond classic adjustments (gamma, contrast, brightness, saturation), the app includes controls that are especially helpful when low light becomes difficult:
  • highlight compression (“knee” and intensity) to avoid harsh clipping,
  • a filmic curve (toe and shoulder) for smoother roll-off in shadows and highlights.
The point isn’t to “stylize” the image — it’s to make what matters visible and interpretable.
Saving properly: single frames, continuous capture, timelapse, burst
The app supports multiple capture modes:
  • single-frame save (raw or processed),
  • continuous saving while streaming,
  • timelapse with fixed intervals,
  • burst capture (with memory-aware handling or live saving),
  • video recording with selectable sources and key parameters.
Event-based capture: when you want the scene to trigger the shot
There’s also an event-triggered mode: it monitors the stream and automatically saves when it detects a significant change (based on thresholds), including a cooldown logic and session folders.
Check / Calibrate: bench-style tools
This is the part that, for me, makes a real difference when evaluating a camera/sensor:
  • bias / dark / flat capture workflows,
  • hot pixel detection using statistical criteria,
  • linearity checks,
  • an updatable report that can be exported.
The native “UVC properties” panel
Finally, there’s a command that opens the classic camera properties panel — the “old-school” native dialog where the driver exposes its own controls. This is extremely useful because when some parameters aren’t mapped cleanly through standard controls, you’ll often find them there.

Conclusion
This test reminded me of something simple: in low light, it’s not just about how much a sensor can “see”, but also how well you can control it, and how confident you can be in what you’re saving.
The ArduCam IMX662 Ultra Low Light is a strong starting point because it combines the convenience of UVC with a sensor (IMX662) designed for conditions where many others start to struggle.
And when generic tools no longer fit, building a dedicated application is — at least for me — the most direct way to turn a quick test into a serious experiment.


If you like this application and want to contribute to its development and improvement you can make a donation .... Thanks!
Ho scritto questa applicazione quando ho provato una Arducam IMX662 Ultra Low Light: una camera compatta, collegabile via USB, pensata per lavorare bene quando la luce è davvero poca.
All’inizio, come spesso succede, la prova “rapida” l’ho fatta con AMCap. Ma mi sono accorto presto che non era quello che cercavo: io volevo uno strumento che fosse sì semplice e immediato, ma anche “da laboratorio” — capace di aiutarmi a capire fino in fondo cosa stavo vedendo, e di salvarlo nel modo giusto.
Da lì è nata l’idea: una piccola applicazione dedicata, costruita attorno a un concetto molto chiaro: vedere bene, controllare bene, salvare bene.

Cos’è una camera UVC (e perché è comoda)
UVC significa USB Video Class: è uno standard che descrive come una periferica deve presentarsi al computer per fare streaming video via USB. In pratica, se una camera è UVC, il sistema operativo può riconoscerla come “webcam/video device” senza driver proprietari, e le applicazioni possono agganciarsi usando le interfacce standard. Questo approccio è definito nell’ambito degli standard dell’USB-IF (USB Implementers Forum).
È uno dei motivi per cui queste camere sono così pratiche: plug-and-play, veloci da testare, facili da integrare in flussi di lavoro diversi.

Il cuore: perché il Sony IMX662 è così interessante
La vera forza, qui, sta nel sensore: Sony IMX662.
Parliamo di un sensore di classe “security/low-light” in formato Type 1/2.8" (diagonale ~6,45 mm) con pixel da 2,9 µm e risoluzione “Full HD class” (area attiva intorno a 1937×1097, con 1920×1080 come formato di registrazione raccomandato).
1) STARVIS 2: sensibilità e qualità nel buio
IMX662 appartiene alla famiglia STARVIS 2, una tecnologia BSI (back-illuminated) progettata per ottenere alta sensibilità e bassa rumorosità in condizioni di scarsa illuminazione. Nei documenti tecnici Sony si parla anche di resa efficace nella regione del vicino infrarosso (NIR), cosa che torna utilissima in scenari notturni (illuminatori IR, scene con luce minima, ecc.).
2) Bassa corrente di buio e “pulizia” dell’immagine
Tra le caratteristiche citate ci sono low dark current e “no smear”, ovvero attenzione sia al rumore in condizioni difficili, sia agli artefatti tipici quando ci sono sorgenti luminose intense nella scena.
3) Dinamica e HDR “intelligente”
Un’altra cosa che mi ha colpito è l’attenzione alla gestione della dinamica: IMX662 supporta modalità HDR (ad esempio Digital Overlap HDR e Clear HDR), con l’obiettivo di tenere insieme aree scure e alte luci senza distruggere i dettagli.

La camera ArduCam IMX662 “Ultra Low Light” in pratica
Nel caso specifico della ArduCam UVC, l’idea è portare queste qualità in un oggetto semplice: colleghi la USB e acquisisci. A seconda della versione/modello, si trovano configurazioni che espongono stream in formati tipici UVC come MJPEG/YUV/H.264 e, su varianti USB 3.0, anche supporto a esposizioni lunghe (molto interessanti quando vuoi spremere la sensibilità).

Perché AMCap non mi bastava
AMCap è perfetto per “vedere se funziona”. Ma quando vuoi davvero misurare, ripetere, confrontare e salvare in modo controllato, ti serve qualcosa di più:
  • una separazione chiara fra immagine grezza e immagine elaborata;
  • strumenti per ridurre rumore e stabilizzare la visione in low-light;
  • modalità di acquisizione automatica (timelapse, burst, trigger su evento);
  • funzioni di controllo e verifica (bias/dark/flat, hot pixel, linearità);
  • e, fondamentale, accesso comodo ai controlli della camera/driver.

La mia applicazione: cosa fa
L’app è pensata per accompagnare tutto il percorso: dal live alla registrazione, fino ai test di qualità.
RAW e AVG: due modi di guardare la stessa scena
  • RAW: la visione “così com’è”, frame per frame.
  • AVG: una visione mediata/ottimizzata, utile quando il rumore domina.
Averaging per vedere nel buio
Quando la luce scende, il rumore sale. L’app permette di combinare più frame (media su N frame o media “progressiva”) per ottenere un’immagine più stabile e leggibile, accettando il compromesso naturale: meno rumore ↔ più latenza.
Controlli di tono pensati per il low-light
Oltre ai controlli classici (gamma, contrasto, luminosità, saturazione), ci sono strumenti dedicati a gestire la parte “critica” del low-light:
  • compressione delle alte luci (con “knee” e intensità), per evitare clipping brutale;
  • curva filmic (toe e shoulder) per un roll-off più naturale su ombre e luci.
Il punto non è “fare l’effetto Instagram”: è rendere leggibile ciò che altrimenti sarebbe sepolto nel rumore o bruciato nelle alte luci.
Salvare bene: singolo scatto, continuo, timelapse, burst
L’app offre più modalità:
  • salvataggio singolo (RAW o elaborato),
  • salvataggio continuo durante l’acquisizione,
  • time-lapse a intervallo fisso,
  • burst (con gestione della memoria o salvataggio “al volo”),
  • registrazione video scegliendo sorgente e parametri principali.
On-Event capture: quando vuoi che sia la scena a “chiamare” lo scatto
C’è anche una modalità “su evento”: osserva il flusso e, quando rileva un cambiamento significativo (in base alle soglie impostate), salva automaticamente, con logica di cooldown e cartelle di sessione dedicate.
Check / Calibrate: strumenti da banco
Questa parte è quella che, per me, fa la differenza quando stai valutando una camera/sensore:
  • acquisizioni tipo BIAS / DARK / FLAT,
  • rilevamento hot pixel con criteri statistici,
  • test di linearità,
  • report aggiornabile ed esportabile.
Il “pannello UVC” nativo
Infine: un comando che apre il classico pannello di proprietà della camera (quello “storico”, con tutte le voci che il driver espone). È utilissimo perché, quando un parametro non è mappato in modo standard, spesso lo trovi lì — e puoi regolare la camera senza impazzire.

Conclusione
Questa prova mi ha ricordato una cosa semplice: in low-light non conta solo “quanto vede” un sensore, ma come puoi controllarlo e come puoi fidarti di quello che stai salvando.
La ArduCam IMX662 Ultra Low Light è un ottimo punto di partenza perché unisce la praticità UVC con un sensore (IMX662) nato per lavorare dove altri iniziano a cedere.
E quando uno strumento “generico” non basta più, costruirsi un’app dedicata è (almeno per me) il modo più diretto per trasformare un test in un esperimento serio.



Se questa applicazione é di tuo gradimento e vuoi contribuire al suo sviluppo e miglioramento puoi fare una donazione .... Grazie!
The complete program file as portable : Tested on Win 10 x64

System libraries you may need ....


Revision History:
  • 0.0.1 2026/02/4   : First release
  • 0.0.2 2026/02/14 : Updated camera resolutions
Free counters!
VAT: IT -
(C) 2016-2026 Officina Turini, Tutti i diritti riservati
Back to content