• 沒有找到結果。

一種具低功率的2D-3D視訊顯示系統設計開發與硬體實現(I)

N/A
N/A
Protected

Academic year: 2021

Share "一種具低功率的2D-3D視訊顯示系統設計開發與硬體實現(I)"

Copied!
24
0
0

加載中.... (立即查看全文)

全文

(1)

行政院國家科學委員會專題研究計畫 成果報告

一種具低功率的 2D-3D 視訊顯示系統設計開發與硬體實現 (I)

研究成果報告(精簡版)

計 畫 類 別 : 個別型

計 畫 編 號 : NSC 100-2221-E-011-093-

執 行 期 間 : 100 年 08 月 01 日至 101 年 07 月 31 日 執 行 單 位 : 國立臺灣科技大學電子工程系

計 畫 主 持 人 : 阮聖彰

報 告 附 件 : 出席國際會議研究心得報告及發表論文

公 開 資 訊 : 本計畫可公開查詢

中 華 民 國 101 年 07 月 18 日

(2)

中 文 摘 要 : 視覺訊號是人類感官所接收到的重要知覺訊號,因此如何有 效呈現自然視覺訊號即成為顯示器的發明與改進方向。鑒於 現今的顯示技術無法在單一畫面中呈現理想的平面以及立體 視覺資訊,本計畫主要探討影像顯示系統的平面影像增強和 立體影像顯示技術兩部分。

人類大腦的深度知覺能夠接收影像視覺訊號中的深度線索來 觀察三維空間的變化。根據此原理,先前的研究主要是透過 深度圖分析來增強影像特徵。但這種方法必須先等待影像深 度圖建立後才能做影像增強,所以十分費時且不利於 2D-3D 視訊顯示系統的硬體平行化設計。因此,本計畫第一年度將 提出一種不需要深度圖的影像增強演算法。

為增強影像對比度,直方圖修正法利用壓縮或拉長影像直方 圖提高主體與背景之間的形狀、紋理、邊緣或其他細節的差 異。一般來說,影片的對比增強必須對每一張畫面做處理,

然而這樣會提高顯示設備如筆記型電腦、PDAs、螢幕、照相 手機處理的複雜度。為了維持影像品質並降低處理時間,本 計畫提出一種由鏈結串列實作的直方圖搜尋方法避免產生空 的 bins。更進一步簡化所提出用來評估影片空間冗餘的 spatiotemporal thresholding 法。當影片畫面只存在些微 改變時,門檻值計算可以簡化對比度增強的運算量;另一方 面,當畫面有大幅度變動時,直方圖修正法便精確的實施在 影片畫面上。經實驗結果證明此法可以有效達到品質及運算 成本之間的平衡。

中文關鍵詞: 影像顯示、影像增強、深度資訊、立體影像、對比度增強、

直方圖建構、鍊結串列、移動評估。

英 文 摘 要 : Vision signal is one of the important perceptual parameters for human senses. Hence, monitor technologies have been developed for the natural vision and image display. In this project, we propose a 2D-3D image display system for both the image

feature enhancement and the depth-based 3D imagery.

Human brain can receive depth cue from natural vision signals to observe the environment change in the three-dimensional space. According to this

principle, prior research used the depth information to enhance the image features. However, this method needs to create depth map before the image

enhancement, thus increasing the computational

complexity. Moreover, the 2D-3D video display system cannot be implemented by the parallel hardware design

(3)

based on this method. To solve this problem, the first year project proposes an image enhancement algorithm without creating depth map.

Histogram modification method compresses or stretches the histogram of an image in order to enhance the contrast of an image, which involves the difference between objects and background, the shape, texture, edge, and other image details. In general, contrast enhancement must be applied to every frame of a sequence, thus increasing the complexity of video processing applications in many display devices, including laptops, PDAs, monitors, mobile camera phones, and so on. In order to keep the

processing effect and to reduce the processing time, this paper proposes a substantial histogram search method with linked lists to avoid generating empty bins. This method is also further simplified by the proposed spatiotemporal thresholding method which evaluates the temporal redundancy in video sequences.

The calculated threshold can simplify the contrast enhancement of each frame when the current frame undergoes only slight changes, while implementing the exact histogram modification method to the current frame if there are great contextual changes in the video sequence. Experimental results demonstrate the effectiveness of the proposed method in achieving a balance between the acceptable effect and low

computational cost.

英文關鍵詞: Image display, image enhancement, depth information, stereoscopic imagery, contrast enhancement, histogram construction, linked lists, motion estimation.

(4)

一種具低功率的 2D-3D 視訊顯示系統設計開發與硬體實現(I)

Development and hardware implementation of low power 2D-3D video display system (I)

計畫編號:NSC 100-221-E-011-093

執行期間:100 年 08 月 01 日 至 101 年 07 月 31 日 主持人:國立台灣科技大學 電子工程系 阮聖彰 副教授 I. 中文摘要

視覺訊號是人類感官所接收到的重要知覺訊 號,因此如何有效呈現自然視覺訊號即成為顯示 器的發明與改進方向。鑒於現今的顯示技術無法 在單一畫面中呈現理想的平面以及立體視覺資訊,

本計畫主要探討影像顯示系統的平面影像增強和 立體影像顯示技術兩部分。

人類大腦的深度知覺能夠接收影像視覺訊號 中的深度線索來觀察三維空間的變化。根據此原 理,先前的研究主要是透過深度圖分析來增強影 像特徵。但這種方法必須先等待影像深度圖建立 後才能做影像增強,所以十分費時且不利於 2D-3D 視訊顯示系統的硬體平行化設計。因此,本計畫 第一年度將提出一種不需要深度圖的影像增強演 算法。

為增強影像對比度,直方圖修正法利用壓縮 或拉長影像直方圖提高主體與背景之間的形狀、

