BLOCK-BASED PRINCIPAL COMPONENT ANALYSIS TRANSFORMATION METHOD AND DEVICE THEREOF

Information

  • Patent Application
  • 20190095755
  • Publication Number
    20190095755
  • Date Filed
    September 20, 2018
    6 years ago
  • Date Published
    March 28, 2019
    5 years ago
Abstract
The present invention provides a block-based principal component analysis transformation method and a device thereof. The principal component analysis transformation method includes: obtaining an input signal; dividing the input signal and obtaining a plurality of one-dimension vectors corresponding to the divided input signal, wherein a number of the one-dimension vectors is a division number; after arranging the one-dimension vectors to a two-dimension vector, subtracting an average value of the one-dimension vectors of the division number to obtain a zero-mean vector; calculating a covariance matrix of the zero-mean vector; calculating an eigenvector of the covariance matrix; multiplying the zero-mean vector by the eigenvector to obtain a projection coefficient.
Description
CROSS-REFERENCE TO RELATED APPLICATION

This application claims the priority benefit of Taiwan application serial no. 106132684, filed on Sep. 22, 2017. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.


BACKGROUND OF THE INVENTION
Field of the Invention

The invention relates to a block-based principal component analysis transformation method and a device thereof, and more particularly to a principal component analysis transformation method and a device thereof that recover the original signal with a smaller data size.


Description of Related Art

When the traditional principal component analysis (PCA) processes a signal, since the signal has quite large dimensions, the calculation cost for capturing the eigenvector and eigenvalues is also very high. Some related researches proposed solving this problem with hardware, but such solution significantly increases the cost on hardware. As such, how to perform PCA transformation more efficiently is a crucial subject in the industry.


SUMMARY OF THE INVENTION

In this concern, the invention provides a block-based principal component analysis transformation method and a device thereof that completely reconstruct the original signal with a small data size.


The invention provides a PCA transformation method and a device thereof, including: obtaining an input signal; dividing the input signal and obtaining a plurality of one-dimension vectors corresponding to the divided input signal, wherein a number of the plurality of one-dimension vectors is a division number; after arranging the plurality of one-dimension vectors to a two-dimension vector, subtracting an average value of the plurality of one-dimension vectors in the number of the division number to obtain a zero-mean vector; calculating a covariance matrix of the zero-mean vector; calculating an eigenvector of the covariance matrix; and multiplying the zero-mean vector by the eigenvector to obtain a projection coefficient.


In an embodiment of the invention, the input signal is a one-dimension signal, and the processes of dividing the input signal and obtaining the plurality of one-dimension vectors corresponding to the divided input signal includes: dividing the one-dimension signal to a plurality of frames and obtaining the plurality of one-dimension vectors according to a plurality of sampling points corresponding to the plurality of frames.


In an embodiment of the invention, the one-dimension signal is a speech signal.


In an embodiment of the invention, the input signal is a two-dimension signal, and the processes of dividing the input signal and obtaining the plurality of one-dimension vectors corresponding to the divided input signal includes: dividing the two-dimension signal to a plurality of blocks, obtaining a plurality of two-dimension matrices corresponding to a plurality of pixels of the plurality of blocks, and transforming the plurality of two-dimension matrices to the plurality of one-dimension vectors.


In an embodiment of the invention, the two-dimension signal is an image signal.


In an embodiment of the invention, the principal component analysis transformation method of the invention further includes: multiplying the projection coefficient by an inverse matrix of the eigenvector to obtain a reconstructed zero-mean vector; adding the average value to the reconstructed zero-mean vector to obtain a recovered one-dimension vector; and arranging the recovered one-dimension vector to a recovered input signal.


The invention provides a block-based principal component analysis transformation device, including a processor and a memory coupled to the processor, wherein the processor obtains an input signal; divides the input signal and obtains a plurality of one-dimension vectors corresponding to the divided input signal, wherein a number of the plurality of one-dimension vectors is a division number; after arranging the plurality of one-dimension vectors to a two-dimension vector, subtracting an average value of the plurality of one-dimension vectors in the number of the division number to obtain a zero-mean vector; calculates a covariance matrix of the zero-mean vector; calculates an eigenvector of the covariance matrix; and multiplies the zero-mean vector by the eigenvector to obtain a projection coefficient.


