Skip to Content
  • Proceeding Paper
  • Open Access

2 September 2026

9 Pages

Methods of Assessment and Enhancement of Spatial and Spectral Homogeneity in the Optical System of a Low-Cost Portable Multispectral Camera †

and
1
Department of Photonics, St. Petersburg Electrotechnical University “LETI”, St. Petersburg 197022, Russia
2
Department of Radiotechnical Systems, St. Petersburg Electrotechnical University “LETI”, St. Petersburg 197022, Russia
*
Author to whom correspondence should be addressed.
†
Presented at the 1st International Online Conference on Optics (IOCO 2026), 25–27 March 2026; Available online: https://sciforum.net/event/IOCO2026.

Abstract

CMOS image sensors and single-board computers provide researchers and educators with the means to create affordable multispectral devices. In this paper, we present some methods used in laboratory tests to assess and enhance the spatial and spectral homogeneity in the optical system of a previously designed low-cost portable multispectral camera. Having calculated the angular field of view size and the focal length, we then derived depth of field and hyperfocal distance distributions from these parameters. By taking images of a white screen and fitting Gaussian functions to the brightness distributions, we assessed the spatial homogeneity of the field of view and performed the flat-field correction. The spectral homogeneity was assessed by analyzing images of the overcast sky.

1. Introduction

Multispectral imaging is among the most valuable and widely used remote sensing techniques. However, data from spaceborne instruments are limited in spatial and temporal resolution, and wider application of portable multispectral cameras is impeded by high costs. Commercially available CMOS image sensors and single-board computers present a possible solution to the problem, serving as an affordable and reliable basis to multispectral and hyperspectral instruments, including those designed for research or academic purposes [1,2].
Previously, we have presented the design of a low-cost portable multispectral camera for the monitoring of vegetation [3]. In this paper, we describe the methods and the results of a series of laboratory experiments that aimed to evaluate and enhance the performance of the camera. The parameters were assessed in the following order: a. field of view angular size; b. depth of field and hyperfocal distance; c. spatial energetic homogeneity of the image (flat-field correction); d. spectral homogeneity of the image. The results that we have obtained will be useful both in planning multispectral surveys with the camera in question and in assessing the performance of other instruments.

2. Materials and Methods

2.1. The General Design of the Multispectral Camera

The multispectral camera uses a single OmniVision OV5647 CMOS image sensor (OmniVision Group, Shanghai, China) and a set of six interchangeable interference filters (State Optical Institute, St Petersburg, Russia), installed in two parallel, geared wheels. The passbands of the filters are centered at 430, 500, 530, 580, 620, and 761 nm, and have a FWHM between 12 and 19 nm. Since the transmission spectrum of an interference filter depends on the angle of incidence of incoming light, a parallel beam has to be formed before letting the light through the filter for the field of view to be spectrally homogeneous. To achieve this, two confocal convex lenses L1 and L2 are used in the optical design of the camera, as shown in Figure 1. After the filter, a third lens L3 forms the image on the surface of the sensor S. A factory-manufactured iris diaphragm A is used to set the aperture size and reduce optical aberrations.
Figure 1. Optical design of the multispectral camera.
All the mechanical parts of the camera, including the lens supports and the filter wheels, were made of plastic, using FDM 3D printing technology. Acquiring and processing images, as well as controlling the stepping motor that rotates the filter wheels, was done by a Raspberry Pi 4B single-board computer [3].

2.2. Field of View Test

To assess the resulting focal length and the angular FOV size of the camera, images were taken of objects of known size set at a predefined distance from the camera. Figure 2 shows the formation of an object’s image in the geometrical optics approximation.
Figure 2. Geometrical interrelations between an object and its image.
Light rays passing through the center of the lens O do not change their direction. Therefore, the angles before and after the lens remain constant; here, β–α is the angular size of the object, and ω is half the angular size of the FOV. From trigonometric considerations,
f ′ = L A ′ B ′ A B ,
where f ′ is the focal length, L is the distance between the camera and the object, AB is the object size, and A′B′ is the physical size of its image, which can be calculated by multiplying the size in pixels by the pixel size Px given in the sensor’s datasheet. The angular size of the camera’s FOV 2ω equals
2 ω = 2 atan w P x 2 f ′ ,
where w is the sensor’s width in pixels. Similar calculations can be done for the vertical FOV size, considering the sensor’s height h and taking Py = Px since the pixels have square shape.

