Application Background and Detection Principle
Application Background
In nut processing and grain sorting, stones and other inorganic contaminants can accidentally mix with food materials during harvesting, drying, and transportation.
Traditional manual inspection and visible-light vision systems mainly rely on differences in color and brightness to identify foreign objects. However, when stones have a similar appearance and color to the nuts, particularly dark-colored nuts mixed with dark stones, visible-light imaging may struggle to distinguish them reliably.
Short-wave infrared (SWIR) imaging offers an alternative approach by detecting differences in the spectral reflectance characteristics of different materials.
This experiment evaluates the ability of the AttosTek SWIR035AU camera to distinguish nuts from similarly colored stones and compares the imaging results under different illumination and optical filtering conditions.
Imaging Principle
Organic materials such as nuts and inorganic materials such as stones exhibit different reflectance characteristics in the SWIR wavelength range.
In this experiment, imaging was performed around 1300 nm. Under the tested conditions, stones generally produced lower grayscale values and appeared darker in SWIR images, while nuts produced higher grayscale values and appeared brighter.
The resulting intensity differences make it possible to distinguish the two materials even when their visible colors are similar.
Image contrast is also affected by illumination spectrum, lighting angle, exposure time, lens transmission, filter bandwidth, surface roughness, and sample moisture content. Therefore, this experiment compares different illumination and filtering configurations under controlled imaging conditions.
Experimental Setup and Conditions
The experiment used the following equipment and materials:
| Equipment / Component | Model / Specification |
|---|---|
| SWIR Camera | AttosTek SWIR035AU |
| Visible-Light Camera | AttosTek VIS028CU3.2-NC |
| Illumination Source | 1300 nm infrared light source |
| Optical Filter | 1300 nm infrared filter |
| Test Samples | Several nuts and similarly colored small stones |
Experimental Procedure
Step 1. Sample Preparation
Nuts and stones were mixed and placed within the central field of view of the SWIR035AU camera. Samples with different sizes and surface orientations were included to observe material-related imaging differences.
Step 2. Camera Adjustment
The camera focus and aperture were manually adjusted to obtain clear images of the samples.
Step 3. Exposure Setting
An appropriate exposure time was selected using manual or automatic exposure mode.
Step 4. Image Acquisition
Images were captured under three SWIR imaging configurations:
- Direct SWIR imaging without additional illumination or optical filtering.
- SWIR imaging with a 1300 nm infrared light source.
- SWIR imaging with both a 1300 nm infrared light source and a 1300 nm optical filter.
Visible-light images were also captured for comparison.
Step 5. Image Comparison
The resulting images were compared to evaluate the grayscale differences between nuts and stones under the different imaging conditions.
Experimental Results and Analysis
4.1 Qualitative Imaging Comparison
Four imaging configurations were used to compare the appearance of nuts and stones.
Condition 1: Visible-Light Imaging

Images captured using the VIS028CU3.2-NC visible-light camera show that nuts and stones with similar colors have limited visual differences. Stones mixed with nuts can therefore be difficult to identify based on appearance alone.
Condition 2: SWIR Imaging Under Natural Light

When captured using the SWIR035AU camera, nuts and stones show more noticeable grayscale differences than in visible-light images.Stones appear darker due to their relatively lower SWIR reflectance, while nuts appear brighter.
Condition 3: SWIR Imaging with 1300 nm Illumination

After adding a 1300 nm infrared light source, the overall image brightness increases and the grayscale separation between nuts and stones becomes more pronounced. The additional illumination improves the visibility of darker stone regions against brighter nut regions.
Condition 4: SWIR Imaging with a 1300 nm Light Source and Optical Filter

When a 1300 nm optical filter is used together with the infrared light source, the image shows the strongest visual separation between nuts and stones among the tested configurations.Stones appear darker, while nuts remain relatively bright.
4.2 Quantitative Contrast Analysis
To evaluate the grayscale separation between nuts and stones, the normalized grayscale difference was calculated using the following formula:
Contrast = (I_nuts − I_stones) / 255.
Where:
- (I_nuts) represents the average grayscale value of the nuts.
- (I_stones}}) represents the average grayscale value of the stones.
- 255 represents the full grayscale range of an 8-bit image.
The measured results are shown below:
| Imaging Condition | Nut Grayscale | Stone Grayscale | Normalized Grayscale Difference |
|---|---|---|---|
| Direct SWIR035AU Imaging | 130.9 | 93.8 | 0.15 |
| With 1300 nm Illumination | 135.2 | 89.2 | 0.18 |
| With 1300 nm Illumination and Optical Filter | 116.5 | 67.9 | 0.19 |
The results show that the normalized grayscale difference increases from 0.15 under direct SWIR imaging to 0.18 with 1300 nm illumination.
When both the 1300 nm light source and optical filter are used, the value reaches 0.19, the highest among the three tested configurations.
These results indicate that additional infrared illumination and optical filtering can improve the grayscale separation between nuts and stones, making foreign objects easier to distinguish in SWIR images.
Conclusion
This experiment demonstrates the ability of the AttosTek SWIR035AU short-wave infrared camera to distinguish nuts from similarly colored stones under the tested imaging conditions.
While visible-light imaging provides limited visual contrast between the samples, SWIR imaging reveals differences in their grayscale responses, allowing the two materials to be distinguished more clearly.
Among the tested configurations, combining a 1300 nm infrared light source with a 1300 nm optical filter produces the highest normalized grayscale difference, increasing the value from 0.15 to 0.19 compared with direct SWIR imaging.
The results demonstrate the potential of the SWIR035AU camera for foreign material detection in nut processing and food sorting applications.
Looking for an SWIR camera for food inspection and foreign object detection?
Contact AttosTek to learn more about the SWIR035AU camera and its potential applications in industrial inspection.