Picture of Quick and Cheap Diffuse Light for Macro Images and Computer Vision

The lighting rig created here is suitable for a range of tasks where you want a diffuse light source.

A perfect diffuse light (also called ambient light in 3D graphics) comes from all angles and won't cast shadows or have strong bright reflections.  Contrast this with a point light, like the sun that casts strong shadows and creates strong bright spots on reflective surfaces.  If you've ever been on a skiing on a grey day, you will have experienced diffuse light and the lack of shadows cast in the all white snow makes it really hard to see the bumps.

When photographing indoors, you get an approximate point light when you use a flash gun, and a more diffuse light when you bounce lights off the walls.

Why You Might Want a Diffuse Light

Diffuse lights are great for when you want:
  • No specular reflections (bright spots on shiny surfaces such as metal)
  • No shadows
In my case, I was experimenting with computer vision systems to detect very small surface mount (SMD / SMT) resistors.  I was photographing them against a red background, which could easily be removed using its colour, but the dark shadows to a computer looked like the body of the resistor and some reflections off the black body of the resistor appeared white.  A sample image from the internet I had found showed none of these problems and was a lot easier to process.

Look at the sample images of resistors (the black small rectangles).  The two with a brighter red background I created and show strong shadows and specular reflections.  Contrast with the last image which has much weaker shadows and no noticeable specular reflections.

Approximating a Diffuse Light

In this project, we're not going to create a perfectly diffuse light, but make something that looks similar.  By placing lots and lots of point lights (LEDs) around the subject.  Ideally we would place the lights all around the subject, but in this case I wanted to try leaving a lot of vertical clearance between the light and subject as in the long run it will be mounted on a moving platform.  So we we will mount all of the LEDs on a flat board.  A flat board will also be quicker and easier to make.

A common commercial, off-the-shelf option for SLR cameras is a "ring flash", which creates a ring of light around the lens to create a similar effect.

It would be very easy to extend this project to make a cube out of several boards to make the light come from all sides.

Time, Cost and Expertise

This project should only take a few hours once you have bought the materials.  It requires a very basic knowledge of electronics, soldering skills and cutting with a sharp knife.  Total cost for me was <£10, but a few pounds extra to include a 12V power supply may be needed.


Well done I like the use of the foam board. cheep and easy to work with. however how did you overcome the heating problem of soldering and the melting of foam board?