CN114727110A - Data processing method and system - Google Patents

Data processing method and system Download PDF

Info

Publication number
CN114727110A
CN114727110A CN202110008566.9A CN202110008566A CN114727110A CN 114727110 A CN114727110 A CN 114727110A CN 202110008566 A CN202110008566 A CN 202110008566A CN 114727110 A CN114727110 A CN 114727110A
Authority
CN
China
Prior art keywords
frame
boundary
data
adjustment
initial
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.)
Pending
Application number
CN202110008566.9A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202110008566.9A priority Critical patent/CN114727110A/en
Priority to US17/525,900 priority patent/US20220078417A1/en
Priority to US17/727,791 priority patent/US20220272325A1/en
Publication of CN114727110A publication Critical patent/CN114727110A/en
Pending legal-status Critical Current

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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Abstract

The method and system for processing data provided by the specification can perform boundary adjustment and coding spectrum adjustment on initial data so as to enhance the boundary in a preset range in an initial frame, stably reduce the amplitude of a selected area in the initial frame, reduce the data information amount, improve the efficiency of data compression, reduce data loss and avoid detail loss. When the compressed data is decompressed, the parameters corresponding to the coding spectrum adjustment are used for carrying out decoding spectrum adjustment on the compressed data, boundary correction is carried out on boundary information in a preset range so as to eliminate noise, and noise is reduced while the data is recovered, so that the decompressed data is clearer. The method and the system can improve the compression efficiency of the data, improve the transmission efficiency, reduce the data loss and simultaneously improve the definition of the decompressed data.

Description

