What the test resolves
Brighter images and more output bits do not automatically improve defect visibility. Compare normalized contrast and noise before selecting a gain/pixel-format combination.
This is a vendor-neutral commissioning method. Check the exact camera, lens, sensor or controller manual before changing settings. The numerical worksheet is hypothetical, not a Deyi Vision measurement or a product specification.
Operating prerequisites
Use a stationary low-contrast defect and matching background with fixed illumination and exposure. Disable automatic gain and image enhancements; document sensor bit depth separately from output format.
Decide whether the problem is insufficient photons, clipping, quantization or a processing threshold before selecting a gain setting. This comparison needs stable illumination and a stationary representative feature; motion blur belongs in a separate test. Disable automatic adjustments and tonal display operations in the measurement path. Confirm the distinction between sensor conversion depth and the transmitted pixel format, because choosing a larger container does not necessarily add sensor information.
Bench and records
Prepare raw decoding that supports packed data, identical ROIs and at least 100 frames per setting. Record clipping fraction, ROI means and temporal variation rather than display brightness.
Create matched defect and background regions, excluding borders, dust and saturated pixels unless saturation is itself the failure under investigation. Record their coordinates, camera gain controls, exposure, pixel format, packing, illumination state and raw file names. Save a dark or low-signal observation when appropriate to distinguish offsets from useful signal. Ensure the analysis software interprets signedness, packing and scaling correctly before comparing numbers across formats.
Run the test
- Capture low-gain 8-bit and supported higher-bit-depth data without changing exposure.
- Repeat at a second supported gain, verifying actual format and decoding after every change.
- Compute defect/background mean and noise, then CNR on the same physical region.
- Replay each set through the actual detector and record misses and false alarms on independent samples.
Acquire the fixed-exposure series without moving the target, using the same incident light for the format or gain comparison. Calculate each region's mean and variation with a documented convention, and report both temporal changes across frames and spatial variation within regions rather than merging them silently. Apply the chosen defect decision to every frame. Repeat using independent defective and acceptable parts so a clean reference coupon is not the sole basis for approval.
Hypothetical worksheet
The hypothetical CNR values below use the root-sum-square of two ROI standard deviations. Scaling 8-bit values to 12 bits leaves the ratio almost unchanged. This screening metric is not an EMVA sensor characterization or a detection guarantee.
CNR = abs(mean_defect - mean_background) / sqrt(sd_defect^2 + sd_background^2)
8-bit example: abs(108 - 100) / sqrt(3^2 + 3^2) = 1.89
12-bit example: abs(1730 - 1600) / sqrt(48^2 + 48^2) = 1.92| Quantity | Hypothetical value | Meaning |
|---|---|---|
| 8-bit CNR | 1.89 | Hypothetical ratio |
| 12-bit CNR | 1.92 | Different output scale, similar ratio |
| Relevant clipped pixels | 0% | Example acceptance target, must be agreed |
The example contrasts are normalized by the combined variation of the two selected regions. The similar values after changing digital level scale illustrate why more numerical levels alone do not establish better defect separation. These regional statistics also contain material texture, fixed-pattern effects and lighting variation. They are screening evidence for this inspection, not an EMVA camera characterization or a prediction that every feature will behave similarly.
Test sequence
Test sequence
Test gain and format as two factors while holding photons and geometry constant.
- Low gain
- Higher gain
- 8 bit
- Higher depth
Interpret the evidence
Interpret the evidence
Convert signal difference and variation to a ratio; compare detection results separately.
- Signal gap
- Noise
- CNR
- Detector result
Follow the comparison diagram using raw measurement data, then use a consistent display only for visual review. An automatically stretched preview can make different captures look equally clear even when their signal distributions differ. Inspect the histogram around both regions and identify clipping in the relevant feature area. Keep the defect's polarity and spatial extent visible; a favorable average can conceal a small critical portion that becomes indistinguishable from the background.
Troubleshooting
- Unexpected stripes or enormous values can mean packed data were decoded incorrectly.
- Clipping after gain increases destroys contrast; inspect histograms before interpreting a smoother display as better data.
Unexpected jumps after a format change require checking decoding and normalization before adjusting optics. If increased gain raises both feature level and variation without improving decision stability, investigate photon supply and material variation. If acceptable parts develop bright clipped spots, reduce the relevant exposure or gain and repeat the defect test. Do not correct an unstable illumination source by increasing a decision threshold until the source instability is understood.
Acceptance and handoff
Choose the setting that meets documented miss/false-alarm limits without clipping relevant detail and stays within transfer/processing capacity. Save raw format and decoder version so comparison remains reproducible.
Archive the raw files, settings, sample identifiers and decision limits together. Discuss the documented requirements with Deyi Vision using the related product and preparation guides below.
Choose the setting using predeclared limits for clipping, decision stability and the smallest relevant defect, with raw data retained for both classes. Verify the selected format through the actual acquisition and inspection pipeline, including any conversions before the decision stage. Approval must state exposure, gain, format and analysis scaling together. A later change in illumination, surface finish or decoder requires a new comparison rather than relying on the nominal bit-depth label.
Sources and technical references
These references explain the methods and limits used in this tutorial. Example checks are guidance; production acceptance requires evidence from your own samples.
- GainBasler
Analog and digital gain act at different stages; supported settings depend on the model.
Checked - Pixel FormatBasler
Transport pixel format and sensor bit depth are distinct; packed formats require correct decoding.
Checked
Component and selection references
- Industrial Camera for Machine Vision
- How to Calculate Camera Resolution for Inspection
- Industrial 2D Cameras
- Industrial Camera vs Regular Camera
- GigE vs USB3 Industrial Camera
- PCB Connector Pin Presence Inspection
- Basler Camera Selection
- Allied Vision Camera Selection
- Hikrobot Machine Vision Alternative
- IDS Imaging Camera Selection
- Diagnose lost GigE packets without masking the fault
- Measure hardware-trigger delay and jitter
- OCR labels: camera and character sampling
- Seal and bead appearance: camera setup
- SKU color sorting: acquire repeatable color
- Surface defects: camera sampling and motion
- Validate synchronized cameras under burst traffic