紋理、邊緣或其他細節的差異。一般來說,影片 的對比增強必須對每一張畫面做處理,然而這樣 會提高顯示設備如筆記型電腦、PDAs、螢幕、照 相手機處理的複雜度。為了維持影像品質並降低 處理時間,本計畫提出一種由鏈結串列實作的直 方圖搜尋方法避免產生空的 bins。更進一步簡化 所提出用來評估影片空間冗餘的 spatiotemporal thresholding 法。當影片畫面只存在些微改變時,

門檻值計算可以簡化對比度增強的運算量;另一 方面,當畫面有大幅度變動時,直方圖修正法便 精確的實施在影片畫面上。經實驗結果證明此法 可以有效達到品質及運算成本之間的平衡。

關鍵字: 影像顯示、影像增強、深度資訊、立體 影像、對比度增強、直方圖建構、鍊結串列、移 動評估。

II. 英文摘要

Vision signal is one of the important perceptual parameters for human senses. Hence, monitor technologies have been developed for the natural vision and image display. In this project, we propose a 2D-3D image display system for both the image feature enhancement and the depth-based 3D imagery.

Human brain can receive depth cue from natural vision signals to observe the environment change in the three-dimensional space. According to

this principle, prior research used the depth information to enhance the image features. However, this method needs to create depth map before the image enhancement, thus increasing the computational complexity. Moreover, the 2D-3D video display system cannot be implemented by the parallel hardware design based on this method. To solve this problem, the first year project proposes an image enhancement algorithm without creating depth map.

Histogram modification method compresses or stretches the histogram of an image in order to enhance the contrast of an image, which involves the difference between objects and background, the shape, texture, edge, and other image details. In general, contrast enhancement must be applied to every frame of a sequence, thus increasing the complexity of video processing applications in many display devices, including laptops, PDAs, monitors, mobile camera phones, and so on. In order to keep the processing effect and to reduce the processing time, this paper proposes a substantial histogram search method with linked lists to avoid generating empty bins. This method is also further simplified by the proposed spatiotemporal thresholding method which evaluates the temporal redundancy in video sequences. The calculated threshold can simplify the contrast enhancement of each frame when the current frame undergoes only slight changes, while implementing the exact histogram modification method to the current frame if there are great contextual changes in the video sequence.

Experimental results demonstrate the effectiveness of the proposed method in achieving a balance between the acceptable effect and low computational cost.

Keywords: Image display, image enhancement, depth information, stereoscopic imagery, contrast enhancement, histogram construction, linked lists, motion estimation.

III. 簡介

影像品質容易受環境、操作人員或硬體 設備本身所影響,例如惡劣天氣、日照不足、

不良的室內燈光照明,甚至是顯示設備本身 感光元件能力造成影像品質低落。除此之外,

缺乏專業知識、訓練的影像設備操作人員也 可能造成影像品質低落。對比度增強可藉由

(5)

提高物件和背景之間的差異進而提升影像設 備顯示品質。此外,對比度增強更可以應用 在醫療影像分析[1]、數位攝影[2]、雷達圖像 處理[3]、人臉識別[4]、文件影像處理[5]、物 件檢測[6]和液晶顯示器處理[7]等領域,以產 生各種令視覺愉悅(visual pleasing)的影像資 訊。因此,對比度增強可以說是影像處理發 展過程中不可或缺的重要角色。

各種對比度增強方法已經在許多論文中 被提出來[8]-[10],主要可以分成三大類:

1) 空間域濾波器[11] - [13], 2) 頻率域濾波器[14]-[15]

3) 直方圖修正法 [16]- [18]

空間域濾波器是透過區域或型態學的方法修 改每個像素的亮度值以提高影像對比度,然 而 local window 修改像素亮度的方式通常會 伴隨額外的計算負擔;另一方面,頻率域濾 波器則是藉由修改頻率係數如傅立葉、小波 轉換、餘弦轉換以增進影像對比度。頻率域 濾波器雖然可以增強影像的紋理、邊緣和其 他被隱藏的資訊,但影像的亮度卻無法獨立 被修正。除此之外,大尺寸影像的頻率轉換 和其相對應之反向轉換亦不適合用於即時處 理;由於直方圖修改法[9]-[10]兼具簡單、直 觀、快速等特性,因此在三大類對比度增強 方法中最受到關注。

傳統 直 方 圖 修 正法 藉 由直方 圖 等化法 (histogram equalization, HE)修正每一個畫素 的灰階值。直方圖等化法利用累積分布函數 (cumulative distribution function, CDF) 產生 影像直方圖,映射函數再將像素強度做轉換。

Simplest histogram equalization (SHE)對應的 CDF 和對比增益為正比關係。一般而言,具 高機率的灰階像素分布的直方圖,會被擴展 到較大的範圍的分布,而具較低機率的灰階 像素分布的直方圖則傾向於被壓縮其分布的 範圍。因此,當影像直方圖出現高峰或低谷 時,SHE 通常會產生不自然的影像。

為解決上述問題,各種全域調整(global adjustment) 、 CDF 或 直 方 圖 分 離 (histogram

separation)的直方圖等化法已經在[16]-[18]中 被 提 出 。 Recursive sub-image histogram equalization (RSIHE)利用影像的區域中位數 將影像直方圖分割成數個區域再分別產生各 自對應的等化法,藉以減少 SHE 所帶來的缺 陷 [16] ;Recursively separated and weighted histogram equalization (RSWHE)利用直方圖 分離技術及正規化伽瑪函數來平滑每個子直 方圖[17]。藉由修改後的子等化圖允許多等化 器在增強對比時也能同時保留影像特徵[17];

Automatic weighting mean-separated histogram equalization (AWMHE)最佳化一些區域映射 以產生一個小量的空間變異與亮度的保存 [18]。可惜的是,上述直方圖等化法並未將相 鄰內容的資訊納入加權時的考量。因此,一 種基於最小弗羅貝尼烏斯範數總和(sum of Frobenius norms)並藉由平滑的二維目標直方 圖 之 contextual and variational histogram equalization (CVHE)在論文[19]中被提出。然 而,CVHE 是基於二維目標直方圖建構而成的,

運算時間較一般直方圖等化法為長。

為了減低建構二維目標直方圖的時間,