2.3. Depth of Field Calculation

To focus the camera on an object of interest, the support that holds the sensor can be shifted to and from the lens L3, with the help of a leadscrew. As in any real optical system, when focusing on an object separated from the camera by a distance of R, all the points that are closer or farther than the object are transformed into circles of confusion in the image due to light diffraction and non-compensated aberrations. The size of these circles increases as we consider points situated farther from R, and two distances exist, at which the circles become greater than the chosen limit of acceptability. These distance values R1 (closer than the object) and R2 (farther than the object) limit the depth of field (DOF) of the camera. The following expressions were used to calculate them [4]:
D = R 2 − R 1 ,
R 1,2 = R f ′ 2 f ′ 2 ∓ K f ′ z ± K R z ,
K = f ′ M d a = f ′ u f 3 ′ d a ,
where D is the depth of field; K is the aperture value; z is the acceptable circle of confusion diameter; M is the pupil magnification, defined by focal length of L3 f 3 ′ and the distance u between L3 and the diaphragm A; and finally, da is the physical diameter of the aperture diaphragm.
From (4), it is observable that with sufficiently long R, the rear DOF limit R2 becomes infinitely large. This value, called the hyperfocal distance, was calculated through the following formula:
H = f ′ 2 K z + f ′ .
In the calculations, the acceptable circle of confusion diameter z was set to 3 μm, which corresponds to the double pixel size of the sensor. The iris diaphragm of the camera allowed its diameter to be changed in a range between 0.8 and 13.5 mm.

2.4. Flat-Field Correction

To increase sensitivity while producing RGB images, two layers are deposited over the surface of CMOS sensors: a layer of wide-band Bayer filters and a layer of lenslets. However, the distribution of lenslets, as well as the low-level processing algorithm, which is used by the built-in image processor of the camera, are optimized for use with short-focus optical systems, in which large angles of incidence are characteristic for pixels at the edges of the sensor. With custom optical systems, vignetting occurs, usually leading to a decrease in brightness along the edges of the image [5].
To test the combination of the sensor and the optical system for energetic inhomogeneity, and to assess the influence of defocusing on vignetting, we have used a simplified version of the method proposed in the aforementioned article by Bowman et al. [5]. In a dark room, the camera was focused at a computer screen that displayed a uniform white rectangle. None of the interference filters were used during the assessment. The exposure time was adjusted manually using a Python (ver. 3.14) script and the picamera2 library (ver. 0.3.34), so that the decrease in brightness towards the edges was observable. The position and orientation of the camera were then adjusted to keep the brighter spot in the center of the image, and thus to ensure more or less normal incidence of light onto the sensor.
Next, images were taken in the principal optical configuration as well as after having moved the first lens L1 1 mm and 2 mm forward and backward. The experiment was repeated with the diaphragm diameter set to 2.6 mm, and then with the minimal possible diameter of 0.8 mm, for a total of 10 images, each one averaged from 10 subsequent frames.
The obtained images were then split into three separate w × h arrays R, G, and B corresponding to each of the color channels, and then normalization was performed by dividing 255 (the maximum value for 8-bit colors) by each element Xij in every array:
N X i j = 255 / X i j ,
where X stands for R, G, or B. To assess the resulting inhomogeneity, we then fitted a Gaussian curve to the horizontal NX(h/2, j) and vertical NX(i, w/2) cross-sections of NXij distributions:
g x = b + A exp − x − x 0 2 2 σ 2 ,
where b is a constant vertical shift, A is the amplitude, x0 defines the position of the function maximum, σ is the standard deviation, and x = 1, 2, …, w for horizontal cross-sections or x = 1, 2, …, h for vertical ones. Fitting was performed using the least squares methods, with the curve_fit method from the scipy.optimize Python module (ver. 1.16.3) [6].

2.5. Spectral Homogeneity Test

Concurrently with vignetting, the field of view of the camera can be spectrally inhomogeneous due to light incident on the filter being not perfectly parallel, to filter wheel tilt, etc. To assess and reduce spectral inhomogeneity, we focused the camera at a hyperfocal distance, and then directed it towards the overcast sky, considering it a source of parallel and spatially uniform radiation. Images were registered with the 580 nm interference filter and a diaphragm diameter of 2.6 mm. Since this wavelength provides sufficient sensitivity in both the red and the green channel, we calculated the red–green brightness ratio for each pixel:
S i j = R i j N R i j G i j N G i j ,
using the normalization coefficients (7) from the previous experiment. To enhance the spectral homogeneity, we repeated adjusting the position of the first lens L1, registering images and calculating distributions of the ratio (9) until the least standard deviation was obtained over the entire image, each time using the values of NR, NG that corresponded to the position of L1.