In an embodiment of the invention, the input signal is a one-dimension signal, and the processor divides the one-dimension signal to a plurality of frames and obtains the plurality of one-dimension vectors according to a plurality of sampling points corresponding to the plurality of frames.


In an embodiment of the invention, the input signal is a two-dimension signal, and the processor divides the two-dimension signal to a plurality of blocks, obtains the plurality of two-dimension matrices corresponding to a plurality of pixels of the plurality of blocks and transforms the plurality of two-dimension matrices to the plurality of one-dimension vectors.


In an embodiment of the invention, the processor multiplies the projection coefficient by an inverse matrix of the eigenvector to obtain a reconstructed zero-mean vector; adds the average value to the reconstructed zero-mean vector to obtain a recovered one-dimension vector; and arranges the recovered one-dimension vector to a recovered input signal.


Based on the foregoing, the block-based principal component analysis transformation method and the device thereof of the invention properly divides a one-dimension signal or two-dimension signal to a plurality of frames or a plurality of blocks in order to obtain a plurality of corresponding one-dimension vectors; next, after arranging the plurality of one-dimension vectors to a two-dimension vector, subtracts an average value of the plurality of one-dimension vectors in a number of the division number to obtain a zero-mean vector; calculates a covariance matrix of the zero-mean vector; calculates an eigenvector of the covariance matrix; and then multiplies the zero-mean vector by the eigenvector to obtain a projection coefficient, which serves as a transformation output of the PCA of the invention. The invention further multiplies the projection coefficient by an inverse matrix of the eigenvector by an inverse transformation to retrieve a reconstructed zero-mean vector, adds the average value to the zero-mean vector to obtain a recovered one-dimension vector, and, lastly, arranges the recovered one-dimension vector to frames or blocks in designated sizes.


To make the above features and advantages of the invention more comprehensible, several embodiments accompanied with drawings are described in detail as follows.





BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate exemplary embodiments of the invention and, together with the description, serve to explain the principles of the invention.



FIG. 1 is a block diagram of a blocked-based principal component analysis transformation device according to an embodiment of the invention.



FIG. 2 is a flow chart of a transformation of a blocked-based principal component analysis transformation method according to an embodiment of the invention.



FIG. 3 is a flow chart of a transformation of a blocked-based principal component analysis transformation method according to another embodiment of the invention.



FIG. 4 is a flow chart of an inverse transformation of a blocked-based principal component analysis transformation method according to an embodiment of the invention.



FIG. 5A and FIG. 5B are schematic figures illustrating how errors of a projection coefficient of a blocked-based principal component analysis transformation method of the invention influence the image quality of a principal component and a non-principal component respectively in a spacial domain.



FIG. 6A and FIG. 6B are schematic figures illustrating how errors of a projection coefficient of a blocked-based principal component analysis transformation method of the invention influence the image quality of a principal component and a non-principal component respectively in a frequency domain.



FIG. 7A and FIG. 7B are schematic figures comparing the quality of divided blocks in different sizes and with a projection coefficient quantified to different decimal places.



FIG. 8 is a schematic figure comparing a data size of a blocked-based principal component analysis of the invention, a data size of a non-quantization discrete cosine transformation and a data size of a quantization discrete cosine transformation.



FIG. 9 is a schematic figure comparing a blocked-based principal component analysis of the invention and the traditional principal component analysis.



FIG. 10 is a schematic figure comparing a time cost for operating a blocked-based principal component analysis method of the invention and a data size required for reconstruction in the blocked-based principal component analysis method.





DESCRIPTION OF THE EMBODIMENTS

Some other embodiments of the invention are provided as follows. It should be noted that the reference numerals and part of the contents of the previous embodiment are used in the following embodiments, in which identical reference numerals indicate identical or similar components, and repeated description of the same technical contents is omitted. Please refer to the description of the previous embodiment for the omitted contents, which will not be repeated hereinafter.



FIG. 1 is a block diagram of a blocked-based principal component analysis transformation device according to an embodiment of the invention.


Referring to FIG. 1, a blocked-based principal component analysis transformation device 100 of the invention includes a processor 110 and a memory 120. The memory 120 is coupled to the processor 110.


The processor 110 is, for example, a central processing unit (CPU) or other programmable microprocessor for general use or special use, a digital signal processor (DSP), a programmable controller, an application specific integrated circuit (ASIC), other similar components, or a combination of the foregoing.


