Effective Chromatic Noise Reduction (Noiseware-like)

無論我們在 RGB colorspace 怎麼解永遠都不好,消除 chromatic noise 的同時一定會有機會影響細節,問題就是在 RGB channel 隱含了很大的 intensity 成分。必須要轉換到有 color-phase 和 color-saturation 的空間,完整的將 luminance 區隔開來,然後處理那些對人眼影響不大,但不規則卻會很惱人的 noise channels。 如Lab、YUV、HSV、YCbCr;都是不錯的選擇。

  1. transform RGB image to luminance-split color space.
  2. smooth the non-luminance channels (may use bilateral filtering), NOTE that the
    smooth window size must be large enough (eg. 21×21 pixels).
  3. well-blended with original channels if we don’t want to lose too much color especially in small object region.
  4. inverse transform colorspace.
  5. Done.

sample source

與主流 denoise 軟體比較,canon DPP、Noiseware,都在強 edge 附近使用了較多原圖的顏色,所以邊緣的 chromatic 雜訊也較多,但是更有機會保留色彩。

Joint Bilateral Upsampling in Laplacian Pyramid

在 Laplacian pyramid 重建回原影像時,我們嘗試利用 edge-preserved upsampling 的方式重建。

\[G_{i}=upsample(G_{i+1})+L_{i}\]

compare
left: Gaussian, center: joint bilateral, right: ground truth

與 Gaussian upsampling 比較,joint bilateral upsampling 利用 Gaussian pyramid 中前一級較大解析度的影像作為 guide image。可以發現在高光處的擴散光暈有明顯的減少,更接近 ground truth 的結果。

 

閱讀全文〈Joint Bilateral Upsampling in Laplacian Pyramid〉

Solving the Discrete Poisson Equation using Conjugate Gradient Method

在 Tone mapping: A quick survey. (Tone mapping 原理) 中我們介紹了 gradient domain 的解法,本篇暨 FFT(DST) 解法後,提供一個 spatial domain 的 optimization 方式。

與原始論文使用 Multigrid 不完全相同,但Conjugate gradient 的作法可被 Multigrid 利用來取代 Gauss–Seidel method 作為 smooth 的方法。與 Multigrid 相比直接求解可能需要更多次的 iteration (大約2000次)。

閱讀全文〈Solving the Discrete Poisson Equation using Conjugate Gradient Method〉

Multi-band Image Blending in Compact Matlab Codes

 % By Hao Jiang, Boston College, Fall 2010
 % comment by adahbingee 2015/01/20
 % max level
M = floor(log2(max(im1_size)));

 % Gaussian pyramid
for n = 2 : M
    % downsample image
    im1p{n} = imresize(im1p{n-1}, 0.5);
    im2p{n} = imresize(im2p{n-1}, 0.5);
    % downsample blending mask
    mp{n} = imresize(mp{n-1}, 0.5, 'bilinear');
end

 % Laplician pyramid
for n = 1 : M-1
    im1p{n} = im1p{n} - imresize(im1p{n+1}, [size(im1p{n},1), size(im1p{n},2)]);
    im2p{n} = im2p{n} - imresize(im2p{n+1}, [size(im2p{n},1), size(im2p{n},2)]);   
end   
 
 % Multi-band blending Laplician pyramid
for n = 1 : M
    imp{n} = im1p{n} .* mp{n} + im2p{n} .* (1-mp{n});
end

 % Laplician pyramid reconstruction
im = imp{M};
for n = M-1 : -1 : 1
    im = imp{n} + imresize(im, [size(imp{n},1) size(imp{n},2)]);
end

Local Laplacian Filtering : Image Detail Enhancement and Tone Mapping

memorial_llc_gradient
left: enhanced by fast local Laplacian filtering [2]. \(N=100, \alpha=0.25, \beta=0, \sigma_{r}=log(2.5)\), right: enhanced by gradient domain compression[3]

Introduction

本篇利用了標準的Laplacian pyramid,藉由操作修改residual layer來達到detail enhancement與tone mapping的效果。想當然是halo free;此外的特色是no optimizationno gradient domain manipulation,所以適用實作和加速。上圖則是激動人心的差異!

92203ad0721401323a780e6b1a4283f8

 

 

這邊我實作了一個簡易版的 javascript demo ,速度很慢,不要太期待。

 

閱讀全文〈Local Laplacian Filtering : Image Detail Enhancement and Tone Mapping〉

Gradient domain high dynamic range compression with local Poisson solver

flowsolver本篇參考論文 A real-time implementation of gradient domain high dynamic range compression using a local Poisson solver

 

1. Model

前情提要,在前一篇中我們討論到了gradient domain的Poisson reconstruction,給定已知的divergence \(\operatorname{div}{G}\),嘗試重建\(I\)

\[
\begin{align}
\nabla^2{I}&=\nabla_{x} \cdot \Phi\cdot\nabla_{x} f +\nabla_{y} \cdot \Phi\cdot\nabla_{y} f \\
&=\operatorname{div}{G} \label{eq:model}
\end{align}
\]

2. Integral Problem

基本上這可看為一個積分問題,用一維的gradient思考,\(\nabla{f}\)套用衰減函數\(\Phi\)後由任何一邊開始積分就可以返回\(I\),如下式可以積回任何第\(n\)點的\(I_n\),其中\(C\)為一個常量

\[I_n=\sum_{i=0}^{n}{\nabla{f}_i{\Phi_i}}+C\]

一個直白的說法就是給你數個位置的個坡度,然後以平滑的方式重建回斜坡

但在二為空間就不是如此,從任何一邊積分的結果都會有所不同,所以在無法兼顧的情況下,我們僅能將其轉換為一個optimization問題來看,使其符合目標式\(\eqref{eq:model}\)。從任何單點來看都需要整個畫面的divergence才能完整的重建

 

閱讀全文〈Gradient domain high dynamic range compression with local Poisson solver〉

Tone mapping: A quick survey. (Tone mapping 原理)

c1aa14506d4d0132e77d6ea4796472e0

假設已經有一個HDR影像,如何顯示在8-bit螢幕上哩? Tone mapping三巨頭,依照結果優排序! 三種都是local tonemapping,都是SIGGRAPH02耶! 那年真流行HDR。

  1. Gradient domain high dynamic range compression
  2. Fast Bilateral Filtering for the Display of High-Dynamic-Range Images
  3. Photographic Tone Reproduction for Digital Images

tm

2和3的方法皆屬於edge preserving,對比度較差;而方法1屬於gradient preserving,對比度較佳。當然這三種算法的結果也反映了演算法複雜程度…

 

閱讀全文〈Tone mapping: A quick survey. (Tone mapping 原理)〉