3. Results

After taking images of a 9.5 × 13 mm rectangular target from a distance of 5.402 m, from (1), (2) we obtained a focal length of 58 ± 0.5 mm and an angular FOV size of 3.6 × 2.7° horizontally and vertically, correspondingly.
The entrance pupil magnification of the optical system M was approximately 3.2. Figure 3 shows the aperture size (5) values for the available physical diameters of the diaphragm, with markers denoting values from the standard full-stop scale.
Figure 3. Aperture values for the available diameters of the diaphragm.
In Figure 4, calculation results for depth of field (3) and hyperfocal distance (6) are presented. The distribution in Figure 4a is shown in logarithmic scale (lg D).
Figure 4. Depth of field and hyperfocal distance calculation results: (a) Decimal logarithm of DOF as a function of distance to the object and aperture value; (b) hyperfocal distance for aperture values from the full-stop scale.
Figure 5 shows an example result of the flat-field assessment. In Figure 5a, the normalization coefficient (7) distribution for the red channel NR is presented, and in Figure 5b, the horizontal cross-section for all the three channels.
Figure 5. Examples of flat-field assessment results: (a) Distribution of normalization coefficient for the red channel, with the diaphragm set to 2.6 mm, and L1 shifted to −1 mm; (b) horizontal cross-sections for distributions in all the three channels.
Table 1 summarizes the Gaussian coefficients obtained from fitting the expression (8) to horizontal cross-sections of the normalization coefficients distributions. The position of the first lens L1 was considered positive (+1, +2) when it was shifted towards the second lens L2, and negative when it was shifted away from it. Values for the cases of non-Gaussian cross-section shape are marked in italics; see the Discussion section for considerations on their selection.
Table 1. Gaussian coefficients for horizontal cross-sections of normalization coefficient distributions.
In Figure 6, two examples of the red to green ratio distributions are presented, obtained during the spectral inhomogeneity assessment experiment. The highly inhomogeneous distribution in Figure 6a was obtained during the adjustments. Figure 6b shows the least inhomogeneous distribution, with standard deviation over the entire image as low as 0.025, and the mean value of the ratio about S i j ≈ 0.78 .
Figure 6. Examples of spectral inhomogeneity assessment results: (a) An example of red to green ratio distribution obtained during the adjustments; (b) The least inhomogeneous red to green ratio distribution.

4. Discussion

The focal length and the FOV size of the camera were suitable for both outdoor and indoor assessment of vegetation [3,7]. The depth of field ranged from 2 mm to infinity, following the definition of hyperfocal distance.
In Figure 4a, the border of the white region in the upper right corner corresponds to hyperfocal values. Any cross-section of this distribution would have a discontinuity at corresponding distance or aperture value, with the plot going towards positive infinity from the left and towards negative infinity from the right, in the white region. Hyperfocal distance values (Figure 5b) ranged from 52.5 to 885.6 m for the smallest and the greatest aperture correspondingly.
Unlike Bowman et al., we have regarded color channels in a RGB image as independent arrays; therefore, expression (7) accounts only for “lens shading” [5], disregarding the color crosstalk. In the future, we plan to compare the results obtained from the original algorithm and from the simplified version of it that we have used.
The values in Table 1 can be divided into two categories, depending on the shape of the cross-section. In the first category (see the first three rows in Table 1 for an example), cross-sections had a distinctive difference in brightness between the center and the edges, well described by a Gaussian function. In certain cases, though, while one of the channels had greater brightness in the center, the other two might have brighter edges, which led to inverted Gaussian curves for them (negative values of amplitude A).
In the second category, denoted by italic font in Table 1, the cross-sections were generally much flatter, which caused the curve fitting algorithm to stop at very high values σ >> w, or even at negative values, which are physically meaningless. In some channels, the brightest spot was shifted from the image center, probably due to imperfect orientation of the camera.
Flat cross-sections were obtained generally at zero position of L1, both with the wide and the narrow diaphragm. However, in the latter case, with the high aperture value, the degree of vignetting was higher. As for the spectral dependence, narrow Gaussian curves were present more often in the red channel than in the two others. Similar patterns were observed in the vertical cross-sections.
The choice of Gaussian functions to describe the brightness distribution across the image is intuitive to a certain degree and relies on the presumption that a combination of several independent processes might lead to a normal distribution as a result. Some examples from scientific literature support this presumption [8,9], but the question of selecting functions and comparing their quality of fit for different optical designs and sensor models is open for further research.
Using the sensor with a Bayer filter layer allowed us to assess the spectral inhomogeneity of the image directly during the adjustments of the optical setup, thus reducing it to an acceptably low level.