許多直方圖搜尋法(histogram search method) 在論文[20]-[22]中被提出。由於兩個相鄰的像 素為中心所形成的二維目標直方圖存在相當 大的冗餘(redundancy)可以被重複利用。在文 獻 [20] 中 , 一 種 boundary histogram search (BHS)藉累計相鄰兩像素二維目標直方圖相 交區域方式降低運算所需時間。可惜的是當 搜尋視窗變大時 BHS 仍然需要相當大的運算 量[21];為了在常數時間內完成直方圖建置,

文獻[21]提出了一種 integral histogram search (IHS)方法。IHS 藉由遞迴傳遞每一個像素所 形成之影像 superset 使每一個目標直方圖可 以更容易地被計算出來。然而 IHS 的缺點是 建置 integral histogram 的過程需要消耗大量 的記憶體空間;一種根據分布的特性提出的 distribute histogram search(DHS)法用來分離 (disjoint)欄區域。DHS 法利用空間冗餘特性在 常數時間內運用最精簡的記憶體空間更新直

(6)

方圖。受到 DHS 法使用欄直方圖的啟發,我 們提出使用 differential column histogram 的 substantial histogram search (SHS)方法。然而 SHS 建構直方圖的方法和 DHS 完全不同。

Differential column histogram 不只分離欄區域 更計算出統計差異,更有助於降低更新核心 直方圖所需使用到的減法運算。此外,特殊 的資料結構如鏈結串列也被用來避免 empty bins 的產生。因此,直方圖建置所需的運算時 間及儲存空間便可以輕易的降低。

影片增強比影像增強更困難也更重要,

實際上許多資料壓縮的技術已經在影片傳輸 和儲存上蓬勃的發展了。因此,影片資料可 以輕易地藉由顯示設備和網路傳輸取得。對 於增強夜間拍攝的影片,一種基於全域移動 估測的方案被用來分析同一場景中白天與夜 晚影片內容的差異性。當場景的差異與背景 影像被生成時,亮度差異比例便可以用來增 強夜間影片[23]。對於一個被壓縮過的影片來 說,每一張增強的畫面必須被正規化以保持 輸出結果和解壓縮資料的一致性。基於利用 影片的 motion vectors(MVs),影片品質可以在 處理的過程中被維持住[24]。

不幸的是對比度增強和其他影像處理法 可能無法被有效應用於處理影片的龐大資料 量。舉例來說,若以每秒 30 張的速度拍攝影

圖一、影片增強法藉由 (a)所提出之方法 (b)傳統方法

片,則對於每隻攝影機來說影像增強法就必 須處理 2592000 張影像。根據直覺我們可以 針對 MVs 設計預先定義門檻值以簡化影像處

理功能[25]。另一方面,懲罰函式藉由評估一 致性也可以應用在效能增強[26]。然而,預先 定義的門檻值無法應用在所有型態的影片而 且許多功能也會帶來額外的計算量。

為了有效降低影像處理法應用在影片上 所帶來的龐大運算量,我們計畫在最新的影 片壓縮標準 H.264 上提出一種 spatiotemporal threshold calculation(STTC)法[27]。首先,每 一個 marcoblock 透過自適應性門檻值決定的 機制,Alarm 則是用來簡化增強每一張畫面的 過程。這個方法很適合用在縮短前後張影像 差異不大的時候。

IV. 研究方法

基於所提出之 SHS 法我們可以很有效率 的建構直方圖。類似於 DHS 的概念,SHS 法 一樣是利用許多建構的 disjointed histogram 來 更新每一列的核心。然而 SHS 法生成的直方 圖在結構上和 DHS 有許多的不同:當加法、

減法和 bin 的差異和其他元素用來更新每一 個像素的核心直方圖(kernel histogram)時,欄 的第一個元素會被初始化為核心直方圖。

此外,我們也利用 MVs 的特性開發了一 種有效率的影片增強法。圖一為所提方法之 架 構 圖 和 影 片 增 強 所 需 的 Histogram Modification(HM)法。我們方法主要的貢獻在 於避免重複建構映射函數。

圖二、SHS 法示意圖

(7)

當目前 畫 面 (current frame, CF) 和先前畫面 (previous frame, PF)很相近的時候,所提之方 法會直接使用前一張畫面產生之相近 HM 映 射函數,以降低整體運算時間。也就是說,

為了避免重複編碼(re-encoding)造成的多於運 算我們直接將近似結果套用在下一張畫面。

A) 直方圖建構

圖二為所提之 SHS 法的示意圖。統計資 訊是直接第一列元素透過不同的算數運算而 得。欄的第一個像素是直接透過 exhaustive search 後計算而來。欄直方圖是藉由欄掃描的 程 序 分 別 使 用 addition 、 difference 和 subtraction 完成。

相同地,欄直方圖也是透過不同的操作 方式簡單的被更新。當最下方的像素存在時,

連續操作會被用來更新每個欄直方圖的元素。

另一方面,當最上方像素也存在於外部邊界 時,必須進一步使用逆算數運算。所提出之 SHS 法的虛擬碼被描述在演算法 1 中。根據 第 32 行,將我們所提架構和 DHS 法相比,

在每個核心直方圖被更新時可以不需要使用 到減法。

基於鍊結串列(linked lists, LL),所提之 SHS 法可以有效地被實作。圖三為 LL 用來建 構直方圖的架構圖。所提之 LL 法的基本概念 是避免將非零 bins 儲存在結點上,以便有效 的維護直方圖。此外,為了提高時間效率,

我們將採用 hash table 來減少 LL 的搜尋時間 使複雜度從線性降低到常數時間。不過,LL 大部分的運算是為了保持 linked list 和其相對 應之 hash tables,藉由消除不必要的節點插入 與刪除,計算時間可以進一步的被減少。更 具體的說,基於更新 SHS 的經驗法則,特別 是成對的加法和減法運算,因為大部分的像 素都是相等的,所以 LL 可以避免掉維持 linked list 和 hash tables 的計算。

演算法 1:SHS 法

圖三、鍊結串列(LL)組織架構圖

(8)

圖四、所提之 STTC 流程圖

也就是說,所提方法和以往的完全不同:我 們不搜尋每一個目標區中所有的 bins 來更新 統計資料(除了編碼之外),而且我們只會在特 定的資料結構中插入新的 bin。因此,在每個 搜尋區域使用 LL 可以讓儲存空間和所需的執 行時間分別可以被最小化和最佳化。

B) 簡化

基於最新 H.264 視訊編碼標準畫面間預 測(inter-frame prediciton),所提出之 STTC 法 可以被應用來簡化視訊對比度增強的過程。

所提之 STTC 法利用 spatial change 和 temporal variation 以降低對比度增強時 HM 的複雜度,

圖四為其流程圖。為了計算目前影片畫面的 spatial change , 一 種 spatial threshold function(STF)被提出來計算 macroblock 改變 的數量作為評估 intra-frame 的依據。此外,

我 們 更 利 用 一 種 temporal threshold function(TTF)來測量連續畫面之間的差異作 為評估 inter-frame 的依據。當影片的 spatial 和 temporal 只有輕微的改變時,我們所提出 之 STTC 可以藉由簡化 HM 法來減少時間消 耗。

1) 空間變化

對於每一張輸入影片的 CF 來說,其 spatial change 可以藉由 STF 從視訊壓縮法中 每一個 macroblock 取得的 MV 評估。假設|mv|

代表每一個 macroblock MV 的絕對值,則 STF 可以用以下公式表示:

|), sgn(| mv T T

T    (1) 其中 T 代表每一個 macroblock 的門檻值,sgn 為傳統的 sign 函數定義如下:





0

, 1

0

, 0

0

, 1 ) sgn(

e if

e if

e if

e (2)

當 T 被計算過後,有大幅度變化之 macroblock 可以被以下公式累計:

, A then T

| mv

|  t

if (3) 其中 At代表 CF 中 macroblock 高於 T 的數量。

需要注意的是每一張 CF 中,At會被重新設成 零,T 一開始則被設成第一個 macroblock 的 MV 值。

2) 時間變化

所提出的 STTC 法藉由 STF 及 TTF 法分 別評估 spatial change 和相鄰畫面的 temporal variation。TTF 法被以下公式所定義:

, r)V - (1 rA V then A

Att-1 ttt-1

if (4)

其中 Vt-1代表以畫面為基礎的變數,r 為每張 畫面有大幅度變化的比例。Weighted factor r 定義如下:

, / d V

rt (5) 其中 d 代表每張畫面 macroblock 的總數。需 要注意的是 V0的初始值為零。定義 Tgf為 PF 生成的映射函數,Tcf為 PF 生成的映射函數,

則 CF 的對比增強可以被以下公式代表:



 

 ( ( , )), otherwise, , V A if )), , ( ) (

,

( t t

y x CF T

y x CF y T

x O

gf cf

t (6)

其中,CF(x,y)為 CF 在座標(x,y)的灰階值,

Ot(x,y)為輸出的灰階值。當 CF 出現大幅度變 化時,轉換函數必須被 HM 精確的調整以增 強 CF。否則已經存在的轉換函數便直接套用 在每個灰階值上。

V. 研究方法

此章節介紹使用 CVHE 的對比度增強法,

CVHE 是透過計算每個像素及其鄰居灰階值 出現的情形做基礎。將輸入影像 I 的每個像素

(9)

(x,y)灰階值出現用 pI(x,y)表示,則二維目 標直方圖(H)便可以由以下公式表示:

}, ,

0

| ) , (

{h pq p q L

H    (7) 其中 L 為灰階值,q 為每個像素鄰居的灰階值,

h(p,q)為 H 的元素。需要特別注意的是每個 H 的元素會被初始化為零。基於我們利用 LL 實 作的 SHS 法,H 可以很有效率的在常數時間 內被生成。縱座標和橫坐標的差異同時做了 以下修改:

), 1 /(

) 1

| )(|

, ( ) ,

(p qh p q pqlmaxlmin

h (8)

其中 lmax為最大的灰階值,lmin為最小灰階值。

用來更新 H 元素的方法可以進一步被正規化 為以下公式:

).

) , ( /(

) , ( ) , (

max

min max

min

 

l

l a

l

l b

b a h q

p h q p

h (9)

除了計算機率密度,擁有相等元素(U)的二維 uniform matrix 也可用於最大化熵理論。所有 U 的元素皆被以下公式所計算:

).

/(

1 ) ,

(p q L2

u (10) 此外,平滑映射需滿足如下所示之 tri-diagonal matrix R:

,

1 1 0 0

0 0

1 1

0 0 0

0 0 0 1

1

0 0 0 0

1

0 0

0 0













R (11)

其中,0 ( 2)/()為自適應參 數。矩陣 R 乘法的結果為 H 矩陣中水平元素 的差異。垂直方向的元素同時間也輕微地被 乘法所修改。

).

1(

U H R

Ht   (12) 依照文獻我們將α、β和γ皆設成 1/3。因此,

R 的反矩陣可以被以後公式表示:

}, ,

0

| ) , (

1 {

L q p q

p s S

R     (13) 其中,S 的元素為 s(p,q)。由於 R 為一般化 tri-diagonal matrix 的特例,每個元素在一開始 便可以輕易的設定成固定的型式。CVHE 法基 於 H(CDFH)和 Ht(CDFHT)的 CDF 的映射函數 可以分別被以下兩個公式計算:

 

l

l a

l

l b

b a h l

CDFH

min min

), , ( )

( (14)

 

l

l a

l

l b

t a b

h l

CDFHT

min min

).

, ( )

( (15)

最後,映射函數可以被以下公式計算:

} ,..., 2 , 1 , 0 {

|, ) ( )

(

| min arg ) (

L c

f l CDFH l CDFHT c

T

(16)

其中,l 代表每個可能的灰階值。如前所述,

使用二維直方圖需要額外的計算。因此,我 們所提方法可以利用門檻值來控制影像編碼 取出的 MVs,以進一步來改善時間域冗餘的 缺點。

VI. 實驗結果

本章節總結了 CVHE 對比度增強演算法 和所提出用來增加其執行效率的 SHS、LL 和 STTC。需要注意的是 STTC 是架構在 H.264 Joint Model 參考軟體(JM 17.0)[27]之上,使用 預設 baseline profile 並做了以下三種修改:

1) 搜尋範圍從 32 修改至 16 2) 使用 full search 計算 MVs 3) 只使用 16×16 macroblock

為了在不同情境下做測試,本計畫中我們使 用八種不同類型的影片。表格一列出了每段 影片的特性,包含攝影機的設定、影片規格、

影片張數、場景的特性和焦段的長度。

(10)

圖五、”container”影片(a)七張原始畫面 (b)經 CVHE 增 強後之畫面 (c)CVHE 結合 STTC 法減化增強後之畫面

圖六、”hall”影片 (a)七張原始畫面 (b)經 CVHE 增強 後之畫面 (c)CVHE 結合 STTC 法減化增強後之畫面

表格一、測試影片之特性

Title Setting Format Frames Scene Focal point

Container Static QCIF 300 Outdoor Long

Hall Static QCIF 300 Indoor Short

Salesman Static QCIF 449 Indoor Short

Street Static QCIF 300 Outdoor Long

Campus Static CIF 900 Outdoor Short

Silent Static CIF 300 Indoor Short

Stefan Dynamic CIF 90 Outdoor Short

Waterfall Dynamic CIF 260 Outdoor Long

一般而言,大氣現象在室外環境中扮演著複 雜的來源,例如太陽的位置、雲層覆蓋情形 等等。另一方面,亮度也會室內照明條件的 影響。因此,對比度增強也必須能夠應用在 室內、外拍攝的影片。

我們將利用主觀評估及客觀評價兩種方 式來證明我們所提的方法的優點。主觀評估 是一種透過直接觀看畫面以評估影片對比度 增強程度。另一方面,客觀評價是利用一些 量化指標的分數來評斷對比度增強結果的好 壞。最後,時間消耗的報告會用來評估各種 方法之間效能。

A) 主觀評估

圖五為七張”container”影片經過 CVHE 增強過後和經過 STTC 結合 CVHE 簡化增強 後的比較圖。在”container”影片中有一艘滿載 貨櫃的船緩慢行駛在海上。很容易可以觀察 到貨櫃船和海的顏色只有很小的差異。此外,

海上的波浪也不明顯。CVHE 法基於 spatial 直方圖產生一個映射函數來轉換每個像素的 的亮度值用以增進目標和背景的對比度。

由於海上的風浪相當平緩因此可以被當作背 景,因此相鄰畫面的 spatial 直方圖是很相近 的。所以 STTC 法重複使用 spatial 直方圖的 方法很適合拿來簡化 CVHE 同時保持畫面增 強後的品質。

圖六為七張”hall”影片經過 CVHE 增強過 後和經過 STTC 結合 CVHE 簡化增強過後的 比較圖。在“hall”影片中兩個人漫步在走廊上,

由於畫面中包含了 chromatic polarization,因 此物件和背景之間的對比度不是很明顯。如 圖六(b)所示,CVHE 利用相鄰像素之間的微 小差別將視覺感受不佳的影片做輕微程度的 提升。圖六(c)則是利用 STTC 法減低運算的 時間,同時維持與圖六(b)非常相近的結果。

圖七(a)為七張”salesman”原始影片的示 意圖,而圖七(b)、(c)依序為經過 CVHE 法增 強過後及 STTC 結合 CVHE 法簡化增強過後 之示意圖。“salesman”影片是一位推銷員在看 起來燈光很昏暗的辦公室中解釋產品。藉由 CVHE 法計算出每一個像素及其鄰居的二維 目標直方圖以增加亮度,另外透過 STTC 法選 擇性地沿用相似的增強直方圖以提高效率。

最後我們可以從圖七(b)、(c)中看出較圖七(a) 更明亮的影片。

圖八(a)為七張”street ”原始影片的示意圖,

經 CVHE 及簡化增強過後的示意圖則分別在 圖八(b)、(c)呈現。”street”影片中許多人和巴 士穿梭在街上,由於是接近黃昏的時段環境 光線較為昏暗。如圖八(b)、(c)所示,CVHE 及 STTC 簡化法成功的增強了影片的亮度,並 修正了天空 chromatic polarization 的問題。

(11)

圖七、”salesman”影片 (a)七張原始畫面 (b)經 CVHE 增強後之畫面 (c)CVHE 結合 STTC 法減化增強後之畫

圖八、”street”影片 (a)七張原始畫面 (b)經 CVHE 增強 後之畫面 (c)CVHE 結合 STTC 法減化增強後之畫面

圖九、”campus”影片 (a)七張原始畫面 (b)經 CVHE 增

強後之畫面 (c)CVHE 結合 STTC 法減化增強後之畫面

圖十、”silent” 影片(a)七張原始畫面 (b)經 CVHE 增強 後之畫面 (c)CVHE 結合 STTC 法減化增強後之畫面

圖十一、”stefan”影片 (a)七張原始畫面 (b)經 CVHE 增 強後之畫面 (c)CVHE 結合 STTC 法減化增強後之畫面

圖十二、”waterfall”影片 (a)七張原始畫面 (b)經 CVHE 增強後之畫面 (c)CVHE 結合 STTC 法減化增強後之畫

圖九(a)為七張”campus”原始影片的示意 圖,經 CVHE 及簡化 CVHE 法增強過後的示 意圖則分別在圖九(b)、(c)呈現。我們可以輕 易的發現”campus”影片中有許多物件移動在 昏暗的停車區域。如圖九(b)、(c)所示 CVHE 法適度的增強了畫面的對比度及亮度且避免 掉顏色失真及其他缺陷。

圖十為七張”silent”原始影片、經過 CVHE 法和 STTC 法簡化的示意圖。”silent”影片為 一位女性無聲地在壁畫前比著手語。雖然主 體和背景可以在每一張畫面中被分辨出來,

