Friday, May 13, 2016

debayering raspberry pi camera (monochrome mod)

monochrome camera basically has higher resolution more sensitivity
really higher resolution??? that sounds weird
think about it like that







if you have 1 mega pixel RGB camera with ratio of .25 red .25 blue and .50 green of the pixels
and you photographing a green field - that means that you getting roughly .50 of the camera pixels

bayer filter

i wanted to try this mod for a while - just cause raspberry pi don't offer them yet ;)
and today i had some free time :)

since i upgraded all my raspi cameras to the newer version and had nothing to do with the old modules i thought why not trying to debayering them
so ill start by saying it is not easy nor quick task and require steady hands and lots of patients
the difference between the noir camera and the regular one
left one is noir and the right one is the regular one

4 X raspi cameras died during this experiment (5  by the end of this post)
2 X died during the opening of the lens socket (it is glued with a thin layer of epoxy)
the trick is to carefully release one corner and use it to dispatch the board from the lens socket
2 X died during debayering attempts
apparently (a microscope could have probably save most of those cameras lives but i was too lazy to drive to TAMI our local hackerspace and do it there) there is some very fine wires (pictures were taken with my cellphone from a mantis vision microscope which i bought later)

running at the top edge of the bayer filter touching them was probably not a good thing as it probably caused them to short so it is well advise to first do it under the microscope and second to leave those wires alone with some extra space just in case
after i destroied the first 4 cameras the 5th one i actually debayered while it was working so i could find what am i doing wrong and it worked (you can see it in the attached video at the bottom)
looks like there is some extra layer of coating under the bayer filter that seems like ar coating but i might be wrong
another tip is applying as less pressure as possible as the cmos can move and brake some of the bonded wires at its edges
this is not the end its just a short rest at the heat of the battle
i will try to use different solvent for debayering as it clearly much better approach 
during the focusing of the lens i expediently done something that destroy the camera so that bring the casualty count to 5
here is a short video of the debayering process using cutting knife


update: new diagnostic looks like it might be a problem of applying too much force to scrub the bayer filter i apparently accidentally moved the cmos? and ripped apart some wires that was connected  to it

sorry for not publishing any photos of the finished result
when i was adjusting the focus of the lens i accidentally ripped the hot glue that i used to fix the lens socket to the board and again ripped apart some cmos wires.
had some time to do it all again and here is the end result

focus slightly off


p.s
i tried several solvents with ultrasonic cleaner without success but looks like it would be a much better way to achieve the goal

later p.s
photoresist  remover then using cleaning solvent worked without damaging the sensor

7 comments:

  1. Hi Elad,
    I have been searching for information on how to debayer the Pi camera and your blog post is one of the few sources I have found. Thanks for posting!

    I have just a few questions:
    1) what type of tool did you use to remove the filter?
    2) what solvent(s) worked best for you?
    3) Do you know of any more links about removing the Pi camera's bayer filter?

    Thanks!
    Kyle

    ReplyDelete
  2. Hello,

    I am interested too in Kyle's questions. I need to debayer a RaspberryPi Camera V2 NoIR for my master thesis.

    Many thanks!
    Abbas

    ReplyDelete
  3. Hi Abbas,
    Which solvent did you eventuelly use? I have to do the same.

    ReplyDelete
    Replies
    1. most kinds and brands of photoresist remover should work
      afterwards you need to clean the residues for best result use heat, patient, and good microscope to monitor the process.

      Delete
  4. Hi Elad,
    I am trying to solve the same problem and I found your blog really useful.
    Can you explain which brand of photoresist remover used and the method (how to heat specially).
    I have been trying to remove the color filter array by scratching, but my cameras always broke. Also, I wonder if there are three layers of the filter array before reach to the CMOS sensor.
    Thank you very much.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Hi Moso,

      As Elad replied above, you need patience, it's a very thorough process if you're etching the pi cam sensors.

      The photoresist remover in general is an aggressive solution, different solutions may destroy the small board (<1sqcm sensor board, not the 2.5sqcm connected to the pi).

      You need to check if the sensor is has a positive or negative photoresists and get the convenient remover. If you can't know that, then you have to try both seperately. For the Pi Cam 1.3 sensor, Wilkes et al. used a positive photoresist remover. Moreover, some removers target both kinds of resists.

      If you get this to work then you will end up with a much more delicate sensor.

      Good luck!

      Delete