Data processing method and system
Technical Field
The present disclosure relates to the field of data processing, and more particularly, to a method and system for data processing.
Background
With the increasing popularity of internet technology, especially mobile terminals, communication networks have emerged with more and more types of data, and with the popularity of computers, more and more data are occupying more and more network and storage resources, such as video data, audio data, and so on. The data often contains huge information amount, and the requirements for storage and transmission are often high, so for convenience of storage and transmission, the data is often required to be compressed, and the compressed data is decompressed and restored when needed. Accordingly, data compression and decompression techniques are increasingly used.
For example, video and image compression techniques have been increasingly used over the past few decades. Video often contains a significant amount of information. From traditional broadcast movie television to today's mass surveillance and internet applications, compressed image video and images are occupying increasing network and storage resources. This makes it possible to occupy a large amount of network resources if the raw data of a piece of video is transmitted from one terminal to another terminal via the network. This makes it difficult to achieve smooth transmission of pictures in some cases of real-time video transmission. Therefore, the video data is first compressed at the data compression device before being transmitted, so as to facilitate transmission. After the compressed video is transmitted to the data decompression device via the transmission medium, the data decompression device decompresses the video to at least partially restore the video image.
The major video compression standards in the prior art are the h.264 and h.265 standards. Before transmission, the video is generally compressed by an encoder according to h.264 and h.265 standards, and then decompressed by a decoder according to h.264 and h.265 standards. However, the above processing method of compressing a video as a whole still does not satisfactorily balance the amount of calculation and the sharpness of the video after decompression. This is because the h.264 and h.265 standards generate predicted frames of original frames through various complicated algorithms when processing the original video, and then record a residual between the original frames and the predicted frames. The closer the predicted frame is to the original frame, the smaller the residual error and the smaller the amount of data after encoding a segment of video. In order to make encoding easier, a common method is to reduce high frequency information in the original frame image by filtering the original frame. As known from fourier transform, frequency information of a boundary portion of an object in a picture is often relatively abundant, and a high-frequency component of the boundary portion is generally larger than that of other gentle areas. Thus, the frame image with reduced high frequency information is visually blurred (i.e., the sharpness of the image is reduced), but the residual between the predicted frame and the filtered original frame can be made smaller. Thus, the amount of calculation required for video coding and the coded data stream are reduced greatly. However, the techniques for frame prediction are very complex and occupy a large amount of computational resources. Taking a video coding and decoding system as an example, the amount of calculation is increased by about 10 times for each 30% -40% improvement of the coding efficiency. Meanwhile, the transmitted data is decompressed and has reduced definition, and various noises such as blocking effect or ringing effect are often present. The blocking effect refers to a phenomenon that in image processing, a discontinuous phenomenon occurs at an image boundary based on Fourier transform of a block. The ringing effect means that when an image is subjected to spectrum adjustment processing in image processing, if a selected spectrum adjustment function has a relatively fast change in numerical value (that is, an area with a severe derivative change exists), the output image generates gray level oscillation at a position with severe gray level change, and the output image is like air oscillation generated after a clock is knocked. The noise is much present at the image boundaries. If an output image has strong noise, the requirement of people for increasing definition of data cannot be met. Therefore, how to further improve the compression efficiency of data, improve the definition of decompressed data, and eliminate noise is always the goal pursued in the technical field of data compression and decompression.
Therefore, in order to improve the transmission efficiency of data and the clarity of the decompressed data, a method and a system for processing the data with higher compression efficiency and clearer data decompression are needed.
Disclosure of Invention
The present specification provides a method and system for data processing with higher compression efficiency and clearer data decompression. Taking video data as an example, the data processing method and system can adjust the boundary in a small range in an initial frame in initial video data through a gamma algorithm in the small range, so as to avoid the loss of boundary information in the small range with small difference between adjacent pixel points in an image in the process of data compression (prediction and residual solution), and avoid detail loss; meanwhile, the method and the system can perform coding spectrum adjustment on the initial frame, so that the signal intensity of the initial frame in the selected frequency domain is reduced, the amplitude of the selected frequency domain in the initial frame is stably reduced, and the data information amount is reduced. And then coding (predicting and solving residual errors) the data after the frequency spectrum adjustment to obtain a compressed frame, so that the efficiency of data compression is improved. The coding spectrum adjustment can reduce the data information amount in the initial frame, and can improve the efficiency of data compression when prediction and residual calculation are carried out. The method and system may perform decoded spectral adjustment and boundary correction on the compressed frame while data decompression is in progress. The method and the system can decode the compressed frame firstly, then use the parameter corresponding to the encoding end to perform decoding frequency spectrum adjustment on the decoded data, the decoding frequency spectrum adjustment can filter the components of the intermediate frequency and the high frequency region in the decoded data to obtain the data which is more fuzzy than the decoded data, and the decoded data and the data filtered out the intermediate frequency and the high frequency region after the decoding frequency spectrum adjustment are subtracted to obtain the boundary information in the initial frame; then the method and the system can weaken the boundary in the small range in the boundary information through a gamma algorithm in the small range so as to carry out the boundary correction to eliminate the noise in the boundary information; finally, the method and the system can obtain the decompressed frame by overlapping the boundary information after noise reduction and the decoded data. The decoding spectrum adjustment corresponds to the coding spectrum adjustment, and a corresponding relation exists between the coding spectrum adjustment function and the decoding spectrum adjustment function, so that the definition of the compressed data subjected to the coding spectrum adjustment can be restored to the initial frame and even higher than that of the initial frame. That is, without significantly increasing the amount of calculation of the codec, the decoding side needs to restore at least the data of the decompressed data in the important frequency to the definition of the initial frame, and can even obtain the definition exceeding the definition of the initial frame. Because the original frame is only subjected to signal attenuation in the frequency domain instead of filtering in the frequency domain in the important frequency region, and information in the important frequency region is not lost, the encoding spectrum adjusting function and the decoding spectrum adjusting function can be designed according to the relationship between the encoding spectrum adjusting function and the decoding spectrum adjusting function and respective characteristics, and the information in the important frequency in the original frame is recovered. The method and the system can obviously improve the compression efficiency of the data, improve the transmission efficiency of the data, reduce the data loss, avoid the detail loss, eliminate the noise and improve the definition of the decompressed data.
Based on this, in a first aspect, the present specification provides a method of data processing, comprising: selecting an initial frame in initial data, wherein the initial frame comprises initial data with preset byte number; and performing data compression on the initial frame to obtain a compressed frame, wherein the data compression comprises performing boundary adjustment on the initial frame and performing coding spectrum adjustment on a compressed frame, and the compressed frame comprises any data state before the initial frame and the initial frame become the compressed frame in the data compression process, wherein the coding spectrum adjustment comprises using a coding convolution kernel to convolute the compressed frame so as to smoothly reduce the amplitude of the intermediate frequency region of the compressed frame in the frequency domain.
In some embodiments, the boundary adjustment includes adjusting a boundary of the initial frame, in which a boundary value is within a first preset range, by a first gamma algorithm in which a gamma value is less than 1.
In some embodiments, the data compressing the initial frame comprises: performing the boundary adjustment on the initial frame, and then performing the coding spectrum adjustment; or the coding spectrum adjustment is performed on the initial frame first, and then the boundary adjustment is performed.
In some embodiments, said boundary adjustment prior to said code spectrum adjustment for said initial frame comprises: performing the boundary adjustment on the initial frame to obtain a first enhanced frame; and performing the coded spectral modification and coding on the first enhancement frame, including one of: performing the coding spectrum adjustment on the first enhancement frame, and then predicting and calculating a residual error on the first enhancement frame after the coding spectrum adjustment, wherein the compressed frame comprises the first enhancement frame; predicting the first enhancement frame to obtain a prediction frame, and then performing the coding spectrum adjustment and residual calculation on the first enhancement frame and the prediction frame, wherein the on-press frame comprises the first enhancement frame and the prediction frame; and predicting and solving a residual error of the first enhanced initial frame, and then performing the coded spectrum adjustment on the residual error, wherein the compressed frame comprises the residual error.
In some embodiments, the performing the boundary adjustment on the initial frame to obtain a first enhanced frame includes: adjusting the initial frame through a first adjusting function to obtain a first frame, so that the component of the initial frame in a low-frequency region in a frequency domain is reserved and the component of a middle-frequency region to a high-frequency region is attenuated; obtaining a first boundary by subtracting the initial frame and the first frame, wherein the first boundary comprises boundary information of the initial frame; adjusting the boundary of which the boundary value is within the first preset range in the first boundary through the first gamma algorithm to obtain an enhanced boundary; and overlapping the first frame and the enhanced boundary to obtain the first enhanced frame.
In some embodiments, before the obtaining the enhanced boundary, the performing the boundary adjustment on the initial frame to obtain a first enhanced frame further includes: and enhancing the first boundary by a first coefficient, wherein the first coefficient is an arbitrary number greater than 1, and the first boundary comprises the boundary enhanced by the first coefficient.
In some embodiments, the adjusting the boundary of the first boundary whose boundary value is within the first preset range to obtain an enhanced boundary includes: adjusting the first boundary through a second adjusting function to obtain a second boundary, so that the component of the first boundary in a low-frequency region in a frequency domain is reserved and the component of a medium-frequency region to a high-frequency region is attenuated; and adjusting the boundary of which the boundary value is within the first preset range in the second boundary through the first gamma algorithm to obtain the enhanced boundary.
In some embodiments, said performing said code spectrum adjustment prior to said boundary adjustment for said initial frame comprises: performing the coding spectrum adjustment on the initial frame to obtain a coding spectrum adjustment frame; performing the boundary adjustment on the coding frequency spectrum adjustment frame to obtain a second enhancement frame; and predicting and residual solving the second enhanced frame.
In some embodiments, said performing said boundary adjustment on said encoded spectral adjustment frame to obtain a second enhancement frame comprises: obtaining a first boundary by subtracting the initial frame and the coding spectrum adjustment frame, wherein the first boundary comprises boundary information of the initial frame; adjusting the boundary of which the boundary value is within the first preset range in the first boundary through the first gamma algorithm to obtain an enhanced boundary; the enhancement boundary and the first boundary are subjected to difference calculation to obtain an adjustment value; and superposing the coding frequency spectrum adjusting frame and the adjusting value to obtain the second enhancement frame.
In some embodiments, said boundary adjusting said encoded spectral adjustment frame prior to said deriving an enhancement boundary, resulting in a second enhancement frame, further comprises: and enhancing the first boundary by a first coefficient, wherein the first coefficient is an arbitrary number greater than 1, and the first boundary comprises the boundary enhanced by the first coefficient.
In some embodiments, the adjusting the boundary of the first boundary whose boundary value is within the first preset range to obtain an enhanced boundary includes: adjusting the first boundary through a second adjusting function to obtain a second boundary, so that the component of the first boundary in a low-frequency region in a frequency domain is reserved and the component of a medium-frequency region to a high-frequency region is attenuated; and adjusting the boundary of which the boundary value is within the first preset range in the second boundary through the first gamma algorithm to obtain the enhanced boundary.
In some embodiments, the performing encoded spectral conditioning on the on-press frame comprises: determining a frame type of the initial frame, the frame type comprising at least one of an intra-predicted frame, a forward-predicted frame, and a bi-directionally predicted frame; and selecting one convolution kernel from a coding convolution kernel group as the coding convolution kernel to convolute the compressed frame based on the frame type of the initial frame.
In some embodiments, said convolving the compressed frame includes: and performing convolution on the compressed frame in at least one direction of a vertical direction, a horizontal direction and an oblique direction.
In some embodiments, the encoded spectral adjustment is such that the amplitude of the on-frame high frequency region is reduced smoothly in the frequency domain.
In some embodiments, the encoding spectral adjustment is such that the amplitude of the low frequency region of the under-frame is reduced smoothly in the frequency domain, and the encoding spectral adjustment reduces the amplitude of the low frequency region of the under-frame by a lower amplitude than the amplitude of the mid-frequency region.
In some embodiments, the encoded spectral adjustment has a gain greater than zero for amplitude adjustments of the compressed frame at any frequency in the frequency domain.
In a second aspect, the present specification also provides a system for data processing, comprising: at least one storage medium storing at least one set of instructions for data processing and at least one processor; the at least one processor is communicatively coupled to the at least one storage medium, wherein when the system is operating, the at least one processor reads the at least one instruction set and performs the method of data processing according to the first aspect of the specification as directed by the at least one instruction set.
In a third aspect, the present specification also provides a method of data processing, including: obtaining compressed data, wherein the compressed data comprises a compressed frame obtained by performing data compression on an initial frame; and decompressing the data of the compressed frame to obtain a decompressed frame, wherein the decompressing comprises performing decoding spectrum adjustment and boundary correction on a decompressed frame, the decompressed frame comprises the compressed frame and any data state before the compressed frame becomes the decompressed frame in the data decompression process, the decoding spectrum adjustment comprises performing convolution on the decompressed frame by using a decoding convolution kernel so that the amplitude of the decompressed frame in a frequency domain is smoothly reduced to filter components from a middle frequency region to a high frequency region, the encoding spectrum adjustment and the decoding spectrum adjustment have a preset association relationship, and the boundary correction comprises correcting a boundary of a boundary value in a second preset range in the boundary of the decompressed frame by using a second gamma algorithm so as to reduce noise.
In some embodiments, the second gamma algorithm includes a gamma algorithm having a gamma value greater than 1, so as to weaken a boundary of the decoded frame, the boundary value of which is within the second preset range.
In some embodiments, said decompressing said compressed frame comprises: performing the decoding frequency spectrum adjustment on the decoding frame to obtain a decoding frequency spectrum adjustment frame; obtaining a third boundary by subtracting the decoding spectrum adjustment frame from the decoding frame, wherein the third boundary is the boundary of the decoding frame and comprises the boundary information of the initial frame; weakening the boundary of which the boundary value is within the second preset range in the third boundary through the second gamma algorithm so as to reduce noise of the third boundary to obtain a noise reduction boundary; and superposing the denoising boundary and the decoding frame to obtain the decompression frame.
In some embodiments, said decompressing said compressed frame prior to said deriving said denoising boundary comprises: and enhancing the third boundary by a second coefficient, wherein the second coefficient is an arbitrary number greater than 1, and the third boundary comprises a boundary enhanced by the second coefficient.
In some embodiments, the attenuating, by the second gamma algorithm, the boundary of the third boundary whose boundary value is within the second preset range to perform noise reduction on the third boundary, so as to obtain a noise-reduced boundary, includes: adjusting the third boundary through a third adjusting function to obtain a fourth boundary, so that the component of the third boundary in a low-frequency region in a frequency domain is reserved, and the component from a medium-frequency region to a high-frequency region is filtered; and weakening the boundary of which the boundary value is within the second preset range in the fourth boundary through the second gamma algorithm.
In some embodiments, before said performing said decoding spectral adjustment on said decoded frame to obtain a decoded spectral adjustment frame, said decompressing said compressed frame further comprises: and decoding the compressed frame to obtain a decoded frame, wherein the decoded frame comprises the decoded frame.
In some embodiments, the data compression includes coding spectral adjustments, including convolving the compressed frame, including the initial frame and any data state of the initial frame prior to the compressed frame being made in the data compression process, with a coding convolution kernel, to smoothly reduce the amplitude of the compressed frame in the intermediate frequency region in the frequency domain, wherein the decoding convolution kernel and the coding convolution kernel correspond.
In a fourth aspect, the present specification also provides a system for data processing, comprising at least one storage medium storing at least one set of instructions for data processing and at least one processor; and the at least one processor is communicatively connected to the at least one storage medium, wherein when the system is operating, the at least one processor reads the at least one instruction set and performs the method of data processing according to the third aspect of the specification according to the instruction of the at least one instruction set.
Additional features of the data processing methods and systems provided herein will be set forth in part in the description which follows. The following numerical and exemplary descriptions will be readily apparent to those of ordinary skill in the art in light of the description. The inventive aspects of the data processing methods, systems, and storage media provided herein can be fully explained by the practice or use of the methods, apparatus, and combinations described in the detailed examples below.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 illustrates a system diagram of data processing provided in accordance with an embodiment of the present description;
FIG. 2 is a schematic diagram of a data compression apparatus for data processing provided in accordance with an embodiment of the present specification;
FIG. 3A illustrates a flow diagram of data compression and data decompression provided in accordance with an embodiment of the present description;
FIG. 3B illustrates a flow diagram of data compression and data decompression provided in accordance with an embodiment of the present description;
FIG. 3C illustrates a flow diagram of data compression and data decompression provided in accordance with an embodiment of the present description;
FIG. 3D illustrates a flow diagram of data compression and data decompression provided in accordance with an embodiment of the present description;
FIG. 4A illustrates a flow diagram of a method of data processing to compress data provided in accordance with an embodiment of the present description;
FIG. 4B illustrates a flow diagram of a method of data processing to compress data provided in accordance with an embodiment of the present description;
FIG. 4C illustrates a flow diagram of a method of data processing to compress data provided in accordance with an embodiment of the present description;
FIG. 4D illustrates a flow diagram of a method of data processing to compress data provided in accordance with an embodiment of the present description;
FIG. 5A illustrates a flow chart for obtaining a first enhancement frame provided in accordance with an embodiment of the present description;
FIG. 5B illustrates a flow chart for performing boundary adjustment provided in accordance with an embodiment of the present description;
FIG. 5C illustrates another flow chart for performing boundary adjustment provided in accordance with an embodiment of the present description;
FIG. 6 illustrates a graph for obtaining a second adjustment function provided in accordance with an embodiment of the present description;
FIG. 7 shows a graph of a gamma algorithm provided in accordance with embodiments of the present description;
FIG. 8A shows a graph of a coded spectrum adjustment function provided in accordance with an embodiment of the present description;
FIG. 8B illustrates a graph of a coded spectral modification function provided in accordance with an embodiment of the present specification;
FIG. 9 illustrates a flow chart for obtaining a second enhancement frame provided in accordance with an embodiment of the present description;
FIG. 10 illustrates a flow diagram of a method of data processing to decompress a compressed frame provided in accordance with an embodiment of the present description;
FIG. 11A illustrates a flow diagram of decoding spectral adjustment and boundary correction provided in accordance with an embodiment of the present description;
FIG. 11B illustrates a flowchart for performing boundary correction provided in accordance with an embodiment of the present description;
FIG. 11C illustrates another flow chart for performing boundary correction provided in accordance with an embodiment of the present description;
FIG. 12A illustrates an overall adjustment function H provided in accordance with embodiments of the present description0(f) A graph of (a);
FIG. 12B illustrates an overall adjustment function H provided in accordance with embodiments of the present description0(f) A graph of (a);
FIG. 12C illustrates an overall adjustment function H provided in accordance with embodiments of the present description0(f) A graph of (a);
FIG. 12D illustrates an overall accommodation function H provided in accordance with embodiments of the present description0(f) Graph of (a);
FIG. 12E illustrates an overall adjustment function H provided in accordance with embodiments of the present description0(f) A graph of (a);
FIG. 13A illustrates a global accommodation function H for a normal mode provided in accordance with embodiments of the present description0(f) Coding a spectral modification function H1(f) And decoding the spectral modification function H2(f) A graph of (a);
FIG. 13B illustrates an overall adjustment function H for an enhancement mode provided in accordance with embodiments of the present description0(f) Coding a spectral modification function H1(f) And decoding the spectral modification function H2(f) Graph of (a);
FIG. 14A is a diagram illustrating an example of a decompressed image without boundary correction provided in accordance with an embodiment of the present description; and
fig. 14B illustrates an example diagram of a decompressed image subjected to boundary correction provided according to an embodiment of the present specification.
Detailed Description
The following description is presented to enable any person skilled in the art to make and use the present disclosure, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present description. Thus, the present description is not limited to the embodiments shown, but is to be accorded the widest scope consistent with the claims.
The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. For example, as used herein, the singular forms "a", "an" and "the" may include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," "includes," and/or "including," when used in this specification, are intended to specify the presence of stated integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
These and other features of the present specification, as well as the operation and function of the related elements of structure and the combination of parts and economies of manufacture, may be significantly improved upon consideration of the following description. Reference is made to the accompanying drawings, all of which form a part of this specification. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended as a definition of the limits of the specification. It should also be understood that the drawings are not drawn to scale.
The flow diagrams used in this specification illustrate the operation of system implementations according to some embodiments of the specification. It should be clearly understood that the operations of the flow diagrams may be performed out of order. Rather, the operations may be performed in reverse order or simultaneously. In addition, one or more other operations may be added to the flowchart. One or more operations may be removed from the flowchart.
One aspect of the present description provides a system 100 for data processing (hereinafter referred to as system 100). In a second aspect, the specification describes a method of data processing P200 for compressing data, and in a third aspect, the specification describes a method of data processing P300 for decompressing compressed frames. The data processing methods P200, P300 and the system 100 may be used for compression and decompression of data to improve the transmission efficiency of the data and save resources and space. The data may be non-real time data or real time data. A wide variety of data exists from traditional broadcast movie television to today's mass surveillance and internet applications. For example, the data may be non-real-time video data, audio data, or image data, among others. The data may also be real-time map data, real-time sensor data, real-time video surveillance data, network surveillance data, meteorological data, aerospace data, and the like. The data may be, for example, map data received from a base station during travel of an autonomous vehicle. The specification does not limit the specific categories of the data. The methods P200 and P300 of data processing and the system 100 of data processing described in this specification are consistent in the method and steps of processing different types of data, and for convenience of illustration, the description will be given by taking the processing of video data as an example.
In data compression and data decompression, compression and decompression are often performed in units of frames. A frame is one processing unit constituting a data sequence. One or more initial frames may be included in the initial data. Each initial frame includes a preset number of bytes of initial data. In video compression, the initial data may be initial video data, and the initial frame may be a frame image in the initial video data. In conventional video compression techniques, the original video data is usually encoded using h.264 and h.265 standards, so as to achieve the purpose of compressing the video data. The h.264 and h.265 standards mainly adopt a predictive coding technique when coding video data, that is, initial data in the video data is predicted to obtain a predicted value, and then the predicted value and the initial value of the initial data are subtracted to obtain a residual value, so that the video data is compressed. In recovery and decompression (i.e., decoding), the initial frame is recovered by adding the residual value and the prediction value.
The data processing methods P200 and P300 and the system 100 provided in this specification can combine encoding spectrum adjustment and encoding when performing data compression, so as to reduce the data amount during encoding, improve the compression efficiency of video data, and improve the transmission efficiency of video; the decoding spectral modification and decoding can be combined to decompress the encoded spectral modification and encoded compressed data when the data decompression is performed, so that the decompressed data can be restored to the original data.
Fig. 1 shows a schematic diagram of a system 100 for data processing. The system 100 may include a data compression device 200, a data decompression device 300, and a transmission medium 120.
The data compression apparatus 200 may receive an initial frame in initial data to be compressed and compress the initial data using the data processing method P200 proposed in the present specification to generate a compressed frame. The data compression device 200 may store data or instructions to perform the method of data processing P200 described herein and execute the data and/or instructions.
The data processing method P200 may perform data compression on the video data. The data compression may be boundary adjustment for an initial frame in the video data and coding spectral adjustment and coding for the video data. Specifically, the data processing method P200 may perform the boundary adjustment on the boundary of the small range in the video data through a gamma algorithm to adjust the boundary of the small range, so as to avoid that the boundary with a smaller pixel value difference between adjacent pixels is lost in the encoding process, and avoid detail loss; meanwhile, the data processing method P200 may also perform data compression on the video data by using a method combining coding spectrum adjustment and coding to obtain a compressed frame, so as to further improve the compression ratio of the video data and improve the efficiency of video transmission. Specifically, the data processing method P200 may perform the boundary adjustment on the video data using a gamma algorithm having a gamma value less than 1. The coding spectrum adjustment refers to adjusting the amplitude of a spectrogram of data to be processed. For example, the encoded spectrum adjustment may perform amplitude attenuation on the data to be processed in the frequency domain, so as to reduce the amount of information in the data to be processed, such as attenuating the amplitude of a selected frequency region of the data to be processed in the frequency domain, such as the amplitude of a middle frequency region, the amplitude of a high frequency region, such as the amplitude of a low frequency region to a middle frequency region, and such as the amplitude of a middle frequency region to a high frequency region, and so on. It will be understood by those skilled in the art that the frequency components of the encoded spectrally modified data in the selected frequency region are reduced, and the amount of information in the data is reduced, so that the efficiency of encoding the encoded spectrally modified data can be improved, and the compression ratio can be increased.
The data decompression device 300 may receive the compressed frame and decompress the compressed frame using the data processing method P300 proposed in the present specification to obtain a decompressed frame. The data decompression device 300 may store and execute data or instructions to perform the method P300 of data processing described herein.
The data processing method P300 may perform data decompression on the compressed frame subjected to the data compression by the data processing method P200 to restore the video data. The data decompression may be decoding spectral adjustment and boundary correction of the compressed frame. The data processing method P300 may employ a combination of decoding (i.e., recovering the compressed frame according to the residual value and the predicted value) and decoding spectral modification to decompress the data of the compressed frame to recover the data in the compressed frame. The data processing method P300 may perform decoding spectrum adjustment on the compressed data by a decoding spectrum adjustment function; obtaining the boundary information of the initial frame by subtracting the compressed data from the decoded data; performing the boundary correction on the boundary information through a gamma algorithm to weaken the boundary in a small range and eliminate noise information in the boundary information; and superposing the boundary information after the noise is eliminated and the decoded data to obtain the decompressed frame, wherein the boundary correction can eliminate the noise information, so that the definition of the decompressed frame is higher. Specifically, the decoding spectrum adjustment enables components of medium-frequency and high-frequency regions in the decoded data to be filtered by using a low-pass filter with smooth transition, so that the decoded data can effectively avoid the ringing effect, and the decompressed data is clearer. The decoding spectral modification may allow the encoded spectral modified data to be fully restored or approximately restored to, or even beyond, the pre-encoded spectral modification state without consideration of other computational errors.
Therefore, the data processing methods P200 and P300 and the system 100 can significantly improve the compression efficiency of video data, reduce data loss during video data compression, improve the transmission efficiency and the recovery rate of video, improve the definition of decompressed video, and reduce noise in decompressed video. The specific procedures for the encoding spectral modification and the boundary correction and the decoding spectral modification and the boundary correction will be described in detail later in the description.
The data compression apparatus 200 and the data decompression apparatus 300 may include a wide range of devices. For example, the data compression apparatus 200 and the data decompression apparatus 300 may include a desktop computer, a mobile computing device, a notebook (e.g., laptop) computer, a tablet computer, a set-top box, a handset such as a smart phone, a television, a camera, a display device, a digital media player, a video game console, an in-vehicle computer, or the like.
As shown in fig. 1, the data compression apparatus 200 and the data decompression apparatus 300 may be connected through a transmission medium 120. Transmission medium 120 may facilitate the transmission of information and/or data. The transmission medium 120 may be any data carrier that can transmit compressed frames from the data compression device 200 to the data decompression device 300. For example, transmission medium 120 may be a storage medium (e.g., a compact disc), a wired or wireless communication medium. The communication medium may be a network. In some embodiments, the transmission medium 120 may be any type of wired or wireless network, as well as combinations thereof. For example, the transmission medium 120 may include a cable network, a wired network, a fiber optic network, a telecommunications network, an intranet, the internet, a Local Area Network (LAN), a Wide Area Network (WAN), a Wireless Local Area Network (WLAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), the Public Switched Telephone Network (PSTN), a bluetooth network, a ZigBee network, a Near Field Communication (NFC) network, or the like. One or more components of the data decompression device 300 and the data compression device 200 may be coupled to the transmission medium 120 to transmit data and/or information. The transmission medium 120 may include a router, switch, base station, or other device that facilitates communication from the data compression device 200 to the data decompression device 300. In other embodiments, the transmission medium 120 may be a storage medium, such as mass storage, removable storage, volatile read-write memory, read-only memory (ROM), or the like, or any combination thereof. Exemplary mass storage may include magnetic disks, optical disks, solid state drives, and non-transitory storage media. Removable storage may include flash drives, floppy disks, optical disks, memory cards, zip disks, magnetic tape, and the like. Typical volatile read and write memory may include Random Access Memory (RAM). RAM may include Dynamic RAM (DRAM), double-date-rate synchronous dynamic RAM (DDR SDRAM), Static RAM (SRAM), thyristor RAM (T-RAM), zero-capacitance RAM (Z-RAM), and the like. ROM may include Masked ROM (MROM), Programmable ROM (PROM), virtually programmable ROM (PEROM), electrically programmable ROM (EEPROM), compact disk (CD-ROM), digital versatile disk ROM, and the like. In some embodiments, the transmission medium 120 may be a cloud platform. By way of example only, the cloud platform may include forms such as a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud, and the like, or forms similar to the above, or any combination thereof.
As shown in fig. 1, the data compression apparatus 200 receives initial data, and executes the instructions of the method P200 of data processing described in this specification, performs data compression on the initial data, and generates a compressed frame; the compressed frame is transmitted to the data decompression device 300 through the transmission medium 120; the data decompression device 300 performs the instruction of the method P300 for data processing described in this specification to decompress data of the compressed frame to obtain a decompressed frame.
Fig. 2 shows a schematic diagram of a data compression device 200 for data processing. The data compression apparatus 200 may perform the method P200 of data processing described in this specification. The method of data processing P200 is described elsewhere in this specification. For example, the data processing method P200 is introduced in the description of fig. 4A to 9.
As shown in fig. 2, the data compression apparatus 200 includes at least one storage medium 230 and at least one compression-side processor 220. In some embodiments, the data compression device 200 may also include a communication port 250 and an internal communication bus 210. Meanwhile, the data compression apparatus 200 may further include an I/O component 260.
The internal communication bus 210 may connect various system components including the storage medium 230 and the compression-side processor 220.
The I/O components 260 support input/output between the data compression device 200 and other components.
Storage medium 230 may include a data storage device. The data storage device may be a non-transitory storage medium or a transitory storage medium. For example, the data storage device may include one or more of a magnetic disk 232, a read only memory medium (ROM)234, or a random access memory medium (RAM) 236. The storage medium 230 further includes at least one set of instructions stored in the data storage device. The instructions are computer program code that may include programs, routines, objects, components, data structures, procedures, modules, and the like that perform the methods of data processing provided herein.
The communication port 250 is used for data communication between the data compression apparatus 200 and the outside. For example, the data compression device 200 may be coupled to the transmission medium 120 via a communication port 250.
The at least one compression-side processor 220 is communicatively coupled to the at least one storage medium 230 via the internal communication bus 210. The at least one compression-side processor 220 is configured to execute the at least one instruction set. When the system 100 is running, the at least one compression-side processor 220 reads the at least one instruction set and executes the data processing method P200 according to the indication of the at least one instruction set. The compression-side processor 220 may perform all the steps involved in the method of data processing P200. Compression-side processor 220 may be in the form of one or more processors, and in some embodiments, compression-side processor 220 may include one or more hardware processors, such as microcontrollers, microprocessors, Reduced Instruction Set Computers (RISC), Application Specific Integrated Circuits (ASICs), application specific instruction set processors (ASIPs), Central Processing Units (CPUs), Graphics Processing Units (GPUs), Physical Processing Units (PPUs), microcontroller units, Digital Signal Processors (DSPs), Field Programmable Gate Arrays (FPGAs), Advanced RISC Machines (ARMs), Programmable Logic Devices (PLDs), any circuit or processor capable of performing one or more functions, the like, or any combination thereof. For illustrative purposes only, only one compression-side processor 220 is described in the data compression apparatus 200 in this specification. However, it should be noted that the data compression apparatus 200 may also include multiple processors, and thus, the operations and/or method steps disclosed in this specification may be performed by one processor as described in this specification, or may be performed by a combination of multiple processors. For example, if the compression-side processor 220 of the data compression apparatus 200 performs step a and step B in this specification, it should be understood that step a and step B may also be performed jointly or separately by two different compression-side processors 220 (e.g., a first processor performs step a, a second processor performs step B, or both a first and a second processor perform steps a and B together).
Although the above structure describes the data compression apparatus 200, this structure is also applicable to the data decompression apparatus 300. The data decompression apparatus 300 may perform the method P300 of data processing described in this specification. The method of data processing P300 is described elsewhere in this specification. For example, the data processing method P300 is introduced in the description of fig. 10 to 14B.
The system 100 may perform data compression on the video data by interchanging or interleaving the coding spectrum adjustment and the coding sequence. The boundary adjustment may be before the code spectrum adjustment or after the code spectrum adjustment. Similarly, when the system 100 decompresses the compressed frame, the decoding spectral adjustment and the decoding order may be interchanged or interleaved. It should be noted that, in order to ensure that the decompressed data information can recover the information in the original data, the sequence of the decoding spectral modification and the decoding in the data decompression should correspond to the sequence of the encoding spectral modification and the encoding in the data compression, that is, the decoding spectral modification and the decoding may operate in a symmetrical reverse direction with respect to the encoding spectral modification and the encoding. For example, if the compressed frame is obtained by performing the coding spectral adjustment first and then performing the coding, the compressed frame should perform the decoding first and then performing the decoding spectral adjustment when decompressing data. For convenience of description, we define the data in the initial frame before data compression processing as P0Defining the code spectrum adjusting function corresponding to the code spectrum adjusting as H1(f) The data in the decompressed frame decompressed by the data decompression apparatus 300 is defined as P4Defining the decoded spectral modification function corresponding to the decoded spectral modification as H2(f)。
In the data processing method P200, when the data compression apparatus 200 performs data compression on the initial frame, the boundary adjustment may be performed on the initial frame first, and then the coding spectrum adjustment may be performed; or the coding spectrum adjustment may be performed on the initial frame first, and then the boundary adjustment may be performed. Fig. 3A-3D illustrate flow diagrams of some data compression and data decompression provided according to embodiments of the present description. In the flow chart of data compression and data decompression shown in fig. 3A to 3C, the data compression apparatus 200 performs the boundary adjustment on the initial frame, and then performs the encoding spectrum adjustment. In the flow chart of data compression and data decompression shown in fig. 3D, the data compression apparatus 200 performs the encoding spectral adjustment on the initial frame, and then performs the boundary adjustment.
Fig. 3A illustrates a flow diagram of data compression and data decompression provided according to an embodiment of the present description. As shown in fig. 3A, the data compression apparatus 200 may perform data compression on the initial data by: the data compression apparatus 200 first processes the initial frame P0The boundary of (2) is adjusted to obtain a first enhancement frame. We define the data in the first enhancement frame as P 'for convenience of description'0(ii) a And then the first enhancement frame P'0And performing the code spectrum adjustment and the code. Wherein, the first enhancement frame P'0The coding spectral adjustment and the coding may be performed by: the data compression device 200 uses the encoded spectral modification function H1(f) For the first enhancement frame P'0The coded spectrum is adjusted firstly, and then the first enhanced frame P 'after the coded spectrum is adjusted'0Line-coded, i.e. the first enhancement frame P 'after conditioning of the coded spectrum'0And predicting and solving a residual error to obtain predicted data PI and residual error data R, inputting the predicted data PI and the residual error data R into a code stream generation module for synthesis, and obtaining the compressed frame. For convenience of presentation, we will go through the encoded spectral modification function H1(f) Defining the data obtained after the coding frequency spectrum adjustment as P1. Details regarding the boundary adjustment and the code spectrum adjustment will be described later in the description. The data compression method shown in fig. 3A can improve the coding efficiency, further reduce the data amount in the compressed frame, improve the compression ratio, and simultaneously reduce the data loss and avoid the detail loss.
As shown in fig. 3A, the data decompression of the compressed frame by the data decompression device 300 may be: the data decompression device 300 performs the decoding on the compressed frame first, that is, analyzes the compressed frame based on a code stream analysis module, and generates the prediction data PI and the residual data R; according to the aboveAnd predicting the measured data PI to obtain a predicted frame, and superposing the predicted frame and the residual data R to obtain a decoded frame. For convenience of description, we define the data in the decoded frame as P2. Then to the decoded frame P2Using the decoded spectral modification function H2(f) Performing the decoding frequency spectrum adjustment and the boundary correction, and superposing the decoding frame and the data after the boundary correction to obtain the decompressed frame P4And outputting the data. Details regarding the decoded spectral adjustment and the boundary correction will be described later in the description.
For convenience of presentation, we will decompress frame P4With initial data P0The transfer function between is defined as the overall spectral modification function H0(f) In that respect The method shown in fig. 3A can reduce the data amount in the compressed frame, thereby improving the compression ratio and the encoding efficiency of the initial data, improving the transmission efficiency of the initial data, and simultaneously reducing data loss and avoiding detail loss.
The data compression device 200 may perform data compression on the initial data by: the encoded spectral adjustments are incorporated into the encoding process. The encoding spectral adjustment may be performed at any stage in the encoding process. Accordingly, the decoding spectral adjustment may also be performed at a corresponding stage of the decoding process.
Fig. 3B illustrates a flow chart of data compression and data decompression provided according to an embodiment of the present description. As shown in fig. 3B, the data compression device 200 may perform data compression on the initial data by: the data compression apparatus 200 first processes the initial frame P0The boundary of the first enhancement frame P 'is obtained by the boundary adjustment'0(ii) a And then to the first enhancement frame P'0Performing the code spectrum adjustment and the coding. Wherein, the first enhancement frame P'0The coding spectral adjustment and the coding may be performed by: the data compression device 200 pairs the first enhancement frame P'0Predicting to obtain a predicted frame and predicted data PI, and then carrying out prediction on the predicted frame and the first enhancement frame P'0Using the encoded spectral modification functions H, respectively1(f) And after the coding frequency spectrum is adjusted, residual errors are solved to obtain residual error data R, and the prediction data PI and the residual error data R are input into a code stream generation module to be synthesized to generate the compressed frame. The specific operation of data compression shown in fig. 3B is the same as that shown in fig. 3A, except that the order of operation is different. Details regarding the boundary adjustment and the code spectrum adjustment will be described later in the description.
As shown in fig. 3B, the data decompression of the compressed frame by the data decompression device 300 may be: the data decompression device 300 analyzes the compressed frame based on a code stream analysis module to generate the prediction data PI and the residual data R1(ii) a For the residual data R1Using the decoded spectral modification function H2(f) Performing the decoding spectral adjustment on the residual data R1And obtaining the residual data R by subtracting the data adjusted by the decoding frequency spectrum1The residual data R1And the data after the difference (the residual data R)1Boundary) of the residual data R is obtained; then, predicting according to prediction data PI to obtain a prediction frame, and overlapping with the residual error data R to obtain an overlapped frame; then, the boundary correction is carried out on the boundary in the superimposed frame, and the data after the boundary correction is taken as the decompressed frame P4And outputting the data. For convenience of description, we define the data in the overlay frame as P3. In particular, for the superimposed frame P3The specific process of performing the boundary correction will be described in detail later.
The method shown in fig. 3B can reduce the data amount in the compressed frame, thereby improving the compression ratio and the encoding efficiency of the initial data, improving the transmission efficiency of the initial data, and simultaneously reducing data loss and avoiding detail loss.
Fig. 3C illustrates a flow diagram of data compression and data decompression provided according to an embodiment of the present description. As shown in fig. 3C, the data compression device 200 may perform data compression on the initial data by: the data compression apparatus 200 first processes the initial frame P0The boundary of the first enhancement frame P 'is obtained by the boundary adjustment'0(ii) a And then to the first enhancement frame P'0Performing the code spectrum adjustment and the coding. Wherein, the first enhancement frame P'0The coding spectral adjustment and the coding may be performed by: the data compression device 200 pre-pairs the first enhancement frame P'0The coding is carried out, namely, the residual error is predicted and solved to obtain predicted data PI and residual error data R, and then the coding spectrum adjusting function H is used for the residual error data R1(f) Performing the code spectrum adjustment; residual data R after the coding frequency spectrum adjustment1And the prediction data PI input code stream generation module synthesizes the prediction data PI input code stream and generates the compressed frame. The data compression scheme shown in FIG. 3C operates in the same manner as that shown in FIG. 3A, except in a different order. Details regarding the boundary adjustment and the code spectrum adjustment will be described later in the description.
As shown in fig. 3C, the data decompression of the compressed frame by the data decompression device 300 may be: the data decompression device 300 analyzes the compressed frame based on a code stream analysis module to generate the prediction data PI and the residual data R1(ii) a For the residual data R1Using the decoded spectral modification function H2(f) Performing the decoding spectral adjustment and applying the residual data R1And obtaining the residual data R by subtracting the data adjusted by the decoding frequency spectrum1The residual data R1And the data (the residual data R) obtained by the subtraction1Boundary) of the residual data R is obtained; then, the prediction is carried out according to the prediction data PI to obtain a prediction frame, and the prediction frame is superposed with the residual error data R to obtain a superposed frame P3(ii) a Then, the boundary correction is carried out on the boundary in the superimposed frame, and the data after the boundary correction is taken as the decompressed frame P4And outputting the data. In particular, for the superimposed frame P3The specific process of performing the boundary correction will be described in detail later.
The method shown in fig. 3C can reduce the data amount in the compressed frame, thereby improving the compression ratio and the encoding efficiency of the initial data, improving the transmission efficiency of the initial data, and simultaneously reducing data loss and avoiding detail loss.
Fig. 3D illustrates a flow chart of data compression and data decompression provided according to an embodiment of the present description. As shown in fig. 3D, the data compression device 200 may perform data compression on the initial data by: the data compression apparatus 200 first uses the encoded spectral modification function H1(f) For the initial frame P0Performing the coding spectrum adjustment and the boundary adjustment to obtain data P'1(ii) a Then to data P'1The encoding is carried out, i.e. on data P'1And predicting and solving a residual error to obtain predicted data PI and residual error data R, inputting the predicted data PI and the residual error data R into a code stream generation module for synthesis, and obtaining the compressed frame. Details regarding the boundary adjustment and the code spectrum adjustment will be described later in the description. The data compression method shown in fig. 3D can improve the coding efficiency, further reduce the data amount in the compressed frame, improve the compression ratio, and simultaneously reduce the data loss and avoid the detail loss.
As shown in fig. 3D, the data decompression of the compressed frame by the data decompression apparatus 300 may be: the data decompression device 300 performs the decoding on the compressed frame first, that is, analyzes the compressed frame based on a code stream analysis module, and generates the prediction data PI and the residual data R; and predicting according to the prediction data PI to obtain a prediction frame, and overlapping the prediction frame with the residual error data R to obtain a decoding frame. For convenience of description, we define the data in the decoded frame as P2. Then to the decoded frame P2Using the decoded spectral modification function H2(f) Performing the decoding frequency spectrum adjustment and the boundary correction, and superposing the decoding frame and the data after the boundary correction to obtain the decompressed frame P4And outputting the data. Details regarding the decoded spectral adjustment and the boundary correction will be described later in the description.
The method shown in fig. 3D can reduce the amount of data in the compressed frame, thereby improving the compression ratio and the encoding efficiency of the initial data, improving the transmission efficiency of the initial data, and simultaneously reducing data loss and avoiding detail loss. The specific processes of data compression and data decompression will be described in detail later.
Fig. 4A to 4D show a flowchart of some methods P200 for data processing of compressing data according to embodiments of the present specification. As described previously, the data compression apparatus 200 may perform the data processing method P200. In particular, the storage medium in the data compression device 200 may store at least one set of instructions. The set of instructions is configured to instruct the compression processor 220 in the data compression device 200 to complete the data processing method P200. When the data compression apparatus 200 operates, the compression processor 220 may read the instruction set and execute the data processing method P200.
The data processing method P200 may be the data processing method PA200 shown in fig. 4A, the data processing method PB200 shown in fig. 4B, the data processing method PC200 shown in fig. 4C, or the data processing method PD200 shown in fig. 4D. The method PA200 of data processing shown in fig. 4A corresponds to the flowchart shown in fig. 3A. The method PB200 of data processing shown in fig. 4B corresponds to the flowchart shown in fig. 3B. The method PC200 of data processing shown in fig. 4C corresponds to the flowchart shown in fig. 3C. The method PD200 of data processing shown in fig. 4D corresponds to the flowchart shown in fig. 3D.
As shown in fig. 4A, the method PA200 may include:
SA 220: an initial frame in the initial data is selected.
A frame is one processing unit constituting a data sequence. In data processing, calculation is often performed in units of frames. The initial data may include one or more initial frames. The initial frame includes a preset number of bytes of initial data. As described above, the video data is described as an example in this specification, and therefore, the initial data may be initial video data, and the initial frame may be a frame image in the initial video data. In step SA220, the data compression apparatus 200 may select a part of frame images from the initial data as the initial frame, or may select all frame images from the initial data as the initial frame. The data compression apparatus 200 may select the initial frame according to the initial data application scenario. If the initial data application is applied to a scene with low requirements on precision and compression quality, a partial frame image can be selected as the initial frame, for example, the monitoring image at the remote location has no foreign object in the picture in most cases, so that most of the frames of the monitoring image at the remote location are the same, and the data compression apparatus 200 can select the partial frame image as the initial frame for compression and transmission. For another example, for a high-definition television playing video, in order to ensure the viewing effect, the data compression apparatus 200 may select all frame images as the initial frames for compression and transmission.
SA 240: and performing the data compression on the initial frame to obtain a compressed frame.
The data compression may include the boundary adjustment for the initial frame and the code spectrum adjustment for an on-going frame. The adjusting the boundary of the initial frame may be adjusting, by a first gamma algorithm, a boundary of the initial frame, where a boundary value is within a first preset range.
The encoding spectrum adjustment on the under-pressure frame may be inputting the under-pressure frame into an encoding spectrum adjuster for encoding spectrum adjustment. The coding spectrum adjustment refers to adjusting the amplitude of the spectrogram of the compressed frame. For example, the code spectrum adjustment may be performed by an attenuator. The attenuator may perform amplitude attenuation on the compressed frame in a frequency domain, thereby reducing an amount of data information in the compressed frame.
The attenuator may be configured to reduce the amplitude of a selected region of the compressed frame in its frequency domain, such as the amplitude of the mid-frequency region, the amplitude of the high-frequency region, such as the amplitude of the low-to-mid-frequency region, such as the amplitude of the mid-to-high-frequency region, and so on. For different forms of data, the receiver is more or less sensitive to frequency, and thus the data compression operation may select different regions in the frequency domain for amplitude attenuation based on the different forms of data. As mentioned above, taking video data as an example, since the edge portion of an object in a picture is rich in mid-frequency and high-frequency information, and the mid-frequency and high-frequency regions carry more data, reducing the amplitude of the mid-frequency to high-frequency regions visually blurs the boundary data of the compressed frame, and also greatly reduces the amount of information in the image. It should be noted that reducing the amplitude of the low frequency region also reduces the amount of information in the image. It will be understood by those skilled in the art that the frequency components from low to high frequency regions in the intermediate state frame subjected to the encoding spectrum adjustment process are reduced and the amount of data information is also reduced, compared to the case where the intermediate state frame subjected to the encoding spectrum adjustment process is not subjected to the encoding spectrum adjustment process, so that the intermediate state frame subjected to the encoding spectrum adjustment process has a higher compression ratio in encoding. The different types of data may differ in their definition of low, mid and high frequency regions. For example, the high frequency may include an interval between any two frequencies of 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.5 in the normalized frequency domain, where 0.5 is the maximum normalized frequency.
Taking video data compression as an example, the data processing method P200 may compress the initial frame by a method combining coding spectrum adjustment and coding, so that the amplitude of the intermediate frequency region is stably reduced, thereby reducing the data information amount, further improving the compression ratio of the video data, and improving the efficiency of video transmission. The compressed frame may include any data state of the initial frame and the initial frame before the compressed frame in the data compression process, such as any data state of the initial frame in the process of performing the coding spectrum adjustment and coding, for example, an initial frame, a prediction frame, a residual frame, and so on. In fig. 3A and 4A, the under-pressure frame may be the initial frame.
Step SA240 may be to perform the boundary adjustment on the initial frame, and then perform the code spectrum adjustment. Specifically, step SA240 may include:
SA 242: for the initial frame P0Performing the boundary adjustment to obtain a first enhancement frame P0
For an image data or video data, after being subjected to the encoding spectrum adjustment, the image or video may become blurred, and the amount of data information in the image or video data becomes small, so that the difference value between adjacent pixels becomes small. When the image data or video data is encoded using the standard h.264/h.265, some loss of detail of certain images and videos may be caused to some extent. That is, the boundaries where the difference between those adjacent pixels is small may become smaller or even disappear after the encoding process, resulting in a loss of detail in the image data or video data. Therefore, in order to avoid the loss of the boundary with a small difference between adjacent pixels in the encoding and decoding processes, the boundary adjustment needs to be performed on the boundary with a small difference between adjacent pixels to perform boundary enhancement, so that the detail part can still be retained after encoding and decoding. For those boundaries where the difference between neighboring pixels is large, the remaining boundaries are still large enough even after the encoded spectral adjustment process. And will not disappear after the encoding and decoding processes. Therefore, no boundary adjustment may be made for those boundaries where the difference between neighboring pixels is large.
Fig. 5A illustrates a flowchart of acquiring a first enhancement frame provided in accordance with an embodiment of the present description. As shown in fig. 4A and 5A, step SA242 may include:
SA 242-2: by means of a first adjusting function HL1(f) For the initial frame P0And adjusting to obtain a first frame.
For convenience of description, we define the data in the first frame as PL1. First adjusting function HL1(f) In the frequency domain, there may be a low-pass filter, so that the initial frame P0Is smoothly reduced in the frequency domain to make the initial frame P0In the frequency domainIs preserved and components of the intermediate to high frequency region are attenuated, thereby obtaining a first frame PL1. First frame PL1Is a blurred image. First adjusting function HL1(f) The filter may be any form of low-pass filter with smooth transition, which is not limited in this specification.
SA 242-4: for the initial frame P0And said first frame PL1And obtaining a first boundary by calculating a difference.
For convenience of description, we define the data in the first boundary as PE1. The first boundary PE1Including the initial frame P0The boundary information of (1). The first boundary PE1Can be expressed as the following equation:
PE1=P0-PL1=P0-P0*HL1(f) formula (1)
The middle frequency to high frequency components in the spectrum of each frame of data are mainly concentrated in the regions of the frame of data where the data change is severe, that is, the boundary data of the data. For example, for one frame of image, the mid-frequency to high-frequency data is mainly concentrated on the boundary of the object in the image, i.e. the boundary data of this frame of image. The first adjusting function HL1(f) Let the initial frame P0The amplitude in the frequency domain is smoothly reduced to attenuate components from the intermediate frequency to the high frequency region. Thus, the first frame PL1It can be understood that the initial frame P is removed0The boundary information in (2). Next, for the initial frame P0And said first frame PL1Taking the difference to obtain the initial frame P0I.e. the first boundary PE1
In some embodiments, step SA242 may further include:
SA 242-6: the first boundary P is defined by a first coefficient aE1And (6) performing enhancement.
Wherein the first coefficient a is an arbitrary number greater than 1. In some embodiments, the first boundary PE1May be for the initial frame P0And said first frame PL1And (5) obtaining data by difference calculation. In othersIn an embodiment, said first boundary PE1May be a boundary enhanced by said first coefficient a. At this time, the first boundary PE1It can also be expressed as the following equation:
PE1=a*(P0-PL1)=a*(P0-P0*HL1(f) equation (2)
As described above, when the boundary adjustment is performed on the boundary of the initial frame to perform adjustment, the boundary adjustment is performed only on the boundary where the difference between adjacent pixels is small. In order to avoid the influence of the boundary adjustment on other boundaries that do not need to be adjusted, the data compression apparatus 200 may first apply the first boundary PE1The signal amplification is performed by a first factor a greater than 1.
SA 242-8: for P in the first boundary by the first gamma algorithmE1And adjusting the boundary with the boundary value in the first preset range to obtain an enhanced boundary.
For convenience of description, we define the data in the enhancement boundary as PE. As described above, when the boundary adjustment is performed on the boundary of the initial frame, the boundary adjustment is performed only on the boundary where the difference between adjacent pixels is small. The first preset range may be a boundary value at which the boundary adjustment is required. The boundary value may be P in the first boundaryE1The value of each pixel in the array. In particular, the first preset range may be [ -R1, R1]In the middle of the above range. R1 may be a boundary threshold. For example, R1 can be 30, 40, 50, etc. In some embodiments, R1 can be any number between 5 and 30.
Fig. 5B shows a flowchart for performing the boundary adjustment according to an embodiment of the present disclosure. As shown in FIG. 5B, step SA242-8 may be: the data compression device 200 passes the second adjustment function HL2(f) For the first boundary PE1Adjusting to obtain a second boundary PE2(ii) a Applying the first gamma algorithm to the second boundary PE2Is in the first preset range [ -R1, R1 [ -R1, R]Inner boundary is adjusted to obtain the enhancementBoundary PE
The boundary of the initial frame (first boundary P)E1) The boundary where the boundary enhancement is not required contains many components from the intermediate frequency region to the high frequency region. Therefore, in order to avoid the influence of the boundary enhancement on other boundaries that do not need to be adjusted, the data compression apparatus 200 may first set the first boundary PE1Filtering is performed to filter components from the mid-frequency to the high-frequency region. Second adjusting function HL2(f) May be a low-pass filter with a DC component DC equal to 1, such that said first boundary P isE1Components in the low frequency region in the frequency domain are retained while components in the medium to high frequency region are filtered.
FIG. 6 illustrates a second tuning function H provided in accordance with an embodiment of the present disclosureL2(f) Schematic representation of (a). The horizontal axis is normalized frequency f, and the vertical axis is a second adjusting function HL2(f) Amplitude adjustment gain H ofL2. The normalized frequency f of the horizontal axis may be divided into a low frequency region, a medium-high frequency region, and a high frequency region. As shown in fig. 6, the normalized frequency maximum on the horizontal axis is 0.5. As previously mentioned, the high frequency region may comprise (d, 0.5) in the normalized frequency domain]The frequency in between. Wherein d is a lower frequency limit of the high frequency region. For example, d may be any one of frequencies 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, and 0.45 in the normalized frequency domain. The intermediate frequency region may include (b, c)]Wherein b is a lower frequency limit of the intermediate frequency region and c is an upper frequency limit of the intermediate frequency region. For example, the lower frequency limit b of the intermediate frequency region may be any one of frequencies of 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, and 0.28 in the normalized frequency domain; the upper frequency limit c of the intermediate frequency region may be any one of frequencies 0.35, 0.34, 0.33, 0.32, and 0.31 in the normalized frequency domain. The low frequency region may include [0, a ] in the normalized frequency domain]The frequency in between. Wherein a is an upper frequency limit of the low frequency region. The upper frequency limit a of the low frequency region may be 0.01, 0.02, 0.03 in the normalized frequency domain0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.12, 0.13, 0.14, and 0.15. When the low frequency region is not connected to the intermediate frequency region, the frequency region between the two is called an intermediate frequency region. When the intermediate frequency region is not connected to the high frequency region, the frequency region therebetween is referred to as an intermediate-high frequency region.
Second adjusting function HL2(f) The components of the medium to high frequency region may be filtered. Second adjusting function HL2(f) The stop band interval in (1) can be any interval between frequencies 0.25-0.50. For example, the second adjustment function HL2(f) The stop band interval of (a) may be within an interval defined by any two of the values 0.25, 0.27, 0.29, 0.31, 0.33, 0.35, 0.37, 0.39, 0.41, 0.43, 0.45, and 0.50. Second adjusting function HL2(f) The pass band interval in (1) can be any interval between frequencies 0-0.35. For example, the second adjustment function HL2(f) The pass band interval in (a) may be within an interval defined by any two of the values 0, 0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.15, 0.17, 0.19, 0.21, 0.23, 0.25, 0.27, 0.29, 0.21, 0.23, and 0.35.
FIG. 7 illustrates a graphical diagram of a gamma algorithm provided in accordance with an embodiment of the present description. The gamma algorithm is a non-linear image and video brightness adjustment method, and the normalized function curve is shown in fig. 7. The gamma algorithm is an algorithm for dynamically adjusting pixel values of an image. As shown in fig. 7, the horizontal axis represents the value before gamma algorithm adjustment, and the vertical axis represents the value after gamma algorithm adjustment. Wherein the curve 7 represents a curve with a gamma value γ > 1. The curve 8 represents a curve in which the gamma value γ is 1. Curve 9 represents the curve γ < 1. When gamma is larger than 1, the absolute value of the whole gray value becomes smaller after the image is corrected by the gamma algorithm. When gamma is less than 1, the absolute value of the whole gray value of the image is increased after the image is corrected by a gamma algorithm. The gamma algorithm shown in fig. 7 is an extended gamma algorithm. Namely, the gamma algorithm is centrosymmetrically expanded to the third quadrant by taking the origin (0, 0) as a symmetrical point.
In step SA242-8, the data compression apparatus 200 may pass through the secondA gamma algorithm performs boundary correction on the boundary of the initial frame. The data compression apparatus 200 may align the second boundary PE2The pixels in (1) are boundary adjusted one by one. Specifically, the data compression apparatus 200 may compress the second boundary PE2The boundary value corresponding to each pixel in (a) is compared with a boundary threshold R1; when the boundary values are in the range of [ -R1, R1]When the first gamma algorithm is used, adjusting the boundary value; when the boundary values are in the range of [ -R1, R1]Otherwise, no adjustment is made.
In some embodiments, the data compression apparatus 200 may apply the first gamma algorithm to the second boundary PE2Boundary adjustment is performed for boundary enhancement. At this time, the first gamma algorithm may be a gamma algorithm having a gamma value γ < 1. The data compression apparatus 200 may align the second boundary PE2The pixels in (1) are boundary-enhanced one by one. Specifically, the data compression apparatus 200 may compress the second boundary PE2The boundary value corresponding to each pixel in (a) is compared with a boundary threshold R1; when the boundary values are in the range of [ -R1, R1]When the absolute value of the boundary value is within the range, the first gamma algorithm is used for enhancing the boundary value, so that the absolute value of the boundary value is increased; when the boundary values are [ -R1, R1 [ -R1 [ ]]Otherwise, no enhancement is performed. The data compression device 200 may perform the boundary adjustment using a table lookup method. Table 1 may be stored in the data compression apparatus 200. Table 1 stores the correspondence between the input boundary value and the output boundary value in the first gamma algorithm, that is, the correspondence between the boundary value before adjustment and the boundary value after adjustment. Taking R1 ═ 5 as an example, table 1 can be expressed as:
Figure BDA0002884076930000301
in some embodiments, the data compression apparatus 200 may also apply the first gamma algorithm to the second boundary PE2Boundary adjustment is performed for boundary reduction for noise reduction. At this time, the first gamma algorithm may be a gamma algorithm having a gamma value γ > 1. Specifically, the data compression apparatus 200 may use a pair of gamma algorithms having a gamma value γ > 1The second boundary PE2In the first preset range [ -R1, R1]The inner boundary is weakened to reduce the absolute value of the boundary value, thereby eliminating the second boundary PE2And (4) noise in the image, increasing the clarity of the initial data. Noise in an image mostly exists where a boundary value in a boundary is small. For the first preset range [ -R1, R1]The inner boundary is weakened, and noise can be effectively eliminated.
In some embodiments, the data compression device 200 may apply the second boundary P through the first gamma algorithmE2Performing boundary adjustment to simultaneously pair the second boundaries PE2The boundary enhancement and the boundary reduction are carried out to obtain an enhanced and noise-reduced image which can be used for preprocessing before image compression, so that better image quality is obtained. At this time, the first gamma algorithm may be in [ -R1, -R2 ]]And [ R2, R1]Internal gamma value gamma < 1, in [ -R2, R2 [ -R2]Gamma algorithm with internal gamma value gamma > 1. Wherein R2 < R1. The data compression apparatus 200 may align the second boundary PE2The pixels in (a) are boundary adjusted one by one. Specifically, the data compression apparatus 200 may compress the second boundary PE2The boundary value corresponding to each pixel in (a) is compared with the boundary thresholds R1 and R2; when the boundary value is [ -R1, -R2 [ -R1 [ -R2 ]]Or [ R2, R1 ]]When the absolute value of the boundary value is less than the threshold value, the boundary value is enhanced by using a gamma algorithm with the gamma value gamma less than 1, so that the absolute value of the boundary value is increased; when the boundary values are in the range of [ -R2, R2]When the second boundary P is eliminated, the boundary value is weakened using a gamma algorithm having a gamma value gamma > 1 to reduce the absolute value of the boundary valueE2The noise in (2); when the boundary values are in the range of [ -R1, R1]Otherwise, no adjustment is made. The data compression apparatus 200 may align the second boundary P by table 2E2Performing the boundary enhancement and the boundary reduction. Taking R1 ═ 5 and R2 ═ 1 as examples, table 2 can be expressed as:
Figure BDA0002884076930000311
as shown in table 2, the gamma value γ > 1 performs the boundary reduction when the boundary value is within [ -1, 1] to perform noise reduction. The boundary enhancement is performed by gamma value gamma < 1 when the boundary values are within [ -5, -1] and [1, 5 ].
Fig. 5C illustrates another flow chart for performing boundary adjustment provided in accordance with an embodiment of the present description. As shown in fig. 5C, step SA242-8 may also be: the data compression apparatus 200 directly compares the first boundary P with the first gamma algorithmE1Is in the first preset range [ -R3, R3 [ -R3, R]Adjusting the inner boundary to obtain the enhanced boundary PE. Wherein R3 may be different from R1 or the same as R1.
Step SA242 may further include:
SA 242-9: the first frame PL1And the enhanced boundary PESuperposing to obtain the first enhancement frame P'0
Step SA240 may further include:
SA 244: for the first enhancement frame P'0Performing the coding spectral adjustment and the coding.
In step SA244, the data compression device 200 may first apply the first enhancement frame P'0Performing the coded spectral adjustment to cause the first enhancement frame P'0The amplitude in the frequency domain is smoothly reduced, resulting in the first enhancement frame P'0To obtain a coded spectral conditioning frame to reduce said first enhancement frame P'0Thereby reducing the amount of information in said first enhancement frame P'0And space resources occupied after compression. Then, coding the coding spectrum adjustment frame, namely predicting and solving a residual error, and predicting the coding spectrum adjustment frame to obtain a prediction frame of the coding spectrum adjustment frame and the prediction data PI; and subtracting the initial frame of the coding spectrum adjusting frame from the prediction frame of the coding spectrum adjusting frame to obtain residual data R of the coding spectrum adjusting frame, and inputting the residual data R and the prediction data PI into a code stream generating module to be synthesized to obtain the compressed frame. The data processing method P200 can improve the coding efficiency of the coding spectrum adjustment frame, so that the data amount in the compressed frame is further increasedThe steps are reduced, the coding efficiency is improved, and the compression ratio is improved. Since the subject of the coded spectral modulation is the first enhancement frame P'0Hence the on-press frame is the first enhancement frame P'0. Taking the video data as an example, step SA244 may include:
SA 244-2: determining a frame type of the initial frame.
As previously described, when video data is encoded using the standards of h.264 or h.265, frames are often compressed into different frame types according to frame images. Thus, the data compression device 200 is buffering the on-press frame (first enhancement frame P'0) Before the coding spectrum adjustment is carried out, the frame type of the initial frame needs to be determined, and the coding convolution kernels selected for different frame types are different.
For a sequence of video frames, specific Frame types may include Intra-predicted frames (I frames), forward predicted frames (P frames), and Bi-directionally predicted frames (B frames). For a frame sequence with only one frame, it is usually processed as intra-predicted frames (I-frames). An I-frame is a coded frame that is compressed within a full frame. When decoding, the data of the I frame is only used without referring to other pictures to reconstruct complete data, and the data can be used as reference frames of a plurality of subsequent frames. P-frames are encoded frames that compress the amount of transmitted data by substantially reducing the temporal redundancy information with previously encoded frames in the image sequence. A P-frame is predicted from a P-frame or I-frame preceding it and compresses the frame based on its difference from the adjacent previous frame or frames. The method of P frame and I frame joint compression can achieve higher compression without obvious compression trace. It only references the I or P frame that was previously near it. The B frame compresses the current frame according to the difference between the previous frame, the current frame and the next frame, that is, only the difference between the current frame and the previous and next frames is recorded. Generally, I-frames are the least efficient in compression, P-frames are higher, and B-frames are the highest. During the encoding process of video data, part of video frames will be compressed into I frames, part will be compressed into P frames, and part will be compressed into B frames. The frame type of the initial frame includes at least one or more of an I frame, a P frame, and a B frame.
SA 244-4: and selecting a convolution kernel from a coding convolution kernel group as the coding convolution kernel based on the frame type of the initial frame, and performing convolution on the compressed frame to obtain a coding spectrum adjusting frame.
Specifically, step SA244-4 may be to the on-press frame (first enhancement frame P'0) And carrying out the coding frequency spectrum adjustment to obtain the coding frequency spectrum adjustment frame. Wherein the encoded spectral modification includes convolving the intra-compressed frame with an encoded convolution kernel to smoothly reduce the amplitude of the intra-compressed frame in the intermediate frequency region in the frequency domain.
The spectral modification of the on-press frame may be expressed as a multiplication of the on-press frame by a transfer function H in the frequency domain1(f) (i.e., the encoded spectral modification function) or a corresponding convolution calculation in the time domain. If the compressed frame is digitized data, the convolution operation may be performed by selecting the same adjustment function H as the encoded spectrum1(f) And carrying out convolution operation on the corresponding coding convolution kernels. For convenience of description, the present specification will describe the spectral adjustment by taking convolution in the time domain as an example, but those skilled in the art will understand that the spectral adjustment function H is adjusted by multiplication in the frequency domain by the coding spectral adjustment function H1(f) The manner in which the spectral adjustment is performed is also within the scope of the present description.
As previously described, the encoded spectral modification of the intra-frame may be represented as a convolution of the intra-frame in the time domain. The storage medium of the data compression device 200 may have stored therein a plurality of code spectrum adjusters, i.e., the group of code spectrum adjusters. Each code spectrum adjuster includes a set of code convolution kernels. That is, the storage medium of the data compression apparatus 200 may include the encoding convolution kernel group, and the encoding convolution kernel group may include at least one convolution kernel. When the data compression apparatus 200 convolves the compressed frame, one convolution kernel may be selected from the encoding convolution kernel group as the encoding convolution kernel based on the frame type of the compressed frame corresponding to the initial frame, and the compressed frame may be convolved. When the current frame corresponding to the initial frame is an I frame or a P frame, the data compression device 200 convolves the I frame or the P frame, including selecting a convolution kernel from the coding convolution kernel set as the coding convolution kernel, and convolving the I frame or the P frame. Any convolution kernel in the convolution kernel group can reduce the amplitude of the I frame or the P frame in the frequency domain and smoothly reduce the amplitude in the intermediate frequency domain. The data compression apparatus 200 may also select a convolution kernel with the best compression effect from the set of coding convolution kernels as the coding convolution kernel according to the coding quality requirement for the initial frame. When the intra-frame (i.e., the first enhancement frame in this embodiment) corresponding to the initial frame is a B frame, the coding convolution kernel of the intra-frame is the same as the coding convolution kernel corresponding to the nearest reference frame of the intra-frame, or the coding convolution kernel of the intra-frame is the same as the coding convolution kernel corresponding to the reference frame with the greatest attenuation degree in the nearest reference frames in two adjacent directions, or the coding convolution kernel of the intra-frame is an average value of the coding convolution kernels corresponding to the nearest reference frames in two adjacent directions. When the distance between the B frame and two adjacent reference frames is the same, the coding convolution kernel of the compressed frame may be a coding convolution kernel corresponding to any one of the two adjacent reference frames, for example, a convolution kernel corresponding to a forward adjacent reference frame selected by the current B frame. Therefore, the amplitude of the compressed frame is better reduced, the coding spectrum is better adjusted, and the compression ratio of the video data is higher.
FIG. 8A illustrates a coded spectral modification function H provided in accordance with an embodiment of the present specification1(f) A graph of (a). As shown in FIG. 8A, the horizontal axis is the normalized frequency f, and the vertical axis is the code spectrum adjustment function H1(f) Amplitude adjustment gain H of1. Curves 1 and 2 in fig. 8A represent different encoded spectral adjustment functions H for different encoded convolution kernels1(f) In that respect Taking video data as an example, because human eyes are more sensitive to data from low frequency to medium frequency than to data from high frequency, when the coding frequency spectrum adjustment is performed on the video data, the low frequency to medium frequency information contained in an initial frame is kept as far as possible without loss, the amplitude gains of the medium frequency region and the low frequency region are kept relatively stable, and the information from the low frequency region to the medium frequency region is made as far as possible to be oppositeThe pair is stable and complete so that the information in the low to medium frequency region can be better recovered when decompressing. Thus, the coding spectral modification function H used for the coding spectral modification1(f) Adjusting the amplitude of the compressed frame in any frequency f from low frequency to intermediate frequency in the frequency domain1May be greater than zero after passing through said encoded spectral modification function H1(f) The amplitudes of all the frequencies in the low-frequency to medium-frequency region after processing are also larger than zero, and data of any frequency cannot be lost in the low-frequency to medium-frequency region. Therefore, data in all frequency ranges of the low frequency to intermediate frequency regions can be recovered when decompressing the compressed data. Otherwise, if the code spectrum adjustment function H1(f) If there is a zero point in the middle-low frequency to middle-high frequency region, the data of the frequency part corresponding to the zero point may be lost, and the decoding end cannot recover the lost data during decompression, so that the original data cannot be recovered. As before, we will be the first enhancement frame P'0Passing through said encoded spectral modification function H1(f) The data obtained after the treatment is defined as P1Thus, the data of the coded spectral adjustment frame is defined as P1. Due to P'0Only to P0Carrying out small-range enhancement, carrying out no enhancement in the area outside the first preset range, and carrying out P 'in the area outside the first preset range'0And P0And (5) the consistency is achieved. Thus, P0And P1The relationship between them can be expressed as the following formula:
P1=H1(f)·P′0≈H1(f)·P0formula (3)
Since the human eye is relatively insensitive to high frequency data, the amplitude of the high frequency part can be attenuated to a greater extent and the amplitude of the high frequency region can be reduced to a greater extent when the coding spectrum adjustment is performed on the video data. Thus, the data information contained in the first enhancement frame can be reduced, and the compression ratio and the coding efficiency can be improved.
The coded spectral modification function H used for the coded spectral modification is therefore1(f) The compressed frame can be reduced in frequency domainThe amplitude value. In some embodiments, the encoded spectral modification function H used by the encoded spectral modification1(f) The amplitude of the high frequency region of the compressed frame in its frequency domain can be smoothly reduced. The smooth reduction of the amplitude may be attenuation of the amplitude by a first amplitude adjustment gain value of the high frequency region, or attenuation of the amplitude within a certain error range around the first amplitude adjustment gain value. For example, the first amplitude adjustment gain may be any value between 0 and 1. For example, the first amplitude adjustment gain may be in a range defined by any two of 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72, 0.76, 0.80, 0.84, 0.88, 0.92, 0.96, and 1, etc. The error range can be within a range defined by any two of numerical values of 0, ± 1%, ± 2%, ± 3%, ± 4%, ± 5%, ± 6%, ± 7%, ± 8%, ± 9%, ± 10%, ± 11%, ± 12%, ± 13%, ± 14%, ± 15%, ± 16%, ± 17%, ± 18%, ± 19%, ± 20%, ± 21%, ± 22%, ± 23%, ± 24%, ± 25%, ± 26%, ± 27%, ± 28%, ± 29%, ± 30%, and the like. As shown in fig. 8A, the first amplitude adjustment gain of the code spectrum adjustment in the high frequency region (approximately, the range of 0.4 to 0.5) is about 0.2.
In some embodiments, the encoded spectral modification function H used by the encoded spectral modification1(f) The magnitude of the intermediate frequency region of the compressed frame can be reduced smoothly in the frequency domain. Wherein the coding spectrum adjustment adjusts an amplitude adjustment gain of the intermediate frequency region of the intra-frame to a second amplitude adjustment gain. In some embodiments, the second amplitude adjustment gain may have a value greater than the first amplitude adjustment gain, as shown in fig. 8A. When the code spectrum is adjusted to be frequency attenuated (i.e., when the code spectrum adjuster is the frequency attenuator), both the first amplitude adjustment gain and the second amplitude adjustment gain are less than 1. That is, the encoded spectral modification may reduce the magnitude of the mid-frequency region of the compressed frame by a lower magnitude than the high-frequency region.
Furthermore, the encoded spectral modification function H1(f) The amplitude of the low frequency region of the compressed frame can also be reduced smoothly in the frequency domain. Wherein the coding spectrum adjustment adjusts an amplitude adjustment gain of the low frequency region of the intra-frame to a third amplitude adjustment gain. When the code spectrum is adjusted to be frequency attenuated (i.e., when the code spectrum adjuster is the frequency attenuator), the third amplitude adjustment gain and the second amplitude adjustment gain are both less than 1. The third amplitude adjustment gain may have a value greater than or equal to the second amplitude adjustment gain. That is, the encoded spectral modification may reduce the amplitude of the low frequency region of the compressed frame by less than or equal to the amplitude of the mid frequency region.
Further, in order to save the amount of computation required in implementation and avoid the occurrence of ringing, the encoding spectrum adjustment function H1(f) The first enhancement frame P 'should be made'0The amplitude in the frequency domain transitions smoothly. As described above, when an image is subjected to spectrum adjustment, if there is a region where the selected spectrum adjustment function has a drastic change in value, a convolution kernel or a combination of convolution kernels with higher orders is required in the implementation process. This means an increase in the amount of unnecessary operations. At the same time, higher order convolution kernels are more likely to cause stronger color ringing, called ringing, in the output image at sharp changes in gray scale or color. Ringing effects occur mostly at image boundaries. By adapting the encoded spectrum to a function H1(f) Comparing the first enhancement frame P 'in frequency domain'0Should be smoothly transitioned so as to avoid abrupt changes in the amplitude adjustment gain. For example, the encoded spectral modification function H may be used when the high frequency region is not contiguous with the intermediate frequency region1(f) The amplitude of the middle and high frequency region of the high voltage frame may be adjusted in the frequency domain such that the variation of the amplitude adjustment gain in the middle and high frequency region is smooth and continuous. When the intermediate frequency region is not connected with the low frequency region, the coding spectrum adjusting function H1(f) The medium-low frequency region of the compressed frame can be processed in the frequency domainThe amplitude is adjusted so that the variation of the amplitude adjustment gain in the mid-low frequency region is continuous.
The code spectrum adjustment function H1(f) The dc portion, i.e. the portion at frequency 0, may also be kept with an amplitude adjustment gain of 1 to ensure that the first enhancement frame P 'may be retained'0The basic information in (2) can obtain average value information during data decompression so as to restore original initial data. Thus, the encoded spectral modification function H used by the encoded spectral modification1(f) The amplitude reduction amplitude of the low frequency region is lower than that of the medium frequency region. But when the amplitude gain of the dc part (i.e. the part with frequency 0) is not 1, the function H is adjusted by designing a suitable decoded spectrum2(f) The original data can also be recovered. In particular with respect to H1(f) And H2(f) The specific relationship will be described in detail in the following description.
Coded spectral modification function H as shown in FIG. 8A1(f) In the graph of (0, 0.1)]The frequencies in between belong to the low frequencies; (0.1,0.15]The frequencies in between belong to the medium and low frequencies; (0.15,0.33]The frequencies in between belong to the intermediate frequency; (0.33,0.4]The frequencies in between belong to medium-high frequencies; (0.4,0.5]The frequencies in between are of high frequency. The third amplitude adjustment gain of the low frequency region is greater than the second amplitude adjustment gain of the medium frequency region; the second amplitude adjustment gain of the intermediate frequency region is greater than the first amplitude adjustment gain of the high frequency region. Meanwhile, the second amplitude adjustment gain of the intermediate frequency region is relatively stable, the curve 1 is about 0.5, and the curve 2 is about 0.6; a first amplitude adjustment gain H of the high frequency region1And is also relatively smooth, with curve 1 slightly below 0.2 and curve 2 slightly above 0.2. The coding spectrum adjustment function H1(f) Is a smooth transition curve. In engineering implementation, the coding spectrum adjusting function H can be allowed on the basis of realizing amplitude reduction1(f) There is a small range of fluctuation in the curve of (2), which does not affect the effect of compression. For forms of data other than video data, the encoded spectral modification function H may be set according to the degree of sensitivity of the recipient to the data1(f) Parameter (d) of. Different forms of data, the receiver is more or less sensitive to frequency.
FIG. 8B illustrates a coded spectral modification function H provided in accordance with an embodiment of the present specification1(f) A graph of (a). Curves 3 and 4 in FIG. 8B represent different encoded spectral modification functions H for different encoded convolution kernels1(f) .1. the In the case of video data, it is desirable to properly retain more high frequency components in some special application scenarios, such as reconnaissance scenarios. Thus, in some embodiments, the spectral modification function H is encoded1(f) The first amplitude adjustment gain may be made larger than the second amplitude adjustment gain (curve 3) or equal to the second amplitude adjustment gain (curve 4) in the curve.
In the case of video data, in some application scenarios where the image quality requirement is not high, the high frequency component can be completely filtered out, and therefore, the coding spectrum adjustment function H used for the coding spectrum adjustment1(f) Adjusting the amplitude of any frequency from the low frequency region to the middle frequency region in the frequency domain of the compressed frame by a gain H1Are all larger than zero, and the gain H is adjusted for the amplitude in the high frequency region1May be equal to 0 (not shown in fig. 8A and 8B).
It should be noted that the curves shown in fig. 8A and fig. 8B are only illustrated by taking video data as an example, and those skilled in the art should understand that the coding spectrum adjustment function H is1(f) Is not limited to the form shown in fig. 8A and 8B, all of the encoded spectral modification functions H that enable the amplitude of the mid-frequency region of the first enhancement frame in the frequency domain to be smoothly reduced1(f) And coding spectral modification function linear combinations
Figure BDA0002884076930000381
Or code spectral modification function product combinations
Figure BDA0002884076930000382
Or combinations of linear and product combinations are within the scope of the present disclosure. Wherein i is more than or equal to 1,
Figure BDA0002884076930000383
representing a linear combination of n functions, H1i(f) Represents the ith function, kiRepresenting the corresponding weight of the ith function. j is more than or equal to 1,
Figure BDA0002884076930000384
Figure BDA0002884076930000385
representing a combination of products of n functions, kjRepresents the weight corresponding to the jth function, H1j(f) And may be any function.
Table 3 shows a parameter table for encoding a convolution kernel provided in accordance with an embodiment of the present specification. Table 3 exemplarily lists the parameters of one coding convolution kernel, wherein each row in table 3 represents one coding convolution kernel. For an 8-bit video image, it is necessary to ensure that the gray value of a pixel point in the encoded spectrum adjustment frame obtained after encoding convolution is within 0-255, and therefore, in this embodiment, the result after convolution needs to be divided by 256. The coding convolution kernel is based on the coding spectrum adjustment function H1(f) Obtained by fourier transform. The following table 3 is only an exemplary illustration, and those skilled in the art should understand that the coding convolution kernel is not limited to the parameters shown in table 3, and all coding convolution kernels that can smoothly reduce the amplitude of the midfrequency region of the compressed frame in the frequency domain belong to the protection scope of the present specification.
Figure BDA0002884076930000391
It should be noted that, in order to avoid ringing, the encoded spectral modification function H1(f) Is a smooth transition curve, and avoids the abrupt change of the amplitude adjustment gain in the curve. As mentioned above, the ringing effect refers to that when an image is subjected to spectrum adjustment in image processing, if the selected spectrum adjustment function has a fast change, the image will "ring". The term "ringing" refers to the gray scale of the output imageThe shock generated at the sharp change is as if the air shock is generated after the clock is knocked. Ringing effects occur at image boundaries as much as possible.
And the coding spectrum adjustment function H1(f) The ratio of the absolute value of the sum of negative coefficients to the sum of non-negative coefficients in the corresponding encoded convolution kernel should be less than 0.1. For example, in some embodiments, the convolution kernel coefficients in the encoded convolution kernel may all be non-negative numbers. Taking video data as an example, when there are more negative coefficients in the coding convolution kernel, the pixel values at the image boundary are very different, and a large pixel value multiplied by a negative coefficient will make the final result of convolution smaller, and the pixel reflected on the image is darker. If the convolution result has a negative number and the absolute value of the negative number is large, when the convolution result is calculated by using unsigned integer calculation, the unsigned integer calculation result may be inverted, and an unsigned complementary value taking the value as the negative number may cause that the convolution result becomes large and the pixel is bright when the result is reflected on an image. Therefore, when designing the coding convolution kernel, the coefficients of the coding convolution kernel can be all non-negative numbers, or the ratio of the absolute value of the sum of the negative coefficients in the coding convolution kernel to the sum of the non-negative coefficients should be less than 0.1, that is, a small number of negative coefficients with small absolute values are allowed to appear in the coding convolution kernel.
The data compression apparatus 200 may convolve the compressed frame (initial frame) in at least one of a vertical direction, a horizontal direction, and a diagonal direction when convolving the compressed frame using the encoded convolution kernel.
It should be noted that when performing the convolution on the compressed frame, the data processing unit processed by the convolution may be a frame of data, or may be a part of a frame of data. Taking video data as an example, the unit may be a frame or a field of pictures, or a part of a frame/field of pictures, for example, in video coding, a picture is further divided into slices (slice), slices (tile), Coding Units (CU), macroblocks (macroblock), or blocks (block). The convolution object includes, but is not limited to, a portion of the image segmentation unit described by the above nouns. The same or different encoding convolutional kernels may be selected in different processing units.
Step SA244 may further include:
SA 244-6: and performing the encoding (predicting and residual solving) on the encoded spectrum adjustment frame to obtain the predicted data PI and the residual data R.
SA 244-8: and inputting the predicted data PI and the residual data R into the code stream generation module for synthesis to obtain the compressed frame.
After the data compression device 200 performs the coding spectrum adjustment on the first enhancement frame, the coding spectrum adjustment frame is obtained, and the frequency component from low frequency to high frequency in the coding spectrum adjustment frame is smaller than the frequency component from low frequency to high frequency in the first enhancement frame. Therefore, the data compression device 200 may improve the coding efficiency of the coding spectrum adjustment frame by performing coding and code stream generation calculation after performing the coding spectrum adjustment on the compressed frame (first enhancement frame), so as to improve the compression ratio of the initial frame and improve the transmission efficiency of the initial data; and meanwhile, the boundary enhancement can avoid detail loss.
The method PB200 of data processing shown in fig. 4B corresponds to the flowchart shown in fig. 3B. The method PB200 as shown in fig. 4B may comprise:
SB 220: an initial frame in the initial data is selected. Consistent with step SA220, the description is omitted here.
SB 240: and performing the data compression on the initial frame to obtain a compressed frame. Step SB240 may include:
SB 242: for the initial frame P0Performing the boundary adjustment to obtain a first enhancement frame P'0. Consistent with step SA242, further description is omitted here.
SB 244: for the first enhancement frame P'0Performing the code spectrum adjustment and the coding. Step SB244 may include:
SB 244-2: the frame type of the initial frame is determined. Consistent with step SA244-2, it is not described herein in detail.
SB 244-4: for the first enhancement frame P'0Firstly, proceed withAnd predicting to obtain a predicted frame and predicted data PI.
SB 244-6: and selecting a convolution kernel from a coding convolution kernel group as the coding convolution kernel based on the frame type of the initial frame, and performing convolution on the compressed frame to obtain a coding spectrum adjusting frame. Wherein the on-frame comprises the first enhancement frame P'0And the predicted frame. Step SB244-6 may be equivalent to using the encoded spectral modification function H1(f) For the first enhancement frame P'0And the predicted frame performs the encoded spectral adjustment. The encoded spectral modification frame comprises P 'to the first enhancement frame'0The first coding spectrum adjusting frame after the coding spectrum adjustment is carried out and the second coding spectrum adjusting frame after the coding spectrum adjustment is carried out on the prediction frame.
SB 244-8: and solving a residual error of the first coding frequency spectrum adjusting frame and the second coding frequency spectrum adjusting frame to obtain the residual error data R.
SB 244-9: and inputting the prediction data PI and the residual error data R into the code stream generation module for synthesis to obtain the compressed frame.
The method PC200 of data processing shown in fig. 4C corresponds to the flowchart shown in fig. 3C. The method PC200 as shown in fig. 4C may include:
the SC 220: an initial frame in the initial data is selected. Consistent with step SA220, the description is omitted here.
SC 240: and performing the data compression on the initial frame to obtain a compressed frame. Step SC240 may include:
SC 242: for the initial frame P0Performing the boundary adjustment to obtain a first enhancement frame P'0. Consistent with step SA242, further description is omitted here.
SC 244: for the first enhancement frame P'0Performing the code spectrum adjustment and the coding. Step SC244 may include:
SC 244-2: the frame type of the initial frame is determined. Consistent with step SA244-2, it is not described herein in detail.
SC 244-4: for the first enhancement frame P'0First of all, carry outCoding, i.e. predicting and calculating residual errors, to obtain prediction data PI and residual error data R1
SC 244-6: and selecting a convolution kernel from a coding convolution kernel group as the coding convolution kernel based on the frame type of the initial frame, and performing convolution on the compressed frame to obtain the residual data R. Wherein the on-frame includes the residual data R1. Step SC244-6 may be equivalent to using the encoded spectral modification function H1(f) For the residual data R1The encoding spectral adjustment is performed.
SC 244-8: and inputting the prediction data PI and the residual error data R into the code stream generation module for synthesis to obtain the compressed frame.
The method PD200 of data processing shown in fig. 4D corresponds to the flowchart shown in fig. 3D. The method PD200 as shown in fig. 4D may comprise:
SD 220: an initial frame in the initial data is selected. Consistent with step SA220, the description is omitted here.
SD 240: and performing the data compression on the initial frame to obtain a compressed frame. Step SD240 may perform the code spectrum adjustment on the initial frame first, and then perform the boundary adjustment. Specifically, step SD240 may include:
SD 242: and performing the coding spectrum adjustment on the initial frame to obtain a coding spectrum adjustment frame.
For convenience of description, we define the data in the encoded spectral adjustment frame obtained in step SD242 as P01. Specifically, step SD242 may include:
SD 242-2: the frame type of the initial frame is determined. Consistent with step SA244-2, it is not described herein in detail.
SD 242-4: selecting a convolution kernel from a coding convolution kernel group as the coding convolution kernel based on the frame type of the initial frame, and performing convolution on the compressed frame to obtain the coding spectrum adjustment frame P01. Wherein the compressed frame comprises the initial frame P0. Step SD242-4 may be equivalent to using the encoded spectral modification function H1(f) To what is neededThe initial frame P0The code spectrum adjustment is performed.
SD 244: adjusting the frame P for the encoded spectrum01And carrying out the boundary adjustment to obtain a second enhancement frame.
For convenience of description, we define the data in the resulting second enhancement frame in step SD244 as P'1. FIG. 9 illustrates a method of obtaining a second enhancement frame P 'provided in accordance with embodiments of the present description'1Is described. As shown in fig. 9 and 4D, step SD244 may include:
SD 244-2: for the initial frame P0And said encoded spectral adjustment frame P01Obtaining a first boundary P by differenceE1
As previously described, the code spectrum adjustment may cause the initial frame P to0The amplitude in the frequency domain is smoothly decreased, thereby making the initial frame P0To obtain a coded spectral adjustment frame P01To reduce the initial frame P0Thereby reducing the amount of information in the initial frame P0And space resources occupied after compression. Thus, the coded spectral adjustment frame P01Can be understood as attenuating the initial frame P0The boundary information in (2). Next, for the initial frame P0And said encoded spectral adjustment frame P01Taking the difference to obtain the initial frame P0The first boundary PE1. The first boundary PE1Including the initial frame P0The boundary information of (1).
In some embodiments, step SD244 may further include:
SD 244-4: the first boundary P is defined by a first coefficient aE1And (6) performing enhancement. This step is substantially identical to step SA242-6, and will not be described herein.
SD 244-6: for the first boundary P by the first gamma algorithmE1The middle boundary value is in the first preset range [ -R1, R1 [ -R1 [ -R1 ]]Is adjusted to obtain the enhanced boundary PE. This step is substantially identical to step SA242-8, and will not be described herein.
SD244-8: enhancing the boundary PEAnd the first boundary PE1And obtaining an adjusting value by calculating the difference.
For convenience of description, we define the data in the adjustment value as Ed. Regulating value EdComprising a pair of first boundaries PE1An adjustment value at the time of adjustment.
In some embodiments, step SD244-6 and step SD244-8 may be combined. Table 4 may be stored in the data compression apparatus 200. Table 4 stores the first boundary PE1Input boundary value and regulation value EdThe corresponding relationship of (1). With 6 cases of R1, table 4 can be expressed as:
Figure BDA0002884076930000441
the data compression apparatus 200 may obtain the adjustment value E directly according to table 4d
SD 244-9: adjusting the encoded spectrum by a frame P01And the regulating value EdSuperposing to obtain the second enhanced frame P'1
As previously mentioned, the encoded spectral modification may be such that the encoded spectral modification frame P01The boundary of (2) is blurred. The encoded spectral adjustment frame P01The difference between adjacent pixels in (b) becomes small. In order to avoid loss of detail, the encoded spectrum is adjusted by a frame P01And the regulating value EdOverlap-add to make the encoded spectrum adjust the frame P01The boundary with smaller difference between adjacent pixels is enhanced, thereby reducing the loss of data in the encoding process and avoiding the loss of details.
Step SD240 may further include:
SD 246: for the second enhancement frame P'1Prediction and residual calculation are performed.
For the second enhancement frame P'1The coding (predicting and solving the residual) is carried out to obtain the predicted data PI and the residual data R, and the predicted data PI and the residual data R are input into the code stream generating module to be synthesized to obtain the code streamThe frame is compressed.
In summary, the data processing method P200 may perform the boundary adjustment and the coding spectrum adjustment on the initial frame at the same time, so as to improve the compression ratio of the initial frame, improve the coding efficiency and the transmission efficiency of the initial data, reduce data loss, and avoid detail loss.
Fig. 10 shows a flow chart of a method P300 of data processing for decompressing compressed frames. As described previously, the data decompression device 300 can execute the data processing method P300. In particular, the storage medium in the data decompression device 300 may store at least one set of instructions. The set of instructions is configured to instruct a decompression processor in the data decompression device 300 to complete the data processing method P300. When the data decompression apparatus 300 is operating, the decompression side processor may read the instruction set and execute the data processing method P300.
For convenience of description, we will describe the method of data processing P300 in the method shown in fig. 3A and 3D. The method P300 may comprise:
s320: compressed data is obtained. The compressed data includes the compressed frame.
The compressed data may include the compressed frame obtained by data-compressing the initial frame in the initial data by the data processing method P200. The compressed frame includes compressed prediction data PI and residual data R. As shown in fig. 3A and 3D, step S320 may include: and inputting the compressed frame into the code stream analysis module for analysis and calculation to obtain the prediction data PI and the residual error data R. As mentioned earlier, in the present application, a frame is one common processing unit constituting a data sequence. In data processing, calculation is often performed in units of frames. In the data processing method P200 in which the data compression apparatus 200 compresses data, the initial data may be compressed in units of frames. When the data decompression apparatus 300 decompresses the compressed frame, data decompression may be performed in units of frames.
S340: and decompressing the compressed frame to obtain a decompressed frame.
The data decompression refers to decompressing and calculating the compressed frame to obtain a decompressed frame, and restoring the decompressed frame to the original data or basically restoring the decompressed frame to the original data, or making the decompressed frame clearer than the original data. Taking video data as an example, when the amplitude of the decompressed frame at any frequency in the low-to-intermediate frequency region is restored to the threshold value of the initial frame or above, it is difficult for human eyes to perceive the difference between the decompressed frame and the initial frame. The threshold value may be any value between 80% and 90%. For example, the threshold may be any value in a closed interval defined by any two values of 80%, 81%, 82%, 83%, 84%, 85%, 86%, 87%, 88%, 89%, and 90%. For example, the data decompression should be performed such that the amplitude of the decompressed frame at any frequency in the low to intermediate frequency region is not less than 85% ± 3% of the initial frame.
The data decompression comprises the steps of carrying out decoding spectrum adjustment on a decoded frame, and carrying out further boundary correction on the data subjected to the decoding spectrum adjustment so as to obtain a required decompressed frame. The data of the frame being decompressed includes the compressed frame and any data state before the compressed frame becomes the decompressed frame in the decompression process.
Taking video data as an example, the data processing method P200 compresses the initial frame by a method combining coding spectrum adjustment and coding, so as to further improve the compression ratio of the video data and improve the efficiency of video transmission. In the video decompression technique, the data processing method P300 may decompress the compressed frame by a method combining decoding (i.e., recovering the compressed frame according to the residual data R and the predicted data PI) and decoding spectral adjustment to obtain a required decompressed frame, so as to recover the data in the compressed frame. The decoding may include any data state of the compressed frame and the compressed frame in a decoding process according to the prediction data PI and the residual data R. For example, the decoding frame may be the compressed frame, a decoded frame obtained by decoding, a predicted frame obtained by prediction, or the like.
Performing the data decoding on the compressed frameAnd the decoding spectrum adjustment applied is to input the decoded frame into a decoding spectrum adjuster for decoding spectrum adjustment. The decoded spectral modification may correspond to the encoded spectral modification, that is to say the decoded spectral modification function H2(f) Co-encoded spectral modification function H1(f) There should be a predetermined relationship. By carefully setting the decoding spectral modification function H2(f) Co-encoded spectral modification function H1(f) The encoded spectrally modified compressed frame, after the decoding spectral modification and the data processing, is completely restored or substantially restored to the data index before the encoding spectral modification (such as the image sharpness of the image data) without considering other calculation errors, or even exceeds the data before the encoding spectral modification in some indexes (such as the sharpness of the decoded image exceeds the original image). Decoding a spectral modification function H2(f) Co-encoded spectral modification function H1(f) The specific correlation relationship between the data and the reference data is related to the data processing mode of the decoded spectrum adjusted data. The data processing mode is different, and the frequency spectrum adjusting function H2(f) Co-encoded spectral adjustment function H1(f) The association relationship between them is also different. The specific mode of data processing and the spectral modification function H2(f) Co-encoded spectral adjustment function H1(f) The relationship between these elements will be described in detail later in the description.
As with the encoded spectral modification, the decoded spectral modification may also be performed in the frequency domain by performing a convolution in the time domain to decode the spectral modification function H2(f) (i.e., the decoding transfer function) adjusts the spectrum of the decoding frame. Therefore, there should be a corresponding relationship between the decoding convolution kernel used for the decoding spectrum adjustment and the encoding convolution kernel used for the encoding spectrum adjustment. By selecting and encoding a spectral modification function H1(f) A decoded spectral modification function H corresponding to said encoded convolution kernel2(f) And decoding the convolution kernel, the two modes can achieve the same effect. For convenience of description, the decoding spectrum adjustment will be described in the present specification by taking convolution in the time domain as an example, but it will be understood by those skilled in the art thatBy multiplying the decoded spectral modification function H in the frequency domain2(f) The manner in which the spectral adjustment is performed is also within the scope of the present description.
As mentioned above, the coding spectrum adjustment may attenuate the amplitude of the mid-frequency region of the intra-frame in its frequency domain, and blur the boundary data of the intra-frame, thereby reducing the amount of data generated by coding. The decoding spectral modification and the data processing can recover and even enhance the data after the coding spectral modification and the data processing. That is, the decoding spectral adjustment and the data processing may fully restore or substantially restore the amplitude of the sensitive frequencies in the decoded frames to a pre-attenuated state or even enhanced relative to the pre-attenuated state. Taking video data as an example, since human eyes are sensitive to low-to-intermediate frequency information in an image, the decoding spectrum adjustment and the data processing can recover or even enhance the amplitude of a low-to-intermediate frequency region in the video data. Thus, the amplitude of the decompressed frame in the low to intermediate frequency region should be at least restored or substantially restored to the amplitude of the original frame in the low to intermediate frequency region. In video data, since the human eye is relatively insensitive to high frequency data, the decoding spectral adjustment and the data processing may not restore the amplitude of the high frequency region, so that the amplitude of the high frequency region remains attenuated.
As described above, the data compression operation attenuates the amplitude of the initial frame in the intermediate frequency region or the intermediate frequency to high frequency region by the encoded spectrum adjustment, thereby reducing the amount of data information in the initial frame. Taking video data as an example, because the edge part of an object in an image has rich intermediate frequency and high frequency information, and the intermediate frequency and high frequency areas carry more data, reducing the amplitude of the intermediate frequency to the high frequency areas can visually blur the boundary data of an on-press frame, and can also greatly reduce the amount of information in the image. Thus, the data decompression may extract boundary information from the compressed frame and perform boundary enhancement on the boundary information to restore it to the state in the initial frame or enhance it relative to the state in the initial frame.
The conventional technology sometimes directly filters a compressed frame by using a high-pass filter or a band-pass filter, filters out components in a low-frequency region in the compressed frame, and extracts components from a medium-frequency region to a high-frequency region in the compressed frame, thereby extracting boundary information. However, more negative coefficients appear in the coefficients of the convolution kernels corresponding to the high-pass filter and the band-pass filter. As described above, when more negative coefficients are present in the convolution kernel, a strong ringing effect may be present in the image resulting from the convolution by the convolution kernel. Thus, to avoid ringing effects, the data decompression described in this specification uses a smoothly-transiting decoded spectral modification function H2(f) And performing spectrum adjustment on the compressed frame, filtering components of a medium-frequency region to a high-frequency region in the compressed frame, then calculating the difference between the compressed frame and the compressed frame subjected to the spectrum adjustment, so as to obtain the boundary information, and adjusting the boundary information by using an adjusting coefficient to restore the boundary information to an initial state or enhance the boundary information relative to the initial state. When the scheme is used for obtaining the boundary information, a decoding convolution kernel can be designed, all coefficients of the decoding convolution kernel are non-negative numbers, or the ratio of the absolute value of the sum of the negative coefficients to the sum of the non-negative coefficients is less than 0.1, so that the occurrence of ringing can be avoided.
Specifically, step S340 may include:
s342: and decoding the compressed frame to obtain a decoded frame. In the method P300, the decoding frame may be the decoded frame.
The compressed frame may be encoded by the data compression device 200 into the spectral adjustment frame. The data decompression apparatus 300 may decode the compressed frame to obtain the decoded frame. That is, the prediction is performed according to the prediction data PI to obtain a prediction frame, and the prediction frame is overlapped with the residual data R to obtain the decoding data P2The decoded data P2Is the data P of said decoded frame2. Certain errors may exist in the encoding and decoding processes, and the decoding process is carried out if the deviation caused by the encoding and decoding processes is smallData P in code frame2And data P in the encoded spectrally adjusted frame1Substantially coincident, therefore, P1And P2The relationship between them can be expressed as the following formula:
P2≈P1formula (4)
The data decompression apparatus 300 may perform the decoding spectral adjustment and the boundary correction on the decoded frame. Fig. 11A shows a flowchart of the decoding spectral adjustment and the boundary correction provided according to an embodiment of the present specification. Fig. 11A corresponds to fig. 10. As shown in fig. 11A and 10, step S340 may further include:
s344: for the decoding frame (i.e. the decoded frame P)2) And performing the decoding frequency spectrum adjustment to obtain a decoding frequency spectrum adjustment frame.
For convenience of description, we define the data in the decoded spectrally modified frame as PC. The decoding spectral adjustment prevents ringing of the decoded frames. The decoding spectral modification comprises using the decoding spectral modification function H2(f) And performing the decoding spectrum adjustment on the decoded frame, and enabling the amplitude of the decoded frame in the frequency domain to be smoothly reduced so as to filter the components from the intermediate frequency to the high frequency region of the decoded frame, thereby obtaining the decoding spectrum adjustment frame. The middle-frequency to high-frequency components in the spectrum of each frame of data are mainly concentrated in the regions of the frame of data where the data change is severe, i.e. the boundary data of the data. For example, for a frame of image, the mid-to-high frequency data is mainly concentrated on the boundary of the object in the image, i.e. the boundary data of this frame of image. Thus, decoding the data P in the spectrally conditioned frameCCan be understood as removing the decoded frame P2The boundary information in (2). The decoding of data P in the spectrally modified frameCCan be expressed as the following equation:
PC=H2(f)·P2=H1(f)·H2(f)·P′0≈H1(f)·H2(f)·P0formula (5)
The decoding spectral adjustment comprises using the corresponding based on the coding convolution kernelThe decoding convolution kernel of (a) convolves the decoding frame (a decoding frame). To avoid ringing effects, the ratio of the absolute value of the sum of negative coefficients to the sum of non-negative coefficients in the decoding convolution kernel is less than a threshold. For example, the threshold may be any one of 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.2, 0.3, 0.4 or any two of the defined intervals. For example, the convolution kernel coefficients in the decoding convolution kernel may all be selected to be non-negative numbers. Decoding a spectral modification function H2(f) The gain is adjusted to 0 for the amplitude in the mid-to-high frequency region and may fluctuate within a certain error range. The error range can be within a range defined by any two of numerical values of 0, ± 1%, ± 2%, ± 3%, ± 4%, ± 5%, ± 6%, ± 7%, ± 8%, ± 9%, ± 10%, ± 11%, ± 12%, ± 13%, ± 14%, ± 15%, ± 16%, ± 17%, ± 18%, ± 19%, ± 20%, ± 21%, ± 22%, ± 23%, ± 24%, ± 25%, ± 26%, ± 27%, ± 28%, ± 29%, ± 30%, ± 31%, ± 32%, ± 33%, ± 34%, ± 35%, and the like.
The pass-decoding spectral modification function H2(f) The amplitude adjustment gain of the dc part, i.e. the part with frequency 0, can be kept at 1 to ensure that the basic information in the initial frame can be retained. Thus, the decoded spectral modification function H used by the decoded spectral modification2(f) And smoothly transiting the amplitude adjusting gain of the low-frequency region from the amplitude adjusting gain 1 at the position with the frequency of 0 to the amplitude adjusting gain of the medium-frequency region close to 0.
Step S344 may include: determining a frame type of the decoded frame; and selecting a convolution kernel from a decoding convolution kernel group as the decoding convolution kernel based on the frame type of the decoding frame, and performing convolution on the decoding frame.
As previously described, the data compression apparatus 200 encodes the initial frame or the encoded spectral adjustment frame into different types in compressing the initial frame. Therefore, the data decompression apparatus 300 needs to determine the frame type of the decoded frame before performing the decoding spectrum adjustment on the decoded frame, and the decoding convolution kernels selected for different frame types are also different. The frame type of the decoded frame may include at least one of an I frame, a P frame, and a B frame. The frame type of the decoded frame may include only one frame type, or may include a plurality of frame types at the same time. The method for determining the frame type of the decoded frame is relatively mature, and is not a key point to be protected in this specification, and therefore, the detailed description is omitted here.
As previously mentioned, the decoded spectral modification of the decoded frame may appear as a convolution of the decoded frame in the time domain. The storage medium of the data decompression device 300 may have stored therein a plurality of different decoding convolution kernels, referred to as a decoding convolution kernel group. Each encoding convolution kernel has at least one decoding convolution kernel in the set of decoding convolution kernels corresponding thereto. When the data decompression apparatus 300 convolves the decoded frame, it may select one convolution kernel from the decoded convolution kernel group as the decoded convolution kernel based on the frame type of the decoded frame, and convolve the decoded frame. The operation of convolving the decoded frames with the decoded convolution kernel may be referred to as decoding the spectral modifier. When the decoded frame is an I frame or a P frame, the data decompression device 300 convolves the I frame or the P frame, including selecting one convolution kernel from the decoded convolution kernel group as the decoded convolution kernel, and convolving the I frame or the P frame. The data decompression apparatus 300 may also select, as the decoding convolution kernel, one convolution kernel having the best decompression effect from the group of decoding convolution kernels according to a decoding quality requirement for the decoded frame. When the decoded frame is a B frame, the decoded convolution kernel of the decoded frame is the same as the decoded convolution kernel of the nearest reference frame to the decoded frame, or the decoded convolution kernel of the decoded frame is the same as the decoded convolution kernel corresponding to the reference frame with the largest attenuation degree in the nearest reference frames in two adjacent directions, or the decoded convolution kernel of the decoded frame is the average value of the decoded convolution kernels corresponding to the nearest reference frames in two adjacent directions. And when the distance between the decoded frame and the two nearest reference frames before and after is the same, the decoding convolution kernel of the decoded frame takes the decoding convolution kernel of the nearest reference frame in the forward direction or the backward direction. When the decoded frame is a B frame, the reference frame corresponding to the decoding convolution kernel selected by the decoded frame should be the same as the reference frame corresponding to the coding convolution kernel selected by the frame under compression when the coding spectrum adjustment is performed.
The data decompression apparatus 300 may convolve the on-demand frame in at least one of a vertical direction, a horizontal direction, and a diagonal direction when convolving the on-demand frame using the decoding convolution kernel. The convolution direction of the current frame is the same as that of the current frame, and the convolution sequence of the current frame is opposite to that of the current frame. If the under-compressed frame is only convolved in the vertical direction, the under-decompressed frame is also only convolved in the vertical direction. Similarly, if the current frame is only convolved in the horizontal direction or the oblique direction, the current frame is also only convolved in the horizontal direction or the oblique direction. If the compressed frame is convoluted in multiple directions, the unframed frame is convoluted in multiple directions, and the direction and the sequence of the unframed frame during convolution are opposite to those of the unframed frame during convolution. That is, the vertical convolution is performed before the horizontal convolution in the frame compression, and the horizontal convolution is performed before the vertical convolution in the frame de-compression.
Step S340 may further include:
s346: for the decoding frame (i.e. the decoded frame P)2) And said decoded spectral adjustment frame PCAnd (5) obtaining a third boundary by difference.
For convenience of description, we define the data in the third boundary as PE3. The third boundary PE3Is the boundary of the decoding frame, including the initial frame P0The boundary information of (1).
In some embodiments, step S340 may further include:
s347: the third boundary P is measured by a second coefficient bE3And (6) performing enhancement.
Wherein the second coefficient b is an arbitrary number greater than 1. In some embodiments, the third boundary PE3May be to the decoded frame P2And said decoded spectral adjustment frame PCAnd (5) obtaining data by difference calculation. In other embodimentsIn an example, the third boundary PE3May be a boundary enhanced by said second coefficient b. At this time, the third boundary PE3It can also be expressed as the following equation:
PE3=P2-PC=P2-P2*H2(f) formula (6)
PE3=b*(P2-PC)=b*(P2-P2*H2(f) Equation (7)
As mentioned above, the components of the if to if region in the decoded frame are filtered, and the difference between the decoded frame and the decoded frame is calculated, so as to obtain the components of the if to if region in the decoded frame, that is, the boundary of the decoded frame. And the boundary information of the initial frame is included in the boundary of the decoding frame. As previously mentioned, the data in the boundary of the deframed is defined as the third boundary PE3. Wherein b is an enhancement coefficient indicating the enhancement degree of the boundary information, and the greater b is, the stronger the enhancement degree of the boundary information is. The adjustment coefficient b can be evaluated according to an empirical value and can also be obtained through machine learning training.
Step S340 may further include:
s348: applying a second gamma algorithm to the third boundary PE3Weakening the boundary with the middle boundary value within the second preset range to the third boundary PE3And denoising to obtain a denoising boundary.
For convenience of description, we define the data in the de-noising boundary as PE0. The boundary correction includes attenuating, by a second gamma algorithm, a boundary of which a boundary value is within a second preset range among the boundaries of the decoded frame to perform noise reduction. In general, image noise generated when encoding and decoding a video or an image is generally within a small range. Therefore, at the time of the data decompression, the noise reduction processing can be performed on the image noise in this small range generated by the encoding and decoding. When performing noise reduction processing, a gamma value greater than 1 can be used for the gamma pairThe threshold value is in the second preset range [ -R4, R4]The inner boundary is weakened to achieve the effect of noise reduction. The second preset range [ -R4, R4]May be a boundary value for which the boundary correction is required. The boundary value may be a third boundary PE3The value of each pixel in the array. R4 may be a boundary threshold. For example, R4 can be 30, 40, 50, etc. In some embodiments, R4 can be any number between 5 and 30.
Fig. 11B shows a flowchart for performing the boundary correction according to an embodiment of the present specification. As shown in fig. 11B, step S348 may be: the data decompression device 300 passes the third adjustment function HL3(f) For the third boundary PE3Adjusting to obtain a fourth boundary PE4(ii) a Applying the fourth boundary P by the second gamma algorithmE4Is in the second preset range [ -R4, R4 [ -R4, R]Weakening the inner boundary to obtain the noise reduction boundary PE0
The third boundary PE3The boundary where the boundary correction is not necessary contains many components from the intermediate frequency region to the high frequency region. Therefore, in order to avoid the influence of the boundary correction on other boundaries that do not need to be corrected, the data decompression device 300 may first determine the third boundary PE3Filtering is performed to filter components from the mid-frequency to the high-frequency region. Third adjustment function HL3(f) May be a low pass filter with a DC component DC equal to 1, such that said third boundary P isE3Components in the low frequency region in the frequency domain are retained while components in the medium to high frequency region are filtered. Third adjustment function HL3(f) Can be adjusted with a second adjustment function HL2(f) The same is true.
The second gamma algorithm may be a gamma algorithm having a gamma value gamma > 1. In step S348, the data decompression apparatus 300 may apply the fourth boundary PE4The pixels in (1) are subjected to boundary correction one by one. Specifically, the data decompression apparatus 300 may divide the fourth boundary PE4The boundary value corresponding to each pixel in (a) is compared with a boundary threshold R4; when the boundary values are in the range of [ -R4, R4]When the boundary value is within the range, correcting the boundary value using the second gamma algorithmPositively, making the absolute value of the boundary value smaller to perform boundary noise reduction; when the boundary values are in the range of [ -R4, R4]Otherwise, no correction is performed.
The data decompression device 300 may perform the boundary correction using a table look-up method. The data decompression apparatus 300 may have table 5 stored therein. Table 5 stores the correspondence between the input boundary value and the output boundary value in the second gamma algorithm, that is, the correspondence between the boundary value before correction and the boundary value after correction. Taking R4 ═ 5 as an example, table 5 can be expressed as:
Figure BDA0002884076930000541
fig. 11C illustrates another flow chart for performing boundary correction provided in accordance with an embodiment of the present description. As shown in fig. 11C, step S348 may also be: the data decompression device 300 directly compares the third boundary P with the second gamma algorithmE3Is in the second preset range [ -R5, R5 [ -R5]Correcting the inner boundary to obtain the noise reduction boundary PE0. Wherein R5 may be different from R4 or the same as R4.
In some embodiments, the data decompression apparatus 300 may further couple the third boundary P by the deviation value Δ EE3Is in the second preset range [ -R5, R5 [ -R5]Correcting the inner boundary to obtain the noise reduction boundary PE0. Wherein the noise reduction boundary PE0Is the third boundary PE3And the sum of the deviation values Δ E. Table 6 may be stored in the data decompression apparatus 300. Table 6 stores the third boundary PE3The deviation value Δ E and the input boundary value output boundary value. With R1 being 5, table 6 can be expressed as:
Figure BDA0002884076930000542
the data decompression apparatus 300 may obtain the denoising boundary 0 directly from table 6E0
S349: the noise reduction boundary PE0And the decoding frame (i.e. the decoded frame P)2) The decompressed frame P is obtained by superposition4
Since the boundary correction is performed only for the boundary within a small range, no correction is performed for the boundary outside the second preset range and the non-boundary region. Thus, the decompressed frame P4Can be expressed as the following equation:
P4=P2+PE0
=P2+PE3+ΔE
≈P′0·H1(f)·(1+b(1-H2(f)))
≈P0·H1(f)·(1+b(1-H2(f) )) formula (8)
Taking video data as an example, human eyes are sensitive to information in low-frequency to medium-frequency regions, and H is1(f) The design of the method is that the amplitude of a low-frequency to medium-frequency region in an initial frame is attenuated, so that the frequency information of all frequencies from low frequency to medium frequency in the initial frame is reserved in a coding frequency spectrum adjusting frame; data P in the decoded frame2And data P in the encoded spectrally adjusted frame1Basically consistent, therefore, the frequency information of the low-frequency to medium-frequency region is also reserved in the decoding frame; the components of the middle frequency area to the high frequency area in the decoded frequency spectrum frame are filtered, so that the frequency information of the low frequency area is reserved; therefore, the frequency information of the intermediate frequency region in the initial frame is retained in the boundary of the decoded frame obtained by the difference between the decoded frame and the decoded spectrum adjustment frame; the denoising boundary only eliminates the noise in a small range in the boundary of the de-framing, and the boundary outside the second preset range is not processed; therefore, theoretically, the decompressed frame obtained by overlapping the decoded frame and the noise reduction boundary can completely recover or substantially recover all frequency information from low frequency to intermediate frequency in the original frame without considering the deviation caused by other algorithms. That is to say, the data decompression can recover and even enhance the data compressed by the data at any frequency from low frequency to intermediate frequency. Therefore, after data decompression, the data is processedThe amplitude of the decompressed frame at any frequency in the low to intermediate frequency region should be approximately equal to or greater than the initial frame. The approximate equality means that the amplitude of the decompressed frame is equal to the amplitude of the initial frame and fluctuates within a certain error range. Taking video data as an example, when the amplitude of the decompressed frame at any frequency in the low-to-intermediate frequency region is restored to 85% or more of the original frame, human eyes can hardly perceive the difference between the decompressed frame and the original frame. Therefore, after data decompression, the amplitude of the decompressed frame at any frequency in the low-to-intermediate frequency region should be no less than 85% of the original frame. I.e. the error range should not be such that the amplitude of the decompressed frame at any frequency in the low to medium frequency region is below 85% of the original frame. And human eyes are relatively insensitive to the information of the high-frequency region, so that the information of the high-frequency region in the decompressed frame can be reserved to adapt to the scene with high quality requirement, and can be attenuated to suppress unnecessary high-frequency noise. P0And P4The relationship between them can be expressed as the following formula:
Figure BDA0002884076930000561
or
Figure BDA0002884076930000562
It should be noted that a certain range of errors can be allowed in the formula. For example, P4≥P0May be P4Is greater than or equal to P0In case of (2), P is allowed4Fluctuating within a certain error range. That is, at P4=P0When is, P4P may be allowed in case of negative error4Slightly less than P0. The formula here lists only P4And P0Without writing errors into the formula, it should be understood by those skilled in the art that fluctuations within the error range cause the amplitude of the decompressed frame in the low to intermediate frequency region to be slightly smaller than the initial frameThe scope of protection of the specification. In the following equations, a range of errors is also allowed. In the following, only P is also given4Is greater than or equal to the initial frame P0Description of the underlying relationships of (1). The person skilled in the art can derive this for fluctuations within the error range.
For convenience of description, we will refer to P0And P4The overall spectral modification function between is defined as H0(f) Then P is0And P4The relationship between them can be expressed as the following formula:
P4=H0(f)·P0formula (11)
Then, the overall spectral scaling function H0(f) Can be expressed as the following equation:
Figure BDA0002884076930000571
or
Figure BDA0002884076930000572
Wherein f is0For the boundary value of the frequency to which the human eye is sensitive, f for video data0It may be 0.33 or may be other values greater or less than 0.33. For different types of data, f0The value of (c) is different.
H in the above formulas (12) to (13)0(f) When in the selected frequency domain interval H0(f) When the value is approximately equal to 1, the data of the decompressed frame in the selected frequency domain interval can be restored to the initial frame; when in the selected frequency domain interval H0(f)>1, the data of the decompressed frame in the selected frequency domain interval may be enhanced, that is, the amplitude of the decompressed frame in the selected region is higher than that of the original frame. For example, if the initial frame is a frame in a video, it is sufficient to have H in a selected frequency domain interval0(f) Greater than 1, sharpness enhancement may be achieved. For convenience of description, we will refer to H0(f) 1 is defined as the normal mode, H0(f)>1 is defined as enhancement mode. In the following, we will take video data as an example and adjust the function H to the whole spectrum0(f) A detailed description will be given.
FIG. 12A illustrates an overall accommodation function H provided in accordance with embodiments of the present description0(f) A graph of (a). FIG. 12B illustrates an overall accommodation function H provided in accordance with embodiments of the present description0(f) A graph of (a). FIG. 12C illustrates an overall adjustment function H provided in accordance with embodiments of the present description0(f) A graph of (a). FIG. 12D illustrates an overall accommodation function H provided in accordance with embodiments of the present description0(f) A graph of (a). FIG. 12E illustrates an overall adjustment function H provided in accordance with embodiments of the present description0(f) A graph of (a). As shown in fig. 12A to 12E, the horizontal axis is normalized frequency f, and the vertical axis is the whole spectrum adjustment function H0(f) Amplitude adjustment gain H of0. The curves in fig. 12A to 12E represent different overall spectral modification functions H0(f) In that respect The normalized frequency maximum on the horizontal axis is 0.5. The normalized frequency f of the horizontal axis may be divided into a low frequency region, a medium-high frequency region, and a high frequency region. (0, a)]The frequencies in between belong to the low frequencies; (a, b)]The frequencies in between belong to the medium and low frequencies; (b, c)]The frequencies in between belong to the intermediate frequency; (c, d)]The frequencies in between belong to medium-high frequencies; (d, 0.5)]The frequencies in between belong to the high frequencies. The values of a, b, c, d, and e are described with reference to fig. 8A, and are not described herein again.
Since human eyes are more sensitive to low-frequency to medium-frequency data than to high-frequency data in video data, after data decompression, information of the decompressed frame in a low-frequency to medium-frequency region relative to the initial frame should be kept as much as possible without loss, that is, the overall spectrum adjusting function H0(f) The amplitude of the decompressed frame in the low-to-intermediate frequency region should be not less than 85% of the initial frame, and may even be larger than the initial frame. Since the human eye is not sensitive to the information in the high frequency region, the amplitude of the decompressed frame in the high frequency region may be selected according to different application scenarios, for example, in a scenario with low definition requirement, the amplitude of the decompressed frame in the high frequency region may be smaller than that of the initial frame. For the definitionIn a high-resolution reconnaissance scene, the amplitude of the decompressed frame in a high-frequency region may be approximately equal to or greater than the initial frame. As shown in fig. 12A to 12E, the overall adjustment function H0(f) Amplitude adjustment gain H at an arbitrary frequency f in the low to intermediate frequency region (including the low and intermediate frequency regions)0And the amplitude of the decompressed frame is not less than 85% of the initial frame, so that the definition is restored or enhanced, and the visual observation effect is improved. Said approximately equal to 1 may here fluctuate within a certain error range equal to 1. The error range can be within a range defined by any two of numerical values of 0, ± 1%, ± 2%, ± 3%, ± 4%, ± 5%, ± 6%, ± 7%, ± 8%, ± 9%, ± 10%, ± 11%, ± 12%, ± 13%, ± 14%, ± 15%, and the like. For convenience of description, we will adjust the function H as a whole0(f) The amplitude adjustment gain in the high frequency region is defined as a first amplitude adjustment gain, the amplitude adjustment gain in the intermediate frequency region is defined as a second amplitude adjustment gain, and the amplitude adjustment gain in the low frequency region is defined as a third amplitude adjustment gain. The third, second, and first amplitude adjustment gain values may fluctuate within the error range.
As shown in FIG. 12A, the global adjustment function H0(f) And the third amplitude adjusting gain value, the second amplitude adjusting gain value and the first amplitude adjusting gain value in the low-frequency to high-frequency region are all equal to 1, so that the amplitudes of the decompressed frame in the low-frequency to high-frequency region are not less than 85% of the initial frame, and the data of the decompressed frame in the low-frequency to high-frequency region can be smoothly restored or basically restored to the state of the initial frame.
As shown in FIG. 12B, the global adjustment function H0(f) The third and second amplitude adjustment gain values in the low to intermediate frequency region are approximately equal to 1, so that the data of the decompressed frame in the low to intermediate frequency region can be smoothly restored or substantially restored to the state of the original frame. Global regulatory function H0(f) The first amplitude adjustment gain value in the high frequency region is smaller than 1, so that the amplitude of the decompressed frame in the high frequency region is smoothly reduced relative to the initial frame to suppress the high amplitudeFrequency noise. The smooth reduction of the amplitude may be the attenuation of the amplitude by a first amplitude adjustment gain value, or the attenuation of the amplitude within a certain error range around the first amplitude adjustment gain value. For example, the first amplitude adjustment gain may be any value between 0 and 1. For example, the first amplitude adjustment gain value may be in a range defined by any two of 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72, 0.76, 0.80, 0.84, 0.88, 0.92, 0.96, and 1. As shown in fig. 12B, the global adjustment function H0(f) The first amplitude adjustment gain in a high frequency region (approximately 0.4 to 0.5) is about 0.6. The second and third amplitude adjustment gain values are both around 1. The second and third amplitude adjustment gain values may fluctuate within a certain error range, for example, the second and third amplitude adjustment gain values may be within a range defined by any two of the values 0.85, 0.90, 0.95, 1, 1.05, 1.10, and 1.15.
As shown in FIG. 12C, the global adjustment function H0(f) The third amplitude adjustment gain value in the low frequency region is equal to 1, so that the data in the low frequency region of the decompressed frame can be smoothly restored or substantially restored to the state of the original frame. Global regulatory function H0(f) And the second amplitude adjustment gain value in the intermediate frequency region and the first amplitude adjustment gain value in the high frequency region are both larger than 1, so that the amplitude of the decompressed frame in the intermediate frequency to high frequency region is smoothly increased relative to the initial frame, and the definition of data in the intermediate frequency to high frequency region is enhanced. The smooth increase of the amplitude value may be that the amplitude value is enhanced by a second amplitude adjustment gain value and a first amplitude adjustment gain value, or that the amplitude value is enhanced within a certain error range around the second amplitude adjustment gain value and the first amplitude adjustment gain value. The second amplitude adjustment gain value may be substantially equal to the first amplitude adjustment gain value, or the second amplitude adjustment gain value may be greater than the first amplitude adjustment gain value, or the second amplitude adjustment gain value may be smaller than the first amplitude adjustment gain value. Shown in FIG. 12CIn the graph, the second amplitude adjustment gain value is substantially the same as the first amplitude adjustment gain value. The second amplitude adjustment gain value and the first amplitude adjustment gain value may be any values greater than 1. For example, the second amplitude adjustment gain value and the first amplitude adjustment gain value may be within an interval defined by any two of the values 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, and 2.4. As shown in fig. 12C, the global adjustment function H0(f) The second amplitude adjustment gain and the first amplitude adjustment gain in the medium-frequency to high-frequency region are around 1.2.
As shown in fig. 12D, the overall adjustment function H0(f) The third amplitude adjustment gain value in the low frequency region is equal to 1, so that the data in the low frequency region of the decompressed frame can be smoothly restored or substantially restored to the state of the original frame. Global regulatory function H0(f) And the second amplitude adjusting gain value in the intermediate frequency region is larger than 1, so that the amplitude of the decompressed frame in the intermediate frequency region is smoothly increased relative to the initial frame, and the data definition of the intermediate frequency region is enhanced. Global regulatory function H0(f) The first amplitude adjustment gain value in the high frequency region is less than 1, so that the amplitude of the decompressed frame in the high frequency region is smoothly reduced relative to the initial frame, thereby reducing the data amount in the insensitive high frequency region to suppress high frequency noise. The graph shown in fig. 12D can enhance the sharpness while reducing the amount of data. The second amplitude adjustment gain value may be any value greater than 1. The first amplitude adjustment gain may be any value between 0 and 1. As shown in fig. 12D, the global adjustment function H0(f) The second amplitude adjustment gain in the intermediate frequency region is about 1.2, and the first amplitude adjustment gain in the high frequency region is about 0.6.
As shown in FIG. 12E, the global adjustment function H0(f) The third amplitude adjustment gain value in the low frequency region is greater than 1, so that the amplitude of the decompressed frame in the low frequency region is smoothly increased with respect to the initial frame. Global regulatory function H0(f) The second amplitude adjustment gain value in the intermediate frequency region is larger than 1, so that the amplitude of the decompressed frame in the intermediate frequency region is relatively flat to the initial frameSteadily increasing so that the sharpness of the data in the low to intermediate frequency region is enhanced. The second amplitude adjustment gain value may be equal to or greater than the third amplitude adjustment gain value. In the curve shown in fig. 12E, the second amplitude adjustment gain value is greater than the third amplitude adjustment gain value, so that the amplitude increase of the decompressed frame in the intermediate frequency region is greater than the amplitude increase of the decompressed frame in the low frequency region, thereby enhancing the definition of the intermediate frequency region to which the human eyes are most sensitive and improving the visual observation effect. Global regulatory function H0(f) The first amplitude adjustment gain value in the high frequency region is less than 1, so that the amplitude of the decompressed frame in the high frequency region is smoothly reduced relative to the initial frame, thereby reducing the data amount in the insensitive high frequency region to suppress high frequency noise. The graph shown in fig. 12E can enhance the sharpness while reducing the amount of data. The third amplitude adjustment gain value may be a value slightly greater than 1. For example, the third amplitude adjustment gain value may be within a range defined by any two of the values 1, 1.04, 1.08, 1.12, 1.16, and 1.2. The second amplitude adjustment gain value may be any value greater than the third amplitude adjustment gain. For example, the second amplitude adjustment gain value and the first amplitude adjustment gain value may be within an interval defined by any two of the values 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.2, and 2.4. The first amplitude adjustment gain may be any value between 0 and 1. For example, the first amplitude adjustment gain value may be in a range defined by any two of 0, 0.04, 0.08, 0.12, 0.16, 0.20, 0.24, 0.28, 0.32, 0.36, 0.40, 0.44, 0.48, 0.52, 0.56, 0.60, 0.64, 0.68, 0.72, 0.76, 0.80, 0.84, 0.88, 0.92, 0.96, and 1. As shown in fig. 12E, the global adjustment function H0(f) The third amplitude adjustment gain in the low frequency region is about 1.1, the second amplitude adjustment gain in the intermediate frequency region is about 1.2, and the first amplitude adjustment gain in the high frequency region is about 0.6.
Further, the overall spectral modification function H is adapted to modify the overall spectral modification function H when the high frequency region is not associated with the medium frequency region0(f) It is also possible to make an adjustment in the amplitude in the high frequency region so that the change in the amplitude adjustment gain in the medium and high frequency region is smooth and continuous.
Further, when the intermediate frequency region is not connected to the low frequency region, the overall spectral modification function H0(f) The adjustment can also be made in the amplitude of the middle and low frequency region, so that the change of the amplitude adjustment gain in the middle and low frequency region is continuous.
The global adjustment function H0(f) Is a smooth transition curve. In engineering implementation, the overall adjusting function H can be allowed on the basis of realizing that the amplitude of the decompressed frame in the low-frequency to intermediate-frequency region is approximately equal to or larger than that of the initial frame0(f) The curve of (2) has a small range of fluctuations that do not affect the decompression effect. For forms of data other than video data, the overall adjustment function H may be set according to the sensitivity of the recipient to the data0(f) The parameter (c) of (c). Different forms of data, the receiver is more or less sensitive to frequency.
For convenience of description, we will describe the case shown in equation (13) as an example. Combining equation (8) and equation (13), the decompressed frame P4Can be expressed as the following equation:
Figure BDA0002884076930000621
at this time, the code spectrum adjusting function H corresponding to the code convolution kernel1(f) A decoded spectral modification function H corresponding to the decoded convolution kernel2(f) The relationship between can be expressed as the following formula:
Figure BDA0002884076930000622
thus, H1(f) And H2(f) Can be expressed as the following formula:
Figure BDA0002884076930000623
wherein the function H is adjusted due to decoding of the spectrum2(f) In (1), except for the amplitude adjustment gain of the part with frequency 0 being 1, the amplitude adjustment gains of other frequencies are all less than 1, so 1/(1+ b (1-H)2(f) ) is less than 1 at frequencies other than 0, equation (16) ensures that the encoded spectral adjustment function H is equal to1(f) The amplitude adjustment gain of the part with the middle frequency of 0 is 1, and the amplitude adjustment gain corresponding to other frequencies is less than 1.
As described above, if the initial frame undergoes convolution in a plurality of directions, the decoded frame also undergoes convolution in a plurality of directions, and the direction and order of the decoded frame at the time of convolution are opposite to those of the initial frame at the time of convolution. That is, the initial frame is first convolved in the vertical direction and then convolved in the horizontal direction, and the decoded frame is first convolved in the horizontal direction and then convolved in the vertical direction. It should be noted that, the decoding frame needs to perform horizontal convolution to obtain compensation information in the horizontal direction, superimpose the compensation information in the horizontal direction of the decoding frame and the decoding frame, perform vertical convolution to obtain compensation information in the vertical direction, and superimpose the compensation information in the vertical direction of the decoding frame and the decoding frame.
FIG. 13A illustrates a global accommodation function H for the normal mode provided in accordance with embodiments of the present description0(f) Code spectrum adjustment function H1(f) And decoding the spectral modification function H2(f) A graph of (a). FIG. 13B illustrates an overall adjustment function H for an enhancement mode provided in accordance with embodiments of the present description0(f) Coding a spectral modification function H1(f) And decoding the spectral modification function H2(f) A graph of (a). The encoding convolution kernel and the decoding convolution kernel used in fig. 13A and 13B are the same, and the adjustment coefficient B is the same. Fig. 13A and 13B illustrate an example in which B is 1.5. As shown in fig. 13A and 13B, the horizontal axis represents the normalized frequency f, and the vertical axis represents the amplitude adjustment gain H. As shown in FIG. 13A, the whole spectrum adjustment function in an arbitrary frequency regionNumber H0(f) 1, integral spectrum adjustment function H0(f) Performing normal-mode spectral modification, i.e. a global spectral modification function H, on the superimposed decompressed frames0(f) The information for all frequencies is completely retained and the data in the decompressed frame can be substantially restored to the data in the initial frame. As shown in FIG. 13B, the overall spectral modification function H in the low frequency region0(f) 1, integral spectrum adjusting function H in medium-frequency to high-frequency region0(f)>1. Integral spectral adjustment function H0(f) Performing enhancement-mode spectral modification, i.e. a global spectral modification function H, on the medium-to-high frequency regions of the decompressed frame0(f) And enhancing the information of the medium-frequency to high-frequency region, wherein the data of the medium-frequency to high-frequency region in the decompressed frame is enhanced compared with the data of the medium-frequency to high-frequency region in the initial frame. It should be noted that the curves shown in fig. 13A and 13B are only exemplary, and those skilled in the art should understand that H is0(f)、H1(f)、H2(f) The curves of (A) are not limited to the forms shown in FIGS. 13A and 13B, and all of them conform to the formula (15) of H0(f)、H1(f)、H2(f) All the curves belong to the protection scope of the present specification. It is noted that all decoded spectral modification functions according to equation (15) are linearly combined
Figure BDA0002884076930000631
Or code spectral modification function product combinations
Figure BDA0002884076930000632
Or combinations of linear and product combinations are within the scope of the present disclosure. Wherein i is more than or equal to 1,
Figure BDA0002884076930000633
representing a linear combination of n functions, H2i(f) Represents the ith function, kiRepresenting the weight corresponding to the ith function. j is more than or equal to 1,
Figure BDA0002884076930000634
Figure BDA0002884076930000635
representing a combination of products of n functions, kjRepresents the weight corresponding to the jth function, H2j(f) And may be any function.
Table 7 shows a parameter table for decoding a convolution kernel provided according to an embodiment of the present specification. Table 7 exemplarily lists one parameter for decoding the convolution kernel. And the parameters of the decoding convolution kernel are all non-negative numbers, so that the data convolved by the decoding convolution kernel avoids ringing effect. Table 7 is only an exemplary illustration, and those skilled in the art should understand that the decoding convolution kernel is not limited to the parameters shown in table 7, and all decoding convolution kernels satisfying the aforementioned requirements are within the scope of the present disclosure.
Figure BDA0002884076930000641
Table 8 shows a parameter table of the encoded convolution kernel for a normal mode provided according to an embodiment of the present specification. Table 8 exemplarily lists the parameters of the coding convolution kernel for one normal mode. The normal mode encoding convolution kernel is based on the normal mode overall spectral modification function H0(f) And a decoded spectral modification function H corresponding to the parameter table of the decoded convolution kernel shown in Table 72(f) The obtained code spectrum adjusting function H1(f) Obtained by fourier transform. I.e. the code spectrum modification function H1(f) Is corresponding to H0(f) Obtained as 1. The data compression apparatus 200 and the data decompression apparatus 300 can make the data of the superimposed frame substantially identical to the data of the initial frame using the encoding convolution kernel of the normal mode shown in table 8 and the decoding convolution kernel shown in table 7. The example in table 8 is only illustrative, and those skilled in the art should understand that the encoding convolution kernel in the normal mode is not limited to the parameters shown in table 8, and all encoding convolution kernels satisfying the aforementioned requirements are within the scope of the present disclosure.
Figure BDA0002884076930000642
Table 9 shows a parameter table of an enhanced mode encoded convolution kernel provided according to an embodiment of the present specification. The enhancement mode encoding convolution kernel is based on the overall spectral modification function H of the enhancement mode0(f) And a decoded spectral modification function H corresponding to the parameter table of the decoded convolution kernel shown in Table 72(f) The obtained code spectrum adjusting function H1(f) Obtained by fourier transform. I.e. the code spectrum modification function H1(f) Is corresponding to H0(f)>1 is obtained. The data compression apparatus 200 can enhance the data of the overlay frame using the encoding convolution kernel of the enhancement mode shown in table 9 and the decoding convolution kernel shown in table 7. The table 9 is only an exemplary illustration, and those skilled in the art should understand that the enhanced mode encoding convolution kernel is not limited to the parameters shown in table 9, and all encoding convolution kernels satisfying the aforementioned requirements are within the scope of the present disclosure.
Figure BDA0002884076930000651
After the convolution operation, normalization processing is required so that the gradation value of the image after the convolution operation is between 0 and 255.
It should be noted that, when the code rate is high, the noise in the decompressed frame is small, and the above-mentioned boundary correction may not be performed. In case of low code rate, or in enhanced mode, i.e. H0(f)>1, the over-enhancement may cause noise in the decompressed frames, affecting the visual observation. We can perform the boundary correction on the boundary of the decoded frame to obtain the decompressed frame, so as to effectively eliminate noise.
FIG. 14A is a diagram illustrating an example of a decompressed image without boundary correction provided in accordance with an embodiment of the present description; fig. 14B illustrates an example diagram of a decompressed image subjected to boundary correction provided according to an embodiment of the present specification. Comparing fig. 14A and 14B, it is found that the boundary correction method described in the present description can effectively remove noise.
To sum up, in the data processing system 100 provided by the present specification, when the initial data is compressed, the data compression device 200 executes the method P200, and the boundary in a small range in the initial frame in the initial data is adjusted by the first gamma algorithm, so that the loss of boundary information with a small difference between adjacent pixel values is avoided in the data compression process, and the loss of details is avoided, and meanwhile, the method P200 performs coding spectrum adjustment on the initial frame by using a coding convolution kernel, so that the amplitude of the initial frame in a low-frequency to high-frequency region in a frequency domain is smoothly reduced, thereby reducing the data information in the initial frame, improving the coding efficiency, reducing the data capacity after compression, and improving the compression efficiency and the data transmission efficiency of the data. The system 100 for data processing provided in this specification, when decompressing the compressed frame, performs the method P300 by the data decompression apparatus 300, performs the decoding spectral adjustment on the compressed frame using the decoding convolution kernel, and uses the decoding spectral adjustment function H of the smooth transition2(f) Performing spectrum adjustment on the compressed frame, filtering components of a medium-frequency region to a high-frequency region in the compressed frame, then obtaining a difference between the compressed frame and the compressed frame subjected to the spectrum adjustment, obtaining boundary information of an initial frame, and weakening a boundary in a small range in the boundary information of the initial frame through the second gamma algorithm so as to eliminate noise in the boundary; and overlapping the decoded frame and the boundary information subjected to noise reduction to obtain the decompressed frame. Wherein the decoding spectral modification function H2(f) The corresponding decoding convolution kernel corresponds to the coding convolution kernel, all coefficients are non-negative numbers, or the ratio of the absolute value of the sum of the negative coefficients to the sum of the non-negative coefficients is less than 0.1, so that the occurrence of noise is effectively avoided, and the decompressed frame is clearer. The method and the system can improve the compression efficiency of data, improve the transmission efficiency, avoid detail loss, improve the definition of decompressed data and effectively eliminate noise.
The present specification additionally provides a non-transitory storage medium storing at least one set of executable instructions for data processing, which when executed by a processor, direct the processor to perform the steps of data processing method P200. In some possible implementations, various aspects of the description may also be implemented in the form of a program product including program code. The program code is for causing the data compression device 200 to perform the steps of the data processing described in this specification when the program product is run on the data compression device 200. A program product for implementing the above method may employ a portable compact disc read only memory (CD-ROM) and include program code and may be run on a data compression device 200, such as a personal computer. However, the program product of the present specification is not so limited, and in this specification, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system (e.g., compression side processor 220). The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Program code for carrying out operations for this specification may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the data compression apparatus 200, partly on the data compression apparatus 200, as a stand-alone software package, partly on the data compression apparatus 200 and partly on a remote computing device, or entirely on the remote computing device. In the case of a remote computing device, the remote computing device may be connected to the data compression device 200 through the transmission medium 120 or may be connected to an external computing device.
The foregoing description of specific embodiments has been presented for purposes of illustration and description. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In conclusion, upon reading the present detailed disclosure, those skilled in the art will appreciate that the foregoing detailed disclosure can be presented by way of example only, and not limitation. Those skilled in the art will appreciate that the present specification is susceptible to various reasonable variations, improvements and modifications of the embodiments, even if not explicitly described herein. Such alterations, improvements, and modifications are intended to be suggested by this specification, and are within the spirit and scope of the exemplary embodiments of this specification.
Furthermore, certain terminology has been used in this specification to describe embodiments of the specification. For example, "one embodiment," "an embodiment," and/or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. Therefore, it is emphasized and should be appreciated that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various portions of this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined as suitable in one or more embodiments of the specification.
It should be appreciated that in the foregoing description of embodiments of the specification, various features are grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the specification, for the purpose of aiding in the understanding of one feature. This is not to be taken as an admission that any of the features are required in combination, and it is fully possible for one skilled in the art to extract some of the features as separate embodiments when reading this specification. That is, embodiments in this specification may also be understood as an integration of a plurality of sub-embodiments. And each sub-embodiment described herein is equally applicable in less than all features of a single foregoing disclosed embodiment.
Each patent, patent application, publication of a patent application, and other material, such as articles, books, descriptions, publications, documents, articles, and the like, cited herein is hereby incorporated by reference. All matters hithertofore set forth herein except as related to any prosecution history, may be inconsistent or conflicting with this document or any prosecution history which may have a limiting effect on the broadest scope of the claims. Now or later associated with this document. For example, if there is any inconsistency or conflict in the description, definition, and/or use of terms associated with any of the included materials with respect to the terms, descriptions, definitions, and/or uses associated with this document, the terms in this document shall be used.
Finally, it should be understood that the embodiments of the application disclosed herein are illustrative of the principles of the embodiments of the present specification. Other modified embodiments are also within the scope of this description. Accordingly, the disclosed embodiments are to be considered in all respects as illustrative and not restrictive. Those skilled in the art can implement the application in this specification in alternative configurations according to the embodiments in this specification. Accordingly, embodiments of the present description are not limited to the embodiments described with particularity in the application.