但環境的亮度還是略顯不足。如圖十(b)、(c) 所示,主體與背景的紋理、邊緣、對比度和 其他細節透過 CVHE 及 STTC 加速後都有了 明顯的改善。

圖十一(a)為七張”stefan”原始影片的示意 圖。動態攝影機捕捉運動員在網球場打網球 的畫面。圖十一(b)(c)則分別為經由 CVHE 及 STTC 簡化法增強過後的影片示意圖。透過影

(12)

片增強後, 更突顯移動中的運動員,而且背 景文字的對比度及銳利度皆有提升。

圖十二為七張”waterfall”原始和經過增強 後的影片示意圖。”waterfall”影片藉由 zoom out 來拍攝整個山間的瀑布。經 CVHE 影片增 強法後的影片如圖十二(b)所示,而圖十二(c) 則是經由 STTC 加速過後的影片示意圖。

B) 客觀評價

除了利用目測提供的主觀評估,客觀評 價也是評鑑所提方法優劣的重要工作。然而,

對於所有種類圖片的測量並沒有公認的標準 [9]、[19],因此很難存在有意義的測量。雖然 有一些利用熵或其他知名度量方式來近似平 均對比增強法已經被提出。不幸的是,利用 這些度量方式測量出最佳的數值的圖片可能 會產生不真實的圖片。然而,客觀評價不能 缺乏量化測量方式提供的可信賴的實驗[9]、

[19] 。因此,本計畫將使用 Absolute Mean Brightness Error(AMBE)、discrete entropy(DE)

和 measure of enhancement(EME)來測量影片 增強後的品質[9]、[19]。

對於一張輸入的影像 X 和其增強後影像 Y,mean(X)和 mean(Y)分別用來找出 X、Y 的平均亮度,則 AMBE 可以被以下公式所定 義:

.

| ) ( )

(

| ) ,

(X Y mean X meanY

AMBE   (17) 數值較低的 AMBE 代表原始影像的亮度被保 留得較好。假設 pdf 為 X 影像中每一個可能 出現的灰階值 l,則 DE 可以被以下公式所定 義:

max

min

)).

( log(

) ( )

(

l

l l

l pdf l

pdf X

DE (18)

較高的 DE 值代表目標影像擁有較多的細節。

當目標影像 X 被分成 S1×S2時擁有 W1×W2 小的 non-overlapping 子影像 Xi,j時,EME 可 以被定義成:

圖十三、由上而下分別為測試影片(a)container (b)hall (c)salesman (d)street (e)campus (f)silent (g)stefan (h)waterfall 之 AMBE、DE 和 EME 數值

(13)

10

圖十四、分別為測試影片(a)container (b)hall (c)salesman (d)street (e)campus (f)silent (g)stefan (h)waterfall 經由 STTC 法產生之自適應性門檻值

表格 2、測試影片經不同方法增強之時間總和報告



1 2

1 2 ,

,

2 1

), min(

) lnmax(

1 20 ) (

S

i S

i i j

j i

X X S

X S

EME (19)

其中 max(Xi,j)和 min(Xi,j)分別為子圖 Xi,j中最 大和最小的灰階值。高對比的子圖擁有較高 的 EME 值,對於同質性的子圖來說其 EME 值則趨近於 0。在這裏我們採用大小為 8×8 的 W1×W2子圖[19]。

圖十三則為 container、hall、salesman、

street、campus、silent、stefan、和 waterfall 等八段影片的 AMBE、DE 及 EME 數值畫出 的曲線圖。需要注意的是,藍色線標示的是 CVHE 法,紅色的線則標示我們提出的 STTC 結合 CVHE 法的曲線。另外,x 座標為量化的 數值,y 座標為畫面張數值。結果顯示簡化的 CVHE 法和原始 CVHE 法產生的增強結果十 分接近,因此在圖十三上幾乎是呈現重疊的 狀態。

C) 效能評估

為了進一步驗證所提出的 STTC 法的效 率,所有被測試影片透過自適應門檻值決定 法決定的門檻值被畫在圖十四中以描述的簡

化過程。需要注意的是圖十四中,At 是用實 線表示,虛線代表 Vt,X 軸代表 macroblock 的變化量,Y 軸代表畫面張數。

一般而言,當影片在 spatiotemporal 上出 現較大程度的變動時如物體移動、場景轉換 或鏡頭變焦,則對比度增強法必須精確的施 行這些畫面上。相反地,當畫面只有少許變 動或是背景固定時,我們便可以簡化此流程。

如虛線所示每張畫面的 running average 值是 藉由 macroblock 被改變的機率計算而得。當 被更改的數量大於 running average 時,精確的 對比度增強法會被用來增進 CF 的品質,而當 CF 只有一點點改變時,便可以直接套用 PF 的轉換函數。換句話說,當所提出的方法接 近區域最大改變時,可以選擇性地採用精確 的對比度增強或沿用已經存在的轉換函數。

透過表格二列出 SHS、LL 及 STTC 等方 法的時間消耗情形,用以評估各方法的效能。

需要注意的是 alarm 代表每段影片透過 STTC 運 算 後, macroblck 變 化 數量 高於 running average 的次數。透過主觀評估與客觀檢驗的 結果可以證明,我們提出的基於 CVHE 的方 法可以有效率的提高影片對比度同時維持影 片的品質。

(14)

11

VII. 結論

為了避免拜訪空的 bins 並維持常數時間 的運算複雜度,本計畫運用欄直方圖和鏈結 串列提出了一種有效率的直方圖建構法。此 外,一種利用 spatiotemporal 資料建模法從目 標影片中取出 MVs 的自適應門檻值決定法也 同時被提出。在非線性的資料上套用我們所 提的方法不但可以增強對比度而且同時降低 計算複雜度。基於評估 CF 和 PF 的相似性,

精確的 CF 分析可以選擇性的被用來增強對比 度。換句話說,當畫面內容出現較大程度改 變時,可以直接將已存在的轉換函數直接被 用於修正畫面的每個像素。透過視覺評估和 量化評估,證明我們所提出來的精簡的對比 增強法能夠達到和其他精確對比增強法相仿 的影片品質。不僅如此,透過消耗時間的分 析報告,也驗證了我們的提出的方法在效能 上高於傳統使用精確對比增強演算法。

VIII. 參考文獻

[1]. V. J. Schmid, B. Whitcher, A. R. Padhani, and G.-Z.

Yang, ``Quantitative analysis of dynamic contrast-enhanced MR images based on Bayesian P-splines," {\it IEEE Trans. Med. Imag.}, vol. 28, no.

6, pp. 789-798, Jun. 2009.

[2]. D.-H. Kim and E.-Y. Cha, ``Intensity surface stretching technique for contrast enhancement of digital photography," {\it Multidim. Syst. Sign.

Process.}, vol. 20, no. 1, pp. 81-95, Mar. 2009.

[3]. M. J. Carlotto, ``Enhancement of low-contrast curvilinear features in imagery," {\it IEEE Trans.

Image Process.}, vol. 16, no. 1, pp. 221-228, Feb.

2007.

[4]. X. Xie and K.-M. Lam, ``Face recognition under varying illumination based on a 2D face shape model," {\it Pattern Recognit.}, vol. 38, no. 2, pp.

221-230, Feb. 2005.

[5]. C.-C. Leung, K.-S. Chan, H.-M. Chan, W.-K. Tsui,

``A new approach for image enhancement applied to low-contrast-low-illumination IC and document images," {\it Pattern Recognit. Lett.}, vol. 26, no. 6, pp. 769-778, May 2005.

[6]. G. Ginesu, D. D. Giusto, and V. Margner,

``Detection of foreign bodies in food by thermal image processing," {\it IEEE Trans. Ind. Electron.}, vol. 51, no. 2, pp. 480-490, Apr. 2004.

[7]. P.-S. Tsai, C.-K. Liang, T.-H. Huang, and H. H.

Chen, ``Image enhancement for backlight-scaled TFT-LCD displays," {\it IEEE Trans. Circuits Syst.

Video Technol.}, vol. 19, no. 4, pp. 574-583, Apr.

2009.

[8]. S. S. Agaian, K. Panetta, and A. M. Grigoryan,

``Transform-based image enhancement algorithms

with performance measure," {\it IEEE Trans. Image Process.}, vol. 10, no. 3, pp. 367-382, Mar. 2001.

[9]. T. Arici, S. Dikbas, and Y. Altunbasak, ``A histogram modification framework and its application for image contrast enhancement," {\it IEEE Trans. Image Process.}, vol. 18, no. 9, pp.

1921-1935, Sep. 2009.

[10]. T. Celik and T. Tjahjadi, ``Automatic image equalization and contrast enhancement using Gaussian mixture modelling," {\it IEEE Trans.

Image Process.}, vol. 21, no. 1, pp. 145-156, Jan.

2012.

[11]. B. Funt, F. Ciurea, and J. McCann, ``Retinex in MATLAB\texttrademark ," {\it J. Electron.

Imaging}, vol.13, no. 1, pp. 48-57, Jan. 2004.

[12]. R. Schettini, F. Gasparini, S. Corchs, F. Marini, A.

Capra, and A. Castorina, ``Contrast image correction method," {\it J. Electron. Imaging}, vol. 19, no. 2, 023005, Apr.-Jun. 2010.

[13]. S. Lee, H. Kwon, H. Han, G. Lee, and B. Kang, ``A space-variant luminance map based color image enhancement," {\it IEEE Trans. Consum. Electron.}, vol. 56, no. 4, Nov. 2010.

[14]. S. Lee, V. H. S. Ha, and Y.-H. Kim, ``Dynamic range compression and contrast enhancement for digital images in the compressed domain," {\it Opt.

Eng.}, vol. 45, no. 2, 027008, Feb. 2006.

[15]. H. D. Cheng, R. Min, and M. Zhang, ``Automatic wavelet base selection and its application to contrast enhancement," {\it Signal Process.}, vol. 90, no. 4, pp. 1279-1289, Apr. 2010.

[16]. K. S. Sim, C. P. Tso, and Y. Y. Tan, ``Recursive sub-image histogram equalization applied to gray scale images," {\it Pattern Recognit. Lett.}, vol. 28, no. 10, pp. 1209-1221, Jul. 2007.

[17]. M. Kim and M. G. Chung, ``Recursively separated and weighted histogram equalization for brightness preservation and contrast enhancement," {\it IEEE Trans. Consum. Electron.}, vol. 54, no. 3, pp.

1389-1397, Aug. 2008.

[18]. F.-C. Cheng and S.-J. Ruan, ``Image quality analysis of a novel histogram equalization method for image contrast enhancement," {\it IEICE Trans. Inf. and Syst.}, vol. E93-D, no.7, pp. 1773-1779, Jul. 2010.

[19]. T. Celik and T. Tjahjadi, ``Contextual and variational contrast enhancement," {\it IEEE Trans.

Image Process.}, vol. 20, no. 12, pp. 3431-3441, Dec.

2011.

[20]. T. S. Huang, G. J. Yang, and G. Y. Tang, ``A fast two-dimensional median filtering algorithm," {\it IEEE Trans. Acoust. Speech Signal Process.}, vol.

ASSP-27, no. 1, pp. 13-18, Feb. 1979.

[21]. F. Porikli, ``Integral histogram: A fast way to extract histograms in Cartesian spaces," {\it in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR)}, vol.

I, 2005, pp. 829-837.

[22]. S. Perreault and P. Hébert, ``Median filtering in constant time," {\it IEEE Trans. Image Process.}, vol. 16, no. 9, pp. 2389-2394, Sep. 2007.

[23]. Y. Rao, W. Lin, and L. Chen, ``Global motion estimation-based method for nighttime video

(15)

12 enhancement," {\it Opt. Eng.}, vol. 50, no. 5, pp.