The memory 120 is, for example, any type of stationary or movable random access memory (RAM), read-only memory (ROM), flash memory, hard disk drive (HHD), solid state drive (SSD), other similar components, or a combination of the foregoing.


In an embodiment of the invention, the blocked-based principal component analysis transformation device 100 may receive an input signal such as a speech signal or an image signal through a communication component (not illustrated) and store or temporarily store the input signal in the memory 120 for the processor 110 to perform a transformation and an inverse transformation of PCA to the input signal.



FIG. 2 is a flow chart of a transformation of a blocked-based principal component analysis transformation method according to an embodiment of the invention.


Referring to FIG. 2, a one-dimension signal is obtained in step S201. The one-dimension signal is, for example, a 32-bit floating-point quantization speech signal having a sampling frequency of 44.1 k.


In step S203, the one-dimension signal is divided to a plurality of frames, and a plurality of one-dimension vectors are obtained according to a plurality of sampling points corresponding to the plurality of frames, wherein a number of the plurality of one-dimension vectors is a number of the plurality of frames. In specific, the processor 110 divides the one-dimension signal according to the plurality of frames in designated sizes, as represented by equation (1).






X
f=[x(f-1)n+1,x(f-1)n+2, . . . ,x(f-1)n+n]T, where f=1, . . . ,F  (1)


where f is an fth frame of the one-dimension signal, F is a number of the plurality of frames of the one-dimension signal, n is a number of the plurality of sampling points in the plurality of frames, and T is a transpose of matrix.


In step S205, after arranging the plurality of one-dimension vectors to a two-dimension vector, an average value of the plurality of one-dimension vectors in the number of the plurality of frames is subtracted to obtain a zero-mean vector. In specific, the processor 110 arranges the plurality of original n×1 one-dimension vectors to an n×F two-dimension vector according to equation (2).






X
V=[X1,X2, . . . ,Xf, . . . XF], where f=1, . . . ,F  (2)


A zero-mean vector ZV is represented by equation (3), wherein the average value of the plurality of one-dimension vectors in the number of the plurality of frames is represented by equation (4).










Z
V

=


X
V

-


X
V

_






(
3
)








X
V

_

=


1
F






f
=
1

F



X
f







(
4
)







In step S207, a covariance matrix of the zero-mean vector is calculated. A covariance matrix C is represented by equation (5).









C
=


cov


(

Z
V

)


=


1

F
-
1







f
=
1

F




Z
f



Z
f
T









(
5
)







In step S209, an eigenvector of the covariance matrix is calculated. In specific, the processor 110 extracts an eigenvector evec by a matrix decomposition method, and the eigenvector is a basis function of the frame-based PCA of the invention, and d(·) represents the matrix decomposition method, as represented by equation (6).






e
vec
×e
val
×e
vec
T
=d(C)  (6)


In step S211, the zero-mean vector is multiplied by the eigenvector to obtain a projection coefficient. A projection coefficient P is a transformation output of the frame-based PCA of the invention, as represented by equation (7).






e
vec
×Z
V
=P  (7)



FIG. 3 is a flow chart of a transformation of a blocked-based principal component analysis transformation method according to another embodiment of the invention.


Referring to FIG. 3, in step S301, a two-dimension signal is obtained. The two-dimension signal is, for example, an 8-bit quantization two-dimension 256×256 image signal.


In step S303, the two-dimension signal is divided to a plurality of blocks, a plurality of two-dimension matrices corresponding to a plurality of pixels of the plurality of blocks are obtained, and the plurality of two-dimension matrices are transformed to a plurality of one-dimension vectors, wherein a number of the plurality of one-dimension vectors is a number of the plurality of blocks. In specific, the processor 110 divides the one-dimension signal according to the plurality of blocks in designated sizes, as represented by equation (8).











X

r
,
c


=

[




x




(

r
-
1

)


p

+
1

,



(

c
-
1

)


q

+
1











x




(

r
-
1

)


p

+
1

,



(

c
-
1

)


q

+
2











x




(

r
-
1

)


p

+
1

,



(

c
-
1

)


q

+
q

































x




(

r
-
1

)


p

+
2

,



(

c
-
1

)


q

+
1











x




(

r
-
1

)


p

+
2

,



(

c
-
1

)


q

+
2











x




(

r
-
1

)


p

+
2

,



(

c
-
1

)


q

+
q





























x




(

r
-
1

)


p

+
p

,



(

c
-
1

)


q

+
1











x




(

r
-
1

)


p

+
p

,



(

c
-
1

)


q

+
2









x




(

r
-
1

)


p

+
p

,



(

c
-
1

)


q

+
q






]


