Hello!
Up until now raw image data was typically associated with the bayer color filter array where neighboring image sensor pixels feature a different color filter to sample color information on an otherwise monochrome detecting sensor. This repeating 2by2 CFA pattern is defined in DNG metadata by these tags
CFAPlaneColor: 0 1 2 #defines RGB color channels
CFARepeatPatternDim: 2 2
CFAPattern2: 0 1 1 2 #RGGB bayer phase
However, for many years now image sensors for use in phone camera modules feature a color filter array, where individual color filters are spread over square pixel groups resulting in 4by4 (or even 6by6 / 8by8) CFA pattern commonly referred to as quad bayer CFA.
CFARepeatPatternDim: 4 4
CFAPattern2: 0 0 1 1 1 1 2 2
This allows the image resolution to be reduced by binning pixel values of neighboring pixels of the same color channel to achieve fast sensor readout for video capture in the typical 2by2 bayer CFA. Reducing the resolution on image data featuring a 2by2 bayer CFA is a far more complex problem with many caveats in practice. This describes the main tradeoff for QBCFA as demosaic of a full resolution unbinned readout becomes more complex on the other hand.
QB demosaic is largely overlooked by the industry as it describes a more complex problem where neighboring are no longer always of a different color channel like on bayer CFA. To alleviate this issue, image sensor manufacturers introduced real time on-sensor processing to remosaic quad bayer to bayer CFA with varying success on most QBCFA sensors. Only this preprocessed unbinned output is intended for end user delivery by phone OEMs. This constitutes a lossy conversion and is unacceptable as a long-term solution.
However, while most phones require root or even modified camera drivers to access quad bayer unbinned raw image, Pixel phones expose this for 3rd party camera apps by default. To humor this, an option was introduced to MotionCam Fuse to transfer QBCFA raw image captures into DNG files with a properly defined QBCFA like described above. If the DNGs metadata defines a usual bayer CFA instead, QB image data will be misinterpreted by image processing environments. This is common for example QB DNGs shared so far. As an example two DNGs are provided of the same image data. One with the properly defined QBCFA and the other with the wrong bayer CFA for testing purposes.
So far image processing environments that feature the necessary QB demosaic are rare. Darktable and RawTherapee fail when confronted with QBCFA. Only Lightroom, Photo Editor by dev.macgyver or PhotonCam feature this processing.
https://drive.google.com/drive/folders/1gmwd_2oqmrAgB8GeiHhv7XKZVeBE8XXF?usp=sharing