De-Bayering Algorithms

The place for questions about shooting with Blackmagic Cameras.
  • Author
  • Message
Offline

Bernhard

  • Posts: 57
  • Joined: Mon Aug 27, 2012 8:00 am

De-Bayering Algorithms

PostSat Sep 22, 2012 7:48 am

Hello,

for everyone interested in the process of de-bayering,
I've found an interesting paper that is easy to understand:
http://www.stark-labs.com/craig/articles/assets/Debayering_API.pdf

Thought the paper mentions, the best method – Variable Number of Gradients
is not suitable for realtime, there are actually realtime-implementations of VNG out there.


Also found a test for different approaches:
http://www.linuxphoto.org/html/test_demosaicing.html


And here I found something for those who are scientifically interested in the topic:
http://scien.stanford.edu/pages/labsite/1999/psych221/projects/99/tingchen/main.htm


I would be very curious which algorithm BMCC / Resolve is using.
(Hope they are developed by Teranex' experts to guarantee maximum quality! ;) )



Best regards,
Bernhard
Offline

John Brawley

  • Posts: 2034
  • Joined: Tue Aug 21, 2012 7:57 am
  • Location: Chicago Illinois

Re: De-Bayering Algorithms

PostSat Sep 22, 2012 12:14 pm

Bernhard wrote:Hello,

for everyone interested in the process of de-bayering,
I've found an interesting paper that is easy to understand:
http://www.stark-labs.com/craig/articles/assets/Debayering_API.pdf

Thought the paper mentions, the best method – Variable Number of Gradients
is not suitable for realtime, there are actually realtime-implementations of VNG out there.


Also found a test for different approaches:
http://www.linuxphoto.org/html/test_demosaicing.html


And here I found something for those who are scientifically interested in the topic:
http://scien.stanford.edu/pages/labsite/1999/psych221/projects/99/tingchen/main.htm


I would be very curious which algorithm BMCC / Resolve is using.
(Hope they are developed by Teranex' experts to guarantee maximum quality! ;) )



Best regards,
Bernhard


Resolve has their own finely tuned de-bayer that comes from 20 years of experience doing just that for "hollywood" level discerning types.

Many also fail to notice there is a "force high quality" debayer on the output setting in Resolve. It takes longer to render for a better result.

jb
John Brawley
Cinematographer
Atlanta
Georgia
Offline

Bernhard

  • Posts: 57
  • Joined: Mon Aug 27, 2012 8:00 am

Re: De-Bayering Algorithms

PostSat Sep 22, 2012 1:25 pm

Hello John,

good to know!
Would still be interested to know what type of method is used.

I'm skeptical in regard to image resampling because of my experience
with software video scaling the last couple of years:

- There simply isn't a good app out there (incl. Resolve's)
(okay, there is one, but an unobtainable spin-of of dedicated HW...)

- The excellent HW-scalers like Teranex don't do file-based conversions.

- now that more and more video/film cams deliver RAW, I see the very same
situation as with video scaling coming once again; but while scaling is a topic at the edge
because it is at the end of the workflow, de-bayering is crucial for the overall image quality

- for the next 10 years I don't want to read again all over the forums, that if I want to get a
really good de-bayering, I would need to do a workaround with a live-signal over
capture hardware because there is no HQ file-based option... (as it is with scaling today)

sorry, I'm simply skeptical...

Best regards,
Bernhard
Offline
User avatar

Frank Glencairn

  • Posts: 1640
  • Joined: Wed Aug 22, 2012 7:07 am
  • Location: Germany

Re: De-Bayering Algorithms

PostSat Sep 22, 2012 2:09 pm

John Brawley wrote:Resolve has their own finely tuned de-bayer that comes from 20 years of experience doing just that for "hollywood" level discerning types.


Hmmm... I may be wrong here, but as far as I know, Resolve was a grading/finishing application over the last 20 years, but I wonder if it saw much raw material from a baiern pattern.

I mean, you don't debaier when the material comes from scanned film or 3-chip cameras.
How long are raw CMOS cameras around? Probably not 20 years.

The one thing I can see, is that those algorithms have to do with scaling, and yes - scaling is something that Resolve does pretty good.

I miss more options to finetune or customize the process in Resolve.
http://frankglencairn.wordpress.com/

I told you so :-)
Offline

John Brawley

  • Posts: 2034
  • Joined: Tue Aug 21, 2012 7:57 am
  • Location: Chicago Illinois

