WO2022247735A1 - 数据处理的方法和系统 - Google Patents

数据处理的方法和系统 Download PDF

Info

Publication number
WO2022247735A1
WO2022247735A1 PCT/CN2022/094004 CN2022094004W WO2022247735A1 WO 2022247735 A1 WO2022247735 A1 WO 2022247735A1 CN 2022094004 W CN2022094004 W CN 2022094004W WO 2022247735 A1 WO2022247735 A1 WO 2022247735A1
Authority
WO
WIPO (PCT)
Prior art keywords
boundary
frame
data
amplitude
frequency
Prior art date
Application number
PCT/CN2022/094004
Other languages
English (en)
French (fr)
Inventor
于江鸿
Original Assignee
于江鸿
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 于江鸿 filed Critical 于江鸿
Priority to JP2023568177A priority Critical patent/JP2024517851A/ja
Priority to EP22810462.6A priority patent/EP4329304A1/en
Publication of WO2022247735A1 publication Critical patent/WO2022247735A1/zh

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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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/18Methods 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 a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation

Definitions

  • This specification relates to the field of data processing, and in particular to a data processing method and system.
  • video and image compression techniques have been used more and more in the past few decades. Videos often contain a huge amount of information. From traditional radio, film and television to a large number of monitoring and Internet applications, compressed images, videos and images are taking up more and more network and storage resources. This makes it take up a lot of network resources if the original data of a piece of video is transmitted from one terminal to another terminal through the network. This makes it difficult to achieve smooth transmission of pictures in the case of some real-time video transmissions. Therefore, before video data is transmitted, compression processing must first be performed at the data compression device to facilitate transmission. After the compressed video is transmitted to the data decompression device via the transmission medium, the data decompression device then decompresses the video to at least partially restore the video image.
  • the main video compression standards in the prior art are the H.264 and H.265 standards.
  • the encoder Before transmission, usually according to the H.264 and H.265 standards, the encoder is used to compress the video as a whole, and after transmission, the video is decompressed through the decoder according to the H.264 and H.265 standards.
  • the above-mentioned overall video compression processing method is still unsatisfactory in terms of the balance between the amount of computation and the clarity of the decompressed video. This is because, when the H.264 and H.265 standards process the original video, various complex algorithms are used to generate the predicted frame of the original frame, and then the residual between the original frame and the predicted frame is recorded .
  • a common method is to reduce the high-frequency information in the original frame image by filtering the original frame. It can be seen from the Fourier transform that the frequency information of the boundary part of the object in the picture is often relatively rich, and the high-frequency components of the boundary part are usually larger than the high-frequency components of other gentle regions. Therefore, although the frame image with reduced high-frequency information becomes blurred visually (that is, the definition of the image is reduced), it can make the residual error between the predicted frame and the filtered original frame smaller. In this way, the calculation amount required for video encoding and the encoded data stream are greatly reduced.
  • the technique of frame prediction is very complex and consumes a lot of computing resources.
  • the video codec system every time the coding efficiency is increased by 30% to 40% on average, the amount of calculation will increase by about 10 times.
  • the clarity of the transmitted data is reduced after decompression, and there are often various noises, such as block effects or ringing effects.
  • the block effect refers to that in image processing, a block-based Fourier transform causes a discontinuity phenomenon to appear at an image boundary.
  • the ringing effect refers to that in image processing, when performing spectrum adjustment processing on an image, if the selected spectrum adjustment function has a faster change in value (that is, there is a region where the derivative changes sharply), it will make the output
  • the image produces grayscale oscillations where the grayscale changes sharply, just like the air vibration produced by a clock being struck.
  • the noise mostly appears at the image boundary. If an output image has strong noise, it cannot meet people's increasing requirements for data clarity. Therefore, how to further improve the compression efficiency of data, improve the clarity of decompressed data, and eliminate noise at the same time has always been the goal pursued in the field of data compression and decompression technology.
  • the data processing method and system can divide the initial frame in the initial video data into multiple units, and obtain the amplitude of the intermediate frequency to high frequency region of each unit, and use different boundary adjustment coefficients Adjusting the amplitude of the intermediate frequency to the high frequency region in each unit, so as to reduce the amplitude of the initial frame in the intermediate frequency to the high frequency region.
  • the amplitude of the mid-frequency to high-frequency region in the current unit is large, it means that the current unit contains a strong boundary, then use the boundary adjustment coefficient less than 1 and greater than 0 to adjust the amplitude of the mid-frequency to high-frequency region of the current unit , to reduce the amplitude of the mid-frequency to high-frequency region of the current unit, thereby reducing the signal strength in the mid-frequency to high-frequency region of the current unit, thereby reducing the amount of data information, and improving the efficiency of data compression when making predictions and calculating residuals efficiency.
  • the amplitude of the mid-frequency to high-frequency region in the current unit is small, it means that the current unit contains a weak boundary, then use a boundary adjustment coefficient greater than 1 to adjust the amplitude of the mid-frequency to high-frequency region of the current unit to enhance The amplitude of the mid-frequency to high-frequency region of the current unit to avoid the loss of weak boundaries in the current unit during data compression (prediction and residual) to avoid loss of details.
  • the data processing method and system can enhance the data information volume of weak boundaries while improving the efficiency of data compression, so as to avoid loss of details during the data compression process, that is, reduce data distortion while improving data compression efficiency.
  • the method and system can use the unit during data compression as the data decompression unit, and use the boundary compensation coefficient corresponding to the boundary adjustment coefficient to adjust the amplitude of the mid-frequency to high-frequency region for each unit Boundary compensation to compensate for the reduced amplitude of the mid-to-high frequency region during data compression resulting in decompressed frames.
  • the boundary compensation corresponds to the boundary adjustment, and there is a corresponding relationship between the boundary compensation coefficient and the boundary adjustment coefficient.
  • the boundary compensation can restore the compressed data after the boundary adjustment to a resolution of the original frame that is even higher than that of the original frame. That is to say, without significantly increasing the calculation amount of codec, the decoding end can at least restore the data in the important frequency of the decompressed data to the definition of the original frame, and even obtain the definition beyond the original frame.
  • the boundary adjustment coefficients of the initial frame in the boundary adjustment process are all greater than 0, the information in the compressed frame is not missing, so the boundary adjustment can be designed according to the relationship between the boundary adjustment coefficient and the boundary compensation coefficient and their respective characteristics Coefficients and boundary compensation coefficients to restore the information in the compressed frame.
  • the method and system can significantly improve data compression efficiency, improve data transmission efficiency, reduce data loss, avoid detail loss, eliminate noise, and improve the clarity of decompressed data.
  • this specification provides a data processing method, including: selecting an initial frame in the initial data, the initial frame including initial data with a preset number of bytes; and performing data compression on the initial frame , to obtain a compressed frame, wherein the data compression includes performing boundary adjustment on the compressed frame, and the compressed frame includes the initial frame and any frame before the initial frame becomes the compressed frame during the data compression process A data state, wherein the boundary adjustment includes adjusting the amplitude of each unit in the plurality of units in the compressed frame using its corresponding boundary adjustment coefficient in the mid-frequency to high-frequency region, so as to reduce the The amplitude of the compression frame in the middle frequency to the high frequency region, the boundary adjustment coefficient is greater than 0.
  • the adjusting the boundary of the compression frame includes: dividing the compression frame into the plurality of units based on a preset unit size; and using the corresponding unit for each unit The above-mentioned boundary adjustment coefficient is used to adjust its amplitude in the mid-frequency to high-frequency region.
  • the adjusting the amplitude of each unit in the mid-frequency to high-frequency region by using the boundary adjustment coefficient corresponding thereto includes: for each unit: from a preset encoding Select a function in the function group as the encoding function, adjust it through the encoding function, and obtain the first unit, so that the components of the low frequency region in the frequency domain are retained and the components of the intermediate frequency to the high frequency region are attenuated; Calculate the difference with the first unit to obtain its corresponding first boundary, the first boundary includes its components in the intermediate frequency to the high frequency region; and use the corresponding boundary adjustment coefficient to the adjusting the magnitude of the first boundary to obtain its corresponding coding boundary; and superimposing the first unit on the coding boundary.
  • the adjusting the magnitude of the first boundary by using the boundary adjustment coefficient corresponding thereto includes: determining that the boundary value of the first boundary is smaller than a preset first threshold, by being greater than 1 The boundary adjustment coefficient of 1 increases the amplitude of the first boundary; or it is determined that the boundary value of the first boundary is greater than a preset second threshold, and the amplitude of the first boundary is reduced by the boundary adjustment coefficient less than 1 value.
  • enhancing the magnitude of the first boundary by using the boundary adjustment coefficient greater than 1 includes: selecting a coefficient from a preset first boundary adjustment coefficient group as the boundary adjustment coefficient, Enhancing the amplitude of the first boundary, the coefficients in the first boundary adjustment coefficient group are all greater than 1; the reducing the amplitude of the first boundary by the boundary adjustment coefficient less than 1 includes: A coefficient is selected from the set second boundary adjustment coefficient group as the boundary adjustment coefficient to reduce the amplitude of the first boundary, and the coefficients in the second boundary adjustment coefficient group are all less than 1.
  • the adjusting the magnitude of the first boundary by using the corresponding boundary adjustment coefficient includes: taking the weighted value of the distortion rate and the code rate as an optimization target, and based on an optimization algorithm, obtaining the The boundary adjustment coefficient is used to adjust the amplitude of the first boundary.
  • the performing data compression on the initial frame includes at least one of the following methods: performing the boundary adjustment on the initial frame first, and then predicting the initial frame after the boundary adjustment and calculating the residual; first predicting the initial frame to obtain a predicted frame, then performing the boundary adjustment and calculating the residual on the initial frame and the predicted frame; and first predicting and calculating the residual on the initial frame difference, and then perform the boundary adjustment on the residual.
  • the compressed frame further includes the encoding function and the boundary adjustment coefficient corresponding to each unit in the plurality of units.
  • this specification also provides a data processing system, including: at least one storage medium and at least one processor, the at least one storage medium stores at least one instruction set for data processing; the at least one processing The processor is connected in communication with 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 executes the first step of the present specification according to the instructions of the at least one instruction set.
  • a data processing system including: at least one storage medium and at least one processor, the at least one storage medium stores at least one instruction set for data processing; the at least one processing The processor is connected in communication with 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 executes the first step of the present specification according to the instructions of the at least one instruction set.
  • this specification also provides a data processing method, including: obtaining compressed data, the compressed data includes a compressed frame obtained by performing data compression on an initial frame, and the data compression includes boundary adjustment; Perform data decompression on the frame to obtain a decompressed frame, the data decompression includes performing boundary compensation on the decompressed frame, the decompressed frame includes the compressed frame and the compressed frame becomes the decompressed frame before the data decompression process Any data state of , wherein there is a preset association between the boundary compensation and the boundary adjustment.
  • the boundary adjustment includes adjusting the amplitude of each unit in the multiple units of the compression frame using its corresponding boundary adjustment coefficient in the mid-frequency to high-frequency region, so as to reduce the The amplitude of the compression frame from the intermediate frequency to the high frequency region, the boundary adjustment coefficient is greater than 0, the compression frame includes the initial frame and the initial frame becomes the compression during the data compression process
  • the boundary compensation includes using the boundary corresponding to the boundary adjustment coefficient based on the association relationship for each of the multiple units in the unframed The compensation coefficient compensates its amplitude in the mid-to-high frequency region.
  • the adjusting the boundary of the compression frame includes: dividing the compression frame into the plurality of units based on a preset unit size; and using the corresponding unit for each unit
  • the boundary adjustment coefficient adjusts its amplitude in the middle frequency to high frequency region, including for each unit: selecting a function from the preset encoding function group as the encoding function, and adjusting it through the encoding function , to obtain the first unit, so that the components in the low-frequency region in the frequency domain are retained and the components in the mid-frequency to high-frequency region are attenuated; and the difference between it and the first unit is obtained to obtain its corresponding first boundary, the The first boundary includes its components in the intermediate frequency to the high frequency region; and the amplitude of the first boundary is adjusted using the boundary adjustment coefficient corresponding thereto to obtain its corresponding coding boundary; and The first unit is superimposed on the encoding boundary.
  • the performing boundary compensation on the de-frame includes: dividing the de-frame into the plurality of units based on the preset unit size; The boundary compensation coefficient corresponding to the boundary adjustment coefficient compensates its amplitude in the middle frequency to high frequency region.
  • the using the boundary compensation coefficient corresponding to the boundary adjustment coefficient for each unit to compensate its amplitude in the mid-frequency to high-frequency region includes: : Determining the decoding function, adjusting it through the decoding function to obtain the second unit, so that the components in the low-frequency region in the frequency domain are retained and the components in the mid-frequency to high-frequency region are attenuated; and the second unit Calculate the difference of the unit, obtain its corresponding second boundary, the second boundary includes its components in the middle frequency to the high frequency region; and use the boundary compensation coefficient corresponding to the boundary adjustment coefficient to adjust the Compensating the magnitude of the second boundary to obtain its corresponding decoding boundary; and superimposing the current unit on the decoding boundary.
  • the determining the decoding function includes: selecting a function from a preset decoding function group as the decoding function.
  • the using the boundary compensation coefficient corresponding to the boundary adjustment coefficient to compensate the magnitude of the second boundary includes: selecting one from a set of preset boundary compensation coefficients as the The boundary compensation coefficient is used to compensate the amplitude of the second boundary.
  • the compressed frame includes: the encoding function and the boundary adjustment coefficient corresponding to each unit in the plurality of units in the compressed frame.
  • the determining the decoding function includes: selecting a function corresponding to the encoding function from a preset decoding function group as the decoding function.
  • the compensating the magnitude of the second boundary by using the boundary compensation coefficient corresponding to the boundary adjustment coefficient includes: based on the relationship between the boundary adjustment coefficient and the boundary compensation coefficient An association relationship, determining the boundary compensation coefficient, and compensating the amplitude of the second boundary.
  • the data decompression of the compressed frame includes at least one of the following methods: decoding the compressed frame first, and then performing the boundary compensation; performing the decompression on the compressed frame performing the boundary compensation during decoding; and performing the boundary compensation on the compressed frame before performing the decoding.
  • the association relationship includes: the boundary compensation makes the amplitude of the decompressed frame at any frequency in the low frequency to intermediate frequency region not less than 85% of the original frame.
  • the association relationship further includes: the boundary compensation makes the amplitude of the decompressed frame increase steadily in the intermediate frequency region relative to the initial frame.
  • the association relationship further includes: the boundary compensation makes the amplitude of the decompressed frame decrease smoothly in the high-frequency region relative to the initial frame.
  • this specification also provides a data processing system, including at least one storage medium and at least one processor, the at least one storage medium stores at least one instruction set for data processing; and the at least one processing
  • the processor is connected in communication with 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 executes the third aspect of the present specification according to the instructions of the at least one instruction set The method of data processing described.
  • FIG. 1 shows a schematic diagram of a data processing system provided according to an embodiment of this specification
  • Fig. 2 shows a schematic diagram of a data compression device for data processing provided according to an embodiment of this specification
  • FIG. 3A shows a flow chart of data compression and data decompression provided according to an embodiment of this specification
  • Fig. 3B shows a flow chart of data compression and data decompression provided according to an embodiment of this specification
  • Fig. 3C shows a flow chart of data compression and data decompression provided according to an embodiment of this specification
  • FIG. 4A shows a flow chart of a data processing method for compressing data provided according to an embodiment of the specification
  • Fig. 4B shows a flow chart of boundary adjustment provided according to an embodiment of this specification
  • Fig. 5 shows a structural block diagram of boundary adjustment provided according to an embodiment of the present specification
  • FIG. 6 shows a graph of an encoding function provided according to an embodiment of the specification
  • Fig. 7A shows a flowchart of a data processing method for decompressing a compressed frame according to an embodiment of the specification
  • Fig. 7B shows a flow chart of boundary compensation provided according to an embodiment of this specification
  • FIG. 8 shows a structural flowchart of a boundary compensation provided according to an embodiment of this specification
  • FIG. 9A shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification
  • FIG. 9B shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification.
  • FIG. 9C shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification.
  • FIG. 9D shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification.
  • FIG. 10A shows a graph of an overall adjustment function H 0 (f), a boundary adjustment function H 1 (f) and a decoding function H 2 (f) in a normal mode according to an embodiment of the present specification.
  • Fig. 10B shows a graph of an overall adjustment function H 0 (f), a boundary adjustment function H 1 (f) and a decoding function H 2 (f) of an enhancement mode provided according to an embodiment of the present specification.
  • this specification provides a data processing system 100 (hereinafter referred to as the system 100).
  • this specification describes a data processing method P200 for compressing data
  • this specification describes a data processing method P300 for decompressing compressed frames.
  • FIG. 1 shows a schematic diagram of a data processing system 100 .
  • the system 100 may include a data compression device 200 , a data decompression device 300 and a transmission medium 120 .
  • the data compression device 200 may receive an initial frame in the initial data to be compressed, and use the data processing method P200 proposed in this specification to compress the initial data to generate a compressed frame.
  • the data compression device 200 may store data or instructions for performing the data processing method P200 described in this specification, and execute the data and/or instructions.
  • the data decompression device 300 can receive the compressed frame, and use the data processing method P300 proposed in this specification to decompress the compressed frame to obtain the decompressed frame.
  • the data decompression device 300 may store data or instructions for executing the data processing method P300 described in this specification, and execute the data and/or instructions.
  • Data compression apparatus 200 and data decompression apparatus 300 may comprise a wide range of devices.
  • data compression device 200 and data decompression device 300 may include desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handheld devices such as smart phones, televisions, cameras, display devices, digital media Players, video game consoles, in-vehicle computers, or the like.
  • Transmission media 120 may facilitate the transfer of information and/or data.
  • the transmission medium 120 may be any data carrier capable of transmitting compressed frames from the data compression device 200 to the data decompression device 300 .
  • the transmission medium 120 may be a storage medium (eg, an optical disk), a wired or wireless communication medium.
  • the communication medium may be a network.
  • transmission medium 120 may be any type or combination of wired or wireless networks.
  • the transmission medium 120 may include a cable network, a wired network, an optical fiber 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), Wide Area Network (WAN), Public Switched Telephone Network (PSTN), Bluetooth network, ZigBee network, Near Field Communication (NFC) network or similar network.
  • LAN local area network
  • WAN wide area network
  • WLAN wireless local area network
  • MAN metropolitan area network
  • WAN Wide Area Network
  • PSTN Public Switched Telephone Network
  • Bluetooth network ZigBee network
  • NFC Near Field Communication
  • One or more components in data decompression device 300 and data compression device 200 may be connected to transmission medium 120 to transmit data and/or information.
  • Transmission medium 120 may include routers, switches, base stations, or other devices that facilitate communication from data compression device 200 to data decompression device 300 .
  • the transmission medium 120 may be a storage medium, such as mass storage, removable storage, volatile read-write storage, read-only memory (ROM), or the like, or any combination thereof.
  • exemplary mass storage might include non-transitory storage media such as magnetic disks, optical disks, solid-state drives, and the like.
  • Removable storage may include flash drives, floppy disks, compact discs, memory cards, zip disks, tapes, and more.
  • Typical volatile read-write memory might include random access memory (RAM).
  • RAM may include dynamic RAM (DRAM), dual date rate synchronous dynamic RAM (DDR SDRAM), static RAM (SRAM), thyristor RAM (T-RAM), and zero-capacitance RAM (Z-RAM), among others.
  • DRAM dynamic RAM
  • DDR SDRAM dual date rate synchronous dynamic RAM
  • SRAM static RAM
  • T-RAM thyristor RAM
  • Z-RAM zero-capacitance RAM
  • transmission medium 120 may be a cloud platform.
  • the cloud platform may include private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, inter-cloud cloud, etc., or a form similar to the above-mentioned forms, or any combination of the above-mentioned forms.
  • the data compression device 200 receives the initial data, and executes the instructions of the data processing method P200 described in this specification, performs data compression on the initial data, and generates a compressed frame; the compressed frame is transmitted to the data through the transmission medium 120
  • FIG. 2 shows a schematic diagram of a data compression device 200 for data processing.
  • the data compression device 200 can execute the data processing method P200 described in this specification.
  • the data processing method P200 is introduced in other parts of this specification.
  • the data compression device 200 includes at least one storage medium 230 and at least one compression end processor 220 .
  • the data compression device 200 may also include a communication port 250 and an internal communication bus 210 .
  • the data compression device 200 may further include an I/O component 260 .
  • Internal communication bus 210 may connect various system components, including storage media 230 and compression end processor 220 .
  • I/O component 260 supports input/output between data compression device 200 and other components.
  • the storage medium 230 may include a data storage device.
  • the data storage device may be a non-transitory storage medium or a temporary storage medium.
  • the data storage device may include one or more of a magnetic disk 232 , a read-only storage medium (ROM) 234 or a random-access storage medium (RAM) 236 .
  • the storage medium 230 also includes at least one instruction set stored in the data storage device.
  • the instructions are computer program codes, and the computer program codes may include programs, routines, objects, components, data structures, procedures, modules, etc. that execute the data processing methods provided in this specification.
  • the communication port 250 is used for data communication between the data compression device 200 and the outside world.
  • the data compression device 200 can be connected to the transmission medium 120 through the communication port 250 .
  • At least one compression end processor 220 is communicatively connected with at least one storage medium 230 through the internal communication bus 210 . At least one compression end processor 220 is configured to execute the above at least one instruction set. When the system 100 is running, at least one compression processor 220 reads the at least one instruction set, and executes the data processing method P200 according to instructions of the at least one instruction set. The compression end processor 220 may execute all the steps included in the data processing method P200. The compression end processor 220 may be in the form of one or more processors.
  • the compression end processor 220 may include one or more hardware processors, such as a microcontroller, a microprocessor, a reduced instruction set computer (RISC), Application Specific Integrated Circuit (ASIC), Application Specific Instruction Set Processor (ASIP), Central Processing Unit (CPU), Graphics Processing Unit (GPU), Physical Processing Unit (PPU), Microcontroller Unit, Digital Signal Processor (DSP), Field Programmable Gate Array (FPGA), Advanced RISC Machine (ARM), Programmable Logic Device (PLD), any circuit or processor capable of performing one or more functions, etc., or any combination thereof .
  • RISC reduced instruction set computer
  • ASIC Application Specific Integrated Circuit
  • ASIP Application Specific Instruction Set Processor
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • PPU Physical Processing Unit
  • Microcontroller Unit Microcontroller Unit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • ARM Programmable Logic Device
  • PLD Programmable Logic Device
  • the data compression device 200 in this specification may also include multiple processors, therefore, the operations and/or method steps disclosed in this specification may be executed by one processor as described in this specification, or by multiple processors. joint execution of the processors.
  • the compression end processor 220 of the data compression device 200 executes step A and step B in this specification, it should be understood that step A and step B may also be jointly or separately executed by two different compression end processors 220 (for example , the first processor performs step A, and the second processor performs step B, or the first and second processors jointly perform steps A and B).
  • the data decompression device 300 may execute the data processing method P300 described in this specification.
  • the data processing method P300 is introduced in other parts of this specification.
  • the data processing methods P200, P300 and the system 100 can be used for data compression and decompression, so as 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.
  • the data may be non-real-time video data, audio data or image data, and so on.
  • the data may also be real-time map data, real-time sensor data, real-time video monitoring data, network monitoring data, meteorological data, aerospace data, and so on.
  • the data may be map data received from a base station while the self-driving car is driving.
  • This manual does not limit the specific category of the data.
  • the data processing methods P200, P300 described in this manual and the methods and steps taken by the system 100 when processing different types of data are consistent. For the convenience of presentation, this manual will take the processing of video data as an example. describe.
  • a frame is a processing unit that makes up a data sequence.
  • One or more initial frames may be included in the initial data.
  • Each initial frame includes initial data of a preset number of bytes.
  • the initial data may be original video data, and the initial frame may be a frame image in the original video data.
  • H.264 and H.265 standards are usually used to encode initial video data, so as to achieve the purpose of compressing the video data.
  • the H.264 and H.265 standards mainly adopt predictive coding when encoding video data, that is, predict the initial data in the video data to obtain the predicted value, and then compare the predicted value with the initial value of the initial data.
  • the residual value is obtained by subtracting, so as to compress the video data.
  • recovering and decompressing that is, decoding
  • the initial frame can be recovered by adding the residual value and the predicted value.
  • the data processing methods P200, P300 and system 100 provided in this manual can combine boundary adjustment and encoding when performing data compression, so as to reduce the amount of data during encoding, improve the compression efficiency of video data, and improve the transmission efficiency of video;
  • boundary compensation and decoding can be combined to decompress the compressed data that has undergone boundary adjustment and encoding, so that the decompressed data can be restored to the original data.
  • the data processing method P200 may perform data compression on the video data.
  • the data processing method P200 may use a combination of coding (ie, prediction and residual calculation) and boundary adjustment to perform data compression on the initial frame to obtain a compressed frame.
  • the data processing method P200 may perform the boundary adjustment and the encoding on the compressed frame.
  • the compressed frame includes the initial frame and any data state before the initial frame becomes the compressed frame during the data compression process.
  • the boundary adjustment refers to adjusting the amplitude of the spectrogram of the data to be processed.
  • the boundary adjustment can adjust the amplitude of the selected area of the data to be processed in its frequency domain, such as the amplitude of the intermediate frequency area, the amplitude of the high frequency area, and the amplitude of the low frequency to intermediate frequency area. , and for example, the amplitude of the mid-frequency to high-frequency region, and so on.
  • the boundary adjustment can be implemented by a boundary adjustment coefficient greater than 0 and less than 1 to attenuate the amplitude of a selected region in the frequency domain, thereby reducing the amount of data information in the data to be processed.
  • the data processing method P300 may perform data decompression on the compressed frames subjected to the data compression by the data processing method P200 to obtain decompressed frames, so as to restore the video data.
  • the data processing method P300 may adopt a method combining decoding (that is, recovering the compressed frame according to the residual value and the predicted value) and boundary compensation to perform data decompression on the compressed frame, so as to restore the data in the compressed frame.
  • the data processing method P300 may perform the boundary compensation and the decoding on the deframed frame.
  • the decompressed frame may include the compressed frame and any data state before the compressed frame becomes the decompressed frame during the data decompression process.
  • the boundary compensation can make the data after the boundary adjustment be completely restored or approximately restored to the state before the boundary adjustment without considering other calculation errors.
  • the data processing method P200, P300, and system 100 can significantly improve the compression efficiency of video data, reduce data loss during video data compression, improve video transmission efficiency, restoration rate and clarity of decompressed video, and reduce video after decompression. noise.
  • the specific process of the boundary adjustment and the boundary compensation will be described in detail later.
  • the order of the boundary adjustment and the encoding can be interchanged, or can be performed in a crossed manner.
  • the boundary adjustment may be before or after the encoding.
  • the order of the boundary compensation and the decoding can be interchanged, or can be performed in a crossed manner.
  • the sequence of the boundary compensation and the decoding in the data decompression is the same as the sequence of the boundary adjustment and the encoding in the data compression
  • the order of should be corresponding, that is, the boundary compensation and the decoding can operate symmetrically and inversely to the boundary adjustment and the encoding.
  • the compressed frame should first perform the decoding and then perform the boundary compensation when data is decompressed.
  • the data in the initial frame before data compression processing P 0
  • the data in the decompressed frame decompressed by the data decompression device 300 P 4 .
  • the data compression device 200 when the data compression device 200 performs data compression on the initial frame, it may first perform the boundary adjustment on the initial frame, and then perform the encoding; The encoding is performed, and then the boundary adjustment is performed.
  • 3A to 3C show some data compression and data decompression flow charts provided according to the embodiments of this specification.
  • Fig. 3A shows a flow chart of data compression and data decompression provided according to the embodiment of this specification.
  • the data compression device 200 performs data compression on the initial data by: the data compression device 200 first performs the boundary adjustment on the initial frame P0 , and then performs the encoding, that is, after the boundary adjustment
  • the initial frame is predicted and the residual is obtained 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 generation module for synthesis to obtain the compressed frame.
  • Said compressed frame comprises said predicted data PI and said residual data R.
  • the under-pressure frame may be the initial frame P 0 .
  • the boundary adjustment may divide the compression frame (initial frame P 0 ) into multiple units, and perform the boundary adjustment using a corresponding boundary adjustment coefficient for each unit.
  • the data compression device 200 may also input the coding function and boundary adjustment coefficient corresponding to each unit in the boundary adjustment into the code stream generation module for synthesis. That is, the compressed frame may further include the encoding function and the boundary adjustment coefficient corresponding to each unit in the boundary adjustment.
  • the data of the coding function and the boundary adjustment coefficient corresponding to each unit in the compressed frame as coded data RAMI (Regional AmplitudeModulationInformation).
  • coded data RAMI Registered AmplitudeModulationInformation
  • the data compression method shown in FIG. 3A can improve coding efficiency, further reduce the amount of data in the compressed frame, improve the compression ratio, and at the same time reduce data loss and avoid loss of details.
  • the data decompression performed by the data decompression device 300 on the compressed frame may be: the data decompression device 300 first performs the decoding on the compressed frame, and then performs the boundary compensation. Specifically, the data decompression device 300 may first perform the decoding on the compressed frame, that is, analyze the compressed frame based on the code stream analysis module, and generate the predicted data PI, the residual data R, and the encoded data RAMI ; Then perform prediction according to the prediction data PI to obtain a prediction frame, and superpose it with the residual data R to obtain a decoded frame. For the convenience of description, we define the data in the decoded frame as P 2 .
  • the data decompression device 300 uses the decoded data corresponding to the encoded data RAMI to perform the boundary compensation on the decoded frame P2 based on the encoded data RAMI, to obtain the decompressed frame P4 for output.
  • the deframed frame may be the decoded frame P2 .
  • the boundary compensation may divide the decoded frame (decoded frame P 2 ) into multiple units, and perform the boundary compensation for each unit using the boundary compensation coefficient corresponding to the boundary adjustment coefficient .
  • the decoded data may include a decoding function and a boundary compensation coefficient corresponding to each unit.
  • the decoding function corresponds to the encoding function
  • the boundary compensation coefficient corresponds to the boundary adjustment coefficient.
  • the data decompression device 300 may determine the decoding function and the boundary compensation coefficient corresponding to each unit based on the encoded data RAMI. Details about the decoding function and the boundary compensation coefficient corresponding to the boundary compensation will be described in detail later.
  • the transfer function between the decompressed frame P 4 and the initial data P 0 as the overall spectrum adjustment function H 0 (f).
  • the manner shown in FIG. 3A can reduce the amount of data in the compressed frame, thereby improving the compression ratio and coding efficiency of the initial data, improving the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding loss of details.
  • the data compression performed by the data compression device 200 on the initial data may also be: incorporating the boundary adjustment into the encoding process.
  • the boundary adjustment can be done at any stage in the encoding process.
  • the boundary compensation may also be performed at a corresponding stage of the decoding process.
  • Fig. 3B shows a flow chart of data compression and data decompression provided according to the embodiment of this specification.
  • the data compression device 200 may perform data compression on the initial data as follows: the data compression device 200 first predicts the initial frame P 0 to obtain the predicted frame and the predicted data PI, and then compresses the initial frame P 0 Performing the boundary adjustment and calculating the residual with the predicted frame to obtain the residual data R; inputting the predicted data PI, the residual data R, and the coded data RAMI into a code stream generation module for synthesis, Get the compressed frame.
  • the under pressure frame may be the predicted frame and the initial frame P 0 .
  • the specific operation of the data compression shown in FIG. 3B is the same as that shown in FIG. 3A , but the operation sequence is different. The content about the boundary adjustment will be introduced in detail in the following description.
  • performing data decompression on the compressed frame by the data decompression device 300 may be: performing the boundary compensation during the decoding process on the compressed frame by the data decompression device 300 .
  • the data decompression device 300 may first analyze the compressed frame based on the code stream analysis module, generate the predicted data PI, the residual data R, and the coded data RAMI; perform prediction according to the predicted data PI Obtaining a predicted frame; based on the coded data RAMI, using the corresponding decoded data to perform the boundary compensation on the predicted frame; superimposing the boundary-compensated predicted frame with the residual data R, and performing The superimposed data is subjected to the boundary compensation to obtain the decompressed frame P 4 .
  • the decomposed frame may be the predicted frame and superimposed data of the predicted frame and the residual data R.
  • the data in the superimposed frame is P 3 .
  • the specific process of performing the boundary correction on the boundary in the superimposed frame P3 will be described in detail later.
  • the manner shown in FIG. 3B can reduce the amount of data in the compressed frame, thereby improving the compression ratio and coding efficiency of the initial data, improving the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding loss of details.
  • Fig. 3C shows a flow chart of data compression and data decompression provided according to the embodiment of this specification.
  • the data compression device 200 may perform data compression on the initial data as follows: the data compression device 200 first predicts and calculates the residual of the initial frame P 0 to obtain the predicted data PI and the residual R 1 , and then The residual R 1 is subjected to the boundary adjustment to obtain the residual data R; the residual data R after the boundary adjustment, the prediction data PI, and the coded data RAMI are input into a code stream generation module to synthesize, The compressed frame is generated.
  • the compressed frame may be the residual R 1 .
  • the specific operation of the data compression method shown in FIG. 3C is the same as that shown in FIG. 3A , but the operation sequence is different. The content about the boundary adjustment will be introduced in detail in the following description.
  • the data decompression performed by the data decompression device 300 on the compressed frame may be: the data decompression device 300 analyzes the compressed frame based on the code stream analysis module, and generates the predicted data PI and the residual data. R; then perform prediction according to the prediction data PI to obtain a prediction frame; based on the encoded data RAMI, use the corresponding decoded data to perform the boundary compensation on the residual data R to obtain a residual R 1 ; and The difference R 1 is superimposed on the predicted frame to obtain the decompressed frame P 4 .
  • the re-deframing may be the residual data R.
  • the manner shown in FIG. 3C can reduce the amount of data in the compressed frame, thereby improving the compression ratio and encoding efficiency of the initial data, improving the transmission efficiency of the initial data, and at the same time reducing data loss and avoiding loss of details.
  • FIG. 4A shows a flowchart of a data processing method P200 for compressing data.
  • the data compression device 200 can execute the data processing method P200.
  • the storage medium in the data compression device 200 may store at least one set of instruction sets.
  • the instruction set is configured to instruct the compression processor 220 in the data compression device 200 to complete the data processing method P200.
  • the compression processor 220 can read the instruction set and execute the data processing method P200.
  • the method P200 may include:
  • S220 Select an initial frame P 0 in the initial data.
  • a frame is a processing unit that makes up a data sequence. During data processing, calculations are often performed in units of frames.
  • the initial data may include one or more initial frames.
  • the initial frame P 0 includes initial data of a preset number of bytes.
  • video data is used as an example for description in this specification, therefore, the initial data may be initial video data, and the initial frame P 0 may be a frame image in the initial video data.
  • the data compression device 200 may select a part of frame images from the initial data as the initial frame P 0 , or select all frame images in the initial data as the initial frame P 0 .
  • the data compression device 200 may select the initial frame P 0 according to the initial data application scenario.
  • a partial frame image can be selected as the initial frame P 0 .
  • Many frames of the monitoring image in a secluded place are the same, and the data compression device 200 may select a part of the frame images as the initial frame P 0 for compression and transmission.
  • the data compression device 200 may select all frame images as the initial frame P 0 for compression and transmission.
  • Said data compression may comprise said boundary adjustment and said encoding of compressed frames.
  • the performing the boundary adjustment on the in-compression frame may be inputting the in-compression frame into a boundary regulator to perform boundary adjustment.
  • the compressed frame may include the initial frame P 0 and any data state before the initial frame P 0 becomes the compressed frame during the data compression process.
  • the compressed frame includes the initial frame P 0 and any data state of the initial frame P 0 in the process of boundary adjustment and encoding, for example, an initial frame, a predicted frame, and a residual frame ,and many more.
  • the boundary adjustment refers to adjusting the amplitude of the spectrogram in the compressed frame.
  • the boundary adjustment can adjust the amplitude of the selected area of the compressed frame in its frequency domain, such as the amplitude of the intermediate frequency area, the amplitude of the high frequency area, and the amplitude of the low frequency to intermediate frequency area. , and for example, the amplitude of the mid-frequency to high-frequency region, and so on.
  • the boundary adjustment can be realized by a boundary adjustment coefficient to adjust the amplitude of a selected region in the frequency domain.
  • the boundary adjustment may use a boundary adjustment coefficient greater than 0 and less than 1 to attenuate the amplitude of a selected region in the frequency domain, thereby reducing the amount of data information in the compression frame.
  • receivers have different degrees of sensitivity to frequency, so the data compression operation can select different regions in the frequency domain for amplitude attenuation according to different forms of data.
  • the mid-frequency to high-frequency components in the frequency spectrum of a frame of data are mainly concentrated in the area where the data changes drastically in this frame of data, that is, the boundary data of the data.
  • the medium-frequency to high-frequency data is mainly concentrated on the boundary of the object in the image, that is, the boundary data of this frame of image. Since the edge part of the object in the picture is rich in mid-frequency and high-frequency information, the mid-frequency and high-frequency areas will carry more data. Therefore, reducing the amplitude of the mid-frequency to high-frequency region will visually blur the boundary data of the compressed frame, and also greatly reduce the amount of information in the image. It should be noted that reducing the amplitude of the low-frequency region will also reduce the amount of information in the image.
  • the boundary adjustment may be to adjust the amplitude of the intermediate frequency to high frequency region of the compressed frame, such as attenuating the amplitude of the intermediate frequency to high frequency region to reduce the intermediate frequency to the amount of data information in the high-frequency region.
  • the amplitude of the intermediate frequency to high frequency region in the intermediate state frame processed by the boundary adjustment is attenuated, and the amount of data information is also reduced. Therefore, the intermediate state frame processed by the boundary adjustment will have a higher compression ratio in encoding.
  • the data processing method P200 can compress the initial frame P0 by using a method combining boundary adjustment and encoding, so as to adjust the amplitude of the intermediate frequency to high frequency region, so as to reduce the amount of data information, Further improve the compression ratio of video data and improve the efficiency of video transmission.
  • the order of the boundary adjustment and the encoding can be interchanged, or can be performed in a crossed manner.
  • Step S240 may include at least one of the data compression methods shown in FIG. 3A , FIG. 3B and FIG. 3C . For the convenience of presentation, this specification will take the manner shown in FIG. 3A as an example to describe step S240 in detail.
  • the data compression device 200 first performs the boundary adjustment on the initial frame P 0 to attenuate the amplitude of the initial frame P 0 in the mid-frequency to high-frequency region, so that the boundary of the initial frame P 0
  • the information is fuzzy, and the encoding adjustment frame P 1 is obtained to reduce the amount of information in the initial frame P 0 , thereby reducing the space resources occupied by the compression of the initial frame P 0 ; and calculate the residual), predict the encoding adjustment frame P1 to obtain the prediction frame of the encoding adjustment frame P1 and the prediction data PI; then combine the prediction frame of the encoding adjustment frame P1 with the encoding
  • the adjustment frame P1 is subtracted to obtain the residual data R; the residual data R, the predicted data PI and the coded data RAMI are input into the code stream generation module for synthesis to obtain the compressed frame.
  • the data processing method P200 can improve the encoding efficiency of the encoding adjustment frame P1 , further reduce the amount of data in the compressed frame, improve the encoding efficiency, and increase the compression ratio. Since the object of the boundary adjustment is the initial frame P 0 , the frame under compression is the initial frame P 0 .
  • performing the data compression on the compressed frame may include executing by at least one compression end processor 220 of the data compression device 200:
  • step S242 Perform the boundary adjustment on the under-compression frame (initial frame P 0 ) to obtain the coding adjustment frame P 1 .
  • Fig. 4B shows a flow chart of boundary adjustment provided according to an embodiment of this specification;
  • Fig. 5 shows a structural block diagram of a boundary adjustment provided according to an embodiment of this specification.
  • step S242 may include being executed by at least one compression end processor 220 of the data compression device 200:
  • the data processing unit processed may be a frame of data or a part of a frame of data.
  • the area may be a frame or a field of images, or a part of a frame/field of images.
  • an image is further divided into a slice, a tile, a coding unit (CU), a macroblock, a block, or a subblock.
  • a region is usually an NxN square, or an MxN rectangle. Regions include but are not limited to the above names. For convenience of description, we define each region as a unit.
  • the boundary adjustment can take the above-mentioned units as adjustment objects, and perform the boundary adjustment on each unit.
  • the size of the unit can be arbitrarily selected according to needs, that is, the values of M and N can be any integers, such as 4, 8, 16, 32, 16, 128, or 256, or even smaller, such as 2 .
  • the cell may contain only one pixel.
  • the under-compression frame (initial frame P 0 ) can be divided into multiple units. For the convenience of description, we define the data of the unit in the i-th row and j-th column in the initial frame P0 as
  • the boundary adjustment may be to use the corresponding boundary adjustment coefficient for each unit in the multiple units of the compressed frame (initial frame P 0 ) to adjust its amplitude in the mid-frequency to high-frequency region The value is adjusted to reduce the overall amplitude of the under-compressed frame (initial frame P 0 ) in the mid-frequency to high-frequency region.
  • the boundary adjustment coefficient will be introduced in detail in the following description.
  • step S242-4 may include the current unit implement:
  • S242-42 Select a function from the preset coding function group as the coding function Through the encoding function for the current unit Adjust to get the first unit In the frequency domain, the components in the low frequency region are preserved and the components in the mid to high frequency region are attenuated.
  • encoding function In the frequency domain there can be a low-pass filter such that the current unit in the initial frame P 0 The magnitude of is smoothly reduced in the frequency domain, so that the current unit in the initial frame P 0 In the frequency domain, the components of the low-frequency region are preserved and the components of the mid-frequency to high-frequency region are attenuated, thereby obtaining the current unit Corresponding first unit In order to save the amount of calculation required in the implementation process and avoid the occurrence of ringing effects, the encoding function should make the current unit Amplitudes in the frequency domain transition smoothly.
  • encoding function It may be a low-pass filter with smooth transition in any form, which is not limited in this specification.
  • the encoding function is a smooth transition curve, avoiding sharp changes in the amplitude adjustment gain in the curve.
  • the ringing effect refers to that in image processing, when performing spectrum adjustment processing on an image, if the selected coding function With faster changes, the image will "ring".
  • the so-called “ringing” refers to the vibration generated at the sharp change of the gray level of the output image, just like the air vibration generated after the clock is struck. The ringing effect mostly appears at the image boundary.
  • the adjustment can be performed in the time domain using an encoded convolution kernel on the current unit Do convolution.
  • the encoding function for the current unit adjustments can be expressed as in the current unit Multiply the transfer function in the frequency domain (ie encoding function) or perform corresponding convolution calculations in the time domain. If the current unit For digitized data, the convolution operation can be selected with the encoding function The corresponding coded convolution kernel performs the convolution operation.
  • this specification will take convolution in the time domain as an example to describe the for the current unit Make adjustments. But those skilled in the art should understand that by multiplying the coding function in the frequency domain The method is also the scope to be protected in this specification.
  • the encoding function group may be stored in the storage medium of the data compression device 200 .
  • the set of encoding functions may include at least one different encoding function.
  • Each encoding function corresponds to an encoding convolution kernel. That is to say, the storage medium of the data compression device 200 may include at least one coded convolution kernel.
  • data compression device 200 for the current unit When performing convolution, one of the encoding function groups can be arbitrarily selected as the current unit Corresponding encoding function And use its corresponding convolution kernel as the coded convolution kernel, for the current unit Do convolution.
  • a convolution kernel or a combination of convolution kernels with a higher order is required in the implementation process. This means an unnecessary increase in computation.
  • high-order convolution kernels are more likely to cause strong color oscillations in the output image where the grayscale or color changes sharply, which is called the ringing effect.
  • the ringing effect mostly appears at the image boundary.
  • the encoding function can be analyzed in the frequency domain
  • the amplitude of the mid-low frequency region is adjusted, so that the change of the amplitude adjustment gain in the mid-low frequency region is smooth and continuous.
  • the ratio of the absolute value of the sum of negative coefficients to the sum of non-negative coefficients in the corresponding coded convolution kernel should be less than 0.1.
  • the convolution kernel coefficients in the coded convolution kernel may all be non-negative numbers. Taking video data as an example, when there are many negative coefficients in the encoding 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 convolution The result is smaller, reflected in the image as darker pixels.
  • the coefficients of the coded convolution kernel can be all non-negative numbers, or the absolute value of the sum of the negative coefficients in the coded convolution kernel and the value of the non-negative coefficient The ratio of the sum should be less than 0.1, that is, a small number of negative coefficients with small absolute values are allowed to appear in the encoding convolution kernel.
  • Fig. 6 shows a kind of encoding function provided according to the embodiment of this description
  • the horizontal axis is the normalized frequency f
  • the vertical axis is the encoding function
  • the amplitude adjustment gain H 1 .
  • the normalized frequency f of the horizontal axis can be divided into a low frequency region, a middle and low frequency region, a middle frequency region, a middle and high frequency region and a high frequency region. Different types of data may have different definitions for low frequency, middle frequency and high frequency regions.
  • the maximum value of the normalized frequency on the horizontal axis is 0.5.
  • the high-frequency region may include frequencies between (d, 0.5] in the normalized frequency domain.
  • d is the frequency lower limit of the high-frequency region.
  • d may be in the normalized frequency domain 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44, and any one frequency in 0.45.
  • the high frequency may include normalized frequency domain (0.33, 0.5].
  • the high frequency may include 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, The interval between any two frequencies in 0.46, 0.47, 0.48, 0.49, 0.5, wherein 0.5 is the maximum frequency of the normalization.
  • the intermediate frequency region can include the frequency between (b, c], where b is The lower frequency limit of the intermediate frequency region, c is the upper frequency limit of the intermediate frequency region.Such as, the lower frequency limit b of the intermediate frequency region can be 0.15,0.16,0.17,0.18,0.19, Any frequency among 0.2, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27 and 0.28; the frequency upper limit c of the intermediate frequency region can be 0.35, 0.34, 0.33, 0.32 in the normalized frequency domain and any frequency in 0.31.
  • the low frequency region can include the frequency between [0, a] in the normalized frequency domain. Wherein a is the frequency upper limit of the low frequency region.
  • the frequency upper limit a of the low frequency region It can be any one of 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.12, 0.13, 0.14 and 0.15 in the normalized frequency domain.
  • the frequency region between the two is called the middle and low frequency region.
  • the frequency region between the two is called the middle and high frequency region .
  • the stop band interval in can be any interval between the frequency 0.15 and 0.50.
  • the stop band interval in can be any two intervals specified in 0.15, 0.17, 0.19, 0.21, 0.23, 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.
  • the passband interval in can be any interval between frequency 0 and 0.35.
  • the passband interval in can be any two of 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. within the specified range.
  • Fig. 6 is only illustrated by taking video data as an example, and those skilled in the art should understand that the encoding function The curves are not limited to the form shown in Figure 6, all capable of making the current unit The magnitude of is smoothly reduced in the frequency domain, so that the current unit in the initial frame P 0
  • m ⁇ 1 Represents a linear combination of n functions
  • k m represents the weight corresponding to the mth function
  • q ⁇ 1 Represents the product combination of n functions
  • k q represents the weight corresponding to the qth function
  • Table 1 shows a parameter table of a coded convolution kernel provided according to an embodiment of this specification.
  • Table 1 exemplarily lists the parameters of an encoding convolution kernel, where each row in Table 1 represents an encoding convolution kernel.
  • the gray value of the pixels in the middle is within 0-255, therefore, in this embodiment, the convolution result needs to be divided by 16.
  • the encoding convolution kernel is based on the encoding function obtained by Fourier transform.
  • Table 1 is just an exemplary illustration, and those skilled in the art should know that the encoding convolution kernel is not limited to the parameters shown in Table 1, all of which can make the current unit
  • the magnitude of is smoothly reduced in the frequency domain, so that the current unit in the initial frame P 0 In the frequency domain, the components of the low-frequency region are preserved and the components of the mid-frequency to high-frequency regions are attenuated. All belong to the scope of protection of this specification.
  • the data compression device 200 may perform steps S242-42 for each unit. per unit in the coded function After adjustment, a corresponding first unit is obtained Encoding functions corresponding to all units Combined to form the encoding function H 1 (f). Encoding function corresponding to each unit
  • the encoding function H 1 (f) can be generated by combining according to the positions of the units, and the encoding function H 1 (f) can be regarded as a matrix. It should be noted that when performing steps S242-42 on different units, the same encoding function (ie encoding convolution kernel) may be selected, or different encoding functions (ie encoding convolution kernel) may be selected. i.e. different units Corresponding encoding function Can be the same or different.
  • All units correspond to the first unit Combined to form the first frame P 1b .
  • the first unit corresponding to each unit The first frame P 1b can be generated by combining according to the positions of each unit, and the first frame P 1b is a blurred image.
  • the relationship between P 0 and P 0b can be expressed as the following formula:
  • step S242-4 may include the current unit implement:
  • the mid-frequency to high-frequency components in the data spectrum of each frame are mainly concentrated in the area where the data changes sharply in this frame of data, that is, the boundary data of the data.
  • the intermediate-frequency to high-frequency data is mainly concentrated on the boundary of the object in the image, that is, the boundary data of this frame of image.
  • the encoding function make the current unit The amplitude in the frequency domain is smoothly reduced to attenuate components in the mid to high frequency region. Therefore, the first unit It can be understood as removing the current unit The data of the boundary information in .
  • the first boundary include current unit Components in the middle frequency to the high frequency region.
  • the first boundary include current unit Boundary information in . per unit
  • a corresponding first boundary is obtained First boundary for all cells Combined to form the first boundary frame E 1b .
  • the first boundary corresponding to each cell The first boundary frame E 1b may be generated by combining the units according to their positions.
  • the first boundary frame E 1b can be expressed as the following formula:
  • step S242-4 may include the current unit implement:
  • the boundary adjustment coefficient corresponding to the boundary adjustment is defined as g 1 .
  • the corresponding boundary adjustment coefficient is defined as For a frame of image, there may be a strong boundary, a weak boundary, or both a strong boundary and a weak boundary.
  • the strong boundary may be a boundary in which pixel values between adjacent pixels differ greatly.
  • the weak boundary may be a boundary with a small difference in pixel values between adjacent pixels.
  • the initial frame P 0 is divided into multiple units through step S242-2, thereby dividing the initial frame P 0 into multiple small areas. The smaller the size of the cell, the more singular the boundaries contained in the cell. When the cells are small enough, each cell may include only strong boundaries or only weak boundaries. Therefore, by dividing the initial frame P0 into multiple units in step S242-2, the data compression device 200 can individually adjust the boundary information of each unit.
  • the boundary adjustment can be performed on those weak boundaries with small differences between adjacent pixels at mid-frequency to high-frequency
  • the amplitude of the area is enhanced, thereby increasing the difference between the pixel values of the adjacent pixels in the weak boundary, avoiding the loss of the weak boundary during the encoding process, and avoiding the loss of details, so that after encoding and decoding, the details can still be reserve.
  • the boundary adjustment can attenuate the amplitude of the strong boundary in the mid-frequency to high-frequency region with a large difference between adjacent pixels, so as to reduce the pixel value between adjacent pixels in the strong boundary The difference, thereby reducing the data information contained in the strong boundary and improving the compression ratio.
  • the difference between adjacent pixels in the strong boundary is large enough, even after the boundary adjustment is performed to attenuate the amplitude, the retained boundary is still large enough, and will not disappear after encoding and decoding processing.
  • the boundary adjustment coefficient when using the boundary adjustment coefficient to the first boundary
  • the information contained in the initial frame P 0 should be preserved as much as possible without loss, so that the information can be better recovered during decompression. Therefore, the boundary adjustment coefficient Should be greater than 0.
  • Adjustment coefficient at the border Processed Encoding Boundary The amplitude in the mid-to-high frequency region is also greater than zero without any data loss. Therefore, all data can be recovered when the compressed data is decompressed.
  • the boundary adjustment coefficient If there is a zero point, the data in the mid-frequency to high-frequency region in the unit corresponding to the zero point may be lost, and the decoding end will not be able to recover the lost data during decompression, so the original data cannot be recovered.
  • step S242-46 the data compression device 200 can Corresponding to the first boundary
  • the size of the boundary value determines the current cell Corresponding boundary adjustment coefficient different units May have different boundary adjustment factors
  • the boundary value may be the first boundary The value corresponding to each pixel in .
  • Step S242-46 may include:
  • S242-462 Determine the current unit corresponding to the first boundary The boundary value is less than the preset first threshold value, and the boundary adjustment coefficient is greater than 1 enhance the first boundary the magnitude of .
  • S242-464 Determine the current unit corresponding to the first boundary The boundary value is greater than the preset second threshold, and the boundary adjustment coefficient is less than 1 Lower the first boundary the magnitude of .
  • steps S242-462 if the current unit Corresponding to the first boundary
  • the boundary value in is smaller than the first threshold, which means that the current unit contains weak boundaries, which contain many small details.
  • use a boundary adjustment factor greater than 1 for the current unit Corresponding to the first boundary Adjust the amplitude of the mid- to high-frequency region to enhance the current unit Corresponding to the first boundary
  • the amplitude of the mid-frequency to high-frequency region maintain the current unit SNR to avoid current cell
  • the weak boundary in is lost in the process of data compression (prediction and residual), avoiding the loss of details and ensuring the coding effect.
  • the data processing method P200 can improve the efficiency of data compression and at the same time enhance the amount of data information of weak boundaries, so as to avoid loss of details during the process of data compression, that is, reduce data distortion while improving the efficiency of data compression.
  • the first threshold may be 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and so on. In some embodiments, the first threshold may be smaller, such as 1, 2, 3, 4, and so on. In some embodiments, the first threshold may be any number between 5 and 30.
  • steps S242-464 if the current unit Corresponding to the first boundary
  • the boundary value in is greater than the second threshold, representing the current unit contains a strong boundary, use a boundary adjustment coefficient less than 1 and greater than 0 for the current unit Corresponding to the first boundary
  • the amplitude of the mid- to high-frequency region is adjusted to reduce the current unit Corresponding to the first boundary amplitude in the mid- to high-frequency region, reducing the current unit Corresponding to the first boundary
  • the signal strength in the mid-frequency to high-frequency region is reduced, thereby reducing the amount of data information, and improving the efficiency of data compression when making predictions and calculating residuals.
  • the second threshold may be greater than the first threshold, or equal to the first threshold.
  • the boundary value in is at the boundary value (including the first threshold and the second threshold) between the first threshold and the second threshold, and no boundary adjustment can be made.
  • the boundary adjustment coefficient Can be 1.
  • the first boundary adjustment coefficient group and the second boundary adjustment coefficient group may be pre-stored in the storage medium of the data compression device 200 .
  • the first set of boundary adjustment coefficients includes at least one coefficient. And the coefficients in the first boundary adjustment coefficient group are all greater than 1.
  • the coefficients in the first boundary adjustment coefficient group may be any number greater than 1.
  • the data compression device 200 executes steps S242-462, it may select a coefficient from the preset first boundary adjustment coefficient group as the boundary adjustment coefficient enhance the first boundary the magnitude of .
  • the data compression device 200 selects the boundary adjustment coefficient from the preset first boundary adjustment coefficient group , according to the first boundary Choose the size of the boundary value in .
  • first border The larger the boundary value of , the corresponding boundary adjustment coefficient smaller; first boundary The smaller the boundary value of , the corresponding boundary adjustment coefficient bigger.
  • the second set of boundary adjustment coefficients includes at least one coefficient. And the coefficients in the second boundary adjustment coefficient group are all coefficients greater than 0 and less than 1.
  • the coefficients in the second boundary adjustment coefficient group may be any number greater than 0 and less than 1.
  • the data compression device 200 executes steps S242-464, it may select a coefficient from the preset second boundary adjustment coefficient group as the boundary adjustment coefficient reduce the magnitude of the first bound
  • the data compression device 200 selects the boundary adjustment coefficient from the preset second boundary adjustment coefficient group , according to the first boundary Choose the size of the boundary value in .
  • first border The larger the boundary value of , the corresponding boundary adjustment coefficient smaller; first boundary The smaller the boundary value of , the corresponding boundary adjustment coefficient bigger.
  • the data compression device 200 can also determine the current unit through an optimization algorithm Corresponding boundary adjustment coefficient Specifically, the data compression device 200 can establish an optimization equation. For example, the data compression device 200 can use the current unit The weighted value of the corresponding distortion rate and code rate is an optimization target. the current unit The minimum weighted value of the corresponding distortion rate and code rate is the optimization goal. Based on the optimization algorithm, the boundary adjustment coefficient perform iterative calculations to determine the boundary adjustment coefficient Adjust the coefficients with the bounds to the first boundary The amplitude is adjusted.
  • the data compression device 200 may perform steps S242-46 for each unit. per unit Corresponding to the first boundary Adjustment coefficient at the border After adjustment, a corresponding coding boundary is obtained Boundary adjustment coefficients for all elements Combined to form the boundary adjustment coefficient g 1 . Boundary adjustment coefficients corresponding to each unit The boundary adjustment coefficient g 1 can be generated by combining according to the position of each unit. The boundary adjustment coefficient g 1 can be regarded as a matrix. It should be noted that different units Corresponding boundary adjustment coefficient Can be the same or different.
  • Coding boundaries corresponding to all units Combined to form the coded boundary frame E 1m Coding boundaries corresponding to each unit
  • the encoding boundary frame E 1m can be generated by combining the units according to their positions.
  • the relationship between E 1m and E 1b can be expressed as the following formula:
  • step S242-4 may include the current unit implement:
  • H E (f) g 1 (1-H 1 (f)) + H 1 (f) formula (6)
  • the initial frame P0 is divided into multiple units by step S242-2, thereby dividing the initial frame P0 into multiple small areas, so that different boundary adjustment coefficients can be selected according to the characteristics of each unit Therefore, it is more flexible to adjust the signal strength of the mid-frequency to high-frequency region components, and achieve a better balance between the coding effect and the size of the code stream.
  • step S240 may also include:
  • S244 Perform the encoding (prediction and residual calculation) on the encoding adjustment frame P1 to obtain the prediction data PI and the residual data R.
  • step S240 may also include:
  • S248 The encoding function of each unit of the initial frame P 0 in the boundary adjustment process and boundary adjustment coefficient input to the code stream generation module for synthesis to obtain the compressed frame.
  • the encoding function H 1 (f) and the boundary adjustment coefficient g 1 corresponding to the initial frame P 0 are input into the code stream generation module for synthesis to obtain the compressed frame.
  • the compressed frame not only includes the prediction data PI and the residual data R, but also includes the encoding function corresponding to each unit in the plurality of units and the boundary adjustment coefficient
  • the encoding function corresponding to each unit and the boundary adjustment coefficient That is, the aforementioned coded data RAMI.
  • the boundary adjustment coefficient g1 may be the boundary adjustment coefficient
  • the difference between, that is, with one of the multiple units as the basic data, the boundary adjustment coefficient corresponding to the other units is the difference between it and the base data.
  • the boundary adjustment coefficient g 1 can also be the boundary adjustment coefficient adjustment coefficient with a boundary near it poor. Wherein, both m and n are integers and are not zero at the same time. In this way, the amount of data in the boundary adjustment coefficient g 1 can be further reduced, and the compression ratio can be further improved.
  • the coding adjustment frame P 1 is obtained.
  • the encoding adjusts the mid-to-high amplitude attenuation of strong boundaries in frame P1 .
  • the data compression device 200 makes the coding adjustment frame P 1 as a whole after performing the boundary adjustment on the initial frame P 0
  • the amount of data information is reduced.
  • the data compression device 200 performs encoding and code stream generation calculation on the encoding adjustment frame P1 , which can improve the encoding efficiency of the initial frame P0 , thereby increasing the compression ratio of the initial frame and improving the transmission efficiency of the initial data.
  • the encoding adjusts the amplitude enhancement from the middle frequency to the high frequency of the weak boundary in the frame P 1 , so as to avoid the loss of details.
  • the data processing method P200 can perform the boundary adjustment on the initial frame at the same time, while improving the compression ratio of the initial frame, improving the encoding efficiency and the transmission efficiency of the initial data, it can also reduce the Data loss, avoid loss of details.
  • FIG. 7A shows a flowchart of a data processing method P300 for decompressing compressed frames.
  • the data decompression device 300 can execute the data processing method P300.
  • the storage medium in the data decompression device 300 may store at least one set of instructions.
  • the instruction set is configured to instruct the decompression processor in the data decompression device 300 to complete the data processing method P300.
  • the processor at the decompression end can read the instruction set and execute the data processing method P300.
  • the method P300 may include:
  • the compressed data includes the compressed frame.
  • the compressed data may include the compressed frame obtained by performing data compression on the initial frame in the initial data by the data processing method P200.
  • the compressed frame comprises compressed prediction data PI and residual data R.
  • the compressed frame further includes an encoding function corresponding to each unit in the plurality of units in the compressed frame and boundary adjustment coefficient That is, the coding function H 1 (f) and the boundary adjustment coefficient g 1 , that is, the aforementioned coded data RAMI.
  • the compressed frame also includes a coding function H 1 (f) and a boundary adjustment coefficient g 1 . As shown in FIG.
  • step S320 may include: inputting the compressed frame into the code stream analysis module for analysis and calculation, obtaining the prediction data PI and the residual data R, and the encoding function H 1 (f) and Boundary adjustment factor g 1 .
  • a frame is a commonly used processing unit that composes a data sequence. During data processing, calculations are often performed in units of frames.
  • the initial data may be compressed in units of frames.
  • the data decompression device 300 decompresses the compressed frames
  • data decompression may also be performed in units of frames.
  • S340 Perform data decompression on the compressed frame to obtain a decompressed frame.
  • the data decompression refers to performing decompression calculation on the compressed frame to obtain a decompressed frame, restoring or substantially restoring the decompressed frame to the original data, or making the decompressed frame clearer than the initial data.
  • the threshold can be any value between 80%-90%.
  • the threshold can be in the closed interval defined by any two values among 80%, 81%, 82%, 83%, 84%, 85%, 86%, 87%, 88%, 89%, and 90%. any value of .
  • the data decompression should make the amplitude of the decompressed frame at any frequency from low frequency to intermediate frequency not less than 85% ⁇ 3% of the initial frame.
  • the data decompression includes performing boundary compensation on the decompressed frame, and decoding the data after the boundary compensation, so as to obtain the required decompressed frame.
  • the frame of data being decompressed during decompression includes the compressed frame and any data state before the compressed frame becomes the decompressed frame during the decompression process.
  • the data processing method P200 uses a combination of boundary adjustment and encoding to compress the initial frame, so as to further increase the compression ratio of video data and improve the efficiency of video transmission.
  • the data processing method P300 can decompress the compressed frame by decoding (that is, recovering the compressed frame according to the residual data R and the predicted data PI) and boundary compensation to obtain the required decompressed frame , to recover the data in the compressed frame.
  • the frame being decompressed may include the compressed frame and any data state of the compressed frame during decoding according to the prediction data PI and residual data R.
  • the decompressed frame may be the compressed frame, a decoded frame obtained through decoding, or a predicted frame obtained through prediction, and so on.
  • the data compression may be to adjust the amplitude of the mid-frequency to high-frequency region of the compressed frame through the boundary adjustment, for example, attenuating the amplitude of the mid-frequency to high-frequency region to reduce the mid-frequency to high-frequency range.
  • the amount of data information in the high-frequency region thereby reducing the amount of data information in the compression frame.
  • video data because the edge part of the object in the image is rich in mid-frequency and high-frequency information, and the mid-frequency and high-frequency regions will carry more data, so reducing the amplitude of the mid-frequency to high-frequency region will visually make the
  • the data at the boundary of the compression frame is blurred, and the amount of information in the image will also be greatly reduced.
  • the data decompression may be to compensate the amplitude of the mid-frequency to high-frequency region of the compressed frame through boundary compensation, for example, to enhance the magnitude of the mid-frequency to high-frequency region to restore it to the original frame , or enhanced relative to the state in the initial frame.
  • the boundary compensation applied when performing the data decompression on the compressed frame refers to inputting the decompressed frame into a boundary compensator to perform boundary compensation.
  • the boundary compensation may correspond to the boundary adjustment, that is to say, there should be a preset relationship between the boundary compensation and the boundary adjustment.
  • boundary compensation There should be a preset relationship between the boundary compensation and the boundary adjustment, which may be that there is a preset relationship between the decoded data (decoding function H 2 (f) and boundary compensation coefficient g 2 ) in the boundary compensation relation.
  • decoded data decoding function H 2 (f) and boundary compensation coefficient g 2
  • encoded data RAMI encoded data RAMI
  • decoding function H 1 (f) and boundary adjustment coefficient g 1 decoding data
  • decoding function H 2 (f) and boundary The correlation between the compensation coefficients g 2 ) will be introduced in detail in the following description.
  • step S340 may include:
  • said de-frame may be said decoded frame P2 .
  • the compressed frame may be obtained by encoding the encoding adjustment frame P1 by the data compression device 200 .
  • the data decompression device 300 may decode the compressed frame to obtain the decoded frame P 2 . That is, a predicted frame is obtained by predicting according to the predicted data PI, and superimposed on the residual data R to obtain decoded data P 2 , which is the data P 2 of the decoded frame.
  • the relationship can be expressed as the following formula:
  • S344 Perform the boundary compensation on the decompressed frame (decoded frame P 2 ), to obtain the decompressed frame P 4 .
  • FIG. 7B shows a flow chart of boundary compensation provided according to an embodiment of this specification
  • FIG. 8 shows a flow chart of a structure of boundary compensation provided according to an embodiment of this specification.
  • step S344 may include being executed by at least one decompression end processor of the data decompression device 300:
  • S344-2 Divide the decoding frame (decoded frame P 2 ) into the plurality of units based on the preset unit size.
  • the division method of the decompression frame (decoded frame P 2 ) can be consistent with the division method of the compression frame (initial frame P 0 ) in step S242-2, and each unit corresponds to each other, which will not be repeated here repeat.
  • S344-4 Use the boundary compensation coefficient corresponding to the boundary adjustment coefficient for each unit to compensate its amplitude in the middle frequency to high frequency region.
  • the data processing method P300 can use the unit during data compression as the data decompression unit, and use the boundary compensation coefficient corresponding to the boundary adjustment coefficient to perform boundary on the amplitude of the mid-frequency to high-frequency region for each unit. Compensation to compensate for the reduced amplitude of the mid-to-high frequency region during data compression resulting in decompressed frames.
  • the boundary compensation corresponds to the boundary adjustment, and there is a corresponding relationship between the boundary compensation coefficient and the boundary adjustment coefficient.
  • the boundary compensation can restore the compressed data after the boundary adjustment to a resolution of the original frame that is even higher than that of the original frame.
  • the boundary compensation may be to use the boundary compensation corresponding to the boundary adjustment coefficient based on the association relationship for each of the multiple units in the deframe (decoded frame P 2 ). coefficients to compensate for its amplitude in the mid to high frequency region.
  • the association relationship and the boundary compensation coefficient will be described in detail in the following description.
  • step S344-4 may include the current unit implement:
  • S344-42 Determine the decoding function Through the decoding function for the current unit Adjustment is made to obtain the second unit In the frequency domain, the components in the low frequency region are preserved and the components in the mid to high frequency region are attenuated.
  • decoding function In the frequency domain there can be a low-pass filter such that the current unit in the decoded frame P2 The magnitude of is smoothly reduced in the frequency domain, so that the current unit in the decoded frame P2 In the frequency domain, the components of the low-frequency region are preserved and the components of the mid-frequency to high-frequency region are attenuated, thereby obtaining the current unit corresponding to the second unit In order to save the amount of calculation required in the implementation process and avoid the occurrence of ringing effects, the decoding function should make the current unit Amplitudes in the frequency domain transition smoothly.
  • decoding function It may be a low-pass filter with smooth transition in any form, which is not limited in this specification.
  • the decoding function is a smooth transition curve, avoiding sharp changes in the amplitude adjustment gain in the curve.
  • the ringing effect refers to that in image processing, when performing spectrum adjustment processing on an image, if the selected decoding function With faster changes, the image will "ring".
  • the so-called “ringing” refers to the vibration generated at the sharp change of the gray level of the output image, just like the air vibration generated after the clock is struck. The ringing effect mostly appears at the image boundary.
  • the data decompression described in this specification uses a smooth transition decoding function Adjust the decoded frame P2 , filter the components of the intermediate frequency to high frequency region in the decoded frame P2 , and then process the decoded frame P2 and the decoding function
  • the boundary information can be obtained by calculating the difference of the adjusted data; the boundary information is adjusted using a boundary compensation coefficient to restore it to an initial state or to enhance it relative to the initial state.
  • a decoding convolution kernel can be designed so that all coefficients are non-negative numbers, or the ratio of the absolute value of the sum of negative coefficients to the sum of non-negative coefficients is less than 0.1, and ringing can be avoided the emergence of the effect.
  • the adjustment can also be expressed as using the decoding convolution kernel in the time domain to check the current unit Do convolution. Therefore, there should also be a corresponding relationship between the decoding convolution kernel used for the boundary compensation and the coding convolution kernel used for the boundary adjustment. That is to say, the encoding function and decode function Corresponding relationships should also exist. That is, by selecting and encoding functions The decoding function corresponding to the encoding convolution kernel And decoding convolution kernel, two ways can achieve the same effect. For the convenience of description, this specification will take convolution in the time domain as an example to describe the boundary compensation, but those skilled in the art should understand that by multiplying the decoding function in the frequency domain The way of performing frequency spectrum adjustment is also the scope to be protected in this specification.
  • a convolution kernel or a combination of convolution kernels with a higher order is required in the implementation process. This means an unnecessary increase in computation.
  • high-order convolution kernels are more likely to cause strong color oscillations in the output image where the grayscale or color changes sharply, which is called the ringing effect.
  • the ringing effect mostly appears at the image boundary.
  • the decoding function The current unit can be analyzed in the frequency domain
  • the amplitude of the middle and low frequency region is adjusted, so that the change of the amplitude adjustment gain in the middle and low frequency region is smooth and continuous.
  • 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 smaller than a threshold.
  • 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 value in the interval defined by any two numbers.
  • the convolution kernel coefficients in the decoding convolution kernel may all be selected as non-negative numbers.
  • decoding function In the middle, the amplitude adjustment gain for the mid-frequency to high-frequency region is equal to 0, and can fluctuate within a certain error range.
  • the error range can be 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 other values within any two specified intervals.
  • the pass decode function The DC part can be kept, that is, the amplitude adjustment gain of the part where the frequency is 0 is 1, so as to ensure that the basic information in the initial frame can be preserved. Therefore, by the decoding function for the current unit When adjusting, the amplitude adjustment gain of the low frequency region is smoothly transitioned from the amplitude adjustment gain of 1 at the position where the frequency is 0 to the amplitude adjustment gain of the intermediate frequency region close to 0.
  • the decoding function group may be stored in the storage medium of the data decompression device 300 .
  • the set of decoding functions may include at least one different decoding function.
  • Each decoding function corresponds to a decoding convolution kernel. That is to say, the storage medium of the data decompression device 300 may include at least one decoding convolution kernel.
  • the storage medium of the data decompression device 300 may also store a decoding function with encoding function Correspondence between.
  • the compressed frame includes the encoded data RAMI, that is, the encoding function H 1 (f) and the boundary adjustment coefficient g 1 , that is, the encoding function corresponding to each unit and boundary adjustment coefficient Data decompression device 300 for the current unit
  • the encoding function H 1 (f) and the decoding function with encoding function The corresponding relationship between the current unit is selected from the preset decoding function group encoding function
  • the corresponding function as the current unit Corresponding decoding function
  • the corresponding convolution kernel is used as the decoding convolution kernel, and the current unit Do convolution.
  • the encoded data RAMI that is, the encoding function H 1 (f) and the boundary adjustment coefficient g 1 are not included in the compressed frame.
  • the data decompression device 300 performs a When performing convolution, a function can be arbitrarily selected from the preset decoding function group as the decoding function And use its corresponding convolution kernel as the decoding convolution kernel to check the current unit Do convolution.
  • the data decompression device 300 can also rely on empirical values to select a decoding function from the decoding function group For example, the decoding function is selected by machine learning
  • the decoding function can be encoded with the function same.
  • the curve shown in Figure 6 can also be a decoding function Those skilled in the art should understand all that can make the current unit The magnitude of is smoothly reduced in the frequency domain, so that the current unit in the decoded frame P2 A decoding function in which components in the low-frequency region are preserved and components in the mid- to high-frequency region are attenuated in the frequency domain and the decoding function linear combination of or the decoding function product combination Or the combination of linear combination and product combination all belong to the protection scope of this specification.
  • m ⁇ 1 Represents a linear combination of n functions
  • k m represents the weight corresponding to the mth function
  • q ⁇ 1 Represents the product combination of n functions
  • k q represents the weight corresponding to the qth function
  • the data decompression device 300 may perform steps S344-42 for each unit. per unit After decoding function After adjustment, a corresponding second unit is obtained Decoding functions corresponding to all units Combined to form the decoding function H 2 (f).
  • the decoding function corresponding to each unit The decoding function H 2 (f) can be generated by combining the units according to their positions.
  • the decoding function H 2 (f) can be regarded as a matrix.
  • All units correspond to the second unit Combined to form the second frame P 2b .
  • the second unit corresponding to each unit The second frame P 2b may be generated by combining the units according to their positions.
  • the second frame P 2b is a blurred image.
  • the relationship between P 2 and P 2b can be expressed as the following formula:
  • step S344-4 may also include the current unit implement:
  • the mid-frequency to high-frequency components in the data spectrum of each frame are mainly concentrated in the area where the data changes sharply in this frame of data, that is, the boundary data of the data.
  • the intermediate-frequency to high-frequency data is mainly concentrated on the boundary of the object in the image, that is, the boundary data of this frame of image.
  • the decoding function make the current unit The amplitude in the frequency domain is smoothly reduced to attenuate components in the mid to high frequency region. Therefore, the second unit It can be understood as removing the current unit The data of the boundary information in .
  • the second boundary include current unit Components in the middle frequency to the high frequency region.
  • the second boundary include current unit Boundary information in .
  • a corresponding second boundary is obtained Second boundary for all cells Combined to form the second boundary frame E 2b .
  • the second boundary corresponding to each cell The second boundary frame E 2b may be generated by combining the units according to their positions.
  • the second boundary frame E 2b can be expressed as the following formula:
  • step S344-4 may also include the current unit implement:
  • the boundary compensation coefficient corresponding to the boundary compensation is defined as g 2 .
  • the boundary adjustment can attenuate the amplitude of the strong boundary in the frequency domain from the middle frequency to the high frequency region of the strong boundary in the compressed frame, so as to blur the boundary data in the compressed frame, thereby Reduce the amount of data generated by encoding.
  • the boundary compensation can restore or even enhance the data after the boundary adjustment. That is to say, the boundary compensation can completely restore the amplitude of the mid-frequency to high-frequency region in the de-framing or basically restore to the state before fading, or even enhance the state before fading.
  • boundary adjustment coefficient and Boundary Compensation Coefficient there is a preset association relationship, that is, the boundary adjustment coefficient and Boundary Compensation Coefficient Corresponding.
  • a set of boundary compensation coefficients may be stored in the storage medium of the data decompression device 300 .
  • the set of boundary compensation coefficients may include at least one different coefficient.
  • the storage medium of the data decompression device 300 may also store a boundary adjustment coefficient and Boundary Compensation Coefficient Correspondence between.
  • the compressed frame includes the encoded data RAMI, that is, the encoding function H 1 (f) and the boundary adjustment coefficient g 1 , that is, the encoding function corresponding to each unit and boundary adjustment coefficient
  • the data decompression device 300 executes steps S344-46, it can adjust the coefficient based on the boundary and Boundary Compensation Coefficient
  • the association relationship of the current unit is selected from the preset boundary compensation coefficient group
  • the boundary adjustment coefficient of Corresponding boundary compensation coefficient as the current unit Corresponding boundary compensation coefficient to the second boundary The amplitude is compensated.
  • the encoded data RAMI that is, the encoding function H 1 (f) and the boundary adjustment coefficient g 1 are not included in the compressed frame.
  • the data decompression device 300 executes steps S344-46, it can arbitrarily select one of the preset boundary compensation coefficient groups as the current unit Corresponding boundary compensation coefficient to the second boundary The amplitude is compensated.
  • the data decompression device 300 can also rely on empirical values to select boundary compensation coefficients from the set of boundary compensation coefficients For example, the selection of boundary compensation coefficients through machine learning
  • the decoding boundary corresponding to each unit can be generated by combining the units according to their positions.
  • the relationship between E 2m and E 2b can be expressed as the following formula:
  • step S344-4 may include the current unit implement:
  • the decompressed frame P 4 can be generated by combining the units according to their positions.
  • the relationship between P 4 and E 2m and P 2 can be expressed as the following formula:
  • the design of the boundary adjustment only attenuates the amplitude of the intermediate-frequency to high-frequency region in the initial frame P 0 , so that the encoding adjustment
  • the frequency information of the low frequencies in the initial frame P 0 is preserved in the frame P 1 .
  • the decoded frame P2 is basically the same as the encoding adjustment frame P1 , therefore, the decoded frame P2 also retains low-frequency frequency information.
  • the design of the boundary compensation only compensates the amplitude of the mid-frequency to high-frequency region in the decoded frame P2 .
  • the frequency information of the low frequency in the original frame P 0 is preserved in the decompressed frame P 4 .
  • the decompressed frame P 4 obtained by compensating the amplitude of the mid-frequency to high-frequency region in the decoded frame P 2 through the boundary compensation can be completely restored Or basically restore all the frequency information of the intermediate frequency in the initial frame P 0 . That is to say, the data decompression can restore or even enhance the compressed data at any frequency of the intermediate frequency.
  • the amplitude of the decompressed frame P 4 at any frequency in the low frequency region should be approximately equal to the initial frame P 0
  • the amplitude at any frequency in the intermediate frequency region should be approximately equal to or greater than the initial frame P 0 .
  • Frame P 0 The approximately equal means that the magnitude of the decompressed frame P 4 is equal to the magnitude of the initial frame P 0 and fluctuates within a certain error range.
  • the amplitude of the decompressed frame P4 returns to 85% or more of the original frame P0 at any frequency in the low-frequency to intermediate-frequency region, it is difficult for human eyes to perceive the amplitude of the original frame P0.
  • the amplitude of the decompressed frame P4 at any frequency in the low frequency to intermediate frequency region should not be less than 85% of the initial frame P0 . That is, the error range should not make the amplitude of the decompressed frame P 4 lower than 85% of the original frame P 0 at any frequency in the low frequency to intermediate frequency region. Since the human eye is not sensitive to information in the high-frequency region, the information in the decompressed frame P 4 for the high-frequency region can be retained to adapt to high-quality scenes, and can also be attenuated to suppress unnecessary high-frequency noise.
  • the amplitude of the decompressed frame P 4 at any high-frequency frequency should be approximately equal to the initial frame P 0 , or lower than the initial frame P 0 , or greater than the initial frame P 0 0 .
  • the relationship between P 0 and P 4 can be expressed as the following formula:
  • the formula here only lists the basic relationship formula between P 4 and P 0 , without writing the error into the formula. Those skilled in the art should understand that fluctuations within the error range make the amplitude of the decompressed frame P 4 slightly smaller than the initial frame P 0 in the low-frequency to intermediate-frequency region, which also falls within the protection scope of this specification.
  • f 0 is the cut-off value of the frequency sensitive to the human eye.
  • f 0 may be 0.33, or other values larger or smaller than 0.33.
  • the value of f0 is different.
  • the decompressed frame P 4 when H 0 (f) ⁇ 1 in the selected frequency domain interval, the decompressed frame P 4 can be in the selected frequency domain The data in the interval is restored to the initial frame P 0 ; when the selected frequency domain interval H 0 (f)>1, the data of the decompressed frame P 4 in the selected frequency domain interval can be Enhanced, that is, the amplitude of the decompressed frame P 4 in the selected area is higher than that of the original frame P 0 .
  • the initial frame P 0 is a frame in the video
  • H 0 (f)>1 as enhanced mode.
  • FIG. 9A shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification.
  • FIG. 9B shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification.
  • FIG. 9C shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification.
  • FIG. 9D shows a graph of an overall adjustment function H 0 (f) provided according to an embodiment of the present specification.
  • the horizontal axis is the normalized frequency f
  • the vertical axis is the amplitude adjustment gain H 0 of the overall spectrum adjustment function H 0 (f).
  • the curves in Figures 9A to 9D represent different overall spectral adjustment functions H 0 (f).
  • the normalized frequency maximum value on the horizontal axis is 0.5.
  • the normalized frequency f of the horizontal axis can be divided into a low frequency region, a middle and low frequency region, a middle frequency region, a middle and high frequency region and a high frequency region.
  • the frequency between (0, a] belongs to low frequency; the frequency between (a, b] belongs to low frequency; the frequency between (b, c] belongs to intermediate frequency; the frequency between (c, d] belongs to medium and high frequency;
  • the frequency between (d, 0.5] belongs to high frequency.
  • the values of a, b, c, d, e are described with reference to FIG. 6, and will not be repeated here.
  • the decompressed frame P4 should be kept in the low-frequency to medium-frequency region relative to the initial frame P0 . That is to say, the overall spectrum adjustment function H 0 (f) should make the amplitude of the decompressed frame P 4 in the low frequency to intermediate frequency region not less than 85% of the initial frame P 0 , and can even be greater than the Describe the initial frame P 0 . Since the human eye is not sensitive to information in the high-frequency region, the amplitude of the decompressed frame P4 in the high-frequency region can be selected according to different application scenarios.
  • the decompressed frame P4 The amplitude of P 4 in the high frequency region may be smaller than the initial frame P 0 .
  • the amplitude of the decompressed frame P 4 in the high-frequency region may be approximately equal to or greater than the initial frame P 0 .
  • the amplitude adjustment gain H 0 of the overall adjustment function H 0 (f) at any frequency f in the low frequency to intermediate frequency region (including the low frequency and intermediate frequency regions) is greater than 1 or approximately equal to 1, so that after decompression
  • the amplitude of the decompressed frame P4 is not less than 85% of the initial frame P0 , so that the clarity is restored or enhanced, and the visual observation effect is improved.
  • Said approximately equal to 1 may fluctuate within a certain error range of being equal to 1 here.
  • the error range can be 0, ⁇ 1%, ⁇ 2%, ⁇ 3%, ⁇ 4%, ⁇ 5%, ⁇ 6%, ⁇ 7%, ⁇ 8%, ⁇ 9%, ⁇ 10%, ⁇ 11% %, ⁇ 12%, ⁇ 13%, ⁇ 14%, ⁇ 15% and other numerical values within the range specified by any two.
  • the amplitude adjustment gain of the overall adjustment function H 0 (f) in the high frequency region as the first amplitude adjustment gain
  • the amplitude adjustment gain in the intermediate frequency region as the second amplitude adjustment gain.
  • the amplitude adjustment gain in the low frequency region is defined as a third amplitude adjustment gain.
  • the third amplitude adjustment gain value, the second amplitude adjustment gain value and the first amplitude adjustment gain value may fluctuate within the error range.
  • the third amplitude adjustment gain value, the second amplitude adjustment gain value and the first amplitude adjustment gain value of the overall adjustment function H 0 (f) in the low-frequency to high-frequency region are all approximately equal to 1, so that The amplitude of the decompressed frame P4 in the low-frequency to high-frequency region is not less than 85% of the initial frame P0 , so that the data of the decompressed frame P4 in the low-frequency to high-frequency region can be restored smoothly or basically to the state of the initial frame P 0 .
  • the third amplitude adjustment gain value and the second amplitude adjustment gain value of the overall adjustment function H 0 (f) in the low frequency to intermediate frequency region are approximately equal to 1, so that the decompressed frame P 4 is in the low frequency to intermediate frequency region.
  • the data of the region can be restored smoothly or basically to the state of the initial frame P0 .
  • the first amplitude adjustment gain value of the overall adjustment function H 0 (f) in the high-frequency region is less than 1, so that the amplitude of the decompressed frame P 4 in the high-frequency region decreases smoothly relative to the initial frame P 0 , so that Suppresses high frequency noise.
  • the steady reduction of the amplitude may be that the amplitude is attenuated by the first amplitude adjustment gain value, or that the amplitude is attenuated within a certain error range around the first amplitude adjustment gain value.
  • the first amplitude adjustment gain may be any value between 0 and 1.
  • the first amplitude adjustment gain value can be 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. within the range specified by any two values. As shown in FIG.
  • the first amplitude adjustment gain of the overall adjustment function H 0 (f) in the high-frequency region is about 0.6.
  • Both the second and third amplitude adjustment gain values are around 1.
  • the second and third amplitude adjustment gain values can fluctuate within a certain error range, for example, the second and third amplitude adjustment gain values can be in values such as 0.85, 0.90, 0.95, 1, 1.05, 1.10, and 1.15 within any two specified intervals.
  • the third amplitude adjustment gain value of the overall adjustment function H 0 (f) in the low frequency region is approximately equal to 1, so that the data of the decompressed frame P 4 in the low frequency region can be restored smoothly or basically to the original Status of frame P 0 .
  • the second amplitude adjustment gain value of the overall adjustment function H 0 (f) in the middle frequency region and the first amplitude adjustment gain value in the high frequency region are both greater than 1, so that the decompressed frame P 4 in the middle frequency to high frequency region
  • the amplitude increases smoothly relative to the initial frame P 0 , resulting in enhanced data clarity in the mid-to-high frequency region.
  • the steady increase of the amplitude may be that the amplitude is enhanced by the second amplitude adjustment gain value and the first amplitude adjustment gain value, or that the amplitude is increased by the second amplitude adjustment gain value and the first amplitude adjustment gain value. Enhancement is performed within a certain error range around the first amplitude adjustment gain value.
  • the second amplitude adjustment gain value may be substantially the same as 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 The second amplitude adjustment gain value is smaller than the first amplitude adjustment gain value. In the curve shown in FIG. 9C , 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 value greater than 1.
  • the second amplitude adjustment gain value and the first amplitude adjustment gain value may be 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 within the range specified by any two of the equal values.
  • the second amplitude adjustment gain and the first amplitude adjustment gain of the overall adjustment function H 0 (f) in the mid-frequency to high-frequency region are about 1.2.
  • the third amplitude adjustment gain value of the overall adjustment function H 0 (f) in the low frequency region is approximately equal to 1, so that the data of the decompressed frame P 4 in the low frequency region can be restored smoothly or basically to the original Status of frame P 0 .
  • the second amplitude adjustment gain value of the overall adjustment function H 0 (f) in the intermediate frequency region is greater than 1, so that the amplitude of the decompressed frame P 4 in the intermediate frequency increases smoothly relative to the initial frame P 0 , so that the intermediate frequency region Enhanced data clarity.
  • the first amplitude adjustment gain value of the overall adjustment function H 0 (f) in the high-frequency region is less than 1, so that the amplitude of the decompressed frame P 4 in the high-frequency region decreases smoothly relative to the initial frame P 0 , so that Reduce the amount of data in the insensitive high-frequency region to suppress high-frequency noise.
  • the curve shown in Fig. 9D can enhance clarity 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. 9D , the second amplitude adjustment gain of the overall adjustment function H 0 (f) in the middle frequency region is about 1.2, and the first amplitude adjustment gain in the high frequency region is about 0.6.
  • the overall spectrum adjustment function H 0 (f) can also adjust the amplitude of the high frequency region, so that the amplitude adjustment gain
  • the changes in the mid-high frequency region are smooth and continuous.
  • the overall spectrum adjustment function H 0 (f) can also adjust the amplitude of the mid-low frequency region, so that the amplitude adjustment gain is at The changes in the mid-low frequency region are continuous.
  • the curve of the overall adjustment function H 0 (f) is a curve with a smooth transition.
  • the curve of the overall adjustment function H0 (f) can be allowed to exist in a small range The fluctuation does not affect the effect of decompression.
  • the parameters of the overall adjustment function H 0 (f) can be set according to the receiver's sensitivity to the data. Different forms of data have different receiver sensitivity to frequency.
  • Fig. 10A shows an overall adjustment function H 0 (f), an encoding function H 1 (f), an encoding transfer function HE (f) and a decoding transfer function H D (f) in the normal mode provided by an embodiment of this specification. ) graph.
  • Fig. 10B shows an overall adjustment function H 0 (f), an encoding function H 1 (f), an encoding transfer function HE (f) and a decoding transfer function HD ( f) Graph.
  • the encoding convolution kernel and the decoding convolution kernel used in FIG. 10A and FIG. 10B are the same as those shown in Table 1.
  • the boundary adjustment coefficient g 1 0.5
  • the boundary compensation coefficient g 2 0.96.
  • the boundary adjustment coefficient g 1 0.5
  • the boundary compensation coefficient g 2 1.6.
  • the horizontal axis is the normalized frequency f
  • the vertical axis is the amplitude adjustment gain H.
  • the overall spectrum adjustment function H 0 (f) ⁇ 1 in any frequency region
  • the overall spectrum adjustment function H 0 (f) performs normal mode spectrum adjustment on the decompressed frame, that is, the overall spectrum adjustment function H 0 In (f)
  • the information for all frequencies is completely preserved, and the data in the decompressed frame can basically be restored to the data in the initial frame.
  • FIG. 10A the overall spectrum adjustment function H 0 (f) ⁇ 1 in any frequency region
  • the overall spectrum adjustment function H 0 (f) performs normal mode spectrum adjustment on the decompressed frame, that is, the overall spectrum adjustment function H 0 In (f)
  • the information for all frequencies is completely preserved, and the data in the decompressed frame can basically be restored to the data in the initial frame.
  • the overall spectrum adjustment function H 0 (f) performs enhanced mode spectrum adjustment on the intermediate frequency to high frequency region of the decompressed frame, that is, the overall spectrum adjustment function H 0 (f) enhances the information in the intermediate frequency to high frequency region, so The data in the mid-frequency to high-frequency region in the decompressed frame is enhanced compared with the data in the mid-frequency to high-frequency region in the initial frame. It should be noted that the curves shown in Fig. 10A and Fig.
  • H 0 (f), H 1 (f), HE (f) and HD (f) The curves are not limited to the form shown in Figure 10A and Figure 10B, all H 0 (f), H 1 (f), H E (f) and HD (f ) curves belong to the protection scope of this specification.
  • the data compression device 200 executes the method P200 to divide the initial frame in the initial video data into multiple units, and Acquire the amplitude of the intermediate frequency to high frequency region of each unit, and use different boundary adjustment coefficients to adjust the amplitude of the intermediate frequency to high frequency region in each unit, so as to reduce the initial frame.
  • the amplitude of the mid-frequency to high-frequency region in the current unit is large, it means that the current unit contains a strong boundary, then use the boundary adjustment coefficient less than 1 and greater than 0 to adjust the amplitude of the mid-frequency to high-frequency region of the current unit , to reduce the amplitude of the mid-frequency to high-frequency region of the current unit, thereby reducing the signal strength in the mid-frequency to high-frequency region of the current unit, thereby reducing the amount of data information, and improving the data when making predictions and calculating residuals Compression efficiency.
  • the amplitude of the mid-frequency to high-frequency region in the current unit is small, it means that the current unit contains a weak boundary, then use a boundary adjustment coefficient greater than 1 to adjust the amplitude of the mid-frequency to high-frequency region of the current unit to enhance The amplitude of the mid-frequency to high-frequency region of the current unit to avoid the loss of weak boundaries in the current unit during data compression (prediction and residual) to avoid loss of details.
  • the data processing method P200 and system 100 can enhance the data information volume of weak boundaries while improving the efficiency of data compression, so as to avoid loss of details during the data compression process, that is, reduce data distortion while improving data compression efficiency .
  • the data processing system 100 when decompressing the compressed frame, executes the method P300 through the data decompression device 300, uses the unit during data compression as the data decompression unit, and uses the boundary adjustment coefficient for each unit
  • the corresponding boundary compensation coefficient performs boundary compensation on the amplitude of the mid-frequency to high-frequency region, so as to compensate the amplitude of the mid-frequency to high-frequency region reduced during the data compression process, and obtain the decompressed frame.
  • the boundary compensation corresponds to the boundary adjustment, and there is a corresponding relationship between the boundary compensation coefficient and the boundary adjustment coefficient.
  • the boundary compensation can restore the compressed data after the boundary adjustment to a resolution of the original frame that is even higher than that of the original frame.
  • the decoding end can at least restore the data in the important frequency of the decompressed data to the definition of the original frame, and even obtain the definition beyond the original frame. Since the boundary adjustment coefficients of the initial frame in the boundary adjustment process are all greater than 0, the information in the compressed frame is not missing, so the boundary adjustment can be designed according to the relationship between the boundary adjustment coefficient and the boundary compensation coefficient and their respective characteristics Coefficients and boundary compensation coefficients to restore the information in the compressed frame.
  • the method and system can significantly improve data compression efficiency, improve data transmission efficiency, reduce data loss, avoid detail loss, eliminate noise, and improve the clarity of decompressed data.
  • This specification also provides a non-transitory storage medium, which stores at least one set of executable instructions for data processing.
  • the executable instructions When the executable instructions are executed by a processor, the executable instructions instruct the processor to implement The steps of the data processing method P200.
  • various aspects of this specification can also be implemented in the form of a program product, which includes program codes.
  • the program product runs on the data compression device 200, the program code is used to make the data compression device 200 execute the steps of data processing described in this specification.
  • the program product for realizing the above method can adopt a portable compact disk read only memory (CD-ROM) and include program codes, and can run on the data compression device 200, such as a personal computer.
  • CD-ROM portable compact disk read only memory
  • the program product in this specification is not limited thereto.
  • a readable storage medium may be any tangible medium containing or storing a program, and the program may be used or combined with an instruction execution system (such as the compression end processor 220) use.
  • the program product may reside on 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 electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof.
  • readable storage media include: electrical connections with one or more conductors, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • the computer readable storage medium may include a data signal carrying readable program code in baseband or as part of a carrier wave traveling as a data signal. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a readable storage medium may also be any readable medium other than a readable storage medium that can send, propagate or transport a program for use by or in conjunction with an instruction execution system, apparatus or device.
  • the program code contained on the readable storage medium may be transmitted by any suitable medium, including but not limited to wireless, cable, optical cable, RF, etc., or any suitable combination of the above.
  • Program code for performing the operations of this specification may be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language - such as "C" or a similar programming language.
  • the program code may execute entirely on the data compression device 200, partly on the data compression device 200, as a stand-alone software package, partly on the data compression device 200 and partly on a remote computing device, or entirely on a remote computer. executed on a computing device.
  • the remote computing device may be connected to data compression device 200 through transmission medium 120, or may be connected to an external computing device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本说明书提供的数据处理的方法和系统,可以将初始帧划分为多个单元,并使用不同的边界调节系数对每个单元的中频至高频区域的幅值进行调节。若当前单元中的中频至高频区域的幅值较大时,使用小于1大于0的边界调节系数以降低中频至高频区域的幅值,从而减少数据信息量,提高数据压缩的效率。若当前单元中的中频至高频区域的幅值较小时,则使用大于1的边界调节系数以增强中频至高频区域的幅值,避免细节损失。在数据解压时,所述方法和系统能够使用与边界调节系数对应的边界补偿系数对每个单元的中频至高频区域的幅值进行边界补偿,使经过所述边界调节的压缩数据恢复至初始帧的清晰度甚至高于所述初始帧的清晰度,得到解压帧。