,









where










r
=
1

,

,
R







c
=
1

,

,
C









(
8
)







where r is a block on a rth row of the two-dimension signal, c is a block on a cth column of the two-dimension signal, R is a total number of the plurality of blocks in rows, C is a total number of the plurality of blocks in columns, p is a number of rows of the plurality of pixels in the plurality of blocks, and q is a number of columns of the plurality of pixels in the plurality of blocks.


Next, the processor 110 further uses custom-character(·) to transform the plurality of two-dimension matrices to the plurality of one-dimension vectors, as represented by equation (9).














X
v

=



[


X
1

,

X
2

,





,

X

p
×
q



]

T

=




(

X

r
,
c


)










=


[


X

1
,
1


,

X

2
,
1


,





,

X

p
,
1


,


X

1
,
2




X

2
,
2



,





,

X

p
,
2


,





,

X

p
,
q



]

T


,










where










r
=
1

,





,
R







c
=
1

,





,
C







v
=
1

,





,

R
×
C










(
9
)







In step S305, after arranging the plurality of one-dimension vectors to a two-dimension vector, an average value of the plurality of one-dimension vectors in the number of the plurality of blocks is subtracted to obtain a zero-mean vector. In specific, the processor 110 arranges the plurality of original (p×q)×B one-dimension vectors to a (p×q)×B two-dimension vector according to equation (10), wherein B is a product of R and C.






X
V=[X1,X2, . . . ,Xν, . . . ,XR×C], where ν=1, . . . ,R×C  (10)


The zero-mean vector ZV is represented by equation (11), wherein the average value of the plurality of one-dimension vectors in the number of the plurality of blocks is represented by equation (12).










Z
V

=


X
V

-


X
V

_






(
11
)








X
V

_

=


1
V






v
=
1

V



X
v







(
12
)







In step S307, a covariance matrix of the zero-mean vector is calculated. A covariance matrix C is represented by equation (13).









C
=


cov


(

Z
V

)


=


1

V
-
1







v
=
0

V




Z
v



Z
v
T









(
13
)







In step S309, an eigenvector of the covariance matrix is calculated. In specific, the processor 110 extracts an eigenvector evec by a matrix decomposition method, and the eigenvector is a basis function of the block-based PCA of the invention, and d(·) represents the matrix decomposition method same as that represented by equation (6).


In step S311, the zero-mean vector is multiplied by the eigenvector to obtain a projection coefficient. A projection coefficient P is a transformation output of the block-based PCA of the invention, same as that represented by equation (7).



FIG. 4 is a flow chart of an inverse transformation of a blocked-based principal component analysis transformation method according to an embodiment of the invention.


Referring to FIG. 4, in step S401, the projection coefficient is multiplied by an inverse matrix of the eigenvector to obtain a reconstructed zero-mean vector. In specific, the processor 110 obtains a reconstructed zero-mean vector simply by multiplying the projection coefficient by the inverse matrix of the eigenvector, as represented by equation (14).






e
vec
×P=Z′
V  (14)


Because the eigenvector is an orthogonal matrix, the inverse matrix of the eigenvector is identical to a transposed matrix of the eigenvector.


In step S403, an average value is added to the reconstructed zero-mean vector to obtain a recovered one-dimension vector, as represented by equation (15).






X′
V
=Z′
V+XV  (15)


In step S405, the recovered one-dimension vector is arranged to a recovered input signal.


If the original input signal is a one-dimension signal, the recovered one-dimension vector is as represented by equation (16), and the recovered input signal is as represented by equation (17).






X
re=[(X′1)T,(X′2)T, . . . (X′f)T, . . . (X′F)T], where f=1, . . . ,F  (16)






X′
f=[x′(f-1)n+1,x′(f-1)n+2, . . . ,x′(f-1)n+n]T, where f=1, . . . ,F  (17)


If the original input signal is a two-dimension signal, the recovered one-dimension vector is as represented by equation (18), and the recovered input signal is as represented by equation (19). It is noteworthy that, custom-character(·) in equation (19) is a transfer function of arranging the plurality of one-dimension vectors to a two-dimension matrix in a designated size.











