Using a diffraction grating in front of my smartphone's camera, I can decompose light sources into their spectral components. The problem is that the background is not always dark and there might be interference between the spectral intensity and bright objects in the back ground.

Here is an example of an image taken with a diffraction grating of a fluorescent lamp:

enter image description here

In this case the background is not so bright but you can see that the dark and bright spots on the vacuum cleaner already change how the blue band looks like. I thought about having a second camera next to the first camera and taking a similar picture without the diffraction grating:

enter image description here

How can I isolate this spectrum that overlaps on my first image and how precise can be this recovery of the original spectral signal? I will be using monochrome cameras.

What I tried until now is to put a black sheet in front of the right half of my lens to block background light landing on the right part of the sensor such that the spectrum can be visualized in a black background environment but I think this limits the flexibility of such method

PS:Here my hand moved in order to remove the taped diffraction grating so the picture was not taken from the same pose but later I thought about having fixed cameras looking at the same direction with a minimal baseline to know their relative pose and easily register both images before proceeding with the spectrum isolation.

  • $\begingroup$ I think you'd do better to try to make a spectroscope than to try to remove the background through software. Your curved spectrum made me think of the spectrscopes made of CDs or DVDs. It doesn't matter what you are using for the grating, though. A homemade spectrometer would provide better results with much less hassle. Like this one: cs.cmu.edu/~zhuxj/astro/html/spectrometer.html $\endgroup$ – JRE Jul 7 '15 at 15:26
  • $\begingroup$ Thanks for the suggestion. I am using a DVD indeed, still waiting for the straight gratings I have ordered. As I mentioned in my edit, putting a black sheet few millimeters in front of my camera to get a black right half of the image solves the problem but it sacrifices half of the image. I considered using a slit but I don't know how good it works when the lamp is 2 meters away from the camera. I am trying to implement a lamp recognition system on a mobile base. $\endgroup$ – Mehdi Jul 7 '15 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.