Description

数据处理的方法和系统 技术领域
本说明书涉及数据处理领域,尤其涉及一种数据处理的方法和系统。
背景技术
随着互联网技术的日益普遍,特别是移动终端的普及,通信网络涌现出越来越多类型的数据,随着而计算机的普及化,越来越多的数据正在占用越来越多的网络和存储资源,例如,视频数据、音频数据,等等。数据中往往包含巨大的信息量,对储存和传输的要求往往很高,因此,为了便于储存和传输,往往需要对数据进行压缩,在需要时再对压缩后的数据进行解压还原。因此,数据压缩和解压技术得到越来越多的应用。
比如,在过去的几十年中,视频和图像压缩技术得到越来越多的应用。视频中往往包含巨大的信息量。从传统的广播电影电视到现在大量的监控和互联网应用,压缩后的图像视频和图像正在占用越来越多的网络和存储资源。这使得如果将一段视频的原始数据从一个终端通过网络传输到另一个终端时会占用大量的网络资源。这就使得在有些实时视频传输的情况下难以实现画面的流畅传输。因此,视频数据传输前首先要在数据压缩设备处进行压缩处理,以便于传输。压缩后的视频在经过传输媒介传输到数据解压设备之后,数据解压设备再对所述视频进行解压,以至少部分地还原视频图像。
现有技术中主要的视频压缩标准是H.264和H.265标准。在传输前,通常依据H.264和H.265标准使用编码器对视频进行整体压缩,传输后再 依据H.264和H.265标准通过解码器对视频进行整体解压。但是,上述对视频进行整体压缩的处理方法在计算量和解压后视频清晰度之间的平衡上表现的仍不能令人满意。这是因为,H.264和H.265标准在处理所述原始视频的时候要通过各种复杂的算法生成原始帧的预测帧,然后记录所述原始帧与所述预测帧之间的残差。所述预测帧同所述原始帧越接近,则残差越小,对一段视频编码后的数据量就越小。为了使编码更加容易,常用的方法是通过对原始帧进行滤波来减少原始帧图像中的高频信息。由傅里叶变换可知,在图片中物体的边界部分频率信息往往是比较丰富的,边界部分的高频分量通常大于其他平缓区域的高频分量。因此减少高频信息的帧图像虽然在视觉上变得模糊了(也就是图像的清晰度降低了),却可以使得预测帧和滤波后的原始帧之间的残差更小。这样对视频编码时需要的计算量和编码后的数据流都减小了很多。然而,帧预测的技术非常复杂,会占用大量的计算资源。以视频编解码系统为例,平均每提高30%~40%的编码效率,便要增加约10倍的计算量。同时,传输后的数据经解压后清晰度降低,而且往往存在各种噪声,比如块效应或振铃效应。所述块效应是指在图像处理中,基于块的傅里叶变换使得图像边界处出现不连续现象。所述振铃效应是指在图像处理中,对一幅图像进行频谱调节处理时,若选用的频谱调节函数数值上具有较快的变化(也就是存在导数变化剧烈的区域),则会使输出图像在灰度剧烈变化处产生灰度震荡,就好像钟被敲击后产生的空气震荡。所述噪声多出现在图像边界处。如果一幅输出图像有很强的噪声,则无法满足人们对数据的清晰度日益增长的要求。因此,如何进一步提高数据的压缩效率,同时提高数据解压后的清晰度,消除噪声,一直都是数据压缩和解压技术领域追求的目标。
因此,为了提升数据的传输效率以及数据解压后的清晰度,需要一种压缩效率更高同时数据解压更清晰的数据处理的方法和系统。
发明内容
本说明书提供一种压缩效率更高同时数据解压更清晰的数据处理的方法和系统。以视频数据为例,所述数据处理的方法和系统可以将初始视频数据中的初始帧划分为多个单元,并获取每个单元的中频至高频区域的幅值,使用不同的边界调节系数对每个单元中的中频至高频区域的幅值进行调节,以降低所述初始帧在所述中频至所述高频区域的幅值。若当前单元中的中频至高频区域的幅值较大,代表当前单元中包含有强边界,则使用小于1且大于0的边界调节系数对当前单元的中频至高频区域的幅值进行调节,以降低当前单元的中频至高频区域的幅值,从而降低当前单元中的中频至高频区域内的信号强度,从而减少数据信息量,在进行预测和求残差时可以提高数据压缩的效率。若当前单元中的中频至高频区域的幅值较小,代表当前单元中包含有弱边界,则使用大于1的边界调节系数对当前单元的中频至高频区域的幅值进行调节,以增强当前单元的中频至高频区域的幅值,以避免当前单元中的弱边界在数据压缩(预测和求残差)过程中丢失,避免细节损失。所述数据处理的方法和系统能够在提高数据压缩的效率的同时增强弱边界的数据信息量,以避免在数据压缩过程中造成细节损失,即在提高数据压缩效率的同时,减少数据失真。
在对压缩帧进行数据解压时,所述方法和系统能够以数据压缩时的单元为数据解压单元,对每个单元使用与边界调节系数对应的边界补偿系数对中频至高频区域的幅值进行边界补偿,以补偿数据压缩过程中降低的中频至高频区域的幅值,得到解压帧。所述边界补偿与所述边界调节相对应,边界补偿系数与边界调节系数之间存在对应的关系。所述边界补偿可以使经过所述边界调节的压缩数据恢复至初始帧的清晰度甚至高于所述初始帧的清晰度。也就是说,在不显著增加编解码的计算量的情况下,解码端可以至少将解压数据在重要频率内的数据恢复至初始帧的清晰度,甚至可以获得超过初始帧的清晰度。
由于初始帧在边界调节过程中的边界调节系数均大于0,压缩帧中的信息并没有缺失,因此可以根据所述边界调节系数和所述边界补偿系数的关系以及各自的特征,来设计边界调节系数和边界补偿系数,对压缩帧中的信息进行恢复。所述方法和系统可以显著提高数据的压缩效率,提升数据的传输效率,减少数据丢失,避免细节损失,同时消除噪声,提高解压后数据的清晰度。
基于此,第一方面,本说明书提供一种数据处理的方法,包括:选择初始数据中的初始帧,所述初始帧包括预设字节数的初始数据;以及对所述初始帧进行数据压缩,得到压缩帧,其中,所述数据压缩包括对在压帧进行边界调节,所述在压帧包括所述初始帧和所述初始帧在所述数据压缩过程中成为所述压缩帧之前的任一数据状态,其中,所述边界调节包括对所述在压帧的多个单元中的每个单元使用与其对应的边界调节系数对其在中频至高频区域的幅值进行调节,以降低所述在压帧在所述中频至所述高频区域的幅值,所述边界调节系数大于0。
在一些实施例中,所述对在压帧进行边界调节,包括:基于预设的单元尺寸将所述在压帧划分为所述多个单元;以及对所述每个单元使用与其对应的所述边界调节系数对其在中频至高频区域的幅值进行调节。
在一些实施例中,所述对所述每个单元使用与其对应的所述边界调节系数对其在中频至高频区域的幅值进行调节,包括对所述每个单元:从预设的编码函数组中选取一个函数作为编码函数,通过所述编码函数对其进行调节,得到第一单元,使其在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减;对其和所述第一单元求差,获取其对应的第一边界,所述第一边界包括其在所述中频至所述高频区域的分量;以及使用与其对应的所述边界调节系数对所述第一边界的幅值进行调节,得到其对应的编码边界;以及将所述第一单元与所述编码边界进行叠加。
在一些实施例中,所述使用与其对应的所述边界调节系数对所述第一 边界的幅值进行调节,包括:确定所述第一边界的边界值小于预设第一阈值,通过大于1的所述边界调节系数增强所述第一边界的幅值;或者确定所述第一边界的边界值大于预设第二阈值,通过小于1的所述边界调节系数降低所述第一边界的幅值。
在一些实施例中,所述通过大于1的所述边界调节系数增强所述第一边界的幅值,包括:从预设的第一边界调节系数组中选取一个系数作为所述边界调节系数,增强所述第一边界的幅值,所述第一边界调节系数组中的系数均大于1;所述通过小于1的所述边界调节系数降低所述第一边界的幅值,包括:从预设的第二边界调节系数组中选取一个系数作为所述边界调节系数,降低所述第一边界的幅值,所述第二边界调节系数组中的系数均小于1。
在一些实施例中,所述使用与其对应的所述边界调节系数对所述第一边界的幅值进行调节,包括:以失真率和码率的加权值为优化目标,基于优化算法,获取所述边界调节系数,以所述边界调节系数对所述第一边界的幅值进行调节。
在一些实施例中,所述对所述初始帧进行数据压缩,包括以下方式中的至少一种:对所述初始帧先进行所述边界调节,再对所述边界调节后的初始帧进行预测和求残差;对所述初始帧先进行预测得到预测帧,再对所述初始帧和所述预测帧进行所述边界调节和求残差;以及对所述初始帧先进行预测和求残差,再对所述残差进行所述边界调节。
在一些实施例中,所述压缩帧还包括所述多个单元中的每个单元对应的所述编码函数和所述边界调节系数。
第二方面,本说明书还提供一种数据处理的系统,包括:至少一个存储介质以及至少一个处理器,所述至少一个存储介质存储有至少一个指令集,用于数据处理;所述至少一个处理器同所述至少一个存储介质通讯连接,其中,当所述系统运行时,所述至少一个处理器读取所述至少一个指 令集,并且根据所述至少一个指令集的指示执行本说明书第一方面所述的数据处理的方法。
第三方面,本说明书还提供一种数据处理的方法,包括:获取压缩数据,所述压缩数据包括对初始帧进行数据压缩得到的压缩帧,所述数据压缩包括边界调节;以及对所述压缩帧进行数据解压,得到解压帧,所述数据解压包括对在解帧进行边界补偿,所述在解帧包括所述压缩帧和所述压缩帧在所述数据解压过程中成为所述解压帧前的任一数据状态,其中,所述边界补偿与所述边界调节存在预先设定的关联关系。
在一些实施例中,所述边界调节包括对在压帧的多个单元中的每个单元使用与其对应的边界调节系数对其在中频至高频区域的幅值进行调节,以降低所述在压帧在所述中频至所述高频区域的幅值,所述边界调节系数大于0,所述在压帧包括所述初始帧和所述初始帧在所述数据压缩过程中成为所述压缩帧之前的任一数据状态,所述边界补偿包括对所述在解帧的所述多个单元中的所述每个单元,基于所述关联关系,使用与所述边界调节系数相对应的边界补偿系数对其在中频至高频区域的幅值进行补偿。
在一些实施例中,所述对在压帧进行边界调节,包括:基于预设的单元尺寸将所述在压帧划分为所述多个单元;以及对所述每个单元使用与其对应的所述边界调节系数对其在中频至高频区域的幅值进行调节,包括对所述每个单元:从预设的编码函数组中选取一个函数作为编码函数,通过所述编码函数对其进行调节,得到第一单元,使其在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减;对其和所述第一单元求差,获取其对应的第一边界,所述第一边界包括其在所述中频至所述高频区域的分量;以及使用与其对应的所述边界调节系数对所述第一边界的幅值进行调节,得到其对应的编码边界;以及将所述第一单元与所述编码边界进行叠加。
在一些实施例中,所述对在解帧进行边界补偿,包括:基于预设的所 述单元尺寸将所述在解帧划分为所述多个单元;以及对所述每个单元使用与所述边界调节系数相对应的所述边界补偿系数对其在中频至高频区域的幅值进行补偿。
在一些实施例中,所述对所述每个单元使用与所述边界调节系数相对应的所述边界补偿系数对其在中频至高频区域的幅值进行补偿,包括对所述每个单元:确定解码函数,通过所述解码函数对其进行调节,得到第二单元,使其在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减;对其和所述第二单元求差,获取其对应的第二边界,所述第二边界包括其在所述中频至所述高频区域的分量;以及使用与所述边界调节系数相对应的所述边界补偿系数对所述第二边界的幅值进行补偿,得到其对应的解码边界;以及将所述当前单元与所述解码边界进行叠加。
在一些实施例中,所述确定解码函数,包括:从预设的解码函数组中选取一个函数作为所述解码函数。
在一些实施例中,所述使用与所述边界调节系数相对应的所述边界补偿系数对所述第二边界的幅值进行补偿,包括:从预设的边界补偿系数组中选取一个作为所述边界补偿系数,对所述第二边界的幅值进行补偿。
在一些实施例中,所述压缩帧包括:所述在压帧中的多个单元中的每个单元对应的所述编码函数和所述边界调节系数。
在一些实施例中,所述确定解码函数,包括:从预设的解码函数组中选取与所述编码函数相对应的函数作为所述解码函数。
在一些实施例中,所述使用与所述边界调节系数相对应的所述边界补偿系数对所述第二边界的幅值进行补偿,包括:基于所述边界调节系数与所述边界补偿系数的关联关系,确定所述边界补偿系数,对所述第二边界的幅值进行补偿。
在一些实施例中,所述对所述压缩帧进行数据解压,包括以下方式中的至少一种:对所述压缩帧先进行解码,再进行所述边界补偿;对所述压 缩帧进行所述解码过程中进行所述边界补偿;以及对所述压缩帧先进行所述边界补偿,再进行所述解码。
在一些实施例中,所述关联关系包括:所述边界补偿使所述解压帧在低频至中频区域的任意频率上的幅值不小于所述初始帧的85%。
在一些实施例中,所述关联关系还包括:所述边界补偿使所述解压帧相对于所述初始帧在中频区域的幅值平稳地增加。
在一些实施例中,所述关联关系还包括:所述边界补偿使所述解压帧相对于所述初始帧在高频区域的幅值平稳地降低。
第四方面,本说明书还提供一种数据处理的系统,包括至少一个存储介质和至少一个处理器,所述至少一个存储介质存储有至少一个指令集,用于数据处理;以及所述至少一个处理器同所述至少一个存储介质通讯连接,其中当所述系统运行时,所述至少一个处理器读取所述至少一个指令集,并且根据所述至少一个指令集的指示执行本说明书第三方面所述的数据处理的方法。
本说明书提供的数据处理的方法和系统的其他功能将在以下说明中部分列出。根据描述,以下数字和示例介绍的内容将对那些本领域的普通技术人员显而易见。本说明书提供的数据处理的方法、系统和存储介质的创造性方面可以通过实践或使用下面详细示例中所述的方法、装置和组合得到充分解释。
附图说明
为了更清楚地说明本说明书实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了根据本说明书的实施例提供的一种数据处理的系统示意图;
图2示出了根据本说明书的实施例提供的一种数据处理的数据压缩设备示意图;
图3A示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图;
图3B示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图;
图3C示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图;
图4A示出了根据本说明书的实施例提供的一种对数据进行压缩的数据处理的方法的流程图;
图4B示出了根据本说明书的实施例提供的一种边界调节的流程图;
图5示出了根据本说明书的实施例提供的一种边界调节的结构框图;
图6示出了根据本说明书的实施例提供的一种编码函数的曲线图;
图7A示出了根据本说明书的实施例提供的一种对压缩帧进行解压的数据处理的方法的流程图;
图7B示出了根据本说明书的实施例提供的一种边界补偿的流程图;
图8示出了根据本说明书的实施例提供的一种边界补偿的结构流程图;
图9A示出了根据本说明书的实施例提供的一种整体调节函数H 0(f)的曲线图;
图9B示出了根据本说明书的实施例提供的一种整体调节函数H 0(f)的曲线图;
图9C示出了根据本说明书的实施例提供的一种整体调节函数H 0(f)的曲线图;
图9D示出了根据本说明书的实施例提供的一种整体调节函数H 0(f)的曲线图;
图10A示出了根据本说明书的实施例提供的一种正常模式的整体调节 函数H 0(f)、边界调节函数H 1(f)和解码函数H 2(f)的曲线图;以及
图10B示出了根据本说明书的实施例提供的一种增强模式的整体调节函数H 0(f)、边界调节函数H 1(f)和解码函数H 2(f)的曲线图。
具体实施方式
以下描述提供了本说明书的特定应用场景和要求,目的是使本领域技术人员能够制造和使用本说明书中的内容。对于本领域技术人员来说,对所公开的实施例的各种局部修改是显而易见的,并且在不脱离本说明书的精神和范围的情况下,可以将这里定义的一般原理应用于其他实施例和应用。因此,本说明书不限于所示的实施例,而是与权利要求一致的最宽范围。
这里使用的术语仅用于描述特定示例实施例的目的,而不是限制性的。比如,除非上下文另有明确说明,这里所使用的,单数形式“一”,“一个”和“该”也可以包括复数形式。当在本说明书中使用时,术语“包括”、“包含”和/或“含有”意思是指所关联的整数,步骤、操作、元素和/或组件存在,但不排除一个或多个其他特征、整数、步骤、操作、元素、组件和/或组的存在或在该系统/方法中可以添加其他特征、整数、步骤、操作、元素、组件和/或组。
考虑到以下描述,本说明书的这些特征和其他特征、以及结构的相关元件的操作和功能、以及部件的组合和制造的经济性可以得到明显提高。参考附图,所有这些形成本说明书的一部分。然而,应该清楚地理解,附图仅用于说明和描述的目的,并不旨在限制本说明书的范围。还应理解,附图未按比例绘制。
本说明书中使用的流程图示出了根据本说明书中的一些实施例的系统实现的操作。应该清楚地理解,流程图的操作可以不按顺序实现。相反,操作可以以反转顺序或同时实现。此外,可以向流程图添加一个或多个其 他操作。可以从流程图中移除一个或多个操作。
本说明书一方面提供了一种数据处理的系统100(以下简称系统100)。第二方面,本说明书描述了一种对数据进行压缩的数据处理的方法P200,第三方面,本说明书描述了一种对压缩帧进行解压的数据处理的方法P300。
图1示出了一种数据处理的系统100的示意图。系统100可以包括数据压缩设备200、数据解压设备300以及传输媒介120。
数据压缩设备200可以接收待压缩的初始数据中的初始帧,并使用本说明书提出的数据处理方法P200压缩初始数据产生压缩帧。数据压缩设备200可以存储有执行本说明书描述的数据处理的方法P200的数据或指令,并且执行所述数据和/或指令。
数据解压设备300可以接收压缩帧,并使用本说明书提出的数据处理方法P300解压压缩帧,得到解压帧。数据解压设备300可以存储有执行本说明书描述的数据处理的方法P300的数据或指令,并且执行所述数据和/或指令。
数据压缩设备200及数据解压设备300可包括广泛范围的装置。比如,数据压缩设备200及数据解压设备300可以包含台式计算机、移动计算装置、笔记本(例如,膝上型)计算机、平板计算机、机顶盒、智能电话等手持机、电视、相机、显示装置、数字媒体播放器、视频游戏控制台、车载计算机,或其类似者。
如图1所示,数据压缩设备200与数据解压设备300可以通过传输媒介120连接。传输媒介120可以促进信息和/或数据的传输。传输媒介120可以是任何可以将压缩帧从数据压缩设备200传输至数据解压设备300的数据载体。例如,传输媒介120可以是储存媒介(例如,光盘)、有线或无线通信媒介。所述通信媒介可以是网络。在一些实施例中,传输媒介120可以是任何类型的有线或无线网络,也可以是其组合。比如,传输媒介120可以包括电缆网络,有线网络、光纤网络、电信通信网络、内联网、互联网、局域网(LAN)、 广域网(WAN)、无线局域网(WLAN)、大都市市区网(MAN)、广域网(WAN)、公用电话交换网(PSTN)、蓝牙网络、ZigBee网络、近场通信(NFC)网络或类似网络。数据解压设备300和数据压缩设备200中的一个或多个组件可以连接到传输媒介120以传输数据和/或信息。传输媒介120可以包括路由器、交换器、基站,或促进从数据压缩设备200到数据解压设备300的通信的其它设备。在另一些实施例中,传输媒介120可以是储存媒介,例如,大容量存储器、可移动存储器、易失性读写存储器、只读存储器(ROM)或类似内容,或其任意组合。示例性大容量存储可能包括磁盘、光盘、固态驱动器等非暂时性存储介质(non-transitory storage medium)。可移动存储可能包括闪存驱动器、软盘、光盘、存储卡、zip磁盘、磁带等。典型的易失性读写内存可能包括随机存取存储器(RAM)。RAM可能包括动态RAM(DRAM)、双日期速率同步动态RAM(DDR SDRAM)、静态RAM(SRAM)、晶闸管RAM(T-RAM)和零电容RAM(Z-RAM)等。ROM可能包括掩码ROM(MROM)、可编程ROM(PROM)、可虚拟可编程ROM(PEROM)、电子可编程ROM(EEPROM)、光盘(CD-ROM)和数字多功能磁盘ROM等。在一些实施例中,传输媒介120可以是云平台。仅仅作为例子,所述云平台可能包括私有云、公共云、混合云、社区云、分布式云、云间云等形式,或者同上述形式类似的形式,或这上述形式的任意组合。
如图1所示,数据压缩设备200接收初始数据,并执行本说明书描述的数据处理的方法P200的指令,对初始数据进行数据压缩,产生压缩帧;所述压缩帧通过传输媒介120传输给数据解压设备300;数据解压设备300执行本说明书描述的数据处理的方法P300的指令,对压缩帧进行数据解压,得到解压帧。
图2示出了一种数据处理的数据压缩设备200的示意图。数据压缩设备200可以执行本说明书描述的数据处理的方法P200。所述数据处理的方法P200在本说明书中的其他部分介绍。
如图2所示,数据压缩设备200包括至少一个存储介质230和至少一个压缩端处理器220。在一些实施例中,数据压缩设备200还可以包括通信端口250和内部通信总线210。同时,数据压缩设备200还可以包括I/O组件260。
内部通信总线210可以连接不同的系统组件,包括存储介质230和压缩端处理器220。
I/O组件260支持数据压缩设备200和其他组件之间的输入/输出。
存储介质230可以包括数据存储装置。所述数据存储装置可以是非暂时性存储介质,也可以是暂时性存储介质。比如,所述数据存储装置可以包括磁盘232、只读存储介质(ROM)234或随机存取存储介质(RAM)236中的一种或多种。存储介质230还包括存储在所述数据存储装置中的至少一个指令集。所述指令是计算机程序代码,所述计算机程序代码可以包括执行本说明书提供的数据处理的方法的程序、例程、对象、组件、数据结构、过程、模块等等。
通信端口250用于数据压缩设备200同外界的数据通讯。比如,数据压缩设备200可以通过通信端口250连接传输媒介120。
至少一个压缩端处理器220同至少一个存储介质230通过内部通信总线210通讯连接。至少一个压缩端处理器220用以执行上述至少一个指令集。当系统100运行时,至少一个压缩端处理器220读取所述至少一个指令集,并且根据所述至少一个指令集的指示执行数据处理方法P200。压缩端处理器220可以执行数据处理的方法P200包含的所有步骤。压缩端处理器220可以是一个或多个处理器的形式,在一些实施例中,压缩端处理器220可以包括一个或多个硬件处理器,例如微控制器,微处理器,精简指令集计算机(RISC),专用集成电路(ASIC),特定于应用的指令集处理器(ASIP),中央处理单元(CPU),图形处理单元(GPU),物理处理单元(PPU),微控制器单元,数字信号处理器(DSP),现场可编程门阵列(FPGA),高 级RISC机器(ARM),可编程逻辑器件(PLD),能够执行一个或多个功能的任何电路或处理器等,或其任何组合。仅仅为了说明问题,在本说明书中数据压缩设备200中仅描述了一个压缩端处理器220。然而,应当注意,本说明书中数据压缩设备200还可以包括多个处理器,因此,本说明书中披露的操作和/或方法步骤可以如本说明书所述的由一个处理器执行,也可以由多个处理器联合执行。例如,如果在本说明书中数据压缩设备200的压缩端处理器220执行步骤A和步骤B,则应该理解,步骤A和步骤B也可以由两个不同压缩端处理器220联合或分开执行(例如,第一处理器执行步骤A,第二处理器执行步骤B,或者第一和第二处理器共同执行步骤A和B)。
虽然上述结构描述的是数据压缩设备200,此结构也适用于数据解压设备300。数据解压设备300可以执行本说明书描述的数据处理的方法P300。所述数据处理的方法P300在本说明书中的其他部分介绍。
数据处理方法P200、P300和系统100可以用于数据的压缩和解压,以提高所述数据的传输效率,节约资源和空间。所述数据可以是非实时数据,也可以是实时数据。从传统的广播电影电视到现在大量的监控和互联网应用都存在各种各样的数据。例如,所述数据可以是非实时的视频数据、音频数据或者图像数据,等等。所述数据还可以是实时地图数据、实时传感器数据、实时视频监控数据、网络监测数据、气象数据、航空航天数据,等等。比如说,所述数据可以是自动驾驶汽车在行驶过程中从基站接收到的地图数据。本说明书对所述数据的具体类别不作限定。本说明书所述的数据处理的方法P200、P300和系统100在对不同类别的数据进行处理时所采取的方法和步骤都是一致的,为了方便展示,本说明书将以视频数据的处理为例进行描述。
在数据压缩和数据解压中,常常以帧为单位进行压缩和解压。帧是组成数据序列的一个处理单位。初始数据中可以包括一个或多个初始帧。每 个初始帧包括预设字节数的初始数据。在视频压缩中,所述初始数据可以是初始视频数据,所述初始帧可以是初始视频数据中的帧图像。在传统的视频压缩技术中,通常使用H.264和H.265标准对初始视频数据进行编码,从而达到对所述视频数据进行压缩的目的。H.264和H.265标准对视频数据进行编码时主要采用的技术手段是预测编码,即对视频数据中的初始数据进行预测得到预测值,再将预测值与所述初始数据的初始值相减得到残差值,从而对所述视频数据进行压缩。在恢复和解压(即解码)时,用残差值和预测值相加即可恢复所述初始帧。
本说明书提供的数据处理方法P200、P300和系统100,在进行数据压缩时可以将边界调节和编码相结合,以降低编码时的数据量提高视频数据的压缩效率,提升视频的传输效率;在进行数据解压时可以将边界补偿与解码相结合对经过边界调节和编码的压缩数据进行解压,以使解压后的数据恢复至初始数据。
数据处理方法P200可以对所述视频数据进行数据压缩。数据处理方法P200可以采用编码(即预测和求残差)和边界调节相结合的方法,对初始帧进行数据压缩,得到压缩帧。具体地,数据处理方法P200可以对在压帧进行所述边界调节和所述编码。所述在压帧包括所述初始帧和所述初始帧在所述数据压缩过程中成为所述压缩帧之前的任一数据状态。所述边界调节是指对对待处理数据的频谱图的幅值进行调节。比如,所述边界调节可以对所述对待处理数据在其频域内的选定区域的幅值进行调节,比如中频区域的幅值,高频区域的幅值,又比如低频至中频区域的幅值,又比如,中频至高频区域的幅值,等等。在一些实施例中,所述边界调节可以由一个大于0且小于1的边界调节系数实现对其频域内的选定区域的幅值进行衰减,从而降低所述对待处理数据中的数据信息量。本领域的普通技术人员可以理解的是,经过幅值衰减的数据在选定频率区域内的频率分量变小,数据中的信息量减少了,因此,经过幅值衰减的数据编码时的效率可以提 高,提升压缩比。
数据处理方法P300可以对经过数据处理方法P200进行所述数据压缩的所述压缩帧进行数据解压,得到解压帧,以恢复所述视频数据。数据处理方法P300可以采用解码(即根据残差值和预测值恢复在压帧)和边界补偿相结合的方法,对所述压缩帧进行数据解压,以恢复所述压缩帧中的数据。具体地,数据处理方法P300可以对在解帧进行所述边界补偿和所述解码。所述在解帧可以包括所述压缩帧和所述压缩帧在所述数据解压过程中成为所述解压帧前的任一数据状态。所述边界补偿可以使经过所述边界调节的数据在不考虑其他计算误差的情况下完全恢复或者近似恢复至边界调节前的状态。
因此,数据处理方法P200、P300和系统100可以显著提高视频数据的压缩效率,减少视频数据压缩时的数据丢失,提升视频的传输效率、还原率以及解压视频的清晰度,减少解压后的视频中的噪声。关于所述边界调节以及所述边界补偿的具体过程将在后面的描述中详细介绍。
系统100在对视频数据进行数据压缩时,所述边界调节和所述编码的顺序是可以互换的,也可以是交叉进行的。所述边界调节可以是在所述编码之前也可以是在所述编码之后。同样,系统100在对压缩帧进行数据解压时,所述边界补偿和所述解码的顺序是可以互换的,也可以是交叉进行的。需要说明的是,为保证解压后的数据信息可以恢复初始数据中的信息,所述数据解压中所述边界补偿和所述解码的顺序与所述数据压缩中的所述边界调节和所述编码的顺序应该是相对应的,即所述边界补偿和所述解码可以同所述边界调节和所述编码呈对称反向操作。比如,如果所述压缩帧是先进行所述边界调节再进行所述编码得到的,则所述压缩帧在数据解压时应先进行所述解码再进行所述边界补偿。为了方便描述我们将数据压缩处理前的所述初始帧中的数据定义为P 0,将经数据解压设备300解压得到的解压帧中的数据定义为P 4
数据处理方法P200中,数据压缩设备200在对所述初始帧进行数据压缩时,可以是先对所述初始帧进行所述边界调节,再进行所述编码;也可以是先对所述初始帧进行所述编码,再进行所述边界调节。图3A至图3C示出了根据本说明书的实施例提供的一些数据压缩和数据解压的流程图。
图3A示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图。如图3A所示,数据压缩设备200对初始数据进行数据压缩可以是:数据压缩设备200先对所述初始帧P 0进行所述边界调节,再进行所述编码,即对所述边界调节后的初始帧进行预测和求残差,得到预测数据PI和残差数据R,将所述预测数据PI和所述残差数据R输入码流生成模块进行合成,得到所述压缩帧。所述压缩帧包括所述预测数据PI和所述残差数据R。其中,所述在压帧可以是所述初始帧P 0。为了方便展示,我们将经过所述边界调节后得到的数据定义为编码调节帧P 1。如前所述,所述边界调节可以将所述在压帧(初始帧P 0)划分为多个单元,并对每个单元使用对应的边界调节系数进行所述边界调节。在一些实施例中,数据压缩设备200还可以将所述边界调节中的每个单元对应的编码函数和边界调节系数也输入码流生成模块进行合成。即所述压缩帧还可以包括所述边界调节中的所述每个单元对应的所述编码函数和所述边界调节系数。为了方便展示,我们将所述压缩帧中的所述每个单元对应的所述编码函数和所述边界调节系数的数据定义为编码数据RAMI(Regional AmplitudeModulationInformation)。为了方便展示,在图3A中,我们以所述压缩帧中包括编码数据RAMI为例进行描述。关于所述边界调节中的所述编码函数和所述边界调节系数将在后面的描述中详细介绍。图3A所示的数据压缩方法可以提高编码效率,使所述压缩帧中的数据量进一步减小,提高压缩比,同时可以减少数据丢失,避免细节损失。
如图3A所示,数据解压设备300对所述压缩帧进行数据解压可以是:数据解压设备300对所述压缩帧先进行所述解码,再进行所述边界补偿。 具体地,数据解压设备300可以先对所述压缩帧进行所述解码,即基于码流解析模块对所述压缩帧进行解析,生成所述预测数据PI、所述残差数据R以及编码数据RAMI;再根据所述预测数据PI进行预测得到预测帧,并和所述残差数据R叠加,得到解码帧。为了方便描述,我们将所述解码帧中的数据定义为P 2。然后数据解压设备300基于编码数据RAMI,使用与编码数据RAMI对应的解码数据对解码帧P 2进行所述边界补偿,得到所述解压帧P 4进行输出。所述在解帧可以是所述解码帧P 2。如前所述,所述边界补偿可以将所述在解帧(解码帧P 2)划分为多个单元,并对每个单元使用与所述边界调节系数对应的边界补偿系数进行所述边界补偿。所述解码数据可以包括所述每个单元对应的解码函数和边界补偿系数。所述解码函数与所述编码函数相对应,所述边界补偿系数与所述边界调节系数相对应。因此,数据解压设备300可以基于所述编码数据RAMI确定所述每个单元对应的所述解码函数和所述边界补偿系数。关于所述边界补偿对应的所述解码函数和所述边界补偿系数的具体内容将在后面的描述中详细介绍。为了方便展示,我们将解压帧P 4与初始数据P 0之间的传递函数定义为整体频谱调节函数H 0(f)。图3A所示的方式可以减少所述压缩帧中的数据量,从而提高所述初始数据的压缩比和编码效率,提升所述初始数据的传输效率,同时可以减少数据丢失,避免细节损失。
数据压缩设备200对初始数据进行数据压缩也可以是:将所述边界调节融入到所述编码过程中。所述边界调节可以在所述编码过程中的任意阶段进行。相应地,所述边界补偿也可以在所述解码过程的对应阶段进行。
图3B示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图。如图3B所示,数据压缩设备200对初始数据进行数据压缩可以是:数据压缩设备200先对所述初始帧P 0进行预测,得到预测帧和预测数据PI,再对所述初始帧P 0和所述预测帧进行所述边界调节和求残差,得到所述残差数据R;将所述预测数据PI、所述残差数据R以及所述编码数据 RAMI输入码流生成模块进行合成,得到所述压缩帧。所述在压帧可以是所述预测帧和所述初始帧P 0。图3B所示的数据压缩的具体的操作与图3A所示的方式相同,只是操作顺序不同。关于所述边界调节的内容将在后面的描述中详细介绍。
如图3B所示,数据解压设备300对所述压缩帧进行数据解压可以是:数据解压设备300对所述压缩帧进行所述解码过程中进行所述边界补偿。具体地,数据解压设备300可以先基于码流解析模块对所述压缩帧进行解析,生成所述预测数据PI、所述残差数据R以及所述编码数据RAMI;根据所述预测数据PI进行预测得到预测帧;基于所述编码数据RAMI,使用相对应的解码数据对所述预测帧进行所述边界补偿;将经过所述边界补偿的所述预测帧与所述残差数据R叠加,并对叠加后的数据进行所述边界补偿,得到所述解压帧P 4。所述在解帧可以是所述预测帧以及所述预测帧与所述残差数据R的叠加数据。为了方便描述,我们将所述叠加帧中的数据定义为P 3。具体地,对所述叠加帧P 3中的边界进行所述边界校正的具体过程将在后面的内容中具体描述。
图3B所示的方式可以减少所述压缩帧中的数据量,从而提高所述初始数据的压缩比和编码效率,提升所述初始数据的传输效率,同时可以减少数据丢失,避免细节损失。
图3C示出了根据本说明书的实施例提供的一种数据压缩和数据解压的流程图。如图3C所示,数据压缩设备200对初始数据进行数据压缩可以是:数据压缩设备200先对所述初始帧P 0进行预测和求残差,得到预测数据PI和残差R 1,再对所述残差R 1进行所述边界调节,得到所述残差数据R;将经过所述边界调节后的残差数据R、预测数据PI以及所述编码数据RAMI输入码流生成模块进行合成,生成所述压缩帧。所述在压帧可以是所述残差R 1。图3C所示的数据压缩方式具体的操作与图3A所示的方式相同,只是操作顺序不同。关于所述边界调节的内容将在后面的描述中详细介绍。
如图3C所示,数据解压设备300对所述压缩帧进行数据解压可以是:数据解压设备300基于码流解析模块对所述压缩帧进行解析,生成所述预测数据PI和所述残差数据R;然后根据预测数据PI进行预测得到预测帧;基于所述编码数据RAMI,使用相对应的解码数据对所述残差数据R进行所述边界补偿,得到残差R 1;并将所述残差R 1与所述预测帧叠加,得到所述解压帧P 4。所述在解帧可以是所述残差数据R。
图3C所示的方式可以减少所述压缩帧中的数据量,从而提高所述初始数据的压缩比和编码效率,提升所述初始数据的传输效率,同时可以减少数据丢失,避免细节损失。
图4A示出了一种对数据进行压缩的数据处理的方法P200的流程图。如前所述,数据压缩设备200可以执行数据处理方法P200。具体地,数据压缩设备200中存储介质可以存储至少一组指令集。所述指令集被配置为可以指示数据压缩设备200中的压缩处理器220完成数据处理方法P200。当所述数据压缩设备200运行的时候,压缩处理器220可以读取所述指令集并执行数据处理方法P200。如图4A所示,所述方法P200可以包括:
S220:选择初始数据中的初始帧P 0
帧是组成数据序列的一个处理单位。在数据处理时,常常以帧为单位进行计算。所述初始数据可以包括一个或多个初始帧。所述初始帧P 0包括预设字节数的初始数据。如前所述,在本说明书中以视频数据为例进行描述,因此,所述初始数据可以是初始视频数据,所述初始帧P 0可以是初始视频数据中的帧图像。在步骤S220中,数据压缩设备200可以从所述初始数据中选择一部分帧图像作为所述初始帧P 0,也可以选择所述初始数据中的全部帧图像作为所述初始帧P 0。数据压缩设备200可以根据所述初始数据应用场景选择所述初始帧P 0。若所述初始数据应用在对精度和压缩质量要求不高的场景可以选择部分帧图像作为所述初始帧P 0,比如,僻静处的 监控图像在多数情况下画面中没有外来物,因此所述僻静处的监控图像多数帧图像是相同的,数据压缩设备200可以从中选择部分帧图像作为所述初始帧P 0进行压缩和传输。又比如,对于高清的电视播放视频,为了保证观影效果,数据压缩设备200可以选择全部帧图像作为所述初始帧P 0进行压缩和传输。
S240:对所述初始帧P 0进行所述数据压缩,得到压缩帧。
所述数据压缩可以包括对在压帧进行所述边界调节和所述编码。所述对所述在压帧进行所述边界调节可以是将所述在压帧输入边界调节器进行边界调节。所述在压帧可以包括所述初始帧P 0和所述初始帧P 0在所述数据压缩过程中成为所述压缩帧之前的任一数据状态。比如,所述在压帧包括所述初始帧P 0和所述初始帧P 0在进行所述边界调节和编码的过程中的任一种数据状态,例如,初始帧、预测帧、残差帧,等等。
所述边界调节是指对所述在压帧的频谱图的幅值进行调节。比如,所述边界调节可以对所述在压帧在其频域内的选定区域的幅值进行调节,比如中频区域的幅值,高频区域的幅值,又比如低频至中频区域的幅值,又比如,中频至高频区域的幅值,等等。在一些实施例中,所述边界调节可以由一个边界调节系数实现对其频域内的选定区域的幅值进行调节。比如,所述边界调节可以由一个大于0且小于1的边界调节系数实现对其频域内的选定区域的幅值进行衰减,从而降低所述在压帧中的数据信息量。对于不同形式的数据,接收者对于频率的敏感程度不同,因此所述数据压缩操作可以根据不同形式的数据在频域上选定不同的区域进行幅值衰减。一帧数据频谱中的中频至高频分量主要集中在这一帧数据中数据变化剧烈的区域,也就是数据的边界数据。如前所述,以视频数据为例,比如,对于一帧图像来说,所述中频至高频数据主要集中在所述图像中物体的边界,也就是这一帧图像的边界数据。由于图片中物体的边缘部分中频和高频信息丰富,而中频和高频区域会携带更多的数据。因此降低中频至高频区域的 幅值从视觉上会使所述在压帧的边界数据模糊化,同时也会使图像中的信息量大大减小。需要说明的是,降低低频区域的幅值,也会减小图像中的信息量。在本说明书中,以视频数据为例,所述边界调节可以是对所述在压帧的中频至高频区域的幅值进行调节,比如对中频至高频区域的幅值进行衰减以降低中频至高频区域的数据信息量。本领域的普通技术人员可以理解的是,比起没经过边界调节处理的情况,经过边界调节处理的中间状态帧中的中频至高频区域的幅值衰减了,数据信息量也减小了,因此经过边界调节处理的中间状态帧在编码中会有更高的压缩比。
以视频数据压缩为例,数据处理方法P200可以采用边界调节和编码相结合的方法对所述初始帧P 0进行压缩,以对中频至高频区域的幅值进行调节,以减少数据信息量,进一步提高视频数据的压缩比,提升视频传输的效率。如前所述,所述对所述初始帧P 0进行数据压缩时,所述边界调节和所述编码的顺序是可以互换的,也可以是交叉进行的。步骤S240可以包括图3A、图3B和图3C中示出的数据压缩的方法中的至少一种。为了方便展示,本说明书将以图3A所示方式为例对步骤S240进行详细的描述。也就是说,数据压缩设备200对所述初始帧P 0先进行所述边界调节,使所述初始帧P 0在中频至高频区域的幅值衰减,从而使所述初始帧P 0的边界信息模糊,得到编码调节帧P 1,以减少所述初始帧P 0中的信息量,从而降低所述初始帧P 0压缩后占用的空间资源;再对编码调节帧P 1进行编码(即预测和求残差),对所述编码调节帧P 1进行预测得到所述编码调节帧P 1的预测帧和所述预测数据PI;再将所述编码调节帧P 1的预测帧与所述编码调节帧P 1相减得到残差数据R;将残差数据R和所述预测数据PI以及所述编码数据RAMI输入码流生成模块进行合成,得到所述压缩帧。数据处理方法P200可以提高所述编码调节帧P 1的编码效率,使所述压缩帧中的数据量进一步减小,提高编码效率,提高压缩比。由于所述边界调节的对象是所述初始 帧P 0,因此所述在压帧便是所述初始帧P 0。以视频数据为例,在步骤S240中,所述对所述在压帧(初始帧)进行所述数据压缩,可以包括通过数据压缩设备200的至少一个压缩端处理器220执行:
S242:对所述在压帧(初始帧P 0)进行所述边界调节,得到所述编码调节帧P 1。图4B示出了根据本说明书的实施例提供的一种边界调节的流程图;图5示出了根据本说明书的实施例提供的一种边界调节的结构框图。如图4B和图5所示,步骤S242可以包括通过数据压缩设备200的至少一个压缩端处理器220执行:
S242-2:基于预设的单元尺寸将所述在压帧(初始帧P 0)划分为多个单元。
我们知道,在对图像数据和视频数据进行所述编码时,其处理的数据处理单元可以是一帧数据,也可以是一帧数据的一部分。比如,我们可以将一帧数据进划分成若干区域,然后对每个区域分别进行编码。以视频数据为例,该区域可以是一帧或者一场图像,或者一帧/场图像的一部分。例如在视频编码中把图像进一步分割为条带(slice),片(tile),编码单元(coding unit,CU),宏块(macroblock),块(block),或者子块(subblock)。一个区域通常是一个NxN的方形,或者是一个MxN的长方形。区域包括但是不限于上述名字。为了方便描述,我们将每个区域定义为一个单元。所述边界调节能够以上述单元为调节对象,对每个单元进行所述边界调节。这里,所述单元的大小可以根据需要任意选择,即M和N的取值可以是任意的整数,比如4,8,16,32,16,128,或者256,甚至可以是更小,比如2。在一些实施例中,所述单元可以只包含一个像素。当一帧图像的分辨率越高时,所述单元的尺寸也可以更大。如前所述,所述在压帧(初始帧P 0)可以被划分为多个单元。为了方便描述,我们将初始帧P 0中第i行和第j列的单元的数据定义为
Figure PCTCN2022094004-appb-000001
S242-4:对所述每个单元使用与其对应的所述边界调节系数对其在中频至高频区域的幅值进行调节。
以视频数据为例,所述边界调节可以是对所述在压帧(初始帧P 0)的多个单元中的每个单元使用与其对应的边界调节系数对其在中频至高频区域的幅值进行调节,以降低所述在压帧(初始帧P 0)整体在所述中频至所述高频区域的幅值。关于所述边界调节系数将在后面的描述中详细介绍。在对第i行和第j列的单元
Figure PCTCN2022094004-appb-000002
进行所述边界调节时,步骤S242-4可以包括对当前单元
Figure PCTCN2022094004-appb-000003
执行:
S242-42:从预设的编码函数组中选取一个函数作为编码函数
Figure PCTCN2022094004-appb-000004
通过所述编码函数
Figure PCTCN2022094004-appb-000005
对当前单元
Figure PCTCN2022094004-appb-000006
进行调节,得到第一单元
Figure PCTCN2022094004-appb-000007
使其在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减。
其中,
Figure PCTCN2022094004-appb-000008
表示第i行和第j列的当前单元
Figure PCTCN2022094004-appb-000009
对应的编码函数。编码函数
Figure PCTCN2022094004-appb-000010
在频域内可以是一个低通率波器,使所述初始帧P 0中当前单元
Figure PCTCN2022094004-appb-000011
的幅值在频域内平滑地降低,以使所述初始帧P 0中当前单元
Figure PCTCN2022094004-appb-000012
在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减,从而得到当前单元
Figure PCTCN2022094004-appb-000013
对应的第一单元
Figure PCTCN2022094004-appb-000014
为了节省实现过程中需要的计算量和避免振铃效应的出现,编码函数
Figure PCTCN2022094004-appb-000015
应使所述当前单元
Figure PCTCN2022094004-appb-000016
在频域内的幅值平滑地过渡。编码函数
Figure PCTCN2022094004-appb-000017
可以是任意形式的平滑过渡的低通滤波器,本说明书对此不做限定。
需要说明的是,为了避免振铃效应,所述编码函数
Figure PCTCN2022094004-appb-000018
是平滑过渡的曲线,避免曲线中的所述幅值调节增益急剧变化。如前所述,所述振铃效应是指在图像处理中,对一幅图像进行频谱调节处理时,若选用的编码函数
Figure PCTCN2022094004-appb-000019
具有较快的变化,则会使图像产生“振铃”。所谓“振铃”就是指输出图像的灰度剧烈变化处产生的震荡,就好像钟被敲击后产生的空气震荡。振铃效应多出现在图像边界处。
通过所述编码函数
Figure PCTCN2022094004-appb-000020
对当前单元
Figure PCTCN2022094004-appb-000021
进行调节可以表现为在时域使用编码卷积核对所述当前单元
Figure PCTCN2022094004-appb-000022
做卷积。通过所述编码函数
Figure PCTCN2022094004-appb-000023
对当前单元
Figure PCTCN2022094004-appb-000024
进行调节可以表达为在所述当前单元
Figure PCTCN2022094004-appb-000025
在频域乘以传递函数
Figure PCTCN2022094004-appb-000026
(即编码函数)或者在时域做相应的卷积计算。如果所述当前单元
Figure PCTCN2022094004-appb-000027
为数字化的数据,则所述卷积运算可以是选取同所述编码函数
Figure PCTCN2022094004-appb-000028
相对应的编码卷积核进行卷积运算。为了方便描述,本说明书将以在时域进行卷积为例来描述通过所述编码函数
Figure PCTCN2022094004-appb-000029
对当前单元
Figure PCTCN2022094004-appb-000030
进行调节。但本领域技术人员应该明白通过在频域乘以编码函数
Figure PCTCN2022094004-appb-000031
的方式也是本说明书要保护的范围。
数据压缩设备200的存储介质中可以存储有所述编码函数组。所述编码函数组中可以包括至少一个不同的编码函数。每个编码函数对应一个编码卷积核。也就是说,数据压缩设备200的存储介质中可以包括至少一个编码卷积核。数据压缩设备200对所述当前单元
Figure PCTCN2022094004-appb-000032
做卷积时,可以从所述编码函数组中任意选取其中一个作为当前单元
Figure PCTCN2022094004-appb-000033
对应的编码函数
Figure PCTCN2022094004-appb-000034
并使用其对应的卷积核作为所述编码卷积核,对所述当前单元
Figure PCTCN2022094004-appb-000035
做卷积。
当对一幅图像进行边界调节处理时,若选用的编码函数存在数值上剧烈变化的区域,在实现过程中需要阶数更高的卷积核或卷积核组合。这就意味着增加不必要的运算量。同时,高阶卷积核更有可能会使输出图像在灰度或者颜色剧烈变化处产生较强烈的颜色震荡,称作振铃效应。振铃效应多出现在图像边界处。通过使所述编码函数
Figure PCTCN2022094004-appb-000036
在频域内对所述当前单元
Figure PCTCN2022094004-appb-000037
的幅值调节增益应平滑地过渡可以避免所述幅值调节增益的急剧变化。比如,当所述低频区域同所述中频区域不相连的时候,所述编码函数
Figure PCTCN2022094004-appb-000038
可以在频域对所述当前单元
Figure PCTCN2022094004-appb-000039
的中低频区域的幅值做出调节,使得所述幅值调节增益在中低频区域内的变化平滑而连续。
与所述编码函数
Figure PCTCN2022094004-appb-000040
对应的编码卷积核中负系数的和的绝对值与非负系数的和的比值应小于0.1。比如在一些实施例中,所述编码卷积核中的卷积核系数可以均为非负数。以视频数据为例,当所述编码卷积核中有较多负系数出现时,在图像边界处的像素值相差很大,一个大的像素值乘以一个负系数,会使得卷积的最终结果变小,反映在图像上则是像素较暗。如果卷积结果出现负数,并且负数的绝对值较大时,在使用无符号整数计算计算卷积结果时,可能造成无符号整数计算结果反转,取值为负数的无符号补码值,则会导致出卷积结果变大,反映在图像上则是像素较亮。因此,在设计所述编码卷积核时,可以使所述编码卷积核的系数可以均为非负数,或者使所述编码卷积核中的负系数的和的绝对值与非负系数的和的比值应小于0.1,即允许所述编码卷积核中出现少量绝对值较小的负系数。
图6示出了根据本说明实施例提供的一种编码函数
Figure PCTCN2022094004-appb-000041
的曲线示意图。横轴为归一化频率f,纵轴为编码函数
Figure PCTCN2022094004-appb-000042
的幅值调节增益H 1。所述横轴的归一化频率f可以分成低频区域,中低频区域,中频区域,中高频区域和高频区域。不同类型的数据对于低频、中频和高频区域的定义可以不同。如图6所示,横轴的归一化频率最大值为0.5。所述高频区域可以包括归一化的频域中(d,0.5]之间的频率。其中d为所述高频区域的频率下限。比如,d可以为所述归一化的频域中0.35、0.36、0.37、0.38、0.39、0.4、0.41、0.42、0.43、0.44、和0.45中的任意一个频率。在一些实施例中,所述高频可以包括归一化的频域中(0.33,0.5]之间的频率。比如,所述高频可以包括所述归一化的频域中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中任何两个频率之间的区间,其中0.5为所述归一化的最大频率。所述中频区域可以包括(b,c]之间的频率,其中b为所述中频区域的频率下限,c为所述中频区域的频率上限。比如,所述中频区域的频率下限b可以是所述归一化 的频域中的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和0.28之中的任意一个频率;所述中频区域的频率上限c可以是所述归一化的频域中0.35、0.34、0.33、0.32和0.31中的任意一个频率。所述低频区域可以包括归一化的频域中[0,a]之间的频率。其中a为所述低频区域的频率上限。所述低频区域的频率上限a可以是所述归一化的频域中0.01、0.02、0.03、0.04、0.05、0.06、0.07、0.08、0.09、0.10、0.12、0.13、0.14和0.15中的任意一个频率。当所述低频区域同所述中频区域不相连时,二者的之间频率区域被称为中低频区域。当所述中频区域同所述高频区域不相连时,二者之间的频率区域被称为中高频率区域。
编码函数
Figure PCTCN2022094004-appb-000043
可以对中频至高频区域的分量进行过滤。编码函数
Figure PCTCN2022094004-appb-000044
中的阻带区间可以在频率0.15~0.50之间的任意区间。比如,编码函数
Figure PCTCN2022094004-appb-000045
中的阻带区间可以在0.15、0.17、0.19、0.21、0.23、0.25、0.27、0.29、0.31、0.33、0.35、0.37、0.39、0.41、0.43、0.45和0.50等数值中任意两个所规定的区间内。编码函数
Figure PCTCN2022094004-appb-000046
中的通带区间可以在频率0~0.35之间的任意区间。比如,编码函数
Figure PCTCN2022094004-appb-000047
中的通带区间可以在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和0.35等数值中任意两个所规定的区间内。
需要说明的是,图6只是以视频数据为例进行说明,本领域的技术人员应该明白所述编码函数
Figure PCTCN2022094004-appb-000048
的曲线并不局限于图6所示的形式,所有能够使所述当前单元
Figure PCTCN2022094004-appb-000049
的幅值在频域内平滑地降低,以使所述初始帧P 0中当前单元
Figure PCTCN2022094004-appb-000050
在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减的编码函数
Figure PCTCN2022094004-appb-000051
以及编码函数
Figure PCTCN2022094004-appb-000052
的线性组合
Figure PCTCN2022094004-appb-000053
或者编码函数
Figure PCTCN2022094004-appb-000054
乘积组合
Figure PCTCN2022094004-appb-000055
Figure PCTCN2022094004-appb-000056
或者线性组合和乘积组合的组合都属于本说明书保护的范 围。其中,m≥1,
Figure PCTCN2022094004-appb-000057
代表n个函数的线性组合,
Figure PCTCN2022094004-appb-000058
代表第m个函数,k m代表第m个函数对应的权重。q≥1,
Figure PCTCN2022094004-appb-000059
代表n个函数的乘积组合,k q代表第q个函数对应的权重,
Figure PCTCN2022094004-appb-000060
可以是任意函数。
表1示出了根据本说明书的实施例提供的一种编码卷积核的参数表。表1示例性地列举出一个编码卷积核的参数,其中,表1中每一行代表一个编码卷积核。对于8比特视频图像来说,需要保证编码卷积后得到的所述第一单元
Figure PCTCN2022094004-appb-000061
中像素点的灰度值在0~255以内,因此,在本实施例中,需要将卷积后的结果除以16。所述编码卷积核是基于所述编码函数
Figure PCTCN2022094004-appb-000062
通过傅里叶变换得到的。表1中只是示例性的举例说明,本领域技术人员应该知道所述编码卷积核不止局限于表1所示的参数,所有能够使所述当前单元
Figure PCTCN2022094004-appb-000063
的幅值在频域内平滑地降低,以使所述初始帧P 0中当前单元
Figure PCTCN2022094004-appb-000064
在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减的编码卷积核都属于本说明书保护的范围。
Figure PCTCN2022094004-appb-000065
如前所述,在所述边界调节中,数据压缩设备200可以对每个单元执行步骤S242-42。每个单元
Figure PCTCN2022094004-appb-000066
在经过编码函数
Figure PCTCN2022094004-appb-000067
调节后,都得到一个对应的第一单元
Figure PCTCN2022094004-appb-000068
所有单元对应的编码函数
Figure PCTCN2022094004-appb-000069
组合起来构成编码函数H 1(f)。各个单元对应的编码函数
Figure PCTCN2022094004-appb-000070
可以按照各个单元所在的位置进行组合生成编码函数H 1(f),编码函数H 1(f)可以看作是一个矩阵。需要说明的是,在对不同的单元执行步骤S242-42时,可以选择相同的编码函数(即编码卷积核),也可以选择不同的编码函数(即编码卷积核)。即不同的单元
Figure PCTCN2022094004-appb-000071
对应的编码函数
Figure PCTCN2022094004-appb-000072
可以是相同的也可以是不同的。
所有单元对应的第一单元
Figure PCTCN2022094004-appb-000073
组合起来构成第一帧P 1b。各个单元对应的第一单元
Figure PCTCN2022094004-appb-000074
可以按照各个单元所在的位置进行组合生成第一帧P 1b,第一帧P 1b是一个模糊的图像。P 0与P 0b之间的关系看可以表示为以下公式:
P 1b=P 0H 1(f)公式(1)
如图4B和图5所示,在对第i行和第j列的单元
Figure PCTCN2022094004-appb-000075
进行所述边界调节时,步骤S242-4可以包括对当前单元
Figure PCTCN2022094004-appb-000076
执行:
S242-44:对当前单元
Figure PCTCN2022094004-appb-000077
和第一单元
Figure PCTCN2022094004-appb-000078
求差,获取当前单元
Figure PCTCN2022094004-appb-000079
对应的第一边界
Figure PCTCN2022094004-appb-000080
每一帧数据频谱中的中频至高频分量主要集中在这一帧数据中数据变化剧烈的区域,也就是数据的边界数据。比如,对于一帧图像来说,所述中频至高频数据主要集中在所述图像中物体的边界,也就是这一帧图像的边界数据。所述编码函数
Figure PCTCN2022094004-appb-000081
使当前单元
Figure PCTCN2022094004-appb-000082
在频域内的幅值平滑地降低以衰减中频至高频区域的分量。因此,第一单元
Figure PCTCN2022094004-appb-000083
可以理解成去除了当前单元
Figure PCTCN2022094004-appb-000084
中的边界信息的数据。接下来,对当前单元
Figure PCTCN2022094004-appb-000085
和所述第一单元
Figure PCTCN2022094004-appb-000086
求差,可以得到当前单元
Figure PCTCN2022094004-appb-000087
的边界,即第一边界
Figure PCTCN2022094004-appb-000088
因此,所述第一边界
Figure PCTCN2022094004-appb-000089
包括当前单元
Figure PCTCN2022094004-appb-000090
在所述中频至所述高频区域的分量。所述第一边界
Figure PCTCN2022094004-appb-000091
包括当前单元
Figure PCTCN2022094004-appb-000092
中的边界信息。每个单元
Figure PCTCN2022094004-appb-000093
在经过步骤S242-44后,都得到一个对应的第一边界
Figure PCTCN2022094004-appb-000094
所有单元对应的第一边界
Figure PCTCN2022094004-appb-000095
组合起来构成第一边界帧E 1b。各个单元对应的第一边界
Figure PCTCN2022094004-appb-000096
可以按照各个单元所在的位置进行组合生成第一边界帧E 1b。所述第一边界帧E 1b可以表示为以下公式:
E 1b=P 0-P 1b=P 0-P 0H 1(f)公式(2)
如图4B和图5所示,在对第i行和第j列的单元
Figure PCTCN2022094004-appb-000097
进行所述边界调节时,步骤S242-4可以包括对当前单元
Figure PCTCN2022094004-appb-000098
执行:
S242-46:使用与当前单元
Figure PCTCN2022094004-appb-000099
对应的所述边界调节系数对第一边界
Figure PCTCN2022094004-appb-000100
的幅值进行调节,得到当前单元
Figure PCTCN2022094004-appb-000101
对应的编码边界
Figure PCTCN2022094004-appb-000102
为了方便描述,我们将所述边界调节对应的所述边界调节系数定义为g 1。我们将第i行和第j列的单元
Figure PCTCN2022094004-appb-000103
对应的边界调节系数定义为
Figure PCTCN2022094004-appb-000104
对于一帧图像,可能存在强边界,也可能存在弱边界,也可能同时存在强边界和弱边界。所述强边界可以是相邻像素间的像素值相差较大的边界。所述弱边界可以是相邻像素间的像素值相差较小的边界。通过步骤S242-2将初始帧P 0划分为多个单元,从而将初始帧P 0划分为多个小的区域。所述单元的尺寸越小,单元中包含的边界越单一。当所述单元足够小时,每个单元中可以只包括强边界或只包括弱边界。因此,通过步骤S242-2将初始帧P 0划分为多个单元,可以使数据压缩设备200对每个单元的边界信息单独进行调节。
对于一个图像数据或者视频数据,在对所述图像数据或视频数据使用标准H.264/H.265进行编码时,可能会在一定程度上造成某些图像和视频的细节损失。也就是说,那些相邻像素之间的差值较小的弱边界,经过所述编码处理后,他们之间的差值可能变得更小甚至消失,从而导致图像数据或视频数据中的细节损失。因此,为了避免相邻像素点之间差值较小的弱边界在编码和解码过程中丢失,所述边界调节可以对那些相邻像素点之间差值较小的弱边界在中频至高频区域的幅值进行增强,从而增加所述弱边界中的相邻像素间的像素值的差值,避免弱边界在编码过程中丢失,避免细节损失,使得经过编码和解码后,细节部分仍然可以保留。
对于那些相邻像素之间的差值较大的强边界,在经过编码和解码处理后不会消失。所述边界调节可以对那些相邻像素点之间差值较大的所述强边界在中频至高频区域的幅值进行衰减,以减小所述强边界中的相邻像素间的像素值的差值,从而减少所述强边界中包含的数据信息,提升压缩比。所述强边界中的相邻像素点之间差值足够大,即便经过所述边界调节进行 幅值衰减后,所保留的边界仍然足够大,在经过编码和解码处理后不会消失。
以视频数据为例,在使用所述边界调节系数
Figure PCTCN2022094004-appb-000105
对第一边界
Figure PCTCN2022094004-appb-000106
的幅值进行调节时,要尽可能地保留初始帧P 0中包含的信息不丢失,以便在解压时可以更好地恢复信息。因此,边界调节系数
Figure PCTCN2022094004-appb-000107
应大于0。在经过边界调节系数
Figure PCTCN2022094004-appb-000108
处理后的编码边界
Figure PCTCN2022094004-appb-000109
在中频至高频区域的幅值也大于零,不会有任何数据丢失。因此,在对压缩后的数据进行解压时便可以对所有数据进行恢复。否则,若边界调节系数
Figure PCTCN2022094004-appb-000110
存在零点,则零点对应的单元内的中频至高频区域的数据可能丢失,在解压时解码端将无法恢复丢失的数据,因此无法恢复初始数据。
在步骤S242-46中,数据压缩设备200可以根据当前单元
Figure PCTCN2022094004-appb-000111
对应的第一边界
Figure PCTCN2022094004-appb-000112
的边界值的大小确定当前单元
Figure PCTCN2022094004-appb-000113
对应的边界调节系数
Figure PCTCN2022094004-appb-000114
不同的单元
Figure PCTCN2022094004-appb-000115
可能有不同的边界调节系数
Figure PCTCN2022094004-appb-000116
所述边界值可以是第一边界
Figure PCTCN2022094004-appb-000117
中每个像素对应的值。步骤S242-46可以包括:
S242-462:确定当前单元
Figure PCTCN2022094004-appb-000118
对应的所述第一边界
Figure PCTCN2022094004-appb-000119
的边界值小于预设第一阈值,通过大于1的所述边界调节系数
Figure PCTCN2022094004-appb-000120
增强所述第一边界
Figure PCTCN2022094004-appb-000121
的幅值。
S242-464:确定当前单元
Figure PCTCN2022094004-appb-000122
对应的所述第一边界
Figure PCTCN2022094004-appb-000123
的边界值大于预设第二阈值,通过小于1的所述边界调节系数
Figure PCTCN2022094004-appb-000124
降低所述第一边界
Figure PCTCN2022094004-appb-000125
的幅值。
在步骤S242-462中,若当前单元
Figure PCTCN2022094004-appb-000126
对应的第一边界
Figure PCTCN2022094004-appb-000127
中的边界值小于所述第一阈值,代表当前单元中包含有弱边界,其中包含有很多细小细节。此时使用大于1的边界调节系数
Figure PCTCN2022094004-appb-000128
对当前单元
Figure PCTCN2022094004-appb-000129
对应的第一边界
Figure PCTCN2022094004-appb-000130
的中频至高频区域的幅值进行调节,以增强当前单元
Figure PCTCN2022094004-appb-000131
对应的第一边界
Figure PCTCN2022094004-appb-000132
的中频至高频区域的幅值,维持当前单元
Figure PCTCN2022094004-appb-000133
的信噪比,以避免当前单元
Figure PCTCN2022094004-appb-000134
中的弱边界在数据压缩(预测和求残差)过程中丢失,避免细节损失,保证 编码效果。数据处理方法P200能够在提高数据压缩的效率的同时增强弱边界的数据信息量,以避免在数据压缩过程中造成细节损失,即在提高数据压缩效率的同时,减少数据失真。所述第一阈值可以是5,10,15,20,25,30,35,40,45,50,等等。在一些实施例中,所述第一阈值可以更小,比如,1,2,3,4,等等。在一些实施例中,所述第一阈值可以是5~30之间的任意数。
在步骤S242-464中,若当前单元
Figure PCTCN2022094004-appb-000135
对应的第一边界
Figure PCTCN2022094004-appb-000136
中的边界值大于所述第二阈值,代表当前单元
Figure PCTCN2022094004-appb-000137
中包含有强边界,则使用小于1且大于0的边界调节系数
Figure PCTCN2022094004-appb-000138
对当前单元
Figure PCTCN2022094004-appb-000139
对应的第一边界
Figure PCTCN2022094004-appb-000140
的中频至高频区域的幅值进行调节,以降低当前单元
Figure PCTCN2022094004-appb-000141
对应的第一边界
Figure PCTCN2022094004-appb-000142
的中频至高频区域的幅值,从而降低当前单元
Figure PCTCN2022094004-appb-000143
对应的第一边界
Figure PCTCN2022094004-appb-000144
中的中频至高频区域内的信号强度减小,从而减少数据信息量,在进行预测和求残差时可以提高数据压缩的效率。所述第二阈值可以大于所述第一阈值,也可以等于所述第一阈值。
需要指出的是,当第一阈值和第二阈值不相等的时候,对于第一边界
Figure PCTCN2022094004-appb-000145
中的边界值处于所述第一阈值和第二阈值之间的边界值(包括第一阈值和第二阈值),可以不做边界调节,此时所述边界调节系数
Figure PCTCN2022094004-appb-000146
可以是1。
在一些实施例中,数据压缩设备200的存储介质中可以预先存储有第一边界调节系数组和第二边界调节系数组。所述第一边界调节系数组中包括至少一个系数。并且所述第一边界调节系数组中的系数均大于1。所述第一边界调节系数组中的系数可以是大于1的任意数。数据压缩设备200在执行步骤S242-462时,可以从预设的所述第一边界调节系数组中选取一个系数作为所述边界调节系数
Figure PCTCN2022094004-appb-000147
增强所述第一边界
Figure PCTCN2022094004-appb-000148
的幅值。在一些实施例中,数据压缩设备200在从预设的所述第一边界调节系数组中选取所述边界调节系数
Figure PCTCN2022094004-appb-000149
时,可以根据所述第一边界
Figure PCTCN2022094004-appb-000150
中的边界值的大小进行选择。 第一边界
Figure PCTCN2022094004-appb-000151
的边界值越大,其对应的边界调节系数
Figure PCTCN2022094004-appb-000152
越小;第一边界
Figure PCTCN2022094004-appb-000153
的边界值越小,其对应的边界调节系数
Figure PCTCN2022094004-appb-000154
越大。
所述第二边界调节系数组中包括至少一个系数。并且所述第二边界调节系数组中的系数均为大于0小于1的系数。所述第二边界调节系数组中的系数可以是大于0小于1的任意数。数据压缩设备200在执行步骤S242-464时,可以从预设的第二边界调节系数组中选取一个系数作为所述边界调节系数
Figure PCTCN2022094004-appb-000155
降低所述第一边界的幅值
Figure PCTCN2022094004-appb-000156
在一些实施例中,数据压缩设备200在从预设的所述第二边界调节系数组中选取所述边界调节系数
Figure PCTCN2022094004-appb-000157
时,可以根据所述第一边界
Figure PCTCN2022094004-appb-000158
中的边界值的大小进行选择。第一边界
Figure PCTCN2022094004-appb-000159
的边界值越大,其对应的边界调节系数
Figure PCTCN2022094004-appb-000160
越小;第一边界
Figure PCTCN2022094004-appb-000161
的边界值越小,其对应的边界调节系数
Figure PCTCN2022094004-appb-000162
越大。
在一些实施例中,数据压缩设备200还可以通过优化算法确定当前单元
Figure PCTCN2022094004-appb-000163
对应的边界调节系数
Figure PCTCN2022094004-appb-000164
具体地,数据压缩设备200可以建立优化方程。比如,数据压缩设备200可以以当前单元
Figure PCTCN2022094004-appb-000165
对应的失真率和码率的加权值为优化目标。即以当前单元
Figure PCTCN2022094004-appb-000166
对应的失真率和码率的加权值最小为优化目标,基于优化算法,对边界调节系数
Figure PCTCN2022094004-appb-000167
进行迭代计算,以确定所述边界调节系数
Figure PCTCN2022094004-appb-000168
以所述边界调节系数
Figure PCTCN2022094004-appb-000169
对所述第一边界
Figure PCTCN2022094004-appb-000170
的幅值进行调节。
如前所述,在所述边界调节中,数据压缩设备200可以对每个单元执行步骤S242-46。每个单元
Figure PCTCN2022094004-appb-000171
对应的第一边界
Figure PCTCN2022094004-appb-000172
在经过边界调节系数
Figure PCTCN2022094004-appb-000173
调节后,都得到一个对应的编码边界
Figure PCTCN2022094004-appb-000174
所有单元对应的边界调节系数
Figure PCTCN2022094004-appb-000175
组合起来构成边界调节系数g 1。各个单元对应的边界调节系数
Figure PCTCN2022094004-appb-000176
可以按照各个单元所在的位置进行组合生成边界调节系数g 1。边界调节系数g 1可以看作是一个矩阵。需要说明的是,不同的单元
Figure PCTCN2022094004-appb-000177
对应的边界调节系数
Figure PCTCN2022094004-appb-000178
可以 是相同的也可以是不同的。
所有单元对应的编码边界
Figure PCTCN2022094004-appb-000179
组合起来构成编码边界帧E 1m。各个单元对应的编码边界
Figure PCTCN2022094004-appb-000180
可以按照各个单元所在的位置进行组合生成编码边界帧E 1m。E 1m与E 1b之间的关系看可以表示为以下公式:
E 1m=g 1E 1b公式(3)
如图4B和图5所示,在对第i行和第j列的单元
Figure PCTCN2022094004-appb-000181
进行所述边界调节时,步骤S242-4可以包括对当前单元
Figure PCTCN2022094004-appb-000182
执行:
S242-48:将所述第一单元
Figure PCTCN2022094004-appb-000183
与编码边界
Figure PCTCN2022094004-appb-000184
进行叠加,得到当前单元
Figure PCTCN2022094004-appb-000185
对应的编码单元
Figure PCTCN2022094004-appb-000186
每个单元
Figure PCTCN2022094004-appb-000187
对应的第一单元
Figure PCTCN2022094004-appb-000188
和编码边界
Figure PCTCN2022094004-appb-000189
叠加后,都得到一个对应的编码单元
Figure PCTCN2022094004-appb-000190
所有单元对应的编码单元
Figure PCTCN2022094004-appb-000191
组合起来构成编码调节帧P 1。各个单元对应的编码单元
Figure PCTCN2022094004-appb-000192
可以按照各个单元所在的位置进行组合生成编码调节帧P 1。P 1与E 1m以及P 1b之间的关系看可以表示为以下公式:
P 1=E 1m+P 1b公式(4)
基于公式(1)~公式(4)可知,P 1与P 0之间的关系看可以表示为以下公式:
P 1=P 0(g 1(1-H 1(f))+H 1(f))公式(5)
为了方便描述,我们将P 1与P 0之间的传递函数定义为编码传递函数H E(f),编码传递函数H E可以表示为以下公式:
H E(f)=g 1(1-H 1(f))+H 1(f)公式(6)
由此可见,通过步骤S242-2将初始帧P 0划分为多个单元,从而将初始帧P 0划分为多个小的区域,这样就可以根据每个单元的特点选择不同的边界调节系数
Figure PCTCN2022094004-appb-000193
从而更灵活的进行中频至高频区域分量信号强度的调节,在编码效果和码流大小之间取得更好的平衡。
如图4A所示,步骤S240还可以包括:
S244:对所述编码调节帧P 1进行所述编码(预测和求残差),得到所述预测数据PI和所述残差数据R。
S246:将所述预测数据PI和所述残差数据R输入所述码流生成模块进行合成,得到所述压缩帧。
在一些实施例中,步骤S240还可以包括:
S248:将初始帧P 0在所述边界调节过程中的每个单元的编码函数
Figure PCTCN2022094004-appb-000194
和边界调节系数
Figure PCTCN2022094004-appb-000195
输入所述码流生成模块进行合成,得到所述压缩帧。
也就是将初始帧P 0对应的编码函数H 1(f)和边界调节系数g 1输入所述码流生成模块进行合成,得到所述压缩帧。即所述压缩帧不仅包括所述预测数据PI和所述残差数据R,还包括所述多个单元中的每个单元对应的所述编码函数
Figure PCTCN2022094004-appb-000196
和所述边界调节系数
Figure PCTCN2022094004-appb-000197
所述每个单元对应的所述编码函数
Figure PCTCN2022094004-appb-000198
和所述边界调节系数
Figure PCTCN2022094004-appb-000199
也就是前述的编码数据RAMI。需要说明的是,边界调节系数g 1中可以是边界调节系数
Figure PCTCN2022094004-appb-000200
间的差,即以所述多个单元中的一个为基本数据,其余单元对应的边界调节系数
Figure PCTCN2022094004-appb-000201
为其与基本数据间的差。边界调节系数g 1中也可以是边界调节系数
Figure PCTCN2022094004-appb-000202
与其附近某个边界调节系数
Figure PCTCN2022094004-appb-000203
的差。其中,m和n都是整数,且不同时为零。这样可以进一步减少边界调节系数g 1中的数据量,进一步提升压缩比。
在数据压缩设备200对所述初始帧P 0进行所述边界调节后,得到所述编码调节帧P 1。所述编码调节帧P 1中的强边界的中频到高频的幅值衰减。虽然所述编码调节帧P 1中的弱边界的中频到高频的幅值得到增强,但数据压缩设备200通过对所述初始帧P 0进行所述边界调节后,使得编码调节帧P 1整体的数据信息量减少。数据压缩设备200再对编码调节帧P 1进行编码和码流生成计算,可以提高对所述初始帧P 0的编码效率,从而提高所述初始帧的压缩比,提升所述初始数据的传输效率。同时所述编码调节帧P 1中的弱 边界的中频到高频的幅值增强,又可以避免细节丢失。
综上所述,数据处理的方法P200可以同时对所述初始帧进行所述边界调节,在提升所述初始帧的压缩比,提高编码效率和所述初始数据的传输效率的同时,又可以减少数据损失,避免细节丢失。
图7A示出了一种对压缩帧进行解压的数据处理的方法P300的流程图。如前所述,数据解压设备300可以执行数据处理方法P300。具体地,数据解压设备300中存储介质可以存储至少一组指令集。所述指令集被配置为可以指示数据解压设备300中的解压处理器完成数据处理方法P300。当所述数据解压设备300运行的时候,解压端处理器可以读取所述指令集并执行数据处理方法P300。为了方便描述,我们将以图3A中所示的方法描述所述数据处理的方法P300。所述方法P300可以包括:
S320:获取压缩数据。所述压缩数据包括所述压缩帧。
所述压缩数据可以包括通过数据处理方法P200对所述初始数据中的所述初始帧进行数据压缩得到的所述压缩帧。所述压缩帧包括压缩的预测数据PI和残差数据R。在一些实施例中,所述压缩帧还包括所述在压帧中的多个单元中的每个单元对应的编码函数
Figure PCTCN2022094004-appb-000204
和边界调节系数
Figure PCTCN2022094004-appb-000205
即编码函数H 1(f)和边界调节系数g 1,也就是前述的编码数据RAMI。为了方便展示,下面的描述中,我们将以所述压缩帧还包括编码函数H 1(f)和边界调节系数g 1为例进行描述。如图3A所示,步骤S320可以包括:将所述压缩帧输入所述码流解析模块进行分析计算,得到所述预测数据PI和所述残差数据R,以及编码函数H 1(f)和边界调节系数g 1。如前所述,在本申请中,帧是组成数据序列的一个常用处理单位。在数据处理时,常常以帧为单位进行计算。在数据压缩设备200对数据进行压缩的数据处理的方法P200中,可以以帧为单位对所述初始数据进行压缩。在数据解压设备300对压缩帧进行解压时也可以以帧作为单位进行数据解压。
S340:对所述压缩帧进行数据解压,得到解压帧。
所述数据解压是指对所述压缩帧进行解压计算,得到解压帧,使所述解压帧恢复或基本上恢复至所述初始数据,或者使所述解压帧比所述初始数据更清晰。以视频数据为例,当所述解压帧在低频至中频区域的任意频率上的幅值恢复至所述初始帧的阈值或者阈值以上时,人眼便很难察觉出所述解压帧与所述初始帧的区别。所述阈值可以是80%-90%之间的任意值。比如,所述阈值可以是80%、81%、82%、83%、84%、85%、86%、87%、88%、89%、90%中任意两个数值所定义的闭区间中的任意值。比如,所述数据解压应使所述解压帧在低频至中频区域的任意频率上的幅值不小于所述初始帧的85%±3%。
所述数据解压包括对在解帧进行边界补偿,并对经过所述边界补偿后的数据做解码,从而得到所需的解压帧。所述在解帧即正在被解压的一帧数据,包括所述压缩帧和所述压缩帧在所述解压过程中成为所述解压帧之前的任一数据状态。
以视频数据为例,所述数据处理的方法P200采用边界调节和编码相结合的方法对所述初始帧进行压缩,以进一步提高视频数据的压缩比,提升视频传输的效率。在视频解压技术中,数据处理方法P300可以采用解码(即根据残差数据R和预测数据PI恢复在压帧)和边界补偿相结合的方法对所述压缩帧进行解压,得到所需的解压帧,以恢复所述压缩帧中的数据。所述在解帧可以包括所述压缩帧和所述压缩帧在根据所述预测数据PI和残差数据R解码过程中的任一数据状态。例如,所述在解帧可以是所述压缩帧、也可以是经过解码得到的解码帧,或者经过预测得到的预测帧,等等。
如前所述,所述数据压缩可以是通过所述边界调节对所述在压帧的中频至高频区域的幅值进行调节,比如对中频至高频区域的幅值进行衰减以降低中频至高频区域的数据信息量,从而降低所述在压帧中的数据信息量。以视频数据为例,由于图像中物体的边缘部分中频和高频信息丰富,而中 频和高频区域会携带更多的数据,因此降低中频至高频区域的幅值从视觉上会使所述在压帧的边界数据模糊化,同时也会使图像中的信息量大大减小。因此,所述数据解压可以是通过边界补偿对所述压缩帧的中频至高频区域的幅值进行补偿,比如对中频至高频区域的幅值进行增强,使其恢复至所述初始帧中的状态,或者使其相对于所述初始帧中的状态有所增强。
在对所述压缩帧进行所述数据解压所应用的所述边界补偿,是指将所述在解帧输入边界补偿器中进行边界补偿。所述边界补偿可以与所述边界调节相对应,也就是说所述边界补偿与所述边界调节应存在预先设定的关联关系。通过仔细地设定所述边界补偿与所述边界调节的关联关系,所述边界调节的压缩帧在经过所述边界补偿以及所述数据处理后,在不考虑其他计算误差的情况下完全恢复或基本恢复至边界调节前的数据指标(比如图像数据的图像清晰度),甚至在一些指标上超过编码调节前的数据(比如解码后的图像的清晰度超过原始图像)。如前所述,在所述边界调节过程中生成编码数据RAMI(编码函数H 1(f)和边界调节系数g 1)。所述边界补偿与所述边界调节应存在预先设定的关联关系可以是所述边界补偿中的解码数据(解码函数H 2(f)和边界补偿系数g 2)之间存在预先设定的关联关系。关于解码数据(解码函数H 2(f)和边界补偿系数g 2)以及编码数据RAMI(编码函数H 1(f)和边界调节系数g 1)与解码数据(解码函数H 2(f)和边界补偿系数g 2)之间的关联关系,将在后面的描述中详细介绍。
具体地,步骤S340可以包括:
S342:对所述压缩帧进行解码,得到解码帧P 2
在所述方法P300中,所述在解帧可以是所述解码帧P 2。所述压缩帧可以是数据压缩设备200对所述编码调节帧P 1进行编码得到的。数据解压设备300可以对所述压缩帧进行解码以得到所述解码帧P 2。即根据所述预测数据PI进行预测得到预测帧,并和所述残差数据R叠加,得到解码数据P 2,所述解码数据P 2就是所述解码帧的数据P 2。编码和解码过程中可能存在一 定的误差,假设编解码过程带来的偏差很小的话,所述解码帧P 2与所述编码调节帧P 1基本一致,因此,P 1与P 2之间的关系看可以表示为以下公式:
P 2≈P 1公式(7)
S344:对所述在解帧(解码帧P 2)进行所述边界补偿,得到所述解压帧P 4
图7B示出了根据本说明书的实施例提供的一种边界补偿的流程图;图8示出了根据本说明书的实施例提供的一种边界补偿的结构流程图。如图7B和图8所示,步骤S344可以包括通过数据解压设备300的至少一个解压端处理器执行:
S344-2:基于预设的所述单元尺寸将所述在解帧(解码帧P 2)划分为所述多个单元。对所述在解帧(解码帧P 2)的划分方式可以和步骤S242-2中对所述在压帧(初始帧P 0)的划分方式一致,且每个单元相互对应,在此不再赘述。为了方便描述,我们将解码帧P 2中第i行和第j列的单元的数据定义为
Figure PCTCN2022094004-appb-000206
S344-4:对所述每个单元使用与所述边界调节系数相对应的边界补偿系数对其在中频至高频区域的幅值进行补偿。
在对压缩帧进行数据解压时,数据处理方法P300能够以数据压缩时的单元为数据解压单元,对每个单元使用与边界调节系数对应的边界补偿系数对中频至高频区域的幅值进行边界补偿,以补偿数据压缩过程中降低的中频至高频区域的幅值,得到解压帧。所述边界补偿与所述边界调节相对应,边界补偿系数与边界调节系数之间存在对应的关系。所述边界补偿可以使经过所述边界调节的压缩数据恢复至初始帧的清晰度甚至高于所述初始帧的清晰度。所述边界补偿可以是对所述在解帧(解码帧P 2)的所述多个单元中的所述每个单元,基于所述关联关系,使用与所述边界调节系数相对应的边界补偿系数对其在中频至高频区域的幅值进行补偿。关于所述 关联关系以及所述边界补偿系数将在后面的描述中详细介绍。在对第i行和第j列的单元
Figure PCTCN2022094004-appb-000207
进行所述边界补偿时,步骤S344-4可以包括对当前单元
Figure PCTCN2022094004-appb-000208
执行:
S344-42:确定解码函数
Figure PCTCN2022094004-appb-000209
通过所述解码函数
Figure PCTCN2022094004-appb-000210
对当前单元
Figure PCTCN2022094004-appb-000211
进行调节,得到第二单元
Figure PCTCN2022094004-appb-000212
使其在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减。
其中,
Figure PCTCN2022094004-appb-000213
表示第i行和第j列的当前单元
Figure PCTCN2022094004-appb-000214
对应的解码函数。解码函数
Figure PCTCN2022094004-appb-000215
在频域内可以是一个低通率波器,使所述解码帧P 2中当前单元
Figure PCTCN2022094004-appb-000216
的幅值在频域内平滑地降低,以使所述解码帧P 2中当前单元
Figure PCTCN2022094004-appb-000217
在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减,从而得到当前单元
Figure PCTCN2022094004-appb-000218
对应的第二单元
Figure PCTCN2022094004-appb-000219
为了节省实现过程中需要的计算量和避免振铃效应的出现,解码函数
Figure PCTCN2022094004-appb-000220
应使所述当前单元
Figure PCTCN2022094004-appb-000221
在频域内的幅值平滑地过渡。解码函数
Figure PCTCN2022094004-appb-000222
可以是任意形式的平滑过渡的低通滤波器,本说明书对此不做限定。
需要说明的是,为了避免振铃效应,所述解码函数
Figure PCTCN2022094004-appb-000223
是平滑过渡的曲线,避免曲线中的所述幅值调节增益急剧变化。如前所述,所述振铃效应是指在图像处理中,对一幅图像进行频谱调节处理时,若选用的解码函数
Figure PCTCN2022094004-appb-000224
具有较快的变化,则会使图像产生“振铃”。所谓“振铃”就是指输出图像的灰度剧烈变化处产生的震荡,就好像钟被敲击后产生的空气震荡。振铃效应多出现在图像边界处。
所述边界补偿处理的方式有很多,传统的技术有时候直接对解码帧P 2使用高通滤波器或者带通滤波器进行滤波,过滤掉所述解码帧P 2中的低频区域的分量,提取出所述解码帧P 2中的中频至高频区域的分量,从而提取出边界信息。但是所述高通滤波器和带通滤波器对应的卷积核的系数中会出现较多的负系数。如前所述,当卷积核中出现较多的负系数时,通过所 述卷积核进行卷积得到的图像中可能会出现很强的振铃效应。因此,为了避免振铃效应,本说明书所述的数据解压使用平滑过渡的解码函数
Figure PCTCN2022094004-appb-000225
对所述解码帧P 2进行调节,过滤所述解码帧P 2中的中频至高频区域的分量,然后对所述解码帧P 2和经过所述解码函数
Figure PCTCN2022094004-appb-000226
调节的数据求差,便可以得到所述边界信息;对所述边界信息使用边界补偿系数进行调整,使其恢复至初始状态或相对于所述初始状态有所增强。当使用上述方案获取边界信息时,可以设计出一个解码卷积核,使其所有系数都是非负数,或者负系数的和的绝对值与非负系数的和的比值小于0.1,就可以避免振铃效应的出现。
与所述边界调节一样,通过所述解码函数
Figure PCTCN2022094004-appb-000227
对当前单元
Figure PCTCN2022094004-appb-000228
进行调节也可以表现为在时域使用解码卷积核对所述当前单元
Figure PCTCN2022094004-appb-000229
做卷积。因此所述边界补偿所使用的解码卷积核同所述边界调节所用的编码卷积核也应存在对应的关联关系。也就是说编码函数
Figure PCTCN2022094004-appb-000230
与解码函数
Figure PCTCN2022094004-appb-000231
也应存在对应的关联关系。也就是通过选取与编码函数
Figure PCTCN2022094004-appb-000232
和所述编码卷积核相对应的解码函数
Figure PCTCN2022094004-appb-000233
和解码卷积核,两种方式可以达到相同的效果。为了方便描述,本说明书将以在时域进行卷积为例来描述所述边界补偿,但本领域技术人员应该明白通过在频域乘以解码函数
Figure PCTCN2022094004-appb-000234
进行频谱调节的方式也是本说明书要保护的范围。
当对一幅图像进行边界调节处理时,若选用的解码函数存在数值上剧烈变化的区域,在实现过程中需要阶数更高的卷积核或卷积核组合。这就意味着增加不必要的运算量。同时,高阶卷积核更有可能会使输出图像在灰度或者颜色剧烈变化处产生较强烈的颜色震荡,称作振铃效应。振铃效应多出现在图像边界处。通过使所述解码函数
Figure PCTCN2022094004-appb-000235
在频域内对所述当前单元
Figure PCTCN2022094004-appb-000236
的幅值调节增益应平滑地过渡可以避免所述幅值调节增益的急剧变化。比如,当所述低频区域同所述中频区域不相连的时候,所述解码函数
Figure PCTCN2022094004-appb-000237
可以在频域对所述当前单元
Figure PCTCN2022094004-appb-000238
的中低频区域的幅值做出调节,使得所述幅值调节增益在中低频区域内的变化平滑而连续。
为了避免振铃效应,所述解码卷积核中负系数的和的绝对值与非负系数的和的比值小于阈值。比如所述阈值可以是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中的任意一个值或者任意两个数所定义的区间中的任意值。比如,所述解码卷积核中的卷积核系数可以均选为非负数。解码函数
Figure PCTCN2022094004-appb-000239
中对于中频至高频区域的幅值调节增益等于0,并可以在一定误差范围内波动。所述误差范围可以在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%等数值中任意两个所规定的区间内。
所述通过解码函数
Figure PCTCN2022094004-appb-000240
可以保持直流部分,即在频率为0的部分的幅值调节增益为1,以保证可以保留初始帧中的基础信息。因此,通过所述解码函数
Figure PCTCN2022094004-appb-000241
对当前单元
Figure PCTCN2022094004-appb-000242
进行调节时,对所述低频区域的幅值调节增益从频率为0的位置的幅值调节增益1平滑过渡到中频区域的幅值调节增益接近0。
如前所述,编码函数
Figure PCTCN2022094004-appb-000243
与解码函数
Figure PCTCN2022094004-appb-000244
也应存在对应的关联关系。也就是说,解码函数
Figure PCTCN2022094004-appb-000245
应与编码函数
Figure PCTCN2022094004-appb-000246
相对应。数据解压设备300的存储介质中可以存储有解码函数组。所述解码函数组中可以包括至少一个不同的解码函数。每个解码函数对应一个解码卷积核。也就是说,数据解压设备300的存储介质中可以包括至少一个解码卷积核。在一些实施例中,数据解压设备300的存储介质中还可以存储有解码函数
Figure PCTCN2022094004-appb-000247
与编码函数
Figure PCTCN2022094004-appb-000248
之间的对应关系。
如前所述,在一些实施例中,所述压缩帧中包括所述编码数据RAMI, 即编码函数H 1(f)和边界调节系数g 1,也就是每个单元对应的编码函数
Figure PCTCN2022094004-appb-000249
和边界调节系数
Figure PCTCN2022094004-appb-000250
数据解压设备300对所述当前单元
Figure PCTCN2022094004-appb-000251
做卷积时,可以基于编码函数H 1(f)以及解码函数
Figure PCTCN2022094004-appb-000252
与编码函数
Figure PCTCN2022094004-appb-000253
之间的对应关系,从预设的所述解码函数组中选取与当前单元
Figure PCTCN2022094004-appb-000254
的编码函数
Figure PCTCN2022094004-appb-000255
相对应的函数作为当前单元
Figure PCTCN2022094004-appb-000256
对应的解码函数
Figure PCTCN2022094004-appb-000257
从所述至少一个解码卷积核中选择与当前单元
Figure PCTCN2022094004-appb-000258
对应的解码函数
Figure PCTCN2022094004-appb-000259
对应的卷积核作为所述解码卷积核,对所述当前单元
Figure PCTCN2022094004-appb-000260
做卷积。
在一些实施例中,所述压缩帧中不包括所述编码数据RAMI,即编码函数H 1(f)和边界调节系数g 1。此时,数据解压设备300对所述当前单元
Figure PCTCN2022094004-appb-000261
做卷积时,可以从预设的所述解码函数组中任意选取一个函数作为所述解码函数
Figure PCTCN2022094004-appb-000262
并使用其对应的卷积核作为所述解码卷积核对当前单元
Figure PCTCN2022094004-appb-000263
做卷积。数据解压设备300也可以依靠经验值从所述解码函数组中选取解码函数
Figure PCTCN2022094004-appb-000264
比如,通过机器学习的方式选取解码函数
Figure PCTCN2022094004-appb-000265
在一些实施例中,解码函数
Figure PCTCN2022094004-appb-000266
可以与编码函数
Figure PCTCN2022094004-appb-000267
相同。图6所示的曲线也可以是解码函数
Figure PCTCN2022094004-appb-000268
本领域的技术人员应该明白所有能够使所述当前单元
Figure PCTCN2022094004-appb-000269
的幅值在频域内平滑地降低,以使所述解码帧P 2中当前单元
Figure PCTCN2022094004-appb-000270
在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减的解码函数
Figure PCTCN2022094004-appb-000271
以及解码函数
Figure PCTCN2022094004-appb-000272
的线性组合
Figure PCTCN2022094004-appb-000273
或者解码函数
Figure PCTCN2022094004-appb-000274
乘积组合
Figure PCTCN2022094004-appb-000275
或者线性组合和乘积组合的组合都属于本说明书保护的范围。其中,m≥1,
Figure PCTCN2022094004-appb-000276
Figure PCTCN2022094004-appb-000277
代表n个函数的线性组合,
Figure PCTCN2022094004-appb-000278
代表第m个函数,k m代表第m个函数对应的权重。q≥1,
Figure PCTCN2022094004-appb-000279
代表n个函数的乘积组合,k q代表第q个函数对应的权重,
Figure PCTCN2022094004-appb-000280
可以是任意函数。
如前所述,在所述边界补偿中,数据解压设备300可以对每个单元执行步骤S344-42。每个单元
Figure PCTCN2022094004-appb-000281
在经过解码函数
Figure PCTCN2022094004-appb-000282
调节后,都得到一个对应的第二单元
Figure PCTCN2022094004-appb-000283
所有单元对应的解码函数
Figure PCTCN2022094004-appb-000284
组合起来构成解码函数H 2(f)。各个单元对应的解码函数
Figure PCTCN2022094004-appb-000285
可以按照各个单元所在的位置进行组合生成解码函数H 2(f)。解码函数H 2(f)可以看作是一个矩阵。
所有单元对应的第二单元
Figure PCTCN2022094004-appb-000286
组合起来构成第二帧P 2b。各个单元对应的第二单元
Figure PCTCN2022094004-appb-000287
可以按照各个单元所在的位置进行组合生成第二帧P 2b。第二帧P 2b是一个模糊的图像。P 2与P 2b之间的关系看可以表示为以下公式:
P 2b=P 2H 2(f)公式(8)
如图7B和图8所示,在对第i行和第j列的单元
Figure PCTCN2022094004-appb-000288
进行所述边界补偿时,步骤S344-4还可以包括对当前单元
Figure PCTCN2022094004-appb-000289
执行:
S344-44:对当前单元
Figure PCTCN2022094004-appb-000290
和所述第二单元
Figure PCTCN2022094004-appb-000291
求差,获取当前单元
Figure PCTCN2022094004-appb-000292
对应的第二边界
Figure PCTCN2022094004-appb-000293
每一帧数据频谱中的中频至高频分量主要集中在这一帧数据中数据变化剧烈的区域,也就是数据的边界数据。比如,对于一帧图像来说,所述中频至高频数据主要集中在所述图像中物体的边界,也就是这一帧图像的边界数据。所述解码函数
Figure PCTCN2022094004-appb-000294
使当前单元
Figure PCTCN2022094004-appb-000295
在频域内的幅值平滑地降低以衰减中频至高频区域的分量。因此,第二单元
Figure PCTCN2022094004-appb-000296
可以理解成去除了当前单元
Figure PCTCN2022094004-appb-000297
中的边界信息的数据。接下来,对当前单元
Figure PCTCN2022094004-appb-000298
和所述第二单元
Figure PCTCN2022094004-appb-000299
求差,可以得到当前单元
Figure PCTCN2022094004-appb-000300
的边界,即第二边界
Figure PCTCN2022094004-appb-000301
因此,所述第二边界
Figure PCTCN2022094004-appb-000302
包括当前单元
Figure PCTCN2022094004-appb-000303
在所述中频至所述高频区域的分量。所述第二边界
Figure PCTCN2022094004-appb-000304
包括当前单元
Figure PCTCN2022094004-appb-000305
中的边界信息。每个单元
Figure PCTCN2022094004-appb-000306
在经过步骤S344-44后,都得到一个对应的第二边界
Figure PCTCN2022094004-appb-000307
所有单元对应的第二边界
Figure PCTCN2022094004-appb-000308
组合起来构成第二边界帧E 2b。各个单元对应的第二边界
Figure PCTCN2022094004-appb-000309
可以按照各个单元所在的位置进行组 合生成第二边界帧E 2b。所述第二边界帧E 2b可以表示为以下公式:
E 2b=P 2-P 2b=P 2-P 2H 2(f)公式(9)
如图7B和图8所示,在对第i行和第j列的单元
Figure PCTCN2022094004-appb-000310
进行所述边界补偿时,步骤S344-4还可以包括对当前单元
Figure PCTCN2022094004-appb-000311
执行:
S344-46:使用与当前单元
Figure PCTCN2022094004-appb-000312
的边界调节系数
Figure PCTCN2022094004-appb-000313
相对应的所述边界补偿系数对第二边界
Figure PCTCN2022094004-appb-000314
的幅值进行补偿,得到当前单元
Figure PCTCN2022094004-appb-000315
对应的解码边界
Figure PCTCN2022094004-appb-000316
为了方便描述,我们将所述边界补偿对应的所述边界补偿系数定义为g 2。我们将第i行和第j列的单元
Figure PCTCN2022094004-appb-000317
对应的边界补偿系数定义为
Figure PCTCN2022094004-appb-000318
如前所述,所述边界调节可以使所述在压帧中的强边界在其频域中的中频至高频区域的幅值做衰减,使所述在压帧的边界数据模糊化,从而减小编码产生的数据量。所述边界补偿可以使经过所述边界调节后的数据恢复甚至增强。也就是说,所述边界补偿可以使所述在解帧中中频至高频区域的幅值完全恢复或基本恢复至衰减前的状态甚至相对所述衰减前的状态有所增强。也就是说,边界调节系数
Figure PCTCN2022094004-appb-000319
与边界补偿系数
Figure PCTCN2022094004-appb-000320
存在预设的所述关联关系,即边界调节系数
Figure PCTCN2022094004-appb-000321
与边界补偿系数
Figure PCTCN2022094004-appb-000322
相对应。数据解压设备300的存储介质中可以存储有边界补偿系数组。所述边界补偿系数组中可以包括至少一个不同的系数。在一些实施例中,数据解压设备300的存储介质中还可以存储有边界调节系数
Figure PCTCN2022094004-appb-000323
与边界补偿系数
Figure PCTCN2022094004-appb-000324
之间的对应关系。
如前所述,在一些实施例中,所述压缩帧中包括所述编码数据RAMI,即编码函数H 1(f)和边界调节系数g 1,也就是每个单元对应的编码函数
Figure PCTCN2022094004-appb-000325
和边界调节系数
Figure PCTCN2022094004-appb-000326
数据解压设备300在执行步骤S344-46时,可以基于边界调节系数
Figure PCTCN2022094004-appb-000327
与边界补偿系数
Figure PCTCN2022094004-appb-000328
的所述关联关系,从预设的所述边界补偿系数组中选取与当前单元
Figure PCTCN2022094004-appb-000329
的边界调节系数
Figure PCTCN2022094004-appb-000330
相对应的边界补偿系数
Figure PCTCN2022094004-appb-000331
作为当前单元
Figure PCTCN2022094004-appb-000332
对应的边界补偿系数
Figure PCTCN2022094004-appb-000333
对所述第二边界
Figure PCTCN2022094004-appb-000334
的 幅值进行补偿。
在一些实施例中,所述压缩帧中不包括所述编码数据RAMI,即编码函数H 1(f)和边界调节系数g 1。此时,数据解压设备300在执行步骤S344-46时,可以从预设的所述边界补偿系数组中任意选取一个作为当前单元
Figure PCTCN2022094004-appb-000335
对应的边界补偿系数
Figure PCTCN2022094004-appb-000336
对所述第二边界
Figure PCTCN2022094004-appb-000337
的幅值进行补偿。数据解压设备300也可以依靠经验值从所述边界补偿系数组中选取边界补偿系数
Figure PCTCN2022094004-appb-000338
比如,通过机器学习的方式选取边界补偿系数
Figure PCTCN2022094004-appb-000339
所有单元对应的解码边界
Figure PCTCN2022094004-appb-000340
组合起来构成解码边界帧E 2m。各个单元对应的解码边界
Figure PCTCN2022094004-appb-000341
可以按照各个单元所在的位置进行组合生成解码边界帧E 2m。E 2m与E 2b之间的关系看可以表示为以下公式:
E 2m=g 2E 2b公式(10)
如图7B和图8所示,在对第i行和第j列的单元
Figure PCTCN2022094004-appb-000342
进行所述边界补偿时,步骤S344-4可以包括对当前单元
Figure PCTCN2022094004-appb-000343
执行:
S344-48:将当前单元
Figure PCTCN2022094004-appb-000344
与解码边界
Figure PCTCN2022094004-appb-000345
进行叠加,得到当前单元
Figure PCTCN2022094004-appb-000346
对应的解码单元
Figure PCTCN2022094004-appb-000347
每个单元
Figure PCTCN2022094004-appb-000348
和解码边界
Figure PCTCN2022094004-appb-000349
叠加后,都得到一个对应的解码单元
Figure PCTCN2022094004-appb-000350
所有单元对应的解码单元
Figure PCTCN2022094004-appb-000351
组合起来构成解压帧P 4。各个单元对应的解码单元
Figure PCTCN2022094004-appb-000352
可以按照各个单元所在的位置进行组合生成解压帧P 4。P 4与E 2m以及P 2之间的关系看可以表示为以下公式:
P 4=E 2m+P 2公式(11)
基于公式(8)~公式(11)可知,P 2与P 4之间的关系看可以表示为以下公式:
P 4=P 2(g 2(1-H 2(f))+1)公式(12)
为了方便描述,我们将P 4与P 2之间的传递函数定义为解码传递函数H D(f),解码传递函数H D可以表示为以下公式:
H D(f)=g 2(1-H 2(f))+1公式(13)
基于公式(5)、(6)、(12)和(13),P 0与P 4之间的关系看可以表示为以下公式:
P 4=P 2H D(f)≈P 0H D(f)H E(f)公式(14)
以视频数据为例,由于人眼对于低频至中频区域的信息比较敏感,而所述边界调节的设计只是对初始帧P 0中的中频至高频区域的幅值进行了衰减,而使编码调节帧P 1中保留了初始帧P 0中的低频的频率信息。所述解码帧P 2与所述编码调节帧P 1基本一致,因此,解码帧P 2中也保留了低频的频率信息。而所述边界补偿的设计也只是对解码帧P 2中的中频至高频区域的幅值进行了补偿。因此,解压帧P 4中保留了初始帧P 0中的低频的频率信息。从理论上讲在不考虑由于其他算法带来的偏差的情况下,所述边界补偿对解码帧P 2中的中频至高频区域的幅值进行补偿得到的解压帧P 4,是可以完全恢复或基本恢复初始帧P 0中的中频的全部频率信息的。也就是说所述数据解压可以使经过所述数据压缩的数据在中频任意频率下得到恢复甚至增强。因此,经过数据解压后,所述解压帧P 4在低频的任意频率上的幅值应约等于所述初始帧P 0,在中频区域的任意频率上的幅值应约等于或者大于所述初始帧P 0。所述约等于是指所述解压帧P 4的幅值等于所述初始帧P 0的幅值,并在一定的误差范围内波动。以视频数据为例,当所述解压帧P 4在低频至中频区域的任意频率上的幅值恢复至所述初始帧P 0的85%或85%以上时,人眼便很难察觉出所述解压帧P 4与所述初始帧P 0的区别。因此,经过数据解压后,所述解压帧P 4在低频至中频区域的任意频率上的幅值应不小于所述初始帧P 0的85%。即所述误差范围不应使所述解压帧P 4在低频至中频区域的任意频率上的幅值低于所述初始帧P 0的85%。由于人眼对于高频区域的信息不太敏感,因此,所述解压帧P 4中对于高频区域的信息可以保留以适应高质量要求的场景,也可以衰减以抑制不必要的高频噪声。也就 是说,所述解压帧P 4在高频的任意频率上的幅值应可以约等于所述初始帧P 0,也可以低于所述初始帧P 0,还可以大于所述初始帧P 0。P 0与P 4之间的关系看可以表示为以下公式:
Figure PCTCN2022094004-appb-000353
或者
Figure PCTCN2022094004-appb-000354
需要说明的是,在公式中可以允许存在一定范围的误差。例如,P 4≥P 0可以是P 4的基本值在大于等于P 0的情况下,允许P 4在一定误差范围内波动。也就是说,在P 4=P 0时,P 4在负误差的情况下可以允许P 4略小于P 0。这里的公式仅仅列出了P 4与P 0的基础关系公式,没有将误差写入公式中。本领域技术人员应当明白在误差范围内的波动使得解压帧P 4在低频至中频区域的幅值略小于所述初始帧P 0的情况同样属于本说明书保护的范围。以下的公式中,同样允许存在一定范围的误差。在下文中也仅仅给出P 4的幅值大于等于所述初始帧P 0的基础关系的说明。对于误差范围内的波动,本领域技术人员可自行推导。
为了方便描述,我们将P 0与P 4之间的整体频谱调节函数定义为H 0(f),则P 0与P 4之间的关系看可以表示为以下公式:
P 4=H 0(f)P 0公式(17)
则,整体频谱调节函数H 0(f)可以表示为以下公式:
Figure PCTCN2022094004-appb-000355
Figure PCTCN2022094004-appb-000356
或者
Figure PCTCN2022094004-appb-000357
其中,f 0为人眼敏感频率的分界值,对于视频数据来说,f 0可以是0.33,也可以是比0.33大或者小的其他数值。对于不同类型的数据,f 0的值不同。
在上述公式(18)~(19)中的H 0(f),当在选定的频域区间H 0(f)≈1时,则可以将所述解压帧P 4在选定的频域区间内的数据恢复至所述初始帧P 0;当在选定的频域区间H 0(f)>1时,则可以将所述解压帧P 4在选定的频域区间内的数据进行增强,即所述解压帧P 4在选定区域的幅值高于所述初始帧P 0。比如,如果初始帧P 0是视频中的一帧的话,只要使得在选定的频域区间内H 0(f)大于1,则可以实现清晰度增强。为了方便描述,我们将H 0(f)≈1定义为正常模式,将H 0(f)>1定义为增强模式。下面我们将以视频数据为例,对整体频谱调节函数H 0(f)进行详细说明。
图9A示出了根据本说明书的实施例提供的一种整体调节函数H 0(f)的曲线图。图9B示出了根据本说明书的实施例提供的一种整体调节函数H 0(f)的曲线图。图9C示出了根据本说明书的实施例提供的一种整体调节函数H 0(f)的曲线图。图9D示出了根据本说明书的实施例提供的一种整体调节函数H 0(f)的曲线图。如图9A至图9D所示,横轴为归一化频率f,纵轴为整体频谱调节函数H 0(f)的幅值调节增益H 0。图9A至9D中的曲线表示不同的整体频谱调节函数H 0(f)。横轴的归一化频率最大值为0.5。所述横轴的归一化频率f可以分成低频区域,中低频区域,中频区域,中高频区域和高频区域。(0,a]之间的频率属于低频;(a,b]之间的频率属于中低频;(b,c]之间的频率属于中频;(c,d]之间的频率属于中高频;(d,0.5]之间的频率属于高频。其中,a,b,c,d,e的取值参考图6所述,在此不再赘述。
由于人眼对于视频数据中的低频到中频的数据比对高频的数据更敏感,因此,在数据解压后,应尽量保持所述解压帧P 4相对于所述初始帧P 0低频到中频区域的信息不丢失,也就是说,整体频谱调节函数H 0(f)应使所述解压帧P 4在低频到中频区域的幅值不小于所述初始帧P 0的85%,甚至可以大 于所述初始帧P 0。由于人眼对于高频区域的信息不敏感,因此,所述解压帧P 4在高频区域的幅值可以根据不同的应用场景选择,比如,在低清晰度要求的场景下,所述解压帧P 4在高频区域的幅值可以小于所述初始帧P 0。在对清晰度要求很高的侦察场景下,所述解压帧P 4在高频区域的幅值可以约等于所述初始帧P 0或大于所述初始帧P 0。如图9A至9D所示,整体调节函数H 0(f)在低频至中频区域(包括低频和中频区域)的任意频率f上的幅值调节增益H 0大于1或约等于1,使得解压后的解压帧P 4的幅值不小于所述初始帧P 0的85%,使得清晰度恢复或增强,提升视觉观察效果。所述约等于1在这里可以是在等于1的一定的误差范围内波动。所述误差范围可以在0、±1%、±2%、±3%、±4%、±5%、±6%、±7%、±8%、±9%、±10%、±11%、±12%、±13%、±14%、±15%等数值中任意两个所规定的区间内。为方便描述,我们将整体调节函数H 0(f)在高频区域的幅值调节增益定义为第一幅值调节增益,在中频区域的幅值调节增益定义为第二幅值调节增益,在低频区域的幅值调节增益定义为第三幅值调节增益。所述第三幅值调节增益值、第二幅值调节增益值和第一幅值调节增益值可以在所述误差范围内波动。
如图9A所示,整体调节函数H 0(f)在低频至高频区域的第三幅值调节增益值、第二幅值调节增益值和第一幅值调节增益值均约等于1,使所述解压帧P 4在低频至高频区域的幅值都不小于所述初始帧P 0的85%,使所述解压帧P 4在低频至高频区域的数据可以平稳地恢复或基本恢复至初始帧P 0的状态。
如图9B所示,整体调节函数H 0(f)在低频至中频区域的第三幅值调节增益值和第二幅值调节增益值约等于1,使所述解压帧P 4在低频至中频区域的数据可以平稳地恢复或基本恢复至初始帧P 0的状态。整体调节函数H 0(f)在高频区域的第一幅值调节增益值小于1,使所述解压帧P 4在高频区域的幅值相对于所述初始帧P 0平稳地降低,以抑制高频噪声。所述幅值的平稳降低可以是所述幅值以第一幅值调节增益值衰减,也可以是所述幅值在所述 第一幅值调节增益值附近的一定误差范围内进行衰减。比如,所述第一幅值调节增益可以是0至1之间的任意数值。比如,所述第一幅值调节增益值可以在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和1等数值中任意两个所规定的区间内。如图9B所示,所述整体调节函数H 0(f)在高频区域(大概是0.4~0.5的区间)的第一幅值调节增益在0.6左右。第二和第三幅值调节增益值都在1附近。第二和第三幅值调节增益值可以在一定的误差范围内波动,比如,第二和第三幅值调节增益值可以在0.85、0.90、0.95、1、1.05、1.10、和1.15等数值中任意两个所规定的区间内。
如图9C所示,整体调节函数H 0(f)在低频区域的第三幅值调节增益值约等于1,使所述解压帧P 4在低频区域的数据可以平稳地恢复或基本恢复至初始帧P 0的状态。整体调节函数H 0(f)在中频区域的第二幅值调节增益值和在高频区域的第一幅值调节增益值均大于1,使所述解压帧P 4在中频至高频区域的幅值相对于所述初始帧P 0平稳地增加,从而使中频至高频区域的数据清晰度增强。所述幅值的平稳增加可以是所述幅值以第二幅值调节增益值和第一幅值调节增益值增强,也可以是所述幅值在所述第二幅值调节增益值和所述第一幅值调节增益值附近的一定误差范围内进行增强。所述第二幅值调节增益值和所述第一幅值调节增益值大小可以大体一致,也可以是所述第二幅值调节增益值大于所述第一幅值调节增益值,或者所述第二幅值调节增益值小于所述第一幅值调节增益值。图9C所示的曲线中,所述第二幅值调节增益值和所述第一幅值调节增益值大小大体一致。所述第二幅值调节增益值和所述第一幅值调节增益值可以是大于1的任意数值。比如,所述第二幅值调节增益值和所述第一幅值调节增益值可以在1、1.1、1.2、1.3、1.4、1.5、1.6、1.7、1.8、1.9、2、2.1、2.2和2.4等数值中任意两个所规定的区间内。如图9C所示,所述整体调节函数H 0(f)在中频至高 频区域的第二幅值调节增益和第一幅值调节增益在1.2左右。
如图9D所示,整体调节函数H 0(f)在低频区域的第三幅值调节增益值约等于1,使所述解压帧P 4在低频区域的数据可以平稳地恢复或基本恢复至初始帧P 0的状态。整体调节函数H 0(f)在中频区域的第二幅值调节增益值大于1,使所述解压帧P 4在中频的幅值相对于所述初始帧P 0平稳地增加,从而使中频区域的数据清晰度增强。整体调节函数H 0(f)在高频区域的第一幅值调节增益值小于1,使所述解压帧P 4在高频区域的幅值相对于所述初始帧P 0平稳地降低,从而使不敏感的高频区域的数据量下降,以抑制高频噪声。图9D所示的曲线在减少数据量的同时又能增强清晰度。所述第二幅值调节增益值可以是大于1的任意数值。所述第一幅值调节增益可以是0至1之间的任意数值。如图9D所示,所述整体调节函数H 0(f)在中频区域的第二幅值调节增益在1.2左右,在高频区域的第一幅值调节增益在0.6左右。
进一步地,当所述高频区域同所述中频区域不相连的时候,所述整体频谱调节函数H 0(f)还可以在高频区域的幅值做出调节,使得所述幅值调节增益在中高频区域内的变化平滑而连续。
进一步地,当所述中频区域同所述低频区域不相连的时候,所述整体频谱调节函数H 0(f)还可以在中低频区域的幅值做出调节,使得所述幅值调节增益在中低频区域内的变化连续。
所述整体调节函数H 0(f)的曲线是平滑过渡的曲线。在工程实现上,在实现所述解压帧P 4在低频至中频区域幅值约等于或大于所述初始帧P 0的基础上可以允许所述整体调节函数H 0(f)的曲线存在小范围的波动,所述波动不影响解压的效果。对于视频数据之外其他形式的数据来说,可以根据接收者对于数据的敏感程度,设置所述整体调节函数H 0(f)的参数。不同形式的数据,接收者对于频率的敏感程度不同。
为了方便展示,我们将以公式(18)所示的情况为例进行描述。结合公式(17)和公式(18),则所述解压帧P 4可以表示为以下公式:
Figure PCTCN2022094004-appb-000358
图10A示出了根据本说明书的实施例提供的正常模式一种整体调节函数H 0(f)、编码函数H 1(f)、编码传递函数H E(f)和解码传递函数H D(f)的曲线图。图10B示出了根据本说明书的实施例提供的一种增强模式的整体调节函数H 0(f)、编码函数H 1(f)、编码传递函数H E(f)和解码传递函数H D(f)的曲线图。图10A与图10B中所使用的编码卷积核与解码卷积核相同,均为表1示出的卷积核。图10A中边界调节系数g 1=0.5,边界补偿系数g 2=0.96。图10B中边界调节系数g 1=0.5,边界补偿系数g 2=1.6。如图10A和图10B所示,横轴为归一化频率f,纵轴为幅值调节增益H。如图10A所示,在任意频率区域的整体频谱调节函数H 0(f)≈1,整体频谱调节函数H 0(f)对所述解压帧进行正常模式的频谱调节,即整体频谱调节函数H 0(f)中对于所有频率的信息完整保留,所述解压帧中的数据可以基本恢复至所述初始帧中的数据。如图10B所示,在低频区域的整体频谱调节函数H 0(f)≈1,在中频至高频区域的整体频谱调节函数H 0(f)>1。整体频谱调节函数H 0(f)对所述解压帧的中频至高频区域进行增强模式的频谱调节,即整体频谱调节函数H 0(f)中对于中频至高频区域的信息进行增强,所述解压帧中的中频至高频区域的数据相较于所述初始帧中的中频至高频区域的数据有所增强。需要说明的是,图10A和图10B所示的曲线,只是示例性说明,本领域的技术人员应该明白H 0(f)、H 1(f)、H E(f)和H D(f)的曲线并不局限于图10A和图10B所示的形式,所有符合公式(18)和公式(19)的H 0(f)、H 1(f)、H E(f)和H D(f)曲线都属于本说明书保护的范围。
综上所述,本说明书提供的数据处理的系统100,在对所述初始数据进行压缩时,通过数据压缩设备200执行方法P200,可以将初始视频数据中 的初始帧划分为多个单元,并获取每个单元的中频至高频区域的幅值,使用不同的边界调节系数对每个单元中的中频至高频区域的幅值进行调节,以降低所述初始帧帧在所述中频至所述高频区域的幅值。若当前单元中的中频至高频区域的幅值较大,代表当前单元中包含有强边界,则使用小于1且大于0的边界调节系数对当前单元的中频至高频区域的幅值进行调节,以降低当前单元的中频至高频区域的幅值,从而降低当前单元中的中频至高频区域内的信号强度减小,从而减少数据信息量,在进行预测和求残差时可以提高数据压缩的效率。若当前单元中的中频至高频区域的幅值较小,代表当前单元中包含有弱边界,则使用大于1的边界调节系数对当前单元的中频至高频区域的幅值进行调节,以增强当前单元的中频至高频区域的幅值,以避免当前单元中的弱边界在数据压缩(预测和求残差)过程中丢失,避免细节损失。所述数据处理的方法P200和系统100能够在提高数据压缩的效率的同时增强弱边界的数据信息量,以避免在数据压缩过程中造成细节损失,即在提高数据压缩效率的同时,减少数据失真。
本说明书提供的数据处理的系统100,在对所述压缩帧进行数据解压时,通过数据解压设备300执行方法P300,以数据压缩时的单元为数据解压单元,对每个单元使用与边界调节系数对应的边界补偿系数对中频至高频区域的幅值进行边界补偿,以补偿数据压缩过程中降低的中频至高频区域的幅值,得到解压帧。所述边界补偿与所述边界调节相对应,边界补偿系数与边界调节系数之间存在对应的关系。所述边界补偿可以使经过所述边界调节的压缩数据恢复至初始帧的清晰度甚至高于所述初始帧的清晰度。也就是说,在不显著增加编解码的计算量的情况下,解码端可以至少将解压数据在重要频率内的数据恢复至初始帧的清晰度,甚至可以获得超过初始帧的清晰度。由于初始帧在边界调节过程中的边界调节系数均大于0,压缩帧中的信息并没有缺失,因此可以根据所述边界调节系数和所述边界补偿系数的关系以及各自的特征,来设计边界调节系数和边界补偿系数,对压 缩帧中的信息进行恢复。所述方法和系统可以显著提高数据的压缩效率,提升数据的传输效率,减少数据丢失,避免细节损失,同时消除噪声,提高解压后数据的清晰度。
本说明书另外提供一种非暂时性存储介质,存储有至少一组用来进行数据处理的可执行指令,当所述可执行指令被处理器执行时,所述可执行指令指导所述处理器实施数据处理方法P200的步骤。在一些可能的实施方式中,本说明书的各个方面还可以实现为一种程序产品的形式,其包括程序代码。当所述程序产品在数据压缩设备200上运行时,所述程序代码用于使数据压缩设备200执行本说明书描述的数据处理的步骤。用于实现上述方法的程序产品可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在数据压缩设备200,例如个人电脑上运行。然而,本说明书的程序产品不限于此,在本说明书中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统(例如压缩端处理器220)使用或者与其结合使用。所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。所述计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读存储介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。可读存储介质上包含的程序代码可以用任何适当 的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。可以以一种或多种程序设计语言的任意组合来编写用于执行本说明书操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在数据压缩设备200上执行、部分地在数据压缩设备200上执行、作为一个独立的软件包执行、部分在数据压缩设备200上部分在远程计算设备上执行、或者完全在远程计算设备上执行。在涉及远程计算设备的情形中,远程计算设备可以通过传输媒介120连接到数据压缩设备200,或者,可以连接到外部计算设备。
上述对本说明书特定实施例进行了描述。其他实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者是可能有利的。
综上所述,在阅读本详细公开内容之后,本领域技术人员可以明白,前述详细公开内容可以仅以示例的方式呈现,并且可以不是限制性的。尽管这里没有明确说明,本领域技术人员可以理解本说明书需求囊括对实施例的各种合理改变,改进和修改。这些改变,改进和修改旨在由本说明书提出,并且在本说明书的示例性实施例的精神和范围内。
此外,本说明书中的某些术语已被用于描述本说明书的实施例。例如,“一个实施例”,“实施例”和/或“一些实施例”意味着结合该实施例描述的特定特征,结构或特性可以包括在本说明书的至少一个实施例中。因此,可以强调并且应当理解,在本说明书的各个部分中对“实施例”或“一个实施例”或“替代实施例”的两个或更多个引用不一定都指代相同的实施例。此外,特定特征,结构或特性可以在本说明书的一个或多个实施例中适当地组合。
应当理解,在本说明书的实施例的前述描述中,为了帮助理解一个特征,出于简化本说明书的目的,本说明书将各种特征组合在单个实施例、附图或其描述中。然而,这并不是说这些特征的组合是必须的,本领域技术人员在阅读本说明书的时候完全有可能将其中一部分特征提取出来作为单独的实施例来理解。也就是说,本说明书中的实施例也可以理解为多个次级实施例的整合。而每个次级实施例的内容在于少于单个前述公开实施例的所有特征的时候也是成立的。
本文引用的每个专利,专利申请,专利申请的出版物和其他材料,例如文章,书籍,说明书,出版物,文件,物品等,可以通过引用结合于此。用于所有目的的全部内容,除了与其相关的任何起诉文件历史,可能与本文件不一致或相冲突的任何相同的,或者任何可能对权利要求的最宽范围具有限制性影响的任何相同的起诉文件历史。现在或以后与本文件相关联。举例来说,如果在与任何所包含的材料相关联的术语的描述、定义和/或使用与本文档相关的术语、描述、定义和/或之间存在任何不一致或冲突时,使用本文件中的术语为准。
最后,应理解,本文公开的申请的实施方案是对本说明书的实施方案的原理的说明。其他修改后的实施例也在本说明书的范围内。因此,本说明书披露的实施例仅仅作为示例而非限制。本领域技术人员可以根据本说明书中的实施例采取替代配置来实现本说明书中的申请。因此,本说明书的实施例不限于申请中被精确地描述过的实施例。

