For folks who know history demosaicing and TCA correction.

Started 3 months ago | Questions thread
Flat view
jw10 Contributing Member • Posts: 911
For folks who know history demosaicing and TCA correction.

Hi all,

I'm in the midst of generating TCA coefs (lensfun poly3 style).

This got me to wondering about raw image demosaicing, and TCA correction.

-- hide signature --

Based on the information I can find, the more advanced demosaicing algorithms (VNG, aMaZe) all assume the r,g and blue channels are in good alignment.

Assuming there is uncorrected and significant TCA present there are two methods to process the data:

1. Demosaic first, then do TCA correction.  With demosaicing algorithm generating a result that is not quite right, and if the next step in the process is TCA correction, it might appear to produce chromatic aberration.

2. TCA correction is done first, then demosaicing.

It seems to me that method 2 is the proper way to do this, but from everything I see method 1 is the way it is done (at least in open source software).   dcraw is the only code I found for demosaicing that will do a primitive TCA correction first.

I have googled and looked in the "way back machine" ;-), to find out how method 1 became the default.  I cannot find a single reference to this being discussed.   If my assumption that method 2 is the best, then surely there would have been some analysis/discussion of the topic while algorithms were being developed many years ago.

The one reason I can see for applying TCA after demosaicing is TCA and lens distortion can be combined as a single operation, making it more efficient.   The other reason could be both methods were analyzed and there just wasn't a significant difference between the result

I have hacked dcraw to handle the lensfun type of TCA correction, but before I spend much more time on it I'd be interested to hear of any history of the problem so I can know whether it would be fruitful to proceed.

Please don't be afraid to point out errors in my assumptions if you feel I've got those wrong.

Thanks in advance...

Jeff (aka jw10)

 jw10's gear list:jw10's gear list
Canon PowerShot A95 Canon PowerShot S3 IS Sony Cyber-shot DSC-WX150 Panasonic Lumix DMC-FZ200 Sony RX100 II
This question has not been answered yet.
Flat view
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow