The present invention relates to a configuration of a signal processing device which compresses data which has been converted into a digital signal in predetermined sampling intervals, and stores the data into a memory.
Generally, when data which has been converted into a digital signal in predetermined sampling intervals is recorded, compression of the data before recording into a memory with a higher data compression ratio contributes to a lower-cost system.
As a method for compressing PCM audio data, compression techniques called DPCM (Differential Pulse Code Modulation) and ADPCM (Adaptive Differential Pulse Code Modulation) have been widely used. The former is a technique of performing data compression by recording differential data between each piece of data. The latter is a technique of performing data compression by recording differential data with respect to predicted data, and it is said that by generating predicted data considerably close to original digital data, the data can be compressed by a factor of about ⅓. In addition, regarding image data, data compression may be performed by converting time-series data into frequency domain data, and thereafter, cutting off a high-frequency component, thereof data compression may be performed using differential data between portions having a high correlation of frames, and the like.
For example, JP No. 5-300019 A discloses a method for compressing digital data to be recorded into a memory by controlling the sampling rate of an input analog signal. According to the publication, a plurality of AD converters for converting an input analog signal into a digital signal are provided, which are operated at sampling rates different from each other, and output PCM data having different sampling rates. The input analog signal is also input to an analog band-pass filter, in which a high frequency component is emphasized. By determining the emphasized signal level, a piece of digital data is selected from PCM data output from the plurality of AD converters. In an embodiment described in the publication, the AD converters have sampling frequencies of 18.9 KHz and 37.8 KHz, so that data can be compressed by a maximum factor of about ½.
When the ADPCM data compression is used, data can be compressed by a factor of about ⅓. However, this data compression disadvantageously requires a large-scale digital circuit (DSP, etc.) which requires a program. Also, disadvantageously, a higher order of predicted data needs to be calculated so as to increase a compression ratio, resulting in a more enormous computation amount.
The method of performing data compression by converting time-series data into frequency domain data and cutting off a high frequency component, is inappropriate with respect to a data sequence which has an important meaning in the high frequency component. Also, this method disadvantageously requires a large-scale digital circuit and an enormous computation amount as in ADPCM.
In addition, if the technique described in the publication is applied to audio data, the amount of consumed memory can be reduced by a factor of about ½, but a plurality of AD converters, and analog parts (an analog band-pass filter, etc.) are required to configure a data compression system. Therefore, when a system in which a memory amount is effectively reduced is configured, a number of analog parts are inevitably required, advantageously resulting in a significant increase in cost.
An object of the present invention is to provide a signal processing device which performs data compression while holding a high data compression effect and without losing an information component from a data sequence which has an important meaning in a high frequency component, which is cut off by the conventional technique, and has a simple circuit configuration without requiring a number of circuits.
To achieve the object, in the present invention, one or more thinning circuits which thin input digital data (original data) into thinned data having a large sampling interval, and it is determined which of the thinned data and the original data is selected in accordance with a predetermined criterion, in predetermined intervals, and the selected data (the original data or the thinned data) is written into a memory.
Specifically, the present invention provides a signal processing device for receiving data which has been converted into a digital signal in predetermined sampling intervals, compressing the input original data, and recording the resultant data into a memory. The device comprises thinning means for thinning the original data into thinned data having a sampling interval different from the predetermined sampling interval, determining means for analyzing the original data in predetermined constant intervals, and based on a predetermined criterion, determining which of the original data and the thinned data of the thinning means is selected, data writing means for writing selected data which is one of the original data and the thinned data of the thinning means, into the memory in the predetermined constant intervals, based on a determination result of the determining means; and information writing means for writing determination result information of the determining means into the memory.
In the signal processing device of the present invention, the thinning means includes a plurality of thinning means for thinning the original data into a plurality of pieces of thinned data having a plurality of sampling intervals different from the predetermined sampling interval, and the predetermined constant interval is equal to a largest sampling interval of the plurality of different sampling intervals.
Further, in the signal processing device of the present invention, the plurality of sampling intervals have a relationship of an integral multiple with respect to the sampling interval of the original data, and the plurality of sampling intervals have a relationship of an integral multiple with respect to each other.
In addition, in the signal processing device of the present invention, the thinning means calculates an average value of the original data within one sampling interval, and the average value data is representative data which is used as thinned data.
Also, in the signal processing device of the present invention, the thinning means calculates a data value which is located at substantially a center when original data is sorted within one sampling interval, and the center value data is representative data which is used as thinned data.
Further, in the signal processing device of the present invention, the predetermined criterion of the determining means is determined by comparing a result of calculation of a feature amount of each piece of data within each predetermined sampling interval of original data, with a predetermined threshold value.
In addition, in the signal processing device of the present invention, the feature amount is a sum value of absolute differential values between each adjacent piece of data within each predetermined sampling interval of original data.
Also, in the signal processing device of the present invention, the feature amount is a maximum value of absolute differential values between each adjacent piece of data within each predetermined sampling interval of original data.
Further, in the signal processing device of the present invention, the feature amount is a sum value or a maximum value of second-order derivatives between each adjacent piece of data within each predetermined sampling interval of original data.
In addition, in the signal processing device of the present invention, the feature amount is any combination of two or more of a sum value and a maximum value of absolute differential values between each adjacent piece of data within each predetermined sampling interval of original data, and a sum value or a maximum value of second-order derivatives between the each adjacent piece of data.
Also, in the signal processing device of the present invention, the predetermined threshold value is changed, depending on the feature amount of original data.
Further, in the signal processing device of the present invention, the information writing means writes determination result information at the same address as an address of data written into a memory by the data writing means, the determination result information being appended to the data.
In addition, in the signal processing device of the present invention, the information writing means writes a plurality of pieces of determination result information together at an address different from an address of data written into a memory by the data writing means.
Also, the present invention provides a signal processing device for receiving data which has been converted into a digital signal in predetermined sampling intervals, compressing the input original data, and recording the resultant data into a memory. The device comprises determining means for analyzing the original data in predetermined constant intervals, and based on a predetermined criterion, determining whether or not the original data is selected, thinning means for thinning the original data into thinned data having a sampling interval larger than the predetermined sampling interval, when the original data is not selected, based on a determination result of the determining means, data writing means for writing selected data which is one of the original data and the thinned data of the thinning means, into the memory in the predetermined constant intervals, based on the determination result of the determining means, and information writing means for writing determination result information of the determining means into the memory.
Accordingly, in the present invention, for example, when original data has a sampling frequency of 10 Hz and thinned data has a sampling frequency of 1 Hz, the amount of data to be written into a memory can be compressed to a maximum of 1/10 of the amount of the original data. In addition, if the predetermined criterion of the determining means is changed as appropriate, data compression can be performed with respect to a data sequence having an important meaning in a high frequency component without losing the high frequency information component. Further, data compression can be performed with a simple configuration without requiring a large-scale digital circuit (DSP, etc.) which requires a program, a plurality of AD converters, or the like, no matter that the thinning means and the determining means are provided.
Particularly, in the present invention, the data analysis for selecting one of original data and a plurality of pieces of thinned data having different sampling intervals, is performed in largest sampling intervals of the thinned data, resulting in a simple configuration of the determination circuit.
Also, in the present invention, the sampling intervals of a plurality of pieces of thinned data have a relationship of an integral multiple with respect to the sampling interval of original data, so that timing of data selection and memory writing can be performed in constant intervals, resulting in an easy control.
Further, in the present invention, average value data of pieces of data within each sampling interval of original data is thinned data, whereby aliasing noise from a high frequency to a low frequency can be reduced to a large extent as compared to simple thinning.
In addition, in the present invention, center data of pieces of data within each sampling interval of original data is thinned data, thereby making it possible to cut off a single noise component.
Also, in the present invention, a predetermined criterion for selecting original data or thinned data is determined by comparing a feature amount of the original data with a predetermined threshold value, whereby data compression can be performed without losing a required feature amount from the original data. Particularly, since a sum value of absolute differential values between each adjacent piece of data is a feature amount of the original data, compression can be performed without losing a high frequency component of the original data. Further, since a maximum value of absolute differential values between each adjacent piece of data is a feature amount of the original data, compression can be performed without losing a single pulse-like component of the original data. In addition, since a sum value or a maximum value of second-order derivatives between each adjacent piece of data is a feature amount, compression can be performed without losing an inflection component of the original data. Also, since any combination of the above-described feature amounts is a feature amount, compression can be performed without losing all the various feature amounts of the original data.
Further, in the present invention, since the predetermined threshold value used as the criterion can be changed, depending on a feature amount of original data, the signal processing device can be utilized to satisfactorily perform data compression with respect to various original data, resulting in high general versatility as a signal processing device.
Therefore, according to the signal processing device of the present invention, it is possible to provide a data compression device which has a simple circuit configuration while holding a high data compression effect and without losing a required information component from original data.
Hereinafter, a signal processing device according to an embodiment of the present invention will be described with reference to the accompanying drawings.
In
As illustrated in
For example, the thinning circuit (thinning means) 1 thins the input PCM data having a sampling frequency of 10 Hz into thinned data having a sampling frequency of 1 Hz. A most commonly used technique for thinning input data is a process called moving average filtering, and calculation is generally performed based on expression 1.
X(n)+X(n−1)+X(n−2)+ . . . +X(n−9)/10 (expression 1)
In expression 1, X(n), X(n−1), . . . indicate a data sequence of the input PCM data having a sampling frequency of 10 Hz, and X(n−1) means data which is transferred and input immediately before X(n). The calculation of expression 1 corresponds to a process which calculates an average of 10 consecutive adjacent pieces of data. In the thinning circuit 1, the calculation of expression 1 is performed in units of 10 pieces of input data, and the result of the calculation is output as a representative value, so that the data amount of output thinned data is compressed into one-tenth of the data amount of the input data.
In the determination circuit (determining means) 2, 10 pieces of input data is grouped into one set, and for each set, one of the thinned data of the thinning circuit 1 and the input PCM data (original data) is selected and written into the memory 3.
An example of this criterion is described by expression 2 below.
TOTAL1=|X(n)−X(n−1)|+|X(n−1)−X(n−2)|+ . . . +|X(n−8)−X(n−9)| (expression 2)
In expression 2, C1 indicates a threshold constant, and |X(n)−X(n−1)| indicates the absolute value of the difference between data X(n) and data X(n−1). In expression 2, for 10 consecutive pieces of data from data X(n) to data X(n−9), the absolute value of the difference between each adjacent piece of data is calculated, and it is determined whether the calculation result TOTAL1 is larger or smaller than the predetermined threshold value C1. When the calculation result TOTAL1 is larger than the threshold value C1, the input PCM data (a 10-piece data sequence X(n) to X(n−9)) are selected, and when otherwise, the thinned data from the thinning circuit 2 (thinned input PCM data) is selected.
The selection circuit (data writing means) 4 selects data based on the determination result of the determination circuit 2, and writes the selected data into the memory 3.
In this embodiment, the input PCM data is divided in units of one second interval (predetermined constant interval) (into groups of 10 pieces of sampled data), and the determination circuit 2 performs analysis (expression 2) in units of 10 pieces of data thus divided. Therefore, when all the determination results of the determination circuit 2 are smaller than or equal to the predetermined threshold value C1, only the thinned data of the thinning circuit 1 is written into the memory 3, so that the data amount is reduced to 10% at maximum in this embodiment.
Exemplary analysis indicating an effect of this embodiment when the predetermined criterion of expression 2 is applied, is illustrated in FIGS. 2 to 4.
The threshold value C1 for the determination is selected so that a feature amount required with respect to input data can be sufficiently extracted. For example, when the original data of
In data compression, data thinning compression in which an input frequency band is limited to a low level is often used. In this case, however, as can be seen from
If the threshold value C1 can be changed, depending on the feature amount of input data, the data compression device can be utilized to compress various input data sequences, resulting in an improvement in the general versatility of the data compression device.
(Another Example of Predetermined Criterion)
A criterion for the determination circuit 2 employing expression 3 is also effective.
TOTAL2=MAX[|X(n)−X(n−1)|, |X(n−1)−X(n−2)|, . . . , |X(n−8)−X(n−9)|] (expression 3)
if TOTAL2>C2 select input PCM data
else select thinned PCM data
In expression 3, MAX[|X(n)−X(n−1)|, |X(n−1)−X(n−2)|, . . . , |X(n−8)−X(n−9)|] means that, for a data sequence of 10 consecutive pieces of data X(n) to X(n−9), the maximum value of absolute differential values between adjacent pieces of data is calculated. It is determined whether the calculation result TOTAL2 is larger or smaller than a predetermined threshold value C2. When the calculation result TOTAL2 is larger than the threshold value C2, the input PCM data (the data sequence of X(n) to X(n−9)) is selected, and when otherwise, the thinned data (thinned PCM data) from the thinning circuit 2 is selected. The selection circuit 4 selects data based on the determination result, and writes the selected data into the memory 3.
Exemplary analysis indicating an effect of this embodiment when the criterion of expression 3 is applied, is illustrated in FIGS. 5(a) to 5(c).
Input data is PCM data having a sampling frequency of 10 Hz and has the waveform of the original data of
The graphs of
As described above, it is desirable to provide a criterion optimal to a required feature amount, depending on input original data. For example, if a second-order derivative of original data is an important feature amount, the sum value of second-order derivative amounts or the maximum value of the second-order derivative amounts is desirably used as the criterion. Further, if the plurality of feature amounts described above are important for input original data, the logical addition (OR) of the respective determination results may be used as a final determination result.
(Another Example of Thinning Circuit)
Although the first-order moving average filter of expression 1 has been used as the thinning circuit 1 in this embodiment, a median filter indicated by expression 4 below is also effective.
Medium[X(n), X(n−1), X(n−2), . . . , X(n−9)] (expression 4)
In expression 4, X(n), X(n−1), . . . indicate a data sequence of input PCM data having a sampling frequency of 10 Hz as in expression 1. X(n−1) means data which is transferred and input immediately before X(n). The calculation of expression 4 means a calculation in which 10 consecutive pieces of data is sorted, and center value data located at substantially a center thereof is output as a representative value. The output data amount is compressed to 1/10 as in expression 1. The median filter of expression 4 has an advantage that output data is not affected by a noise component included in the data sequence, as compared to the moving average filter of expression 1, but has a disadvantage that data phase information is lost or a computation amount is more or less large as compared to the calculation of expression 1. Thus, the thinning filter can be achieved by various methods. In addition to the above-described thinning circuits employing a moving average filter and a median filter, a second or more-order moving average filter or a higher-order low-pass filter can be used to thin input data.
(Method for Storing Compressed Data)
Next, a method for storing compressed data into the memory 3 will be described with reference to
As described above, when compressed data is stored into the memory 3, there are a method for storing a determination result into the same address as that of data as illustrated in
When compressed data stored in the memory 3 is plotted onto a graph, the data can be easily decompressed based on the determination result information. In the example of
Next, a second embodiment of the present invention will be described.
Although there is one kind of sampling interval in which thinned data is output by the thinning circuit 1 in the first embodiment, a plurality of thinning circuits having different thinning rates can be provided. This embodiment illustrates such an example.
As illustrated in
The thinning circuit 1.1 thins the input PCM data having a sampling frequency of 10 Hz into data having a sampling frequency of 1 Hz, as in the thinning circuit 1 of
The thinning circuit 1.2 thins the input PCM data having a sampling frequency of 10 Hz into data having a sampling frequency of 0.1 Hz. In this case, determination is performed in the determination circuit 2 in accordance with expression 5.
TOTAL1=|X(n)−X(n−1)|+|X(n−1)−X(n−2)|+ . . . +|X(n−98)−X(n−99)| (expression 5)
if TOTAL1>C3 select input PCM data
else if TOTAL1>C4 select thinned PCM data of fs=1 Hz
else select thinned PCM data of fs=0.1 Hz
In expression 5, C3 and C4 (C3>C4) are threshold constants, and |X(n)−X(n−1)| represents the absolute differential value between data X(n) and data X(n−1). In expression 5, for 100 consecutive pieces of data X(n) to X(n−99), the sum of absolute differential values between adjacent pieces of data, as in expression 2. When the calculation result TOTAL1 is larger than the first threshold value C3, 100 pieces of input PCM data (original data) are selected. On the other hand, when the calculation result TOTAL1 is larger than the second threshold value C4 and is smaller than or equal to the first threshold value C3, 10 pieces of PCM data (thinned data, fs=1 Hz) are selected. When the calculation result TOTAL1 is smaller than or equal to the second threshold value C4, one piece of PCM data (thinned data, fs=0.1 Hz) is selected. The selection circuit 4 selects data based on the determination result, and writes the selected data into the memory 3.
As described above, when the thinning circuit 1.2 having a sampling frequency of 0.1 Hz is further prepared, it is possible to reduce the data amount of the input PCM data to a maximum of about 1/100. In this embodiment, a considerably high effect is obtained for a data group having characteristics in which a period of time during which there are significant data changes is considerably short with respect to all data. Although determination result information stored in the memory 3 is identified using 1-bit data in the first embodiment, two bits are required in this embodiment.
As described above, by preparing the thinning circuits 1.1 and 1.2 having different thinning rates and determining which thinned data is selected among a plurality of pieces of thinned data using the determination circuit 2 in addition to selection between original data and thinned data, a data compression device having a higher data reduction effect is obtained.
Assuming that the thinning circuits 1.1 and 1.2 having a plurality of sampling intervals are provided as illustrated in
Although it has been described above that the thinning circuit is configured to invariably perform a process of thinning input PCM data, the thinning circuit may be configured to perform the thinning process only when it is determined that the determination circuit 2 does not select input PCM data (original data).
As described above, the signal processing device of the present invention can have a simple circuit configuration while holding a high data compression effect and without losing a required information component from original data, and therefore, is useful as a data compression device and the like.
Number | Date | Country | Kind |
---|---|---|---|
2003-395624 | Nov 2003 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP04/15577 | 10/14/2004 | WO | 5/26/2006 |