I don’t think this model I’ve been working on is worth uploading since there’s probably only 1 or 2 people in the world who might use it other than myself, and using it in something practical would need some OpenSCAD code to merge it with a larger project, but on the very small chance that someone else does find it useful, I’ve put the files on my own website .
So… this is a holder for a glass prism and two Raspberry Pi cameras, that aligns the two cameras as closely as possible so that the images from each camera can be superimposed almost exactly without the stereo separation that you get from having the two cameras side-by-side. Why, you might ask? Well it’s so that the image taken by the regular color camera can be modified by the image taken by an infrared-sensitive camera, whether for artistic photographic effect or for scientific purposes in monitoring plant life or pollution etc.
I’ve put together a bash script to take the photographs, and a python script that takes the two images and aligns them as best it can, which not only applies any small x,y shift that’s needed because physically aligning the cameras to pixel accuracy is just not possible, but which also applies any affine transform that might be needed due to the pi camera lenses not being exactly level in the focal plane or from having marginally different focal lengths due to manufacturing differences. Here’s an example of the two images superimposed:
The software and a link to a source of suitable prisms is in the README file. It uses the new Pi5 because that board supports two cameras:
Printed in black to minimise internal reflections. Matt black would be best if you have it.