5. Conclusions

The laboratory tests have shown the suitability of the methods and techniques that we used for assessment of performance of a multispectral camera. For future research, several general directions can be outlined. First, applying the original method and instrumentation proposed by Bowman et al. to the OV5647 sensor is of interest. Secondly, introducing another image sensor, more specifically, a monochromatic one without the Bayer filters, and applying the same tests, appropriately modified. Finally, trying other functions, besides the Gaussian, to describe inhomogeneity profiles in multispectral images, comparing the quality of fit, and investigating the factors that influence the shape of inhomogeneity profiles should be prioritized.

Author Contributions

Conceptualization, V.G. and J.B.N.N.A.; methodology, V.G.; software, V.G.; validation, V.G. and J.B.N.N.A.; formal analysis, V.G.; investigation, V.G.; resources, V.G. and J.B.N.N.A.; data curation, V.G.; writing—original draft preparation, V.G.; writing—review and editing, J.B.N.N.A.; visualization, V.G.; supervision, V.G.; project administration, V.G.; funding acquisition, V.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by project No. FSEE-2025-0013, which was carried out as part of the state assignment of the Ministry of Science and Higher Education of the Russian Federation.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
CMOSComplementary metal–oxide–semiconductor
DOFDepth of field
FDMFused deposition modeling
FOVField of view
FWHMFull width at half maximum
RGBRed–green–blue
UAVUnmanned aerial vehicle

References

  1. Mukhtar, S.; Arbabi, A.; Viegas, J. Advances in spectral imaging: A review of techniques and technologies. IEEE Access 2025, 13, 35848–35902. [Google Scholar] [CrossRef] [Scilit]
  2. Mukhtar, S.; Arbabi, A.; Viegas, J. Compact spectral imaging: A review of miniaturized and integrated systems. Laser Photonics Rev. 2025, 19, e01042. [Google Scholar] [CrossRef] [Scilit]
  3. Goryainov, V.S.; Ngoua Ndong Avele, J.B.; Mazoya, A.B.; Tarasov, S.A. Portable multispectral camera for environmental monitoring. J. Russ. Univ. Radioelectron. 2025, 28, 66–82. [Google Scholar] [CrossRef] [Scilit]
  4. Allen, E.; Triantaphilidou, S. The Manual of Photography, 10th ed.; Focal Press: Burlington, NJ, USA, 2011; pp. 111–112. [Google Scholar]
  5. Bowman, R.W.; Vodenicharski, B.; Collins, J.T.; Stirling, J. Flat-field and colour correction for the Raspberry Pi camera module. J. Open Hardw. 2020, 4, 1–9. [Google Scholar] [CrossRef] [Scilit]
  6. Python—Gaussian Fit—Geeksforgeeks. Available online: https://www.geeksforgeeks.org/python/python-gaussian-fit/ (accessed on 2 April 2026).
  7. Goryainov, V.S.; Ngoua Ndong Avele, J.B. Assessment of Miniature Rose Plants’ Health Using Multispectral Imaging. In Proceedings of the 2025 XXVIII International Conference on Soft Computing and Measurements (SCM), Saint Petersburg, Russia, 28 May 2025. [Google Scholar] [CrossRef] [Scilit]
  8. He, K.; Tang, P.-F.; Liang, R. Vignetting Image Correction Based on Gaussian Quadrics Fitting. In Proceedings of the 2009 Fifth International Conference on Natural Computation, Tianjian, China, 14–16 August 2009. [Google Scholar] [CrossRef] [Scilit]
  9. Cao, H.; Gu, X.; Zhang, M.; Zhang, H.; Chen, X. Vignetting correction based on a two-dimensional Gaussian filter with harmony for area array sensors. IEEE Trans. Comput. Imag. 2022, 8, 576–584. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.