CN111683258A - Image data compression method and interface circuit - Google Patents

Image data compression method and interface circuit Download PDF

Info

Publication number
CN111683258A
CN111683258A CN202010538066.1A CN202010538066A CN111683258A CN 111683258 A CN111683258 A CN 111683258A CN 202010538066 A CN202010538066 A CN 202010538066A CN 111683258 A CN111683258 A CN 111683258A
Authority
CN
China
Prior art keywords
image data
pixel
compressed
data
wavelet transform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010538066.1A
Other languages
Chinese (zh)
Other versions
CN111683258B (en
Inventor
李停
李林
张远
陈西昌
张正威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai IC R&D Center Co Ltd
Original Assignee
Shanghai IC R&D Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai IC R&D Center Co Ltd filed Critical Shanghai IC R&D Center Co Ltd
Priority to CN202010538066.1A priority Critical patent/CN111683258B/en
Publication of CN111683258A publication Critical patent/CN111683258A/en
Application granted granted Critical
Publication of CN111683258B publication Critical patent/CN111683258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/93Run-length coding

Abstract

The invention provides a compression method of image data and an interface circuit, wherein the compression method comprises the following steps: receiving image data to be compressed, and performing one-dimensional wavelet transform on the image data to be compressed by using a one-dimensional wavelet transform method to obtain transformed data; performing quantization processing on the transformed data to obtain a quantization coefficient; and carrying out zero run coding on the quantized coefficient to obtain compressed image data. The compression method provided by the invention has the advantages of low delay, high output frequency and small required storage space. Meanwhile, the interface circuit provided by the invention has a simpler structure and a smaller occupied area.

Description

Image data compression method and interface circuit
Technical Field
The present invention relates to the field of image data, and in particular, to a method for compressing image data and an interface circuit.
Background
In the field of image data, it is often necessary to compression encode the original image to eliminate redundancy. Specifically, an original image is received by using an MIPI interface, the original image is compressed and encoded by using a compression circuit in the MIPI interface, and then the compressed data is output through the MIPI interface for subsequent processing.
In the related art, a Differential Pulse Code (DPCM) method is mainly used as a method for compressing an original image. And fig. 1 is a schematic structural diagram of a compression circuit corresponding to a DPCM method in the related art, and as shown in fig. 1, when encoding the first two pixel points of the original image, the DPCM encoder is used to directly perform compression encoding on the first two pixel points to obtain an encoding result, and then output the encoding result. And when the third pixel point and each pixel point after the third pixel point are compressed and coded, coding is required to be carried out based on a decoding value of a coding result of a previous pixel point, wherein the coding value of a second pixel point in front of the current pixel point is firstly obtained, a decoder is adopted to decode the coding value of the second pixel point in front of the decoder to obtain the decoding value, then the decoding value is stored, and a prediction factor is calculated based on the decoding value, so that the DPCM coder carries out predictive coding on the current pixel point based on the prediction factor to obtain a coding result and then outputs the coding result, thus the coding of each pixel point of the original image is completed, and the compressed coding of the original image is realized.
However, since the MIPI interface is mainly multi-channel input-output (e.g., up to four-channel input-output support), it requires multi-channel simultaneous input and multi-channel simultaneous output. At this time, when the DPCM encoding technique is used to compress the original image, the DPCM encoding technique is used to encode each pixel of the image data, and thus the requirement on the correlation between the pixels is high. Specifically, when encoding a third pixel point and a subsequent pixel point, encoding can be performed only after a decoding value is obtained by performing decoding operation based on an encoding value of a previous second pixel point, and then when a plurality of pixel points are simultaneously input by using multiple channels, an encoding result of the pixel points arranged in front needs to be calculated first, and then the pixel points arranged in the rear need to be encoded, so that simultaneous encoding of the pixel points input at the same time can not be performed at all, and delay exists between the encoding operations of the pixel points input at the same time. Therefore, in view of the requirement of simultaneous output of multiple channels by the MIPI interface, after the pixels are input in parallel at each time, the encoding results of all the pixels input at each time must be calculated, and then the input encoding results of all the pixels are output in parallel at the same time. Thus, the output frequency is low, and high-frequency output cannot be realized. Meanwhile, the compression circuit in the related art is also complex and occupies a large area.
Disclosure of Invention
The invention aims to provide a compression method of image data and an interface circuit, which are used for solving the technical problems that a compression circuit in the related technology is complex, has high delay and cannot realize high-frequency output.
In a first aspect, to solve the above technical problem, the present invention provides a method for compressing image data, including: receiving image data to be compressed, and performing one-dimensional wavelet transform on the image data to be compressed by using a one-dimensional wavelet transform method to obtain transformed data;
performing quantization processing on the transformed data to obtain a quantization coefficient;
and carrying out zero run coding on the quantized coefficient to obtain compressed image data.
Optionally, the one-dimensional wavelet transform method includes 3/1 wavelet transform method.
Optionally, the method for performing one-dimensional wavelet transform on image data to be compressed by using a one-dimensional wavelet transform method includes:
providing a formula, and performing wavelet transformation on each pixel point of the image data to be compressed by using the formula to obtain the transformed data;
y(i)pixel=x(i)pixeli≤8
y(i)pixel=x(i)pixel-ceil((x(i-1)pixel+x(i+1)pixel)/2)i>8 and i is an odd number
y(i)pixel=x(i)pixel+ceil((y(i-4)pixel+y(i-5)pixel+y(i-6)pixel+y(i-7)pixel)/4)i>8 and i is an even number
Wherein, x (i)pixelData indicating a point corresponding to an ith pixel of image data to be compressed, y (i)pixelFor indicating pairs x (i)pixelAnd (4) carrying out wavelet transformation on the obtained data, wherein the ceil function is used for indicating an upward rounding function.
Optionally, the method for receiving image data to be compressed includes: and receiving the image data to be compressed in parallel.
Optionally, the method for performing quantization processing on the transformed data includes: and quantizing the transformed data by adopting a uniform quantization method to obtain a uniform quantization coefficient.
Optionally, after performing zero run length coding on the quantized coefficient to obtain compressed image data, the method further includes: and outputting the compressed image data in parallel.
In a second aspect, the present invention further provides an interface circuit, where the interface circuit is configured in the MIPI interface;
and the interface circuit comprises a compression circuit for performing the compression method as described in the first aspect above.
Optionally, the compression circuit includes:
the wavelet transformation module is used for receiving image data to be compressed and carrying out one-dimensional wavelet transformation on the image data to be compressed by utilizing a one-dimensional wavelet transformation method to obtain transformed data;
the quantization module is used for performing quantization processing on the transformed data to obtain a quantization coefficient;
and the coding module is used for carrying out zero run coding on the quantized coefficient to obtain compressed image data.
Optionally, the wavelet transform module includes a phase filter composed of a combination of a 3-tap low-pass filter and a 1-tap high-pass filter.
Optionally, the interface circuit further includes a sending module and a control interface;
the sending module is connected with the compression circuit and used for receiving compressed image data sent by the compression circuit in parallel and outputting the compressed image data in parallel;
the control interface is connected with the compression circuit and used for sending configuration information to the compression circuit, wherein the configuration information comprises the compression type of the image data to be compressed.
In summary, in the compression method and the interface circuit for image data provided by the present invention, when the compression method is used to compress image data, one-dimensional wavelet transform is performed on each pixel point of the image data to be compressed to obtain transformed data, then quantization processing is performed on the transformed data to obtain a quantization coefficient, and finally zero-run coding is performed on the quantization coefficient to obtain the compressed image data. Therefore, when the data is compressed, each pixel point is compressed and coded in a clock pipeline-based mode, the requirement on the correlation among the pixel points is low, namely, when each pixel point is coded, coding is not needed based on the coding results of other pixel points, and the phenomenon that when a certain pixel point is coded, the coding result of the previous pixel point needs to be decoded first to obtain a decoding value and then the coding is carried out can not occur. Therefore, when a plurality of pixel points are input by adopting multiple channels, the plurality of pixel points can be coded simultaneously, and the coding results of the pixel points can be simultaneously obtained and then simultaneously output, so that the delay is reduced, the coding efficiency and the output frequency are improved, and high-frequency output can be realized.
In addition, in this embodiment, when each pixel is encoded, since the encoding result of other pixels does not need to be applied, the encoding results of other pixels do not need to be stored. Compared with the coding result of the previous pixel point of the current pixel point and the decoding value corresponding to the coding result which need to be stored in the related technology, the compression method of the invention can also reduce the storage space.
In addition, the one-dimensional wavelet transform method adopted in the invention has a simple realization mode of performing wavelet transform on image data to be compressed, and can reduce the calculation amount without applying a multiplier.
Drawings
Fig. 1 is a schematic diagram of a compression circuit of image data provided in the related art;
fig. 2 is a flowchart of a method for compressing image data according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an image data compression circuit according to an embodiment of the present invention;
fig. 4 is an interface circuit according to an embodiment of the present invention.
Detailed Description
The following describes the compression method, compression circuit, and interface circuit of the image data according to the present invention in further detail with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description. It is to be noted that the drawings are in a very simplified form and are not to precise scale, which is merely for the purpose of facilitating and distinctly claiming the embodiments of the present invention.
Fig. 2 is a flowchart of a method for compressing image data according to an embodiment of the present invention, and as shown in fig. 2, the method may include:
step 100, receiving image data to be compressed, and performing one-dimensional wavelet transform on the image data to be compressed by using a one-dimensional wavelet transform method to obtain transformed data.
The image data to be compressed may be original image data sent by an external camera, or may be test image data sent by an internal test module. Specifically, before the compression circuit is used to compress and encode the original image data sent by the external camera, the compression circuit may send the test image data to the compression circuit first, so that the compression circuit compresses and encodes the test image data to obtain an encoding result, and determines whether the compression circuit successfully compresses the test image data based on the encoding result, so as to further determine whether the compression circuit normally operates, thereby ensuring that the original image data sent by the external camera can be subsequently compressed successfully and accurately.
In this embodiment, the image data to be compressed is received in parallel through multiple channels, and after the wavelet transform is performed to obtain transformed data, the transformed data corresponding to each pixel point is also sent out in parallel through multiple channels.
Further, in the present embodiment, the one-dimensional wavelet transform method mainly includes 3/1 wavelet transform method, and the 3/1 wavelet transform method adopted in the present embodiment is not the conventional 3/1 wavelet transform method, but is modified 3/1 wavelet transform method to be suitable for the interactive manner of simultaneous reception and simultaneous transmission by multiple channels in the present embodiment. Specifically, in this embodiment, an interactive mode that employs four channels to simultaneously receive and simultaneously transmit is taken as an example for explanation, and a calculation formula of the improved 3/1 wavelet transform method employed in this embodiment is as follows:
y(i)pixel=x(i)pixeli≤8 ①
y(i)pixel=x(i)pixel-ceil((x(i-1)pixel+x(i+1)pixel)/2)i>8 and i is odd ②
y(i)pixel=x(i)pixel+ceil((y(i-4)pixel+y(i-5)pixel+y(i-6)pixel+y(i-7)pixel)/4)i>8 and i is even ③
Wherein, x (i)pixelData indicating a point corresponding to an ith pixel of image data to be compressed, y (i)pixelFor indicating pairs x (i)pixelData obtained after wavelet transformation, ceil (z) function being used to refer toIndicating an upward rounding function, wherein the upward rounding function is: when z is a decimal, 1 is added to the integer ceil (z) z, for example, when z is 1.1, ceil (z) 1+ 1-2.
And, in this embodiment, the above formula (c) corresponds to an image prediction operation, and the above formula (c) corresponds to an image update operation.
Based on this, in this embodiment, the method for performing one-dimensional wavelet transform on the image data to be compressed by using the one-dimensional wavelet transform method to obtain the transformed data may specifically include: and calculating each pixel point of the image data to be compressed based on the formula (I) to the formula (III) to obtain transformed data. Specifically, the first 8 pixels of the image data to be compressed may be calculated based on a formula, and subsequent pixels may be processed separately in odd and even manner, wherein an odd pixel after the first 8 pixels may be calculated based on a pixel immediately before and a pixel immediately after the odd pixel, and an even pixel after the first 8 pixels may be calculated based on data after wavelet transformation of a fourth pixel before, a fifth pixel before, a sixth pixel before, and a seventh pixel before. In this way, the data of each pixel point of the image data to be compressed can be calculated to obtain the transformed data.
And, it should be noted that, for the interactive mode of parallel receiving and parallel sending data of four channels, the method of performing wavelet transform by using the above formula has low delay and can ensure high frequency output. Specifically, every four pixel points in the image data to be compressed are divided into one group according to the sequence, and each group of pixel points are respectively input into the compression circuit along four channels in parallel to perform wavelet transformation. As can be seen from formula (i), the data after wavelet transform corresponding to the first 8 pixel points should be the data corresponding to each pixel point, and then it can be determined that: when the wavelet transformation is carried out on the first 8 pixel points, the data after the wavelet transformation of a certain pixel point is not required to be applied, so that the phenomenon that when the wavelet transformation is carried out on the current pixel point, the wavelet transformation is carried out on the current pixel point only after the wavelet transformation is carried out on the certain pixel point is waited for firstly can be avoided.
And a formula II shows that when wavelet transformation is performed on the odd pixel point after the 8 th pixel point, the wavelet transformation is mainly performed on the basis of the data of the pixel point immediately before and the data of the pixel point immediately after the current odd pixel point, so that the calculation is not required to be performed on the data of the pixel point before or after the wavelet transformation of the current odd pixel point, and the phenomenon that when the wavelet transformation is performed on the current odd pixel point, the wavelet transformation is performed on the current odd pixel point only after the wavelet transformation is performed on a certain pixel point is avoided.
Meanwhile, based on the formula III, when wavelet transformation is performed on the even-numbered pixel points after the 8 th pixel point, the wavelet transformation is mainly performed on the wavelet-transformed data of the fourth pixel point before the current even-numbered pixel point, the fifth pixel point before the current even-numbered pixel point, the sixth pixel point before the current even-numbered pixel point and the seventh pixel point before the current even-numbered pixel point. In this embodiment, since four channels are mainly input simultaneously, that is, four pixels are input at a time, the fourth pixel before the current even pixel, the fifth pixel before, the sixth pixel before, and the seventh pixel before are certainly not input to the compression circuit simultaneously with the current even pixel, and should be input to the four pixels in the compression circuit in parallel at the previous time of the current even pixel. Correspondingly, the wavelet transformation of the fourth pixel point before the current even pixel point, the fifth pixel point before the current even pixel point, the sixth pixel point before the current even pixel point and the seventh pixel point before the current even pixel point is also executed in the previous time when the current even pixel point is input into the compression circuit, at this time, the data after the wavelet transformation of the fourth pixel point before the current even pixel point, the fifth pixel point before the current even pixel point, the sixth pixel point before the current even pixel point and the seventh pixel point before the current even pixel point can be directly obtained when the wavelet transformation is carried out on the current even pixel point, and the phenomenon that the wavelet transformation is carried out after the wavelet transformation is carried out on the current even pixel point is waited for the pixel point input at the same time first can.
It can be known from the above content that the 3/1 wavelet transform method adopted in this embodiment does not need to apply data after wavelet transform of other pixel points input at the same time when performing wavelet transform on each pixel point input in parallel at the same time, so that the correlation of the operation of wavelet transform between each pixel point input at the same time is small, and then the wavelet transform can be performed on each pixel point input at the same time, thereby reducing the delay of performing wavelet transform between each pixel point input at the same time, and ensuring that high-frequency output can be realized.
In the present embodiment, the 3/1 wavelet transform method executed based on the formulas (i) to (iii) mainly performs integer transform on each pixel point, so that the calculation amount can be reduced, wherein compared with the conventional 3/1 wavelet transform method, the 3/1 wavelet transform method in the present embodiment can reduce half of the calculation amount. Moreover, after the 3/1 wavelet transform method provided by the embodiment is adopted, accurate reconstruction can be realized during subsequent decoding, and data is ensured not to be distorted.
In addition, in this embodiment, as can be seen from the above formula (i) to formula (iii), when the image data to be compressed is transformed by the one-dimensional wavelet transform method, there is no multiplication operation, and it is not necessary to apply the multiplication operation to the multiplier, so that the operation difficulty and the operation amount can be greatly reduced.
And, after wavelet transformation is performed on image data to be compressed, redundancy among image pixels can be reduced.
And 200, performing quantization processing on the transformed data to obtain a quantization coefficient.
The quantization processing may specifically be uniform quantization processing, where the uniform quantization processing specifically refers to dividing the transformed data into at least one quantization interval at equal intervals, then performing quantization processing on the data in each quantization interval to obtain a quantization result corresponding to each quantization interval, where the quantization result may be, for example, an average value of the data in each quantization interval, and finally, combining the quantization results corresponding to each quantization interval to obtain a uniform quantization coefficient.
And, in the present embodiment, visual redundancy of image data can be eliminated by quantization processing.
And step 300, performing zero run length coding on the quantized coefficient to obtain compressed image data.
Wherein, the zero run coding specifically comprises: and recording the code value and the number of continuous repetitions of the code aiming at the repeated code so as to realize data compression. For example, if the quantized coefficient obtained in step 300 is 1111100000011111100000, which includes four consecutive repeats of data, "11111" in the first consecutive repeat, and the length of the consecutive repeats is 5, the zero-run code corresponding to the first consecutive repeat of data should be (1, 5); the second segment of continuously repeated data is "000000", and the length of the continuous repetition is 6, then the zero run length code corresponding to the second segment of continuously repeated data should be (0, 6); and calculating the zero run length code corresponding to each continuously repeated data segment by analogy, and combining each continuously repeated data segment to obtain the final zero run length code, namely: (1, 5) (0, 6) (1, 6) (0, 5) to implement zero run coding of quantized coefficients.
Wherein redundancy can be probabilistically eliminated by performing zero-run coding. And the zero run length coding is mainly a statistical coding, which is lossless coding, so that the compression loss ratio can be ensured to a great extent when coding is carried out by using a zero run length coding mode, and the data distortion after coding is prevented.
In addition, in the embodiment, the data after the wavelet transform is quantized and then encoded, so that the number of samples can be reduced to a great extent, and the compression ratio of the image can be improved.
As can be seen from the above, the compression method of image data provided in this embodiment mainly encodes the image data to be compressed by performing steps 100 to 300. It should be noted that the compression method provided in this embodiment should be suitable for compressing image data of various types and sizes, for example, in this embodiment, the data type of the image data to be compressed may be one of RAW8, RAW10, and RAW12, and the data size of the image data to be compressed may be equal to or less than 4M.
In addition, in this embodiment, the compression type of the compression method may be set in advance. The compression type mainly limits the bit width of the pixel points before compression, the bit width of the pixel points after compression and the bit width of the pixel points after decompression. For example, the compression type may be indicated as X-Y-Z, where X represents a pixel bit width before compression, Y represents a pixel bit width after compression, and Z represents a pixel bit width after decompression. Then, in this embodiment, the compression type may be, for example: 12-8-12, 12-7-12, 12-6-12, 10-8-10, 10-7-10, 10-6-10, 8-6-8, 8-7-8.
It should be noted that, in this embodiment, the wavelet transform operation, the uniform quantization process, and the zero run length coding may be performed within one clock beat, where a compression period of each clock beat may be specifically calculated by using sequential logic. Therefore, when the compression method of the present invention is used to perform compression encoding on 1080P frames of image data to be compressed, 1920 × 1080 clock beats are required to complete the compression encoding. Based on this, the present embodiment can estimate the clock frequency of encoding the image data to be compressed by the number of clock beats.
In summary, in the method for compressing image data provided by the present invention, when compressing image data, one-dimensional wavelet transform is performed on each pixel point of the image data to be compressed to obtain transformed data, then quantization processing is performed on the transformed data to obtain a quantization coefficient, and finally zero-run coding is performed on the quantization coefficient to obtain the compressed image data. Therefore, when the data is compressed, each pixel point is compressed and coded in a clock pipeline-based mode, the requirement on the correlation among the pixel points is low, namely, when each pixel point is coded, coding is not needed based on the coding results of other pixel points, and the phenomenon that when a certain pixel point is coded, the coding result of the previous pixel point needs to be decoded first to obtain a decoding value and then the coding is carried out can not occur. Therefore, when a plurality of pixel points are input by adopting multiple channels, the plurality of pixel points can be coded simultaneously, and the coding results of the pixel points can be simultaneously obtained and then simultaneously output, so that the delay is reduced, the coding efficiency and the output frequency are improved, and the high-frequency output is realized. When an interactive mode of simultaneous input and simultaneous output of four channels is adopted, the output frequency of the compression method provided by the embodiment of the invention can be up to 6 Gbit/s.
In addition, in this embodiment, when each pixel is encoded, since the encoding result of other pixels does not need to be applied, the encoding results of other pixels do not need to be stored. Compared with the coding result of the previous pixel point of the current pixel point and the decoding value corresponding to the coding result which need to be stored in the related technology, the compression method of the invention can also reduce the storage space.
In addition, the one-dimensional wavelet transform method adopted in the invention has a simple realization mode of performing wavelet transform on image data to be compressed, and can reduce the calculation amount without applying a multiplier.
Further, fig. 3 is a schematic diagram of a compression circuit for image data according to an embodiment of the present invention, and as shown in fig. 3, the compression circuit may include:
the wavelet transformation module is used for receiving the image data to be compressed and carrying out one-dimensional wavelet transformation on the image data to be compressed by utilizing a one-dimensional wavelet transformation method to obtain transformed data.
And the quantization module is used for performing quantization processing on the transformed data to obtain a quantization coefficient.
And the coding module is used for carrying out zero run coding on the quantized coefficient to obtain compressed image data.
Alternatively, the wavelet transform module may be a phase filter composed of a combination of a 3-tap low-pass filter and a 1-tap high-pass filter. The wavelet transform module may specifically receive the image data to be compressed in parallel to perform one-dimensional wavelet transform on the image data to obtain transformed data, and then may output the transformed data to the quantization module in parallel. And, in this embodiment, the wavelet transform module may perform one-dimensional wavelet transform on the received image data to be compressed based on the formula (i) -c in step 100.
Optionally, the quantization module is configured to perform quantization processing on the transformed data by using a uniform quantization method to obtain a uniform quantization coefficient, and output the uniform quantization coefficient to the encoding module in parallel.
Optionally, the encoding module is further configured to output the compressed image data in parallel.
In addition, fig. 4 is an interface circuit according to an embodiment of the present invention, and as shown in fig. 4, the interface circuit includes the compression circuit shown in fig. 3.
Optionally, the interface circuit further includes a sending module connected to the compression circuit, and configured to receive compressed image data sent by the compression circuit in parallel, and output the compressed image data in parallel and at high frequency through a physical interface.
Optionally, the interface circuit further includes a control interface connected to the compression circuit and the sending module, where the control interface is configured to send configuration information to the compression circuit, where the configuration information includes a compression type of a compression method. The control interface can control the compression type of the image data to be compressed, and the compression type mainly limits the bit width of the pixel points before compression, the bit width of the pixel points after compression and the bit width of the pixel points after decompression. Specifically, the compression type may be indicated as X-Y-Z, where X represents a pixel bit width before compression, Y represents a pixel bit width after compression, and Z represents a pixel bit width after decompression. And in this embodiment, the compression type may be, for example: 12-8-12, 12-7-12, 12-6-12, 10-8-10, 10-7-10, 10-6-10, 8-6-8, 8-7-8
Optionally, the control interface may include an I2C interface.
Optionally, the interface circuit may further include an internal test module connected to the compression circuit, and configured to send test image data to a wavelet transform module in the compression circuit, so that the compression circuit performs compression coding on the test image data to test whether the compression circuit of the image data operates normally. The method for testing whether the compression circuit normally works according to the test image data may specifically refer to the description in step 100, which is not described herein again in this embodiment.
Optionally, in this embodiment, the control interface is further configured to be connected to the internal test module, so as to configure a data type and a data size of the test image data, where the data type of the test image data may be one of RAW8, RAW10, and RAW12, and the data size of the test image data may be less than or equal to 4M.
Optionally, the interface circuit may be specifically configured in the MIPI interface. The MIPI can support four-channel parallel input and four-channel parallel output at most, the clock frequency of the four-channel parallel input can reach 187.5Mhz at most, the bit rate of each channel output can reach 1.5Gbit/s, and the bit rate of the four-channel parallel output can reach 6Gbit/s at most.
Optionally, the compression circuit is further configured to receive original image data sent by an external camera, so as to compress the original image data.
In summary, in the method for compressing image data and the interface circuit provided by the present invention, when compressing image data, one-dimensional wavelet transform is performed on each pixel point of the image data to be compressed to obtain transformed data, then quantization processing is performed on the transformed data to obtain a quantization coefficient, and finally zero run coding is performed on the quantization coefficient to obtain the compressed image data. Therefore, when the data is compressed, each pixel point is compressed and coded in a clock pipeline-based mode, the requirement on the correlation among the pixel points is low, namely, when each pixel point is coded, coding is not needed based on the coding results of other pixel points, and the phenomenon that when a certain pixel point is coded, the coding result of the previous pixel point needs to be decoded first to obtain a decoding value and then the coding is carried out can not occur. Therefore, when a plurality of pixel points are input by adopting multiple channels, the plurality of pixel points can be coded simultaneously, and the coding results of the pixel points can be simultaneously obtained and then simultaneously output, so that the delay is reduced, the coding efficiency and the output frequency are improved, and high-frequency output can be realized.
In addition, in this embodiment, when each pixel is encoded, since the encoding result of other pixels does not need to be applied, the encoding results of other pixels do not need to be stored. Compared with the coding result of the previous pixel point of the current pixel point and the decoding value corresponding to the coding result which need to be stored in the related technology, the compression method of the invention can also reduce the storage space.
In addition, the one-dimensional wavelet transform method adopted in the invention has a simple realization mode of performing wavelet transform on image data to be compressed, and can reduce the calculation amount without applying a multiplier.
The compression circuit and the interface circuit provided by the invention are simple and occupy small area, and meanwhile, the interface circuit can compatibly receive various data types through an external configurable register, so that various types of data can be compressed and coded.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The above description is only for the purpose of describing the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention, and any variations and modifications made by those skilled in the art based on the above disclosure are within the scope of the appended claims.

Claims (10)

1. A method of compressing image data, the method comprising:
receiving image data to be compressed, and performing one-dimensional wavelet transform on the image data to be compressed by using a one-dimensional wavelet transform method to obtain transformed data;
performing quantization processing on the transformed data to obtain a quantization coefficient;
and carrying out zero run coding on the quantized coefficient to obtain compressed image data.
2. A method of compressing image data as claimed in claim 1, wherein said one-dimensional wavelet transform method comprises an 3/1 wavelet transform method.
3. The method of compressing image data according to claim 2, wherein the method of performing one-dimensional wavelet transform on the image data to be compressed using the one-dimensional wavelet transform method comprises:
providing a formula, and performing wavelet transformation on each pixel point of the image data to be compressed by using the formula to obtain the transformed data;
y(i)pixel=x(i)pixeli≤8
y(i)pixel=x(i)pixel-ceil((x(i-1)pixel+x(i+1)pixel)/2) i>8 and i is an odd number
y(i)pixel=x(i)pixel+ceil((y(i-4)pixel+y(i-5)pixel+y(i-6)pixel+y(i-7)pixel)/4) i>8 and i is an even number
Wherein, x (i)pixelData indicating a point corresponding to an ith pixel of image data to be compressed, y (i)pixelFor indicating pairs x (i)pixelAnd (4) carrying out wavelet transformation on the obtained data, wherein the ceil function is used for indicating an upward rounding function.
4. The method of compressing image data according to claim 1, wherein the method of receiving the image data to be compressed includes: and receiving the image data to be compressed in parallel.
5. The method of compressing image data according to claim 1, wherein the method of quantizing the transformed data includes: and quantizing the transformed data by adopting a uniform quantization method to obtain a uniform quantization coefficient.
6. The method of compressing image data according to claim 1, wherein after zero-run coding said quantized coefficients to obtain compressed image data, said method further comprises: and outputting the compressed image data in parallel.
7. An interface circuit, wherein the interface circuit is configured in a MIPI interface;
and the interface circuit comprises a compression circuit for performing the compression method according to any one of claims 1-6.
8. The interface circuit of claim 7, wherein the compression circuit comprises:
the wavelet transformation module is used for receiving image data to be compressed and carrying out one-dimensional wavelet transformation on the image data to be compressed by utilizing a one-dimensional wavelet transformation method to obtain transformed data;
the quantization module is used for performing quantization processing on the transformed data to obtain a quantization coefficient;
and the coding module is used for carrying out zero run coding on the quantized coefficient to obtain compressed image data.
9. An interface circuit as in claim 8, where said wavelet transform module comprises a phase filter consisting of a combination of a 3-tap low pass filter and a 1-tap high pass filter.
10. The interface circuit of claim 7, wherein the interface circuit further comprises a transmit module and a control interface;
the sending module is connected with the compression circuit and used for receiving compressed image data sent by the compression circuit in parallel and outputting the compressed image data in parallel;
the control interface is connected with the compression circuit and used for sending configuration information to the compression circuit, wherein the configuration information comprises the compression type of the image data to be compressed.
CN202010538066.1A 2020-06-12 2020-06-12 Image data compression method and interface circuit Active CN111683258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010538066.1A CN111683258B (en) 2020-06-12 2020-06-12 Image data compression method and interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010538066.1A CN111683258B (en) 2020-06-12 2020-06-12 Image data compression method and interface circuit

Publications (2)

Publication Number Publication Date
CN111683258A true CN111683258A (en) 2020-09-18
CN111683258B CN111683258B (en) 2022-04-22

Family

ID=72454110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010538066.1A Active CN111683258B (en) 2020-06-12 2020-06-12 Image data compression method and interface circuit

Country Status (1)

Country Link
CN (1) CN111683258B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114297110A (en) * 2021-12-28 2022-04-08 上海集成电路装备材料产业创新中心有限公司 MIPI signal decoding method, device and chip thereof

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020059923A (en) * 2001-01-09 2002-07-16 정우영 Apparatus and method for compressing and depressing movable images using Wavelet theory
CN101421934A (en) * 2003-09-30 2009-04-29 德罗普莱特科技公司 The system and method that is used for the control of out of order compression of time and multiple source compression speed
CN101493945A (en) * 2009-03-13 2009-07-29 北京航空航天大学 Point interference image compression method and device based on wavelet transform
CN101534439A (en) * 2008-03-13 2009-09-16 中国科学院声学研究所 Low power consumption parallel wavelet transforming VLSI structure
US20100086029A1 (en) * 2008-10-03 2010-04-08 Qualcomm Incorporated Video coding with large macroblocks
CN101867809A (en) * 2010-04-09 2010-10-20 中国科学院光电技术研究所 High-speed image compression VLSI coding method based on systolic array, and encoder
CN102970545A (en) * 2012-12-11 2013-03-13 东南大学 Static image compression method based on two-dimensional discrete wavelet transform algorithm
US20130163892A1 (en) * 2011-12-21 2013-06-27 Sony Corporation Image processing apparatus and image processing method
CN106558084A (en) * 2016-12-11 2017-04-05 天津君邦科技有限公司 Compression method of geographic information image

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020059923A (en) * 2001-01-09 2002-07-16 정우영 Apparatus and method for compressing and depressing movable images using Wavelet theory
CN101421934A (en) * 2003-09-30 2009-04-29 德罗普莱特科技公司 The system and method that is used for the control of out of order compression of time and multiple source compression speed
CN101534439A (en) * 2008-03-13 2009-09-16 中国科学院声学研究所 Low power consumption parallel wavelet transforming VLSI structure
US20100086029A1 (en) * 2008-10-03 2010-04-08 Qualcomm Incorporated Video coding with large macroblocks
CN101493945A (en) * 2009-03-13 2009-07-29 北京航空航天大学 Point interference image compression method and device based on wavelet transform
CN101867809A (en) * 2010-04-09 2010-10-20 中国科学院光电技术研究所 High-speed image compression VLSI coding method based on systolic array, and encoder
US20130163892A1 (en) * 2011-12-21 2013-06-27 Sony Corporation Image processing apparatus and image processing method
CN102970545A (en) * 2012-12-11 2013-03-13 东南大学 Static image compression method based on two-dimensional discrete wavelet transform algorithm
CN106558084A (en) * 2016-12-11 2017-04-05 天津君邦科技有限公司 Compression method of geographic information image

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114297110A (en) * 2021-12-28 2022-04-08 上海集成电路装备材料产业创新中心有限公司 MIPI signal decoding method, device and chip thereof

Also Published As

Publication number Publication date
CN111683258B (en) 2022-04-22

Similar Documents

Publication Publication Date Title
EP1913698B1 (en) Efficient coding and decoding of transform blocks
US10499086B2 (en) Video data encoding and decoding methods and apparatuses
US7664184B2 (en) Interpolation image compression
EP0084270A2 (en) Video bandwidth reduction system employing interframe block differencing and transform domain coding
EP1341385A1 (en) System and method for using pattern vectors for video and image coding and decoding
EP3108583B1 (en) Devices and methods of source-encoding and decoding of data
EP1787477A1 (en) System and method for compression of mixed graphic and video sources
US11863799B2 (en) Image encoding method and apparatus, image decoding method and apparatus, and chip
KR101037421B1 (en) Image data compression device, compression method, recording medium having program recorded, and image data decompression device, decompression method, and recording medium having program recorded
CN103873877A (en) Image transmission method and device for remote desktop
CN111683258B (en) Image data compression method and interface circuit
US20040037461A1 (en) Adaptive method and system for mapping parameter values to codeword indexes
KR20100079121A (en) Image encoder and image encoding method
CN101729901A (en) System and method for image compression
US20100002946A1 (en) Method and apparatus for compressing for data relating to an image or video frame
CN112449191A (en) Method for compressing a plurality of images, method and apparatus for decompressing an image
CN116582689A (en) Lossless compression for low-latency video transmission in resource-constrained coding environments
JPH01171324A (en) High efficient encoder
JPH0748859B2 (en) Predictive coding method for television signals
Vo Image Compression Using Burrows-Wheeler Transform
WO2024007843A9 (en) Encoding method and apparatus, decoding method and apparatus, and computer device
JPH11338853A (en) Image coding method
JP2002209111A (en) Image encoder, image communication system and program recording medium
KR0185849B1 (en) The variable length encoder
CN115802050A (en) Image compression and decompression method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant