| 1 意見 ]


    JPEG(Joint Photographic Experts Group)標準是一個適用範圍廣泛的通用標準,由聯合圖像專家小組製定。它不僅適用於靜止圖像的壓縮,也適用於電視圖像序列的幀內圖像的壓縮[1]。

近年來,隨著FPGA技術的日益成熟,愈來愈多的曾使用軟件或DSP實現的複雜數字算法開始使用PPCA完成。這當然是由於FPGA的特殊結構和特性,使它可以更加高速和高效地完成這些算法。IPcore技術可以把這些FPGA中的算法設計封裝成包(模塊)。這些包具有智力產權,可以被繼承、共享或購買。

1 視頻壓縮原理和算法實現

視頻壓縮技術主要利用圖像信號的相關、冗餘等特性,通過一些變換算法,保留對人眼視覺最重要的部分,進行編碼傳輸。大部分視頻壓縮利用2D-DCT(二維離散餘弦變換)和2D-IDCT(二維反離散餘弦變換)變換得到圖像的頻譜,高精度保留對人眼重要的高頻部分,低精度保留低頻部分從而對視頻流進行壓縮[1]。其過程如圖1所示。

    1.1 DCT變換算法

2D-DCT變換是視頻壓縮中的常用變換[2]。在壓縮過程中,將一幅圖像分成許多8x8的小塊進行變換。

8x8的2D-DCT變換如公式(1)所示:

如果直接使用公式(1)進行2D-DCT變換,運算量將會十分巨大,普通FPGA很難有效完成整個視頻壓縮運算。所以需要先把2D-DCT運算進行一些變換,簡化計算,減少運算量。



    2D-DCT具有正交可分解性悶,可以通過對輸入的矩陣先做一維行變換,再做一維列變換實現。即將8x8數據先按行方向進行累加運算,產生中間矩陣,再對中間矩陣按列方向進行累加運算,最後得到變換結果。2D-DCT可以分解成兩個1D-DCT運算,見公式(2)。

將公式(2)展開成矩陣形式,得到公式(3)。計算一個這樣的單元需要64個乘法器和56個加法器,運算量還是很大。利用公式(3)的對稱性進行變換,可以得到公式(4),使乘法器減少到32個,加法器減少到8個。

一個由公式(4)推演出的分布式乘法器如圖2所示。4個乘數(x0…x3)同時與各自的係數(c0…c3)相與,然後相加得到一個和數,這個和數與除2器出來的數相加,得到一個新的累計數。這個新的累加數如果是最後的結果,則輸出;如果不是,送入除2器,進行下一步累加。這樣,分布式乘法器就可以完成係數yj的運算。

由於DCT運算中的係數Cm是常數,對於擁有RAM單元的FPGA,上述運算也可以使用查ROM表的方法實現。將圖2中的虛線內部分,改換ROM單元,如圖3所示。這時,(x0…x3)作為ROM表的地址位,通過查表的方式輸出和數,進行累加運算。ROM表的地址位寬度為4,存儲單元數量DW=24=16。一些生產商提供的綜合軟件帶有IP庫,可以調用這些IP庫中的ROM模塊實現ROM表。例如ALTERA公司的Megafunction Library中的LPM_ROM可以用以下的語句調用(VerilogHDL)[4]。用VC或MATLAB生成一個.mif的ROM表文件。

LPM_ROM U1(

.address(adr),

.inclock(clk),

.q(dat));

defparaln

lpm_rom_component.lpm_width=16,

lpm_rom_component.lpm_widthad=4,

lpm_rom_component.1pm_address_control

="REGISTERED",

lpm_rom_component.ipm_outdata

="UNREGISTERED",

lpm_rom_component.1pm_file="romtable.mif";

這樣,可以得到由這些基本單元構成與矩陣公式(4)相對的1D-DCT的FPGA設計,如圖4所示。其中4RC單元表示圖3的結構。

    如前所述,2D-DCT需要兩個1D-DCT共同完成,但是兩個1D-DCT運算的中間變量並不是直接傳遞的,而需要一個矩陣轉置模塊進行耦合。

1.2 轉置RAM

2D-DCT單元由兩個相同的1D-DCT和轉置RAM等組成,如圖5所示。根據公式(2),可以知道1D-DCT先對8x8單元的行進行累加操作,把得到的結果暫存到RAM中,直到8行都運算完成。RAM中的臨時8x8矩陣要先轉置,把列數據變成行數據,經並串轉換後輸入到第2個1D-DCT進行行累加。