Claims (24)

  1. 一种数据处理的方法,其特征在于,包括:
    选择初始数据中的初始帧,所述初始帧包括预设字节数的初始数据;以及
    对所述初始帧进行数据压缩,得到压缩帧,其中,所述数据压缩包括对在压帧进行边界调节,所述在压帧包括所述初始帧和所述初始帧在所述数据压缩过程中成为所述压缩帧之前的任一数据状态,
    其中,所述边界调节包括对所述在压帧的多个单元中的每个单元使用与其对应的边界调节系数对其在中频至高频区域的幅值进行调节,以降低所述在压帧在所述中频至所述高频区域的幅值,所述边界调节系数大于0。
  2. 如权利要求1所述的数据处理的方法,其特征在于,所述对在压帧进行边界调节,包括:
    基于预设的单元尺寸将所述在压帧划分为所述多个单元;以及
    对所述每个单元使用与其对应的所述边界调节系数对其在中频至高频区域的幅值进行调节。
  3. 如权利要求2所述的数据处理的方法,其特征在于,所述对所述每个单元使用与其对应的所述边界调节系数对其在中频至高频区域的幅值进行调节,包括对所述每个单元:
    从预设的编码函数组中选取一个函数作为编码函数,通过所述编码函数对其进行调节,得到第一单元,使其在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减;
    对其和所述第一单元求差,获取其对应的第一边界,所述第一边界包括其在所述中频至所述高频区域的分量;以及
    使用与其对应的所述边界调节系数对所述第一边界的幅值进行调节,得到其对应的编码边界;以及
    将所述第一单元与所述编码边界进行叠加。
  4. 如权利要求3所述的数据处理的方法,其特征在于,所述使用与其对应的所述边界调节系数对所述第一边界的幅值进行调节,包括:
    确定所述第一边界的边界值小于预设第一阈值,通过大于1的所述边界调节系数增强所述第一边界的幅值;或者
    确定所述第一边界的边界值大于预设第二阈值,通过小于1的所述边界调节系数降低所述第一边界的幅值。
  5. 如权利要求4所述的数据处理的方法,其特征在于,所述通过大于1的所述边界调节系数增强所述第一边界的幅值,包括:
    从预设的第一边界调节系数组中选取一个系数作为所述边界调节系数,增强所述第一边界的幅值,所述第一边界调节系数组中的系数均大于1;
    所述通过小于1的所述边界调节系数降低所述第一边界的幅值,包括:
    从预设的第二边界调节系数组中选取一个系数作为所述边界调节系数,降低所述第一边界的幅值,所述第二边界调节系数组中的系数均小于1。
  6. 如权利要求3所述的数据处理的方法,其特征在于,所述使用与其对应的所述边界调节系数对所述第一边界的幅值进行调节,包括:
    以失真率和码率的加权值为优化目标,基于优化算法,获取所述边界调节系数,以所述边界调节系数对所述第一边界的幅值进行调节。
  7. 如权利要求3所述的数据处理的方法,其特征在于,所述对所述初 始帧进行数据压缩,包括以下方式中的至少一种:
    对所述初始帧先进行所述边界调节,再对所述边界调节后的初始帧进行预测和求残差;
    对所述初始帧先进行预测得到预测帧,再对所述初始帧和所述预测帧进行所述边界调节和求残差;以及
    对所述初始帧先进行预测和求残差,再对所述残差进行所述边界调节。
  8. 如权利要求7所述的数据处理的方法,其特征在于,所述压缩帧还包括所述多个单元中的每个单元对应的所述编码函数和所述边界调节系数。
  9. 一种数据处理的系统,其特征在于,包括:
    至少一个存储介质,存储有至少一个指令集,用于数据处理;以及
    至少一个处理器,同所述至少一个存储介质通讯连接,
    其中,当所述系统运行时,所述至少一个处理器读取所述至少一个指令集,并且根据所述至少一个指令集的指示执行权利要求1-8中任一项所述的数据处理的方法。
  10. 一种数据处理的方法,其特征在于,包括:
    获取压缩数据,所述压缩数据包括对初始帧进行数据压缩得到的压缩帧,所述数据压缩包括边界调节;以及
    对所述压缩帧进行数据解压,得到解压帧,所述数据解压包括对在解帧进行边界补偿,所述在解帧包括所述压缩帧和所述压缩帧在所述数据解压过程中成为所述解压帧前的任一数据状态,
    其中,所述边界补偿与所述边界调节存在预先设定的关联关系。
  11. 如权利要求10所述的数据处理的方法,其特征在于,所述边界调 节包括对在压帧的多个单元中的每个单元使用与其对应的边界调节系数对其在中频至高频区域的幅值进行调节,以降低所述在压帧在所述中频至所述高频区域的幅值,所述边界调节系数大于0,所述在压帧包括所述初始帧和所述初始帧在所述数据压缩过程中成为所述压缩帧之前的任一数据状态,
    所述边界补偿包括对所述在解帧的所述多个单元中的所述每个单元,基于所述关联关系,使用与所述边界调节系数相对应的边界补偿系数对其在中频至高频区域的幅值进行补偿。
  12. 如权利要求11所述的数据处理的方法,其特征在于,所述对在压帧进行边界调节,包括:
    基于预设的单元尺寸将所述在压帧划分为所述多个单元;以及
    对所述每个单元使用与其对应的所述边界调节系数对其在中频至高频区域的幅值进行调节,包括对所述每个单元:
    从预设的编码函数组中选取一个函数作为编码函数,通过所述编码函数对其进行调节,得到第一单元,使其在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减;
    对其和所述第一单元求差,获取其对应的第一边界,所述第一边界包括其在所述中频至所述高频区域的分量;以及
    使用与其对应的所述边界调节系数对所述第一边界的幅值进行调节,得到其对应的编码边界;以及
    将所述第一单元与所述编码边界进行叠加。
  13. 如权利要求12所述的数据处理的方法,其特征在于,所述对在解帧进行边界补偿,包括:
    基于预设的所述单元尺寸将所述在解帧划分为所述多个单元;以及
    对所述每个单元使用与所述边界调节系数相对应的所述边界补偿系数 对其在中频至高频区域的幅值进行补偿。
  14. 如权利要求13所述的数据处理的方法,其特征在于,所述对所述每个单元使用与所述边界调节系数相对应的所述边界补偿系数对其在中频至高频区域的幅值进行补偿,包括对所述每个单元:
    确定解码函数,通过所述解码函数对其进行调节,得到第二单元,使其在频域内的低频区域的分量被保留而中频至高频区域的分量被衰减;
    对其和所述第二单元求差,获取其对应的第二边界,所述第二边界包括其在所述中频至所述高频区域的分量;以及
    使用与所述边界调节系数相对应的所述边界补偿系数对所述第二边界的幅值进行补偿,得到其对应的解码边界;以及
    将所述当前单元与所述解码边界进行叠加。
  15. 如权利要求14所述的数据处理的方法,其特征在于,所述确定解码函数,包括:
    从预设的解码函数组中选取一个函数作为所述解码函数。
  16. 如权利要求14所述的数据处理的方法,其特征在于,所述使用与所述边界调节系数相对应的所述边界补偿系数对所述第二边界的幅值进行补偿,包括:
    从预设的边界补偿系数组中选取一个作为所述边界补偿系数,对所述第二边界的幅值进行补偿。
  17. 如权利要求14所述的数据处理的方法,其特征在于,所述压缩帧包括:
    所述在压帧中的多个单元中的每个单元对应的所述编码函数和所述边 界调节系数。
  18. 如权利要求17所述的数据处理的方法,其特征在于,所述确定解码函数,包括:
    从预设的解码函数组中选取与所述编码函数相对应的函数作为所述解码函数。
  19. 如权利要求17所述的数据处理的方法,其特征在于,所述使用与所述边界调节系数相对应的所述边界补偿系数对所述第二边界的幅值进行补偿,包括:
    基于所述边界调节系数与所述边界补偿系数的关联关系,确定所述边界补偿系数,对所述第二边界的幅值进行补偿。
  20. 如权利要求10所述的数据处理的方法,其特征在于,所述对所述压缩帧进行数据解压,包括以下方式中的至少一种:
    对所述压缩帧先进行解码,再进行所述边界补偿;
    对所述压缩帧进行所述解码过程中进行所述边界补偿;以及
    对所述压缩帧先进行所述边界补偿,再进行所述解码。
  21. 如权利要求10所述的数据处理的方法,其特征在于,所述关联关系包括:
    所述边界补偿使所述解压帧在低频至中频区域的任意频率上的幅值不小于所述初始帧的85%。
  22. 如权利要求21所述的数据处理的方法,其特征在于,所述关联关系还包括:
    所述边界补偿使所述解压帧相对于所述初始帧在中频区域的幅值平稳地增加。
  23. 如权利要求21所述的数据处理的方法,其特征在于,所述关联关系还包括:
    所述边界补偿使所述解压帧相对于所述初始帧在高频区域的幅值平稳地降低。
  24. 一种数据处理的系统,其特征在于,包括:
    至少一个存储介质,存储有至少一个指令集,用于数据处理;以及
    至少一个处理器,同所述至少一个存储介质通讯连接,
    其中,当所述系统运行时,所述至少一个处理器读取所述至少一个指令集,并且根据所述至少一个指令集的指示执行如权利要求10-23中任一项所述的数据处理的方法。
