Abstract

The Raspberry Pi camera module is widely used in open source hardware projects as a low cost camera sensor. However, when the stock lens is removed and replaced with other custom optics the sensor will return a non-uniform background and colour response which hampers the use of this excellent and popular image sensor. This effect is found to be due to the sensor's optical design as well as due to built-in corrections in the GPU firmware, which is optimised for a short focal length lens. In this work we characterise and correct the vignetting and colour crosstalk found in the Raspberry Pi camera module v2, presenting two measures that greatly improve the quality of images using custom optics. First, we use a custom "lens shading table" to correct for vignetting of the image, which can be done in real time in the camera's existing processing pipeline (i.e. the camera's low-latency preview is corrected). The second correction is a colour unmixing matrix, which enables us to reverse the loss in saturation at the edge of the image, though this requires post-processing of the image. With both of these corrections in place, it is possible to obtain uniformly colour-corrected images, at the expense of slightly increased noise at the edges of the image.

Highlights

  • The Raspberry Pi single-board computer [2] and its accompanying camera module (Figure 1) are staple components of many open hardware projects [20, 21, 26]

  • There are a wide range of microscopy projects making use of the Raspberry Pi camera including the OpenFlexure Microscope [26], FlyPi [20], a fluorescence imaging system [21], and various o­ thers [4, 12, 13, 19]

  • The lenslet array on the Raspberry Pi camera module v2 causes both vignetting and pixel crosstalk when used with optics that have close to normal incidence across the whole sensor

Read more

Summary

Introduction

The Raspberry Pi single-board computer [2] and its accompanying camera module (Figure 1) are staple components of many open hardware projects [20, 21, 26]. A plot of the increase in noise due to colour unmixing (Uijpq) and vignetting correction (LSTijp) is shown in Figure 8(b, c) Note that this does not include the increased noise due to colour balance (adjusting the overall brightness of the three colour channels), and it refers to the matrix that unmixes the colours to achieve uniform response over the camera rather than fully unmixing to pure red, green and blue. The latter would increase the noise by a further factor of 2.3 for the optical system described here. While the details of the code to acquire and load the raw images will vary from camera to camera, the core algorithm should work in its present form

Discussion
Conclusion

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.