Claims (25)

1. A method of data processing, comprising:
selecting an initial frame in the initial data, wherein the initial frame comprises initial data with preset byte number; and
performing data compression on the initial frame to obtain a compressed frame, wherein the data compression includes performing boundary adjustment on the initial frame and performing coding spectrum adjustment on a compressed frame, the compressed frame includes the initial frame and any data state before the initial frame becomes the compressed frame in the data compression process,
wherein the encoded spectral conditioning includes convolving the intra-compressed frame with an encoded convolution kernel to smoothly reduce the amplitude of the intermediate frequency region of the intra-compressed frame in the frequency domain.
2. The method of data processing as claimed in claim 1, wherein the boundary adjustment includes adjusting a boundary having a boundary value within a first preset range among the boundaries of the initial frame by a first gamma algorithm having a gamma value less than 1.
3. The method of data processing according to claim 2, wherein said data compressing said initial frame comprises:
firstly, the boundary adjustment is carried out on the initial frame, and then the coding spectrum adjustment is carried out; or alternatively
And firstly, carrying out the coding spectrum adjustment on the initial frame, and then carrying out the boundary adjustment.
4. The method of data processing according to claim 3, wherein said boundary adjustment prior to said code spectrum adjustment for said initial frame comprises:
performing the boundary adjustment on the initial frame to obtain a first enhanced frame; and
performing the coded spectral modification and coding on the first enhancement frame, including one of:
performing the coding spectrum adjustment on the first enhancement frame, and then performing prediction and residual calculation on the first enhancement frame after the coding spectrum adjustment, wherein the compressed frame comprises the first enhancement frame;
predicting the first enhancement frame to obtain a prediction frame, and then performing the coding spectrum adjustment and residual calculation on the first enhancement frame and the prediction frame, wherein the on-press frame comprises the first enhancement frame and the prediction frame; and
and predicting and solving a residual error of the first enhanced initial frame, and then performing the coded spectrum regulation on the residual error, wherein the compressed frame comprises the residual error.
5. The method of data processing according to claim 4, wherein said performing said boundary adjustment on said initial frame to obtain a first enhanced frame comprises:
adjusting the initial frame through a first adjusting function to obtain a first frame, so that the component of the initial frame in a low-frequency region in a frequency domain is reserved and the component of a middle-frequency region to a high-frequency region is attenuated;
obtaining a first boundary by subtracting the initial frame and the first frame, wherein the first boundary comprises boundary information of the initial frame;
adjusting the boundary of which the boundary value is within the first preset range in the first boundary through the first gamma algorithm to obtain an enhanced boundary; and
and superposing the first frame and the enhanced boundary to obtain the first enhanced frame.
6. The method of data processing according to claim 5, wherein said performing said boundary adjustment on said initial frame to obtain a first enhanced frame prior to said obtaining an enhanced boundary, further comprises:
and enhancing the first boundary by a first coefficient, wherein the first coefficient is an arbitrary number greater than 1, and the first boundary comprises the boundary enhanced by the first coefficient.
7. The data processing method of claim 5, wherein the adjusting the boundary of the first boundary whose boundary value is within the first preset range to obtain an enhanced boundary comprises:
adjusting the first boundary through a second adjusting function to obtain a second boundary, so that the component of the first boundary in a low-frequency region in a frequency domain is reserved and the component of a medium-frequency region to a high-frequency region is attenuated; and
and adjusting the boundary of which the boundary value is within the first preset range in the second boundary through the first gamma algorithm to obtain the enhanced boundary.
8. The method of data processing according to claim 3, wherein said performing said code spectrum adjustment prior to said boundary adjustment for said initial frame comprises:
performing the coding spectrum adjustment on the initial frame to obtain a coding spectrum adjustment frame;
performing the boundary adjustment on the coding frequency spectrum adjustment frame to obtain a second enhancement frame; and
and predicting and residual solving are carried out on the second enhanced frame.
9. The data processing method of claim 8, wherein said performing said boundary adjustment on said encoded spectrally adjusted frame to obtain a second enhancement frame comprises:
obtaining a first boundary by subtracting the initial frame and the coding spectrum adjustment frame, wherein the first boundary comprises boundary information of the initial frame;
adjusting the boundary of which the boundary value is within the first preset range in the first boundary through the first gamma algorithm to obtain an enhanced boundary;
obtaining a first boundary of the first image, and obtaining an enhanced boundary; and
and superposing the coding frequency spectrum adjusting frame and the adjusting value to obtain the second enhancement frame.
10. The data processing method of claim 9, wherein said boundary adjusting said coded spectral adjustment frame prior to said deriving an enhancement boundary, resulting in a second enhancement frame, further comprising:
and enhancing the first boundary by a first coefficient, wherein the first coefficient is an arbitrary number greater than 1, and the first boundary comprises the boundary enhanced by the first coefficient.
11. The data processing method of claim 9, wherein the adjusting the boundary of the first boundary whose boundary value is within the first predetermined range to obtain an enhanced boundary comprises:
adjusting the first boundary through a second adjusting function to obtain a second boundary, so that the component of the first boundary in a low-frequency area in a frequency domain is reserved, and the component of a medium-frequency area to a high-frequency area is attenuated; and
and adjusting the boundary of which the boundary value is within the first preset range in the second boundary through the first gamma algorithm to obtain the enhanced boundary.
12. The method of data processing according to claim 1, wherein said code spectrum adjustment of said on-press frame comprises:
determining a frame type of the initial frame, the frame type comprising at least one of an intra-predicted frame, a forward-predicted frame, and a bi-directionally predicted frame; and
and selecting one convolution kernel from the coding convolution kernel group as the coding convolution kernel to convolute the compressed frame based on the frame type of the initial frame.
13. The method of data processing according to claim 12, wherein said convolving the compressed frame comprises:
and performing convolution on the compressed frame in at least one direction of a vertical direction, a horizontal direction and an oblique direction.
14. The method of data processing according to claim 1, wherein said encoded spectral modification is such that the amplitude of said at-compressed-frame high-frequency region is reduced smoothly in the frequency domain.
15. The method of data processing according to claim 1, wherein said encoding spectral adjustment is such that the amplitude of the low frequency region of the compressed frame is reduced smoothly in the frequency domain, and
the encoded spectral modification reduces the amplitude of the low frequency region of the compressed frame by a lower amplitude than the amplitude of the mid frequency region.
16. The method of data processing according to claim 1, wherein said encoded spectral modification provides a gain greater than zero for amplitude modification of said compressed frame at any frequency in the frequency domain.
17. A system for data processing, comprising:
at least one storage medium storing at least one set of instructions for data processing; and
at least one processor communicatively coupled to the at least one storage medium,
wherein when the system is running, the at least one processor reads the at least one instruction set and performs the method of data processing of any of claims 1-16 in accordance with the instructions of the at least one instruction set.
18. A method of data processing, comprising:
obtaining compressed data, wherein the compressed data comprises a compressed frame obtained by performing data compression on an initial frame; and
decompressing the compressed frame to obtain a decompressed frame, the decompressing includes performing decoding spectral adjustment and boundary correction on a decoded frame, the decoded frame includes the compressed frame and the compressed frame becomes any data state before the decompressed frame in the data decompressing process, wherein,
said decoding spectral modification includes convolving said decoded spectral modification with a decoding convolution kernel so that said decoded spectral modification is reduced smoothly in frequency domain in order to filter components from the intermediate frequency to the high frequency region, said encoded spectral modification having a predetermined relationship with said decoded spectral modification,
the boundary correction includes correcting, by a second gamma algorithm, a boundary of which a boundary value is within a second preset range among the boundaries of the decoded frame to perform noise reduction.
19. The data processing method of claim 18, wherein the second gamma algorithm includes a gamma algorithm having a gamma value greater than 1 to attenuate a boundary of the boundary value within the second preset range among the boundaries of the solution frame.
20. The method of data processing according to claim 18, wherein said data decompressing the compressed frame comprises:
performing the decoding frequency spectrum adjustment on the decoding frame to obtain a decoding frequency spectrum adjustment frame;
obtaining a third boundary by subtracting the decoding spectrum adjustment frame from the decoding frame, wherein the third boundary is the boundary of the decoding frame and comprises the boundary information of the initial frame;
weakening the boundary of which the boundary value is within the second preset range in the third boundary through the second gamma algorithm so as to reduce noise of the third boundary to obtain a noise reduction boundary; and
and superposing the denoising boundary and the decoding frame to obtain the decompression frame.
21. The method of data processing according to claim 20, wherein said decompressing said compressed frame prior to said deriving said de-noised boundary comprises:
and enhancing the third boundary by a second coefficient, wherein the second coefficient is an arbitrary number greater than 1, and the third boundary comprises a boundary enhanced by the second coefficient.
22. The data processing method of claim 20, wherein the attenuating, by the second gamma algorithm, the boundary of the third boundary whose boundary value is within the second preset range to denoise the third boundary to obtain a denoised boundary comprises:
adjusting the third boundary through a third adjusting function to obtain a fourth boundary, so that the component of the third boundary in a low-frequency region in a frequency domain is reserved, and the component from a medium-frequency region to a high-frequency region is filtered; and
and weakening the boundary of which the boundary value is within the second preset range in the fourth boundary through the second gamma algorithm.
23. The method of data processing according to claim 20, wherein said decompressing said compressed frame prior to said performing said decoded spectral conditioning on said frame under decoding to obtain a decoded spectral conditioned frame, further comprises:
and decoding the compressed frame to obtain a decoded frame, wherein the decoded frame comprises the decoded frame.
24. The method of data processing according to claim 18, wherein said data compression includes code spectrum adjustment, including convolving said compressed frame with a code convolution kernel to smoothly reduce in a frequency domain an amplitude in an intermediate frequency region of the compressed frame, said compressed frame including said initial frame and any data state of said initial frame prior to said compressed frame being said compressed frame in said data compression process,
wherein the decoding convolution kernel corresponds to the encoding convolution kernel.
25. A system for data processing, comprising:
at least one storage medium storing at least one set of instructions for data processing; and
at least one processor communicatively coupled to the at least one storage medium,
wherein when the system is running, the at least one processor reads the at least one instruction set and performs the method of data processing according to the instructions of the at least one instruction set.
CN202110008566.9A 2020-04-09 2021-01-05 Data processing method and system Pending CN114727110A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202110008566.9A CN114727110A (en) 2021-01-05 2021-01-05 Data processing method and system
US17/525,900 US20220078417A1 (en) 2020-04-09 2021-11-13 Image and video data processing method and system
US17/727,791 US20220272325A1 (en) 2020-04-09 2022-04-24 Image and video data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110008566.9A CN114727110A (en) 2021-01-05 2021-01-05 Data processing method and system