轉置RAM是一個8x8的RAM陣列。當數據完成1D-DCT變換後,即由xij到zjl變換,按行順序輸入到轉置RAM,在讀出時按列順序讀出,這樣完成zil到zli的變換;然後將z9並串轉換,輸入到第二個1D-DCT,由zli運算得到ylk。這樣就完成了公式(1)的2D-DCT整個變換,如圖6所示。

1.3 2D-IDCT

2D-IDCT變換如公式(5)所示。

    可見公式(5)與公式(1)相同,所以2D-IDCT可以用與2D-DCT的同樣方法實現。

1.4 量化,編碼

量化算法包括一張量化表,它因人眼對各種空間頻率的靈敏度的不同而確定。在表中,較低空間頻率的精度要高於較高頻率的精度,這是由於人眼的低頻分量比較敏感,而對高頻分量不太敏感。

編碼可以采用遊程編碼或熵編碼。單元模塊均可通過FPGA的片上RAM(滿足雙口RAM的特性)設計完成。
圖6
2 結論

整個視頻壓縮IPcore設計可以在FPGA上實現,在27MHz的係統時鍾下工作。根據具體芯片的不同,可以在更高的速率工作。壓縮速率可以達到108Mbps。

實際應用中,數據字長對壓縮效果和比率有較大影響,一般情況下係數Cm取12位,可以滿足大部分的視頻壓縮要求。

整個視頻壓縮IPcore可以直接下載到FPGA上(例如EDIF格式),獨立實現視頻壓縮功能,也可以通過軟件設計與其他的IPcore協同工作。例如,在網絡攝像機的應用上,可以把視頻壓縮IPcore、數字攝像頭控製器、網絡接口一起編譯成新的核。這個核具有視頻采

集、壓縮、傳輸等一係列功能。把核的EDIF文件通過生產廠商的下載軟件下載到FPGA上,就可以在一塊芯片上實現所有網絡攝像機的功能。實現了SoPC(System On a Programmable Chip)的目標

| 0 意見 ]

 

gi

中國載人潛水器「蛟龍號」今天早上進行七千公尺級海試的第二次下潛試驗,在早上9點24分,蛟龍號下潛深度為6965米,再創中國載人深潛記錄。

如條件許可,蛟龍號將開展部分海底作業,將取集水樣本和沉積物樣本,並放標誌物。海試現場指揮部表示,預計下潛時間為10小時。

中國自主研製的蛟龍號載人潛水器,在上星期才完成第一次下潛試驗。

| 0 意見 ]

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In mathematics, a unitary matrix is a (square) clip_image002complex matrix clip_image004satisfying the condition

clip_image006

where clip_image008is the identity matrix in n dimensions and clip_image010is the conjugate transpose (also called the Hermitian adjoint) of clip_image011. This condition implies that a matrix clip_image012is unitary if and only if it has an inverse which is equal to its conjugate transpose clip_image014

clip_image016

A unitary matrix in which all entries are real is an orthogonal matrix. Just as an orthogonal matrix clip_image018preserves the (real) inner product of two real vectors,

clip_image020

so also a unitary matrix clip_image011[1]satisfies

clip_image022

for all complex vectors x and y, where clip_image024is the standard inner product on clip_image026.

If clip_image012[1]is an clip_image027matrix then the following are all equivalent conditions:

  1. clip_image012[2]is unitary
  2. clip_image028is unitary
  3. the columns of clip_image011[2]form an orthonormal basis of clip_image026[1]with respect to this inner product
  4. the rows of clip_image011[3]form an orthonormal basis of clip_image026[2]with respect to this inner product
  5. clip_image012[3]is an isometry with respect to the norm from this inner product
  6. clip_image012[4]is a normal matrix with eigenvalues lying on the unit circle.

| 0 意見 ]

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In mathematics, a unitary matrix is a (square) complex
matrix satisfying the condition


where is the identity matrix in n dimensions and is the conjugate transpose (also called the Hermitian adjoint) of . This condition implies that a matrix is unitary if and only if it has an inverse which is equal to its conjugate transpose


A unitary matrix in which all entries are real is an orthogonal matrix. Just as an orthogonal matrix preserves the (real) inner product of two real vectors,


so also a unitary matrix satisfies


for all complex vectors x and y, where is the standard inner product on .

If is an matrix then the following are all equivalent conditions:

  1. is unitary
  2. is unitary
  3. the columns of form an orthonormal basis of with respect to this inner product
  4. the rows of form an orthonormal basis of with respect to this inner product
  5. is an isometry with respect to the norm from this inner product
  6. is a normal matrix with eigenvalues lying on the unit circle.


| 0 意見 ]


X=[randn(100,2)+ones(100,2);randn(100,2)-ones(100,2) ];
opts = statset('Display','final');
[idx,ctrs] = kmeans(X,2,'Replicates',5,'Options',opts,'emptyaction','drop');
subplot(2,1,1);
plot(X(idx==1,1),X(idx==1,2),'r.','MarkerSize',12)
hold on
plot(X(idx==2,1),X(idx==2,2),'b.','MarkerSize',12)