PCT/CN2022/094004 2021-05-28 2022-05-20 数据处理的方法和系统 WO2022247735A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2023568177A JP2024517851A (ja) 2021-05-28 2022-05-20 データ処理方法及びシステム
EP22810462.6A EP4329304A1 (en) 2021-05-28 2022-05-20 Data processing method and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110594135.5A CN115412730A (zh) 2021-05-28 2021-05-28 数据处理的方法和系统
CN202110594135.5 2021-05-28

Publications (1)

Publication Number Publication Date
WO2022247735A1 true WO2022247735A1 (zh) 2022-12-01

Family

ID=84156379

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/094004 WO2022247735A1 (zh) 2021-05-28 2022-05-20 数据处理的方法和系统

Country Status (4)

Country Link
EP (1) EP4329304A1 (zh)
JP (1) JP2024517851A (zh)
CN (1) CN115412730A (zh)
WO (1) WO2022247735A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158701A (zh) * 2011-04-19 2011-08-17 湖南大学 一种基于压缩感知理论的分类量化图像编码方法
CN106612439A (zh) * 2016-02-04 2017-05-03 四川用联信息技术有限公司 一种自适应快速分形图像压缩方法
CN113518227A (zh) * 2020-04-09 2021-10-19 于江鸿 数据处理的方法和系统
CN113766239A (zh) * 2020-06-05 2021-12-07 于江鸿 数据处理的方法和系统
CN114079472A (zh) * 2020-08-20 2022-02-22 于江鸿 数据处理的方法和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158701A (zh) * 2011-04-19 2011-08-17 湖南大学 一种基于压缩感知理论的分类量化图像编码方法
CN106612439A (zh) * 2016-02-04 2017-05-03 四川用联信息技术有限公司 一种自适应快速分形图像压缩方法
CN113518227A (zh) * 2020-04-09 2021-10-19 于江鸿 数据处理的方法和系统
CN113766239A (zh) * 2020-06-05 2021-12-07 于江鸿 数据处理的方法和系统
CN114079472A (zh) * 2020-08-20 2022-02-22 于江鸿 数据处理的方法和系统