Publications (1)

Publication Number Publication Date
CN114727110A true CN114727110A (en) 2022-07-08

Family

ID=82234563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110008566.9A Pending CN114727110A (en) 2020-04-09 2021-01-05 Data processing method and system

Country Status (1)

Country Link
CN (1) CN114727110A (en)

Similar Documents

Publication Publication Date Title
US7804896B2 (en) Content adaptive noise reduction filtering for image signals
US10863206B2 (en) Content-weighted deep residual learning for video in-loop filtering
CN113518227B (en) Data processing method and system
KR101081074B1 (en) Method of down-sampling data values
US20070285729A1 (en) Image processing apparatus and image processing method
US11503306B2 (en) Image and video data processing method and system
US20220078417A1 (en) Image and video data processing method and system
CN114079472A (en) Data processing method and system
CN113766239A (en) Data processing method and system
US11528488B2 (en) Image and video data processing method and system
JP4380498B2 (en) Block distortion reduction device
CN114727110A (en) Data processing method and system
JP7465410B2 (en) Data processing method and system
EP4329304A1 (en) Data processing method and system
JP3081658B2 (en) Image signal encoding device and image signal decoding device
US20220272325A1 (en) Image and video data processing method and system
CN114391254A (en) Video decoder, video encoder, methods for encoding and decoding a video signal and computer program for adjusting one or more denoising operations
CN108632502B (en) Image sharpening method and device
Wada et al. Extended joint bilateral filter for the reduction of color bleeding in compressed image and video
JP2844619B2 (en) Digital filter for image signal
JP2005191865A (en) Image processing apparatus, image processing program and image processing method
CN117979031A (en) Image filtering method, storage medium, electronic device and product
JPH04192695A (en) Moving image decoding device
JP4785953B2 (en) Video signal preprocessing method, video signal preprocessing apparatus, and video signal preprocessing program
JP4785954B2 (en) Video signal preprocessing method, video signal preprocessing apparatus, and video signal preprocessing program

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