X
re

=


[

X

r
,
c



]

=

[




X

1
,
1











X

1
,
2











X

1
,
C

































X

2
,
1











X

2
,
2











X

2
,
C





























X

R
,
1











X

R
,
2









X

R
,
C






]



,





where










r
=
1

,

,
R







c
=
1

,

,
C









(
18
)







X

r
,
c



=





(

X
v


)


=

[




x

1
,
1











x

1
,
2











x

1
,
q

































x

2
,
1











x

2
,
2











x

2
,
q





























x

p
,
1











x

p
,
2









x

p
,
q






]






(
19
)







Table 1 and Table 2 are provided hereinafter to describe the quality test on the inverse transformation recovery and the error on a sampling unit.


Table 1 shows the difference between an original one-dimension speech signal having a sampling frequency of 44.1 k and the speech signal being inverse transformed (i.e. a signal to noise ratio, SNR).












TABLE 1







Test item
SNR









Recovered data of inverse transformation
287.7907



Recovered data of a speech sampling
262.9465



point with an amplitude error of 0.5



Recovered data after a rounding process











Table 2 shows the difference between an original 256×256 two-dimension image signal and the image signal being inverse transformed (i.e. peak signal to noise ratio, PSNR).












TABLE 2







Test item
PSNR









Recovered PSNR of inverse transformation
299.1945



PSNR of an image pixel with a grayscale
102.3162



error of 0.5



Recovered data after a rounding process











According to Table 1 and Table 2, when a recovery signal is not quantified, it can be shown by the recovered SNR and PSNR of the inverse transformation that the original signal cannot be completely recovered in the recovery test. If an error of 0.5 is added to one point of the signal with and results in the SNR and PSNR results both smaller than the SNR and PSNR values recovered simply by inverse transformation, it shows that the error generated by the inverse transformation is smaller than the difference made by the error of 0.5. Lastly, the signal is completely recovered by the inverse transformation using a rounding process to eliminate the errors in a digital signal.



FIG. 5A and FIG. 5B are schematic figures illustrating how errors of a projection coefficient of a blocked-based principal component analysis transformation method of the invention influence the image quality of a principal component and a non-principal component respectively in a spacial domain. FIG. 6A and FIG. 6B are schematic figures illustrating how errors of a projection coefficient of a blocked-based principal component analysis transformation method of the invention influence the image quality of a principal component and a non-principal component respectively in a frequency domain.


In FIG. 5A, FIG. 5B, FIG. 6A and FIG. 6B, all the horizontal axes represent a percentage of projection coefficient error, and all the vertical axes represent a PSNR. FIG. 5B is a partial enlarged view of FIG. 5A. FIG. 6B is a partial enlarged view of FIG. 6A.



FIG. 5A shows how the changing of magnification of the projection coefficient on the image signal in a spacial domain influences the quality of the recovered signal. FIG. 6A shows how the changing of magnification of the projection coefficient on the image signal in a frequency domain influences the quality of the recovered signal. In FIG. 5A and FIG. 6A, both tests are operated with 8×8 divided blocks. FIG. 5A and FIG. 6A prove that the block-based PCA of the invention has identical influence to the robust of the image quality when processing data in a spacial domain and processing data in a frequency domain. In addition, the PSNR of FIG. 5A and FIG. 6A prove that the quality of the reconstructed signal revised by the non-principal component projection coefficient is better than the reconstructed signal revised by the principal component projection coefficient. The PSNR of the reconstructed image that changes ±20% of the principal component coefficient is about 35 dB, and the PSNR of the reconstructed image that changes ±10% of the principal component coefficient is about 35 dB. Since the reconstructed image still has good quality, the projection coefficient may also serve as a carrier space for data hiding and provide information such as watermark for utilization in hiding techniques.



FIG. 7A and FIG. 7B are schematic figures comparing the quality of divided blocks in different sizes and with a projection coefficient quantified to different decimal places. FIG. 7B is a partial enlarged view of FIG. 7A. In FIG. 7A and FIG. 7B, both of the horizontal axes represent a number of decimal places, and both of the vertical axes represent a PSNR.



