A USB camera can provide a matrix of pixel values, but those numbers normally are not measurements in volts or amperes. That distinction matters when you want to compare illumination, estimate collected charge, or build an optical measurement rather than simply display an image.
The useful first decision is whether you need relative image intensity, calibrated optical response, or access to analog electronics. Those are different requirements. Here is how to interpret the digital matrix, recognize settings that change its meaning, and check camera capabilities before buying.
What the USB pixel matrix actually contains
A conventional digital camera converts the sensor's electrical response into numerical codes before sending image data through USB. Depending on the camera and selected output format, additional processing may happen before transmission.
After the acquisition software interprets the frame correctly, a monochrome image usually becomes a two-dimensional array of digital numbers, often abbreviated DN. A color image might instead contain a Bayer mosaic or multiple color channels.
These numbers describe the camera's encoded response. They do not automatically carry units of voltage, current, optical power, or irradiance.
| What you receive | What it represents | What you cannot assume |
|---|---|---|
| Raw monochrome samples | Digitized sensor response, potentially with camera corrections | Each code corresponds to a known voltage |
| Raw Bayer samples | Samples from differently filtered sensor locations | Every location measures the same wavelength range |
| Processed grayscale | Intensity after the selected conversion and processing | Values remain proportional to collected charge |
| Processed color | Color channels after some combination of reconstruction and correction | Channel values are calibrated optical measurements |
| Compressed image data | An encoded representation that requires decoding | File bytes are individual pixel intensities |
If your immediate problem is obtaining an array from an image file or transport buffer, start with image bytes versus decoded pixel data. That is a data-format question. Understanding what the decoded numbers physically mean is the separate question addressed here.
How light becomes a digital number
In conventional CCD and CMOS imaging, incident light generates charge in photosensitive regions. The sensor collects charge during exposure, reads it through electronic circuitry, and produces a signal for analog-to-digital conversion.
The architecture varies. The practical point is that several transformations sit between arriving light and the number your software receives.
A simplified model for an unsaturated, linear monochrome channel is:
This is an explanatory model, not a universal camera calibration equation. Dark signal, spatial variations, electronic noise, gain settings, and corrections can all affect the measured code. The clipping limits depend on the active output path.
The model explains why a single DN cannot reveal a unique sensor voltage. You would need the documented analog signal path, conversion characteristics, offsets, gain configuration, and any subsequent processing.
Even a documented analog-to-digital converter input range would describe a particular electronic node. It would not automatically describe the original photodiode voltage or the photocurrent at each pixel.
USB supply voltage is unrelated to the intensity scale. A bright pixel is not a measurement of the camera's power rail.
Bit depth defines codes, not electrical units
An unsigned sample with a bit depth of b has up to 2^b possible codes. This describes the numerical representation, not the voltage range or measurement accuracy.
A value of 2048 in a 12-bit image is approximately halfway through its numerical range. It is not necessarily half the collected charge at saturation, half the incident optical power, or any particular voltage. Black offset, nonlinear processing, and clipping can break those interpretations.
Likewise, storing samples in a 16-bit array does not prove that the camera supplies 16 meaningful bits. Software may place lower-bit-depth samples into a larger container, with alignment defined by the pixel format.
Use camera bit-depth selection when deciding how much numerical precision your inspection needs. For preservation after acquisition, the guide to saving higher-bit-depth camera images addresses the storage side.
More available codes can help retain small differences, but they do not eliminate read noise, photon noise, or uncertainty in the optical setup.
Exposure, gain, offset, and processing change the meaning
For stable illumination and an approximately linear response, the black-subtracted signal generally increases with exposure until saturation or another limit intervenes. Doubling exposure can approximately double that signal, provided other settings remain fixed.
Gain changes the relationship between collected charge and output code. It does not create additional photoelectrons. Analog gain can affect how downstream electronic noise contributes, while digital gain scales values already digitized.
Offset changes the baseline. A nonzero value in darkness may therefore be intentional rather than evidence of illumination. Dark current and noise can also contribute.
| Setting or operation | Effect on the matrix | Measurement consequence |
|---|---|---|
| Longer exposure | Usually increases accumulated signal | Comparisons require equal exposure or a validated normalization |
| Analog gain | Changes signal scaling before digitization | Charge-to-code calibration may change |
| Digital gain | Scales digitized values | Larger codes do not mean more collected light |
| Black-level adjustment | Moves the baseline | Subtracting an assumed zero can introduce bias |
| Gamma or tone mapping | Applies a nonlinear intensity transformation | Code ratios may no longer represent signal ratios |
| Demosaicing | Reconstructs color channels from neighboring samples | Channels are not independent original sensor readings |
| Defect or shading correction | Replaces or rescales selected samples | Spatial measurements include the correction model |
For quantitative comparisons, disable automatic controls where possible and record the fixed settings. The guide to interpreting exposure and gain units explains why an API's numeric setting also needs documented units.
If brightness changes without an obvious command, check which pixels automatic exposure and gain use. A changing metering region can alter the entire frame's intensity scale.
Worked example: from codes to charge, only with calibration
Consider a hypothetical measurement path with a documented, linear raw output. These numbers illustrate the arithmetic; they are not specifications for any camera featured below.
Assume the following conditions:
- The selected output is 12-bit raw monochrome.
- A matching dark reference has a mean of 64 DN in the measurement region.
- An illuminated frame has a mean of 1064 DN in that region.
- A calibration establishes 2 electrons per DN at the selected gain.
- Exposure is 5 ms, with no saturation or nonlinear processing.
The black-subtracted signal is:
Without the conversion calibration, the defensible answer stops at 1000 DN above the reference. You cannot assign an electron count merely from the bit depth.
If the calibration is valid, collected charge can be estimated using the elementary charge:
That current is an equivalent average inferred from accumulated signal charge. It is not a measurement of the sensor's output-pin current, nor does it show how the current varied during exposure.
Averaging a region reduces some random uncertainty, but it does not remove an incorrect offset or calibration. Match the reference exposure, gain, temperature conditions, and processing configuration closely enough for your required uncertainty.
Converting this charge estimate into incident optical power requires further information, including wavelength-dependent response and the optical measurement geometry.
Which camera capabilities to check before buying
Start with the required measurement, then choose the physical format. Both area scan cameras and board-level cameras may be relevant, but neither category guarantees calibrated raw access.
The camera finder helps narrow interface, shutter, sensor format, and resolution. Raw pixel formats, correction controls, and calibration information still need separate confirmation.
Use this checklist when reviewing documentation or requesting an acquisition sample:
- Exact output formats: Ask for the supported monochrome, Bayer, and processed formats, including meaningful bit depth and packing.
- Processing controls: Check whether gamma, automatic gain, automatic exposure, and relevant corrections can be disabled or documented.
- Setting readback: Confirm that software can read the active exposure, gain, black level, and pixel format.
- Calibration information: Ask whether conversion gain, linearity, saturation behavior, and noise measurements are available for the required mode.
- Frame metadata: Check how settings are associated with captured frames, especially when settings change during acquisition.
- Host acquisition: Verify that the intended software returns original sample values rather than a display-converted image.
- Repeatability: Define acceptable drift and repeatability before evaluating candidate hardware.
The LS-CMR-0166 is an area scan candidate to review against that checklist. Its catalog listing alone does not establish raw-output availability or radiometric calibration.
- Sensor format
- 1/1.7"
- Interface
- USB3
- Resolution
- 12 MP
- Shutter
- Rolling
The LS-BCM-0047 is a board-level candidate. Confirm its supported acquisition formats and processing controls before treating its output as measurement data.
- Sensor format
- 1/2.7"
- Lens mount
- C-mount
- Interface
- USB3
- Resolution
- Up to 3 MP
These cards identify camera options, not proven substitutes for an electrical measuring instrument. For integration questions beyond pixel interpretation, use the board camera evaluation checklist.
Compact cameras to build in
120 models · from $179.00Verify the interpretation before trusting measurements
A short acquisition experiment can expose several common mistakes without requiring a full radiometric calibration.
- Fix the acquisition path. Record pixel format, exposure, gain, black level, and enabled corrections. Save original samples separately from preview images.
- Acquire a dark reference. Block incoming light without touching the sensor. Inspect the mean, variation, and any clipped baseline values.
- Use stable illumination. Hold geometry and illumination constant, then acquire repeated frames at each setting.
- Sweep exposure below saturation. For example, compare 1 ms, 2 ms, and 4 ms. After reference subtraction, the mean should approximately follow a 1:2:4 ratio if the path is linear over that range.
- Inspect individual regions. A whole-image mean can conceal saturated highlights or local corrections. Check the actual inspection region and its brightest samples.
- Repeat after restarting acquisition. Confirm that configuration changes or startup defaults do not alter the interpretation.
If the response does not track exposure, check automatic controls, flickering illumination, saturation, offset handling, and nonlinear processing first. Do not immediately infer a defective sensor.
A successful test supports relative intensity measurement over the tested range. It does not, by itself, establish absolute accuracy in electrons, volts, amperes, or optical units.
GigE, USB3, 10GigE and CoaXPress
1,287 models · from $149.00When an image matrix is not the right answer
If you need actual analog waveforms at sensor readout nodes, a normal USB image stream is generally the wrong interface. Use manufacturer-documented development hardware and measurement procedures, or select instrumentation designed for electrical characterization. Do not probe undocumented sensor connections.
If you need calibrated optical power or irradiance, choose a measurement method with a documented spectral response and calibration chain. An imaging system may be appropriate when spatial distribution matters, but ordinary raw output alone is insufficient.
If you only need defect contrast or repeatable thresholding, fixed camera settings and controlled illumination may be enough. Absolute electrical units add little unless the inspection requirement genuinely depends on them.
Before ordering, write down the required units, useful intensity range, repeatability target, output format, and calibration assumptions. Start a camera configuration with those requirements, or contact the applications team to confirm which capabilities need documentation before you select a camera.
Questions
Can a USB camera return a voltage matrix for every pixel?
Normally, acquisition software receives digitized image samples rather than individual sensor voltages. Displaying those samples as a matrix does not change their units. A voltage interpretation requires documentation of the relevant electronic signal path, conversion scale, gain, offset, and processing, which ordinary image output may not provide.
Does raw camera output mean unprocessed sensor data?
Raw output usually avoids some display-oriented processing, but its exact meaning depends on the camera. Black-level adjustment, defect correction, or other operations may still be present. Ask which corrections remain active and whether sample values have a documented linear relationship to collected charge.
Why do pixels have nonzero values when no light reaches the sensor?
Sensor noise, dark signal, and an intentional black-level offset can all produce nonzero samples without illumination. Acquire a dark reference using the same settings as your measurement. Check whether the camera clips low values, because clipping can distort both the estimated baseline and its noise distribution.
Can pixel values be converted into electrons or current?
Only with an appropriate calibration and clearly stated assumptions. A known charge-to-code relationship can support an electron-count estimate after reference subtraction. Dividing estimated charge by exposure gives an equivalent average signal current, not a direct measurement of instantaneous photocurrent or sensor output current.
What should I request before buying a camera for intensity measurements?
Prioritize documented raw formats, controllable processing, readable acquisition settings, repeatable exposure, and suitable calibration information. Bit depth matters, but it cannot establish accuracy on its own. Request sample frames and test response linearity over the illumination range your application will actually use.

