Reflected Darkfield Rheinberg Microscopy to 3D Topology

Since the geometry is known in a Disco Lights Illumination system, one can tell a computer which direction each color is coming from. It is fairly straighforward to then assign a value, which I will call the "slope", to each pixel, deriving from the three sector illumination.

The first step is to load, display and crop an input image.

input image for 3D reconstruction by Disco Lights Illumination analysis

Then, either select RGB as the color channels, or click on three places in the image as representatives of your three colors. Here, I have red, green and yellow filters, so the yellow channel is appropriate (yellow is the inverse of blue, coincidentally). Once the three color channels are known, a vector projection from the known RGB values to the custom channels is done.

RGB and custom color channels

With knowledge of the geometry, i.e. that the yellow light is coming from -90°, the red from 30° and the green from 150°, a vector decompostion can be done on the three channels, in x- and y-directions.

x and y vector components from each source

We see that the yellow light doesn't contribute to the x-component, as you would expect.

With this information in hand, we can now calculate the x- and y-slopes, averaging the three sector components.

x and y slope maps

Now that we have the slope maps, integration to determine surface height is done. Here, I use the Inverse FFT method.

3D reconstructed surface map, shown in 2D 3D reconstructed surface map

And for comparison, here is a stacked image of the same region, but with brightfield illumination.

Brightfield stack of 3D printed ABS black plastic

So far, this image has been the only one that really gave almost reasonable results. Work is continuing on the algorithm, but I will show some of the not-quite-successful attemps, also.

I'm not claiming the heights are correct, or even linear, but this DLI technique seems to show some promise for a single-image technique. Given enough contrast, regular transmitted Rhienberg could also produce 3D data.


The Matlab programs are available here and here (for the integration). No responsibility is taken for their use or misuse!


I tried to do the same thing with the image of a "D" for Denver on a U.S. nickel, but found that since the slope was so high, we lost all information there at the "vertical" wall, so the unwrapping to form an image from the "slope" maps failed to create a continuous edge and edge to flat-top transition. It still looks pretty cool in the end, but it is definitely not right.

Following the same steps as before,

input image for 3D reconstruction by Disco Lights Illumination analysis
RGB and custom color channels x and y vector components from each source
x and y slope maps
3D reconstructed surface map, shown in 2D 3D reconstructed surface map
Brightfield single image of D (Denver) mintmark on US nickel

It makes pretty nice "slope" maps, which really are more like edge-finders than accurate slope maps, but it fails to make sense of it in the end.



Last updated September 19, 2024. If you arrived via an external link, please visit the homepage for navigation!