How Can You Color Process Mars Rover’s Images In DaVinci Resolve?

March 16, 2021

Learn how to use DCTLs (and texture references) in DaVinci Resolve Fusion to debayer Perseverance rover raw images, yourself.


Series

DCTLs….On Mars?

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.

A Bayer pattern sensor uses multiple red, green, and blue photosites to assemble full RGB pixels. Just like a raw Alexa or RED camera file, the Perseverance rover’s cameras are transmitting Bayer pattern images to us.

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.

A raw, Bayer pattern image, from the Perseverance rover before and after debayering.

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

Additional Resources

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.

-Joey

Comments

Homepage Forums How Can You Color Process Mars Rover’s Images In DaVinci Resolve?


  • Keith G
    Guest

    Amazing Joey! I share your passion for space. Great insight into the process.

    Keith


  • Joey D’Anna
    Guest

    Thanks so much!


  • Remco Hekker
    Guest

    Hi Joey, Thanks for this fun insight! Cool to see we share another passion. I’ve shared this insight in some of the astroimaging forums I’m a member of.
    I will say, my understanding of imaging technology and colorgrading have risen to a new level since I’ve taken up deep-sky astrophotography as a hobby and started processing these images with an application called PixInsight. Thanks for spreading the love.


  • Joey D’Anna
    Guest

    Thanks! Astrophotography is definitely something I’ve wanted to get into for awhile as well. Too many hobbies, too little time!


  • Remco Hekker
    Guest

    I agree! It’s a time sink. Fortunately a significant part of it happens as I sleep 😉


  • andi winter
    Guest

    wow… i love this nerdy stuff :)! keep on going, this really helps understanding the alchemy of BAYER-ing!
    (and some DCTL secrets as well)


  • Diego B
    Guest

    Great tutorial, Joey! One question: if you increase the number of sampling neighbour photosites, lets say a RGB pixel is built by 2 surrounding red, 2 blue and four green, helps to improve the image quality?


  • Joey D’Anna
    Guest

    Thanks! Yea i think that would definitely help – but I doubt its as simple as just averaging more neighbors. To go the next step you would probably have to implement some kind of bilinear or other filtering – which is definitely beyond my math capabilites!


  • Joey D’Anna
    Guest

    Thanks! yea this was a real fun one for me!

Log in to reply.

1,000+ Tutorials to Explore

Get full access to our entire library of over 1,100+ color tutorials for an entire week!


Start Your Test Drive!
Loading...