freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

利用離散余弦變換進(jìn)行圖像壓縮畢業(yè)論文外文翻譯-文庫(kù)吧資料

2025-03-04 07:17本頁(yè)面
  

【正文】 22 25 26 27 28 29 30 BlockImage[%, {2, 3}] // MatrixForm 1 2 3 4 5 6 9 10 11 12 13 14 17 18 19 20 21 22 25 26 27 28 29 30 UnBlockImage[%] // MatrixForm 1 2 3 4 5 6 9 10 11 12 13 14 17 18 19 20 21 22 25 26 27 28 29 30 Our quantization function blocks the image, divides each block (elementbyelement) by the quantization matrix, reassembles the blocks, and then rounds the entries to the nearest integer: DCTQ[image_, qMatrix_] := Map[(/qMatrix)amp。 Displaying the matrix as a grayscale image shows the dependence of the quantization factors on the frequencies: ShowImage[qLum]。 the second is entropy coding of the quantized coefficients. Quantization is the process of reducing the number of possible values of a quantity, thereby reducing the number of bits needed to represent it. Entropy coding is a technique for representing the quantized data as pactly as possible. We will develop functions to quantize images and to calculate the level of pression provided by different degrees of quantization. We will not implement the entropy coding required to create a pressed image file. A simple example of quantization is the rounding of reals into integers. To represent a real number between 0 and 7 to some specified precision takes many bits. Rounding the number to the nearest integer gives a quantity that can be represented by just three bits. x = Random[Real, {0, 7}] Round[x] 3 In this process, we reduce the number of possible values of the quantity (and thus the number of bits needed to represent it) at the cost of losing information. A finer quantization, that allows more values and loses less information, can be obtained by dividing the number by a weight factor before rounding: w = 1/4。 The result is a blurred letter A: the highest horizontal and vertical frequencies have been removed. This is easiest to see when the image is reduced in size so that individual pixels are not as visible. Quantization DCTbased image pression relies on two techniques to reduce the data required to represent the image. The first is quantization of the image39。 Do[output2[[i, 8]] = 0, {i, 8}]。 we leave this as an exercise for the reader. Since the twodimensional DCT is separable, we can extend our function DCT to the case of twodimensional input as follows: DCT[array_?MatrixQ] := Transpose[DCT / Transpose[DCT / array] ] This function assumes that its input is an 8 x 8 matrix. It takes the 1D DCT of each row, transposes the result, takes the DCT of each new row, and transposes again. This function is more efficient than puting the tensor contraction shown above, since it exploits the builtin function InverseFourier. We pare the result of this function to that obtained using contraction of tensors : DCT[input2] output2 // Chop // Abs // Max 0 The definition of the inverse 2D DCT is straightforward: IDCT[array_?MatrixQ] := Transpose[IDCT / Transpose[IDCT / array] ] As an example, we invert the transform of the letter A: ShowImage[Chop[IDCT[output2]]]。,{8, 8}]。, Reverse[DCTTensor], {2}] ]]。 Each basis matrix can be thought of as an image. The 64 basis images in the array are shown in Figure 2. The package , included in the electronic supplement, contains the functions GraphicsImage and ShowImage to create and display a graphics object from a given matrix. GraphicsImage uses the builtin function Raster to translate a matrix into an array of gray cells. The matrix elements are scaled so that the image spans the full range of graylevels. An optional second argument specifies a range of values to occupy the full grayscale。 We apply DCT to our test input and pare it to the earlier result puted by matrix multiplication. To pare the results, we subtract them and apply the Chop function to suppress values very close to zero: DCT[input1] {, , , , , , , }% output1 // Chop{0, 0, 0, 0, 0, 0, 0, 0} The inverse DCT can be puted by multiplication with the inverse of the DCT matrix. We illustrate this with our previous example: Inverse[DCTMatrix] . output1 {, , , , , , , }% input1 // Chop{0, 0, 0, 0, 0, 0, 0, 0} As you might expect, the IDCT can also be puted via the inverse DFT. The twiddle factors are the plex conjugates of the DCT factors and the reordering is applied at the end rather than the beginning: IDCTTwiddleFactors = Conjugate[DCTTwiddleFactors] {1., + I, + I, + I, 1. + 1. I, + I, + I, + I} IDCT[list_] := Re[Fourier[ IDCTTwiddleFactors list] ][[{1, 8, 2, 7, 3, 6, 4, 5}]] For example: IDCT[DCT[input1]] input1 // Chop {0, 0, 0, 0, 0, 0, 0, 0} The TwoDimensional DCT The onedimensional DCT is useful in processing onedimensional signals such as speech waveforms. For analysis of twodimensional (2D) signals such as images, we need a 2D version of the DCT. For an n x m matrix s, the 2D DCT is puted in a simple way: The 1D DCT is applied to each row of s and then to each column of the result. Thus, the transform of s is given by 11002 ( 2 1 ) ( 2 1 )( , ) ( ) ( ) ( , ) c o s c o s22mnyxx u y uS u v C u C v s x y nmnm ????????? ?? u=0,… n v=0,… m where 1/2( ) 2Cu ?? for u=0 =1 otherwise Since the 2D DCT can be puted by applying 1D transforms separately to the rows and columns, we say that the 2D DCT is separable in the two in the onedimensional case, each element S(u, v) of the transform is the inner product of the input and a basis function, but in this case, the basis functions are n x m matrices. Each twodimensional basis matrix is the outer product of two of the onedimensional basis vectors. For n = m = 8, the following expression creates an 8 x 8 array of the 8 x 8 basis matrices, a tensor with dimensions {8, 8, 8, 8}: DCTTensor = Array[ Outer[Tim
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1