plot(ctrs(:,1),ctrs(:,2),'kx',...
     'MarkerSize',12,'LineWidth',2)
plot(ctrs(:,1),ctrs(:,2),'ko',...
     'MarkerSize',12,'LineWidth',2)
legend('Cluster 1','Cluster 2','Centroids',...
       'Location','NW')

subplot(2,1,2);
[idx,ctrs] = kmeans(X,2,'Replicates',1115,'Options',opts,'emptyaction','drop');
subplot(2,1,2);
plot(X(idx==1,1),X(idx==1,2),'r.','MarkerSize',12)
hold on
plot(X(idx==2,1),X(idx==2,2),'b.','MarkerSize',12)

plot(ctrs(:,1),ctrs(:,2),'kx',...
     'MarkerSize',12,'LineWidth',2)
plot(ctrs(:,1),ctrs(:,2),'ko',...
     'MarkerSize',12,'LineWidth',2)
legend('Cluster 1','Cluster 2','Centroids',...
       'Location','NW')

| 0 意見 ]

Additional References for Digital Video Processing (EE392J)




References


"Digital Video Processing", M. Tekalp, Prentice Hall, 1995, ISBN 0-13-190075-7. This is an additional recommended text for the course, and covers a number of video signal processing subjects that are not covered by the required text, including motion-compensated filtering, noise reduction, restoration, and superresolution. A list of corrections is available.

"The Art of Digital Video", J. Watkinson, 3rd edition, Focal Press, 2000. Contains a variety of practical information about digital video.

"Video Demystified", K. Jack, 3rd edition, Llh Technology Publishing, 2001. Contains practical, nuts & bolts, information about analog and digital video.

"Motion Analysis and Image Sequence Processing", edited by M.I. Sezan and R.L. Lagendijk, Kluwer Academic Publishers, 1993. Individual chapters cover a variety of topics in motion analysis and video processing.

"Fundamentals of Electronic Imaging Systems", W.F. Schreiber, Springer-Verlag, 3rd edition, 1993. Examines the analysis and design of imaging systems, covers a lot of material that is not available anywhere else.

"Image and Video Compression Standards: Algorithms and Architectures", V. Bhaskaran and K. Konstantinides, Kluwer Academic Publishers, 2nd edition, 1997. Good overview of compression standards, both in terms of the high-level algorithms and efficient hardware architectures -- all under one cover.

"Digital Video: An Introduction to MPEG-2", B.G. Haskell, A. Puri, and A.N. Netravali, Chapman & Hall, 1997. A detailed description of the MPEG-2 video compression standard as well as a good overview of video compression.

"Digital Pictures: Representation and Compression", A. Netravali and B. Haskell, Plenum Press, second edition, 1995. A classic image/video compression text.

Engineering Journals and Conferences that Cover Digital Video Processing


"IEEE Transactions on Image Processing", "IEEE Transactions on Circuits and Systems for Video Technology", "IEEE Transactions on Multimedia", and "Signal Processing: Image Communications".

There have also been a number of special issues that cover video processing in the "Proceedings of the IEEE", "IEEE Transactions on Signal Processing", and "IEEE Journal on Selected Areas of Communications".

In addition, there are a number of conferences that cover digital video processing, including IEEE International Conference on Image Processing (ICIP), IEEE International Conference on Multimedia and Expo (ICME), Visual Communications and Image Processing (VCIP), and IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP).

Background References in Image Processing, Compression, and DSP


"Two-Dimensional Signal and Image Processing", J. Lim, Prentice Hall, 1990. Provides a great introduction to 2-D signal processing and image processing.

"Two-Dimensional Imaging", R. Bracewell, Prentice Hall, 1995. Great coverage of a number of topics in imaging that are not typically covered in an image processing text (complementary coverage to that provided by Lim's book above).

"Vector Quantization and Signal Compression", A. Gersho and R. Gray, Kluwer Academic Publishers, 1992. Does not cover video, but provides a very nice overview of the fundamentals of compression.

"Digital Coding of Waveforms: Principles and Applications to Speech and Video", N. Jayant and P. Noll, Prentice Hall, 1984. A classic compression book.

"Discrete-Time Signal Processing", A.V. Oppenheim and R.W. Schafer, Prentice Hall, 2nd edition, 1999. Excellent first-graduate class introduction to DSP.

| 0 意見 ]

http://inst.eecs.berkeley.edu/~selfpace/

class
http://inst.eecs.berkeley.edu/classes-eecs.html