Also Published As

Publication number Publication date
JP2024517851A (ja) 2024-04-23
CN115412730A (zh) 2022-11-29
EP4329304A1 (en) 2024-02-28

Similar Documents

Publication Publication Date Title
US20210067785A1 (en) Video encoding rate control for intra and scene change frames using machine learning
WO2021204015A1 (zh) 数据处理的方法和系统
US10645383B2 (en) Constrained directional enhancement filter selection for video coding
US10425641B2 (en) Quantization offset and cost factor modification for video encoding
CN106664412B (zh) 包括目标比特率的视频编码速率控制和质量控制
US11418789B2 (en) Content adaptive quantization for video coding
US20210144377A1 (en) Method and system of video coding with content adaptive quantization
US11503306B2 (en) Image and video data processing method and system
WO2022247735A1 (zh) 数据处理的方法和系统
US20210321119A1 (en) Image and video data processing method and system
US20220078417A1 (en) Image and video data processing method and system
WO2022037498A1 (zh) 数据处理的方法和系统
US8526506B1 (en) System and method for transcoding with quality enhancement
CN114079472A (zh) 数据处理的方法和系统
US20220272325A1 (en) Image and video data processing method and system
NL2029548A (en) Determining adaptive quantization matrices using machine learning for video coding
CN113766239B (zh) 数据处理的方法和系统
JPH09130648A (ja) 動画像信号処理装置
EP3242476A1 (en) Histogram segmentation based local adaptive filter for video encoding and decoding
CN113766239A (zh) 数据处理的方法和系统
CN114727110A (zh) 数据处理的方法和系统
US20210306640A1 (en) Fine grain lookahead enhancement for video coding
JPH07274165A (ja) 画像情報圧縮装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22810462

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023568177

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 2022810462

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022810462

Country of ref document: EP

Effective date: 20231124

NENP Non-entry into the national phase

Ref country code: DE