It’s no secret: I am a huge fan of space exploration and technology. When NASA successfully landed the Perseverance Rover on Mars earlier this year – I was thrilled. I was even more thrilled when stunning images of the Martian surface and the exciting entry, descent, and landing were released by NASA.
Bayer Pattern Sensors
But as the rover’s images are released – a lot of them are not color processed. This means NASA only provided a PNG file of the raw sensor output. This gives us a great excuse to talk about a major crossover between digital video post production and space exploration – imaging. People have been launching cameras into space since 1946! These cameras have served many different purposes and had many different capabilities over the years.
Today – the cameras on Perseverance are modern, Bayer pattern digital sensors. This means they are made up of a grid of many monochromatic photosites, with red, green, or blue filters in front of them. But it’s up to us to turn the raw, black and white image into a human viewable color image by assembling full-color pixels from neighboring single-color pixels, just like RED or Alexa raw digital images.
So What Does The Perseverance Rover Have To Do With DaVinci Resolve?
Well, friend and fellow colorist John Rogers – as we were talking about the rover – laid down a challenge for me: Write a DCTL to debayer these raw images into color. Luckily, the DaVinci Resolve Color Transform Language (DCTL) is publicly documented by Blackmagic Design. While researching this challenge I discovered a feature I had never used before. We can use a texture reference to get RGB values of adjacent pixels. From there – It was a matter of figuring out what pixel we are on, and what adjacent pixels had the data needed to assemble the RGB pixel.
Credit Where Credit Is Due
I owe a big thanks to John who helping me with research and then testing the DCTL. I also need to shout out to my brother, Larry – for teaching me about the modulus operator that I will show you in the video.
In This Insight
In the video, after explaining my love for all things NASA and orbital mechanics, you’ll learn how to read the DCTL that I’m sharing publicly. Here are a few time stamps for this video, in case you want to skip around some of the content:
- Start – Introduction
- :40 – The history of NASA cameras
- 2:00 – Understanding photosensors and Bayer patterns
- 3:10 – What do the raw Perseverance images look like?
- 4:20 – About NASA’s image repository
- 4:57 – How the DCTL script makes sense of the Perseverance rover’s photosensors
- 9:30 – Why this DCTL doesn’t work in a standard DaVinci Resolve project if you have multiple cameras of differing frame raster sizes
- 10:14 – How to use Fusion to easily debayer the Perseverance rover’s raw images, independently of your DaVinci Resolve project settings
- 10:38 – Important limitations about this debayering DCTL
- 11:56 – About John Rogers’ GitHub repository for Mars Perseverance cameras
- 12:30 – Conclusion
- If you want to try this DCTL yourself: [S3FILE file=’MARSDEBAYER_DCTL-mixingLight-ML1028.zip’]
- Have you never used DCTLs before? Check out my previous Insight for how to use DCTLs and some more examples of DCTL code.
- Perseverance raw images: Visit NASA’s free download site.
- For more DCTLs – including ones for other sensors on the rover, and using John’s matrix for color correction – visit John Rogers’ GitHub repository
- For a detailed and fascinating look at the color calibration targets on Perseverance, check out this ASU blog post.
Do you have comments or questions?
As always, we love interacting with our members. At the bottom of this page, you can leave your questions or comments, which we actively monitor. You can also ‘subscribe’ to this discussion thread to get email updates of new comments, questions, or answers. Just click the ‘subscribe’ button at the end of the comment block.