Re: De-Bayering Algorithms

PostSun Sep 23, 2012 12:59 am

Frank Glencairn wrote:
I mean, you don't debaier when the material comes from scanned film or 3-chip cameras.
How long are raw CMOS cameras around? Probably not 20 years.



I'm only quoting what i was told by the Resolve guys.

You do know that CCD's can require debayering as well right ? ( I only learned that recently)

jb
John Brawley
Cinematographer
Atlanta
Georgia
Offline

Bernhard

  • Posts: 57
  • Joined: Mon Aug 27, 2012 8:00 am

Re: De-Bayering Algorithms

PostSun Sep 23, 2012 11:07 am

John, perhaps what You were told was meant in the context of film scanners?


Nevertheless, we consumers are facing a new level of complexity in our workflows now,
and what I want to say is that we need to take care to get the maximum level of quality.


The history of the very similar process of video scaling shows that software vendors
are making bad compromises in favor of speed against quality;
e.g. they gave us Bilinear or Bicubic video scaling, instead of sub-pixel precise Lanczos.
And the very best scaling techniques were restricted to expansive hardwares.


Now we need to take care that the same does not happen again with De-Bayering!
Because this time it is crucial for the overall quality of our media products.

- We need to encourage BMD and all the other vendors of Videosoftwares to give us the
best available methods for De-Bayering; even if the computation could take forever
(would be a market for acceleration-HW ;) )

- We need to take care to get consistent quality within our workflows.
In general, this is nothing BMD could do alone with more and more RAW cams on the market;
with their special characteristics and requirements.

But in the case of BMCC, what BMD could do, is to supply an API as RED does,
so there would be an official way for De-Bayering BMCC's DNG to guarantee
consistent De-Bayering quality within the apps of Adobe, Apple, Avid, etc.


But, perhaps I'm too critical and see a problem where no one else does?
I only wanted to make a constructive proposal, a respectful cause for thought,
so that complexity of our workflows decreases instead of increases.


Best regards,
Bernhard
Offline

John Brawley

  • Posts: 2034
  • Joined: Tue Aug 21, 2012 7:57 am
  • Location: Chicago Illinois

Re: De-Bayering Algorithms

PostSun Sep 23, 2012 11:28 am

Bernhard wrote:

- We need to encourage BMD and all the other vendors of Videosoftwares to give us the
best available methods for De-Bayering; even if the computation could take forever
(would be a market for acceleration-HW ;) )



My understanding is that Resolve has no compromise at all in this area.

Remember, this is a piece of software that sold for over 250k only 2 years ago.

The Resolve guys only play in the big sandpit. If I recall, they are the first and i think still only to offer full time 32bit precision with RGB AND Y colour correction.

I've been told that the Debayer is the envy of others. And again, I understand it IS ALREADY hardware accelerated...by GPU, which with Resolve is open ended.

You might have more luck asking this question in the Post section.

I think you'll find that Resolve isn't taking any short cuts.

jb
John Brawley
Cinematographer
Atlanta
Georgia
Offline

Bernhard

  • Posts: 57
  • Joined: Mon Aug 27, 2012 8:00 am

Re: De-Bayering Algorithms

PostSun Sep 23, 2012 1:15 pm

John Brawley wrote:
I think you'll find that Resolve isn't taking any short cuts.

jb



Excellent! But if You think one step further, there is no guarantee
to get the same excellent Resolve-quality when working with
BMCC's DNGs in PremierePro, FCP-X, etc.

Thought, there surely are workflows; but those are workarounds.
You're right when You say that this is a postproduction topic.

to be clear: I do NOT criticize Resolve nor BMD!

I'm trying to draw attention on a structural problem:
that we have to expect an increase of complexity in our workflows.
I want to encourage constructive rethinking of those workflows to cope with.
What can we consumers do? What features could and should we request?

We need to do this kind of reflection now at the beginning of this new era.
Otherwise we will facing never-ending discussion, also here in the forums, like:
'my app does de-bayer DNGs better than yours'
and
'if you want this level of quality you need to take a workaround over five apps
and three pieces of hardware'

:D

That's my point.

Best regards,
Bernhard

Return to Cinematography

Who is online

Users browsing this forum: Domingo Olmo Martin, JoshMallett, pnguyen720, pulalis, youlikeny and 23 guests