057203(1-6), May 2011.

[24]. C. A. Segall and A. K. Katsaggelos, ``Application of the motion vector constraint to the regularized enhancement of compressed video," {\it in Proc.

IEEE Int. Conf. Image Process. (ICIP)}, 2001, pp.

646-649.

[25]. Y. Yang and L. Boroczky, ``System for and method of sharpness enhancement for coded digital video,"

US patent, 0206591 A1, Nov. 2003.

[26]. E. B. Bellers, ``3-D recursive vector estimation for video enhancement," US patent, 0181590A1, Dec.

2002.

[27]. H.264 Reference Software Group [Online].

Available:

http://iphome.hhi.de/suehring/tml/download/

(16)

2011 IEEE/IFIP 19th International Conference on VLSI and System-on-Chip

FPGA Implementation of High Sampling Rate In-Car Non-Stationary Noise Cancellation Based on

Adaptive Wiener Filter

Hong-Yuan Jheng*+, Yen-Hsiang Chen*:::, Shanq-Jang Ruan*+ and Ziming Qit

*Department of Electronic Engineering National Taiwan University of Science and Technology,

No. 43, SecA, Keelung Rd., Taipei, Taiwan, R.O.C

t Auckland Institute of Smart Technology, New Zealand Email: [email protected]

+Email: [email protected]@[email protected]

Abstract-This paper presents the architecture and implemen­

tation of a real-time adaptive Wiener filter for non-stationary noise cancellation in a car environment. The Wiener filter has been implemented in a Xilinx Virtex-5 chip and the target device is chosen as xc5vlxllOt. The proposed design can filter each 32 samples within 918 micro seconds. The peak sampling rate is estimated to be 88.6KHz. The performance of proposed design is measured as 15.85dB noise reduction.

I. INTRODUCTION

In recent years, Automatic Speech Recognition (ASR) has been widely used in in-car environment applications, such as navigation system control, cabin control, and stereo system control. Nevertheless, most of those products are typically assumed in a silent environment which is not suitable for in­

car applications.

There are two types of additive noise in a car cabin:

stationary and non-stationary. Stationary noise in car is from the engine, road, wind, and air-conditioner etc. Non-stationary noise is from the stereo, navigation guide, traffic information guide, bumps, wipers, indicators, conversational noise and noise when passing a car running in the opposite direction (1].

Therefore, noise reduction methods for speech enhancement in a car have been investigated for such applications. The Griffiths-Jim acoustic beam-forming is a major technology in reducing stationary or non-stationary noise in car cabin (2].

Three beam-forming microphones were used to detect the desired and undesired periods of speech by defining a ge­

ometrical "active zone". With three microphones this word boundary detector can retrieve the desired speech embedded with noise from varieties of noisy backgrounds. Simulation experiments have shown that the Voice Activity Detection (VAD) algorithm is an effective speech detecting method that performs to an average of 80% success rate (3].

However, most of the related works mentioned above are conventionally implemented by using industrial control soft­

ware such as LabV IEW. By using LabVIEW we can verify our design rapidly due to its powerful mathematical libraries and the capability of real-time simulation. Furthermore, the

related works (4], (5] has proved the effectiveness on noise cancellation using an adaptive Wiener filter. But most of the components which are employed in LabVIEW are optimized Intellectual Properties (IPs) that we are unable to evaluate the performance and throughput of the design. Meanwhile, due to the high complexity of the matrix operations in Wiener filter based noise cancellation, a DSP processor is no longer suitable for real-time applications.

Furthermore, the adaptive filter implementation has been focused on DSP-based system for many years. With the raising of computational complexity of modem devices, the DSP processor is facing a speed limitation for high computational complexity and high performance applications. To overcome those difficulties, Field Programmable Gate Array (FPGA) has been employed in DSP design. Kim et al. (6] proposed an FPGA implementation of ICA algorithm for adaptive noise canceling which can provide 21dB Signal-to-Noise Ratio (SNR) enhancement but the sampling rate is only 12KHz.

Mahbub et al. (7] used spectral subtraction to suppress the acoustic noise in real-time. Their experimental result shows the SNR is enhanced over a 2.39 to 10dB range at 48KHz sampling rate. In this paper, we present an implementation of noise cancellation by using adaptive Wiener filter based on FPGA design and provide the performance and throughput evaluation reports. The major contribution of this paper is to provide a high sampling rate noise canceller with superior performance compared to (6] and (7].

II. WIENER FILTER

The Wiener filter was first introduced by Norbert Wiener (8]

and independent for the discrete-time case by Kolmogorov (9].

Wiener-Kolmogorov filters have the following assumptions:

a) signal and (additive) noise are stochastic processes with known spectral characteristics or known auto-correlation and cross-correlation, and b) the performance criterion minimizes the mean-square error (MSE). An optimal filter can be found from a solution based on scalar or multi-variable methods.

The goal of the Wiener filter is to filter out noise that has

數據

Fig.  1.  In-car  two  microphones  test  plan.
Fig.  4.  Architecture  of proposed  Wiener  filter  implementation
TABLE  II  SNR  ANALYSIS

參考文獻

相關文件

(a) Giving your answers in standard form, estimate (i)the total mass of the population of Europe.. (ii)how many more people live in Asia than

In an Ising spin glass with a large number of spins the number of lowest-energy configurations (ground states) grows exponentially with increasing number of spins.. It is in

The disabled person can thus utilize this apparatus to integrate variety of commercial pointing devices and to improve their controllability in computer operation.. The

The algorithms have potential applications in several ar- eas of biomolecular sequence analysis including locating GC-rich regions in a genomic DNA sequence, post-processing

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2005..

Every sequence of n 2 +1 distinct real numbers contains a subsequence of length n+1 that is either strictly increasing or strictly decreasing.

Trace of display recognition and mental state inference in a video labelled as undecided from the DVD [5]: (top) selected frames from the video sampled every 1 second; (middle) head

• If we want analysis with amortized costs to show that in the worst cast the average cost per operation is small, the total amortized cost of a sequence of operations must be