Liquid Level Detection in Opaque Containers with the SWIR051AU SWIR Camera

Author:Attostek    ·    Release Date :06/13/2026    ·    Category :Industrial Inspection

Application Background

Opaque plastic bottles are widely used for packaging products such as cleaning solutions, sprays, and personal care liquids. These containers help protect their contents from light exposure, but their opaque walls make it difficult to inspect the liquid level using the naked eye or conventional visible-light cameras.

In manufacturing and quality inspection, this can create challenges when checking filling levels, identifying underfilled containers, or monitoring the remaining liquid inside a bottle.

Short-wave infrared (SWIR) imaging offers an alternative approach. By using the transmission characteristics of certain plastics in the SWIR wavelength range, a SWIR camera can reveal the liquid inside containers that appear opaque under visible light.

This experiment evaluates the ability of the AttosTek SWIR051AU SWIR camera to image liquid levels through an opaque plastic bottle and compares the results under different illumination and filtering conditions.

Imaging Principle

Many plastics that appear opaque under visible light, including certain HDPE and PP materials, can transmit light in the short-wave infrared (SWIR) range, typically around 900–1700 nm.

Water exhibits strong absorption around 1450 nm. Differences in the optical response of the liquid and the surrounding air region can create grayscale variations in the captured SWIR image. These variations make it possible to distinguish the liquid-filled area from the empty space inside a container.

In addition, SWIR illumination and wavelength-matched optical filters can help improve image contrast by controlling the illumination and spectral range reaching the camera.

Experimental Setup

The experiment used an opaque plastic bottle containing cleaning liquid as the test sample. A visible-light camera was used for comparison, while the SWIR camera captured images under different illumination and filtering conditions.

EquipmentModel / Specification
SWIR CameraAttosTek SWIR051AU
Visible-Light CameraAttosTek VIS028CU3.2-NC
Light Source1300 nm infrared light source
Optical Filter1300 nm infrared filter
Test SampleOpaque plastic bottle containing cleaning liquid
EnvironmentIndoor environment, 25°C

Experimental Procedure

  1. Fix the SWIR051AU camera and position the plastic bottle at the center of the camera’s field of view.
  2. Adjust the camera focus and aperture to obtain a clear image.
  3. Set an appropriate exposure time using manual or automatic exposure mode.
  4. Capture images under four conditions: direct SWIR imaging, 1300 nm illumination, a 1300 nm optical filter, and a combination of the 1300 nm illumination and filter.
  5. Capture a comparison image using the VIS028CU3.2-NC visible-light camera under the same sample positioning.

Experimental Results and Analysis

1 Image Comparison

The visible-light camera could only capture the outer surface of the opaque bottle. The liquid inside was not visible.

In contrast, the SWIR051AU revealed the liquid level through the bottle wall. The liquid-filled region appeared darker, while the region without liquid appeared brighter, creating a visible boundary between the two areas.

The effects of different imaging conditions were as follows:

Imaging ConditionObserved Result
Visible-light camera under ambient lightThe bottle appeared opaque, and the internal liquid level was not visible.
SWIR051AU under direct imagingThe liquid and empty regions were distinguishable, with a visible boundary.
SWIR051AU with 1300 nm illuminationOverall image brightness increased, and the difference between the two regions became more pronounced.
SWIR051AU with a 1300 nm filterThe filter helped isolate the selected wavelength range and improved the visible grayscale difference.
SWIR051AU with both 1300 nm illumination and filterThe image showed the clearest liquid-level boundary among the tested conditions.

2 Quantitative Analysis

Imaging ConditionNormalized Grayscale Difference
Direct SWIR imaging0.10
With 1300 nm illumination0.15
With 1300 nm optical filter0.16
With both 1300 nm illumination and filter0.18

The normalized grayscale difference increased from 0.10 under direct imaging to 0.18 when both the 1300 nm illumination and optical filter were used. This indicates improved grayscale separation between the liquid-filled and empty regions under the tested conditions.

Conclusion and Potential Applications

The experiment demonstrates that the AttosTek SWIR051AU camera can reveal liquid levels inside an opaque plastic bottle that cannot be inspected effectively with a conventional visible-light camera.

Among the tested configurations, combining a 1300 nm infrared light source with a matching optical filter produced the largest normalized grayscale difference and the clearest liquid-level boundary.

This imaging approach may be useful in several industrial inspection scenarios, including:

  • Personal care and household products: Liquid-level inspection in opaque spray bottles, detergent containers, and cosmetic packaging.
  • Food and beverage packaging: Inspection of liquid levels in light-blocking bottles and opaque sauce containers.
  • Chemical and laboratory supplies: Non-contact monitoring of liquid levels in opaque reagent and chemical containers.
  • Pharmaceutical packaging: Liquid-level inspection in light-protective plastic bottles and containers.

The SWIR051AU provides a potential imaging solution for non-contact liquid-level inspection where visible-light imaging is limited by opaque packaging materials.

Quick Consultation
Do you need more information about this solution?
Contact US
Share To:

latest articles

My experiment involves two cameras capturing images of the same object at the same time. Can your software handle this?

Yes. We can offer two solutions: Option 1: Use the software to connect and open multiple cameras at the same time, achieving synchronized multi-camera imaging, and you can save all the images to the same path. Option 2: Use another software that supports running two instances simultaneously, each performing multi-camera imaging, and you can save the images to different paths.
View details

How do you check if a camera is dropping frames?

If you're using trigger mode, you can directly compare the number of triggers to the final frame count of the camera. If you're using video mode, you can check for frame drops by looking at the continuity of the frame numbers.
View details

What’s the difference between optocoupler-isolated and non-isolated signals?

Optocoupler isolation will optimize the input trigger signal, while non-isolated signals won't. If the trigger signal quality is poor (has glitches), it might trigger falsely. If the trigger signal quality is good, it's recommended to use non-isolated signals, as its input rise delay (TDR) is only 0.02µs.
View details