FIG. 7A shows a comparison of the image quality quantified to 0th to 20th decimal place when the image is divided to different block sizes in the block-based PCA method of the invention. When quantified to the 13th or more than 13th decimal places, regardless of the change of the block size, the PSNR of the reconstructed image quality does not increase, wherein a block has the greatest PSNR when having a block size of 32×32. Besides, in view of FIG. 7B, when quantified to the 12th or less than 12th decimal places, a block has the greatest PSNR when having a block size of 128×128; when quantified to less than 12th decimal places, a block has the greatest PSNR when having a block size of 32×32.


Table 3 is a test result of the recovery quality of the projection coefficient through a rounding process when decimal places is quantified under different block sizes.











TABLE 3





Block size
0th decimal place
1st decimal place







2 × 2
58.7529



4 × 4
58.9133



8 × 8
58.9348



16 × 16
60.2415



32 × 32




64 × 64




128 × 128











In view of Table 3, regardless of the block size, in the PCA method of the invention, when quantifying to the first decimal place, the original image in the blocks of all sizes are completely reconstructed, and the PSNR is infinite.



FIG. 8 is a schematic figure comparing a data size of a blocked-based principal component analysis of the invention, a data size of a non-quantization discrete cosine transform (DCT) and a data size of a quantization discrete cosine transform (i.e. JPEG).


In FIG. 8, the horizontal axis represents a PSNR, and the vertical axis represents a compressing rate. In FIG. 8, the data size of the blocked-based PCA is always larger than the data size of the quantization discrete cosine transformation when the PSNR rises. However, in the comparison between the data size of the block-based PCA and the data size of the non-quantization DCT, for example, the line with square markers and the line with triangle markers, when the compressing rate is greater than 0.8, the quality of the recovered image (i.e. the PSNR) of the block-based PCA and that of the non-quantization DCT are very close. On the other hand, when the compressing rate falls within a range of 0.1 to 0.8, the quality of the recovered image of the block-based PCA is slightly better than that of the recovered image of the non-quantization DCT. On the other hand, when the compressing rate is smaller than 0.1, because the projection coefficient and eigenvector generated by the block-based PCA are slightly greater than the original data size, the compressing rate of the block-based PCA is a negative value before operating any more effective quantization vector algorithm, which means that the data size is slightly larger than the original data size. The data size of the block-based PCA and the non-quantization DCT are really similar, in view of the comparison therebetween. Therefore, it is necessary to develop an effective quantization vector algorithm of the block-based PCA.



FIG. 9 is a schematic figure comparing a blocked-based principal component analysis of the invention and the traditional principal component analysis.



FIG. 9 compares the time cost for calculating, the data size and the quality of the recovered image of the blocked-based PCA with those of the traditional PCA. Regarding the time cost for calculating, the blocked-based PCA of the invention enhances the processing speed effectively. The calculation amount of the block-based CPA is better than the traditional CPA when the size of the divided blocks is 128×128, but the data size of the block-based CPA is larger than the traditional CPA at a 95% confidence level. However, when the size of the divided blocks is smaller than 64×64, the block-based CPA is better than the traditional CPA not only in terms of the calculation amount, but the data size of the block-based CPA is also smaller than the traditional CPA at a 95% confidence level. Moreover, it is proved by the PSNR that the reconstructed information completely recovers the original information losslessly.



FIG. 10 is a schematic figure comparing a time cost for operating a blocked-based PCA method of the invention and a data size required for reconstruction in the blocked-based PCA method.


In FIG. 10, the horizontal axis represents the block size, and there is only one block in the whole image in the traditional PCA, i.e. the image is not divided. The vertical axis on the left represents the data size, and the unit thereof is 64-bit floating-point number in a number of 2 to the power of n. The vertical axis on the right represents the cost time, and the unit thereof is 10 to the power of n seconds. FIG. 10 is a schematic figure showing the information in the table of FIG. 9.


In summary of the foregoing, the PCA transformation method and the device thereof properly divides a one-dimension signal or two-dimension signal to a plurality of frames or a plurality of blocks in order to obtain a plurality of corresponding one-dimension vectors, calculates a zero-mean vector of the plurality of one-dimension vectors and calculates a covariance matrix of the zero-mean vector, calculates an eigenvector of the covariance matrix, then multiplies the zero-mean vector by the eigenvector to obtain a projection coefficient, which serves as a transformation output of the PCA of the invention. The invention further multiplies the projection coefficient by an inverse matrix of the eigenvector by an inverse transformation to retrieve a reconstructed zero-mean vector, adds an average value to the zero-mean vector to obtain a recovered one-dimension vector, and, lastly, arranges the recovered one-dimension vector to frames or blocks in designated sizes. In addition, under the premise of a small data size, the PCA transformation method further achieves complete recovery of input signal, which other prior methods cannot achieve.


It will be apparent to those skilled in the art that various modifications and variations can be made to the disclosed embodiments without departing from the scope or spirit of this invention. In view of the foregoing, it is intended that the invention covers modifications and variations provided that they fall within the scope of the following claims and their equivalents.

Claims
  • 1. A blocked-based principal component analysis transformation method, comprising: obtaining an input signal;dividing the input signal and obtaining a plurality of one-dimension vectors corresponding to the divided input signal, wherein a number of the plurality of one-dimension vectors is a division number;after arranging the plurality of one-dimension vectors to a two-dimension vector, subtracting an average value of the plurality of one-dimension vectors of the division number to obtain a zero-mean vector;calculating a covariance matrix of the zero-mean vector;calculating an eigenvector of the covariance matrix; andmultiplying the zero-mean vector by the eigenvector to obtain a projection coefficient.
  • 2. The blocked-based principal component analysis transformation method according to claim 1, wherein the input signal is a one-dimension signal, and the process of dividing the input signal and obtaining the plurality of one-dimension vectors corresponding to the divided input signal comprises: dividing the one-dimension signal to a plurality of frames and obtaining the plurality of one-dimension vectors according to a plurality of sampling points corresponding the frames.
  • 3. The blocked-based principal component analysis transformation method according to claim 2, wherein the one-dimension signal is a speech signal.
  • 4. The blocked-based principal component analysis transfol nation method according to claim 1, wherein the input signal is a two-dimension signal, and the process of dividing the input signal and obtaining the plurality of one-dimension vectors corresponding to the divided input signal comprises: dividing the two-dimension signal to a plurality of blocks, obtaining a plurality of two-dimension matrices corresponding to a plurality of pixels of the plurality of blocks and transforming the plurality of two-dimension matrices to the plurality of one-dimension vectors.
  • 5. The blocked-based principal component analysis transformation method according to claim 4, wherein the two-dimension signal is an image signal.
  • 6. The blocked-based principal component analysis transformation method according to claim 1, further comprising: multiplying the projection coefficient by an inverse matrix of the eigenvector to obtain a reconstructed zero-mean vector;adding the average value to the reconstructed zero-mean vector to obtain a recovered one-dimension vector; andarranging the recovered one-dimension vector to a recovered input signal.
  • 7. A blocked-based principal component analysis transformation device, comprising: a processor; anda memory coupled to the processor, wherein the processorobtains an input signal;dividing the input signal and obtaining a plurality of one-dimension vectors corresponding to the divided input signal, wherein a number of the plurality of one-dimension vectors is a division number;after arranging the plurality of one-dimension vectors to a two-dimension vector, subtracts an average value of the plurality of one-dimension vectors of the division number to obtain a zero-mean vector;calculates a covariance matrix of the zero-mean vector;calculates an eigenvector of the covariance matrix; andmultiplying the zero-mean vector by the eigenvector to obtain a projection coefficient.
  • 8. The blocked-based principal component analysis transformation device according to claim 7, wherein the input signal is a one-dimension signal, and the processor divides the one-dimension signal to a plurality of frames and obtains the plurality of one-dimension vectors according to a plurality of sampling points corresponding to the plurality of frames.
  • 9. The blocked-based principal component analysis transformation device according to claim 7, wherein the input signal is a two-dimension signal, and the processor divides the two-dimension signal to a plurality of blocks, obtains the plurality of two-dimension matrices corresponding to a plurality of pixels of the plurality of blocks and transforms the plurality of two-dimension matrices to the plurality of one-dimension vectors.
  • 10. The blocked-based principal component analysis transformation device according to claim 7, wherein the processor multiplies the projection coefficient by an inverse matrix of the eigenvector to obtain a reconstructed zero-mean vector, adds the average value to the reconstructed zero-mean vector to obtain a recovered one-dimension vector, and arranges the recovered one-dimension vector to a recovered input signal.
Priority Claims (1)
Number Date Country Kind
106132684 Sep 2017 TW national