WO2020168501A1 - Image encoding method and decoding method, and device and system to which said methods are applicable - Google Patents

Image encoding method and decoding method, and device and system to which said methods are applicable Download PDF

Info

Publication number
WO2020168501A1
WO2020168501A1 PCT/CN2019/075642 CN2019075642W WO2020168501A1 WO 2020168501 A1 WO2020168501 A1 WO 2020168501A1 CN 2019075642 W CN2019075642 W CN 2019075642W WO 2020168501 A1 WO2020168501 A1 WO 2020168501A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
bit
plane
image
serialization
Prior art date
Application number
PCT/CN2019/075642
Other languages
French (fr)
Chinese (zh)
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 CN201980005137.7A priority Critical patent/CN111316644B/en
Priority to PCT/CN2019/075642 priority patent/WO2020168501A1/en
Publication of WO2020168501A1 publication Critical patent/WO2020168501A1/en

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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • 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/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • This application relates to the field of image processing technology, and in particular to an image encoding method, decoding method, and applicable equipment and systems.
  • High-definition images have a wide range of applications, such as urban security, medical imaging, and event broadcasting.
  • front-end equipment such as infrared cameras, array cameras, etc.
  • lenses and image chips that can capture 4K or even above 4K.
  • high-definition video files acquired by front-end equipment pose a challenge to data storage and network transmission due to the huge amount of data.
  • the front-end equipment usually uses an image encoding method to encode and compress the acquired high-definition images, in the hope of reducing the data volume of the original image data.
  • the purpose of this application is to provide an image encoding method, decoding method, and applicable equipment and systems, which are used to solve the problem of the large amount of high-definition image data in the prior art that is difficult to save. And transmission problems.
  • the first aspect of this application provides an image encoding method, which includes: dividing the acquired image data into multiple bit-plane matrix data according to binary data bits; and based on preset serialization Cycle, serialize at least part of the bit-plane matrix data of the bit-plane to obtain bit-plane sequence data; wherein, the serialization cycle is a cycle set by the preset m*n matrix according to the serialization of adjacent data ; Perform encoding processing on each of the obtained bit-plane sequence data, and generate encoded image data of the image data.
  • the step of dividing the acquired image data into a plurality of bit-plane matrix data according to binary data bits includes: performing frequency domain conversion on the acquired image data, and according to a preset binary The data bits divide the converted frequency domain image data into multiple bit plane matrix data.
  • the encoding method further includes a step of dividing the acquired original image into multiple channels of image data according to colors; so as to perform frequency domain conversion processing on each channel of the image data.
  • the encoding method further includes a step of performing block processing on the obtained bit-plane matrix data; correspondingly, based on the preset serialization period, at least part of the bit-plane
  • the step of serializing the bit-plane matrix data of the bit-plane includes: serializing each matrix data block in the bit-plane matrix data of at least part of the bit-plane based on a preset serialization cycle to obtain each serial data block; and According to the position of each matrix data block in the bit plane matrix data, the sequence data blocks are connected into bit plane sequence data.
  • the step of serializing at least part of the obtained bit-plane matrix data based on a preset serialization period includes: following a sequence set based on the preset bit-plane In the conversion cycle, the bit-plane matrix data of the corresponding bit-plane is serialized.
  • the number of serialization periods set based on a preset bit plane is multiple, and the number of the sequence segments described in the serialization period set corresponding to a higher bit plane The length is greater than the length of the sequence segment described in the serialization period set corresponding to the lower bit plane.
  • the step of serializing at least part of the obtained bit-plane matrix data based on a preset serialization period includes: according to the serialization period, the corresponding bit-plane The matrix data is serialized into a plurality of sequence segments; according to the start data and the end data of the sequence segment described in the serialization period, the sequence segments of the corresponding bit planes are connected to obtain the corresponding bit plane sequence data.
  • the step of encoding each bit plane sequence data includes: performing encoding processing on each bit plane sequence data according to a preset encoding method corresponding to each bit plane.
  • the step of encoding each bit-plane sequence data includes: encoding the corresponding bit-plane sequence data with a coding unit set based on the serialization period.
  • the step of encoding each bit plane sequence data includes: using an entropy coding method to encode each bit plane sequence data.
  • the frequency domain conversion method includes wavelet transform.
  • the serialization period is obtained based on the Hilbert polyline algorithm.
  • the image data includes 4K and above image data.
  • a second aspect of the present application provides an image decoding method, including: decoding the acquired encoded image data to extract bit-plane sequence data used to describe multiple bit-planes of the image data; based on a preset serialization period, Convert the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data; wherein, the serialization period is a period set by the preset m*n matrix according to the serialization of adjacent data; according to the binary data bits of each bit plane , Merge all the obtained bit-plane matrix data into the described image data.
  • the decoding method further includes: combining the obtained multiple image data into an original image according to colors.
  • the step of decoding the acquired encoded image data includes: setting an encoding unit based on the serialization period, and processing the encoded bit plane sequence data in the encoded image data Decoding processing.
  • the step of decoding the acquired encoded image data includes: using an entropy decoding method to decode the acquired encoded image data.
  • the step of converting the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period includes: performing bit-plane sequence data of the corresponding bit-plane Block processing to obtain multiple sequence data blocks; based on the preset serialization cycle, convert each sequence data block of the corresponding bit plane into a matrix data block; based on the position of each sequence data block in the corresponding bit plane sequence data, Combine the blocks into bit-plane matrix data.
  • the step of converting the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period includes: according to a sequence set based on the preset bit-plane The conversion cycle converts the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data.
  • the number of serialization periods set based on the preset bit plane is multiple, and the length of the sequence segment described in the serialization period set corresponding to the higher bit plane It is greater than the length of the sequence segment described in the serialization period set corresponding to the lower bit plane.
  • the step of converting the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period includes: according to the serialization period, converting the corresponding bit-plane The plane sequence data is serialized into multiple sequence segments; according to the start data and end data of the sequence segment described in the serialization cycle, each sequence segment of the corresponding bit plane is converted into a matrix form, and the data in each matrix form is merged Into bit plane matrix data.
  • the step of decoding the acquired coded image data includes: according to a decoding method corresponding to a preset bit plane, the coded bit plane sequence data in the coded image data Perform decoding processing.
  • the step of combining all the obtained bit-plane matrix data into the described image data according to the binary data bits of each bit plane includes: according to the binary data bits of each bit plane, combining All the obtained bit-plane matrix data undergoes frequency domain inverse transformation to obtain the described image data.
  • the frequency domain inverse transformation method includes wavelet transform inverse transformation.
  • the serialization period is configured based on the Hilbert polyline algorithm.
  • the image data obtained after decoding includes 8K image data.
  • a third aspect of the present application provides an image encoding device, including: an image acquisition interface for acquiring the image data; a storage device for storing at least one program and image data to be encoded; and a processing device for calling and The program is executed to perform encoding processing on the image data according to the image encoding method described in any one of the first aspect.
  • a fourth aspect of the present application provides a camera device, including: a capturing device for acquiring an original image, wherein the original image is composed of multiple image data set based on color; and a storage device for storing at least one A program and image data to be encoded; a processing device for calling and executing the program to perform encoding processing on the image data according to the image encoding method according to any one of the first aspects.
  • a fifth aspect of the present application provides an image decoding device, which includes: a storage device for storing at least one program and encoded image data to be decoded; a processing device for calling and executing the program to perform as described in the second aspect
  • the image decoding method described in any one of the image decoding methods decodes the encoded image data to obtain image data that can be displayed.
  • a sixth aspect of the present application provides an image playback device, including: a storage device for storing at least one program and encoded image data to be decoded; and a processing device for calling and executing the program to perform as described in the second aspect
  • the image decoding method described in any one of the image decoding methods decodes the encoded image data; the interface device is used to transmit the decoded image data to the connected display screen.
  • a seventh aspect of the present application provides an image transmission system, including: an image acquisition interface for acquiring the image data; a storage device for storing at least one program, image data to be encoded, and encoded image data to be decoded; processing A device for calling and executing the program to perform encoding processing on the image data according to the image encoding method as described in any one of the first aspect; and/or according to any one of the second aspect
  • the image decoding method performs encoding processing on the encoded image data.
  • An eighth aspect of the present application provides an image transmission system, including: the image encoding device as shown in the third aspect, or the imaging device as shown in the fourth aspect; and the decoding device as shown in the fifth aspect, or The playback device shown in the sixth aspect.
  • a ninth aspect of the present application provides a computer storage medium, which is characterized by including: storing at least one program; when called, the at least one program executes the image encoding method according to any one of the first aspects; or , When the at least one program is called, the decoding method as described in any one of the second aspect is executed.
  • this application uses a serialization period to implement serialization of bit-plane matrix data, which is beneficial to improve the original image
  • the cohesion especially the cohesion of high-definition images of 4K and above.
  • the use of different serialization cycles based on binary data bits effectively improves the image compression rate.
  • Figure 1 shows a flowchart of an embodiment of the coding method of this application.
  • FIG. 2 shows a schematic diagram of a bit plane of a channel of image data divided by color in this application.
  • Figure 3 shows a schematic diagram of the spectrum distribution of the image data of this application after three-level wavelet transformation.
  • FIG. 4 shows a schematic diagram of the serialization rule of the 4*4 matrix in this application as the serialization cycle.
  • FIG. 5 shows a schematic diagram of the serialization rule of the 8*8 matrix in this application as the serialization cycle.
  • FIG. 6 shows a schematic diagram of serializing bit-plane matrix data (8*16) according to the serialization cycle shown in FIG. 4.
  • FIG. 7 shows a flowchart of an embodiment of the decoding method of this application.
  • FIG. 8 shows a schematic structural diagram of an image transmission system of this application in an embodiment.
  • FIG. 9 shows a schematic diagram of the structure of the image transmission system of this application in another embodiment.
  • A, B or C or "A, B and/or C” means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C” .
  • An exception to this definition will only occur when the combination of elements, functions, steps or operations is inherently mutually exclusive in some way.
  • the present application provides an image encoding method, which aims to achieve the encoding purpose of not only retaining as much image information as possible, but also effectively reducing the amount of image data.
  • the encoding method mainly re-serializes the image data according to the binary data bits in the image data, and encodes the serialized data after the serialization processing, and realizes the image information concentration by using a more cohesive serialization method To achieve the above purpose.
  • the image data may come from the original image.
  • the original image includes but is not limited to: high-definition images (such as 2K images), standard-definition images (such as 720*576 images), ultra-high-definition images (such as 4K images or 8K images), and compressed and decompressed Images etc.
  • the original image is a high-definition image from an original video captured by a high-definition camera.
  • the original image is a high-definition image transmitted through a dedicated data channel.
  • the original image is an image that comes from the Internet and needs to be re-encoded.
  • the image data may be an original image, or the image data is obtained by dividing the original image into multiple paths according to colors.
  • the original image is divided into three channels of image data according to RGB, and each channel of image data is encoded using the encoding method.
  • the original image is divided into three channels of image data according to YUN, and each channel of image data is encoded using the encoding method.
  • the encoding method is mainly executed by an image encoding device.
  • the encoding device may be a terminal device or a server.
  • the terminal equipment includes but is not limited to camera equipment, personal electronic terminal equipment, etc.
  • the camera equipment includes a camera device, a storage device, a processing device, and may also include an interface device.
  • the camera device is used to obtain an original image, wherein the original image is composed of multi-channel image data set based on colors.
  • the imaging device includes at least a lens composed of a lens group, a light sensing device, etc., where the light sensing device includes, for example, a CCD device, a CMOS device, and the like.
  • the storage device may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
  • the storage device also includes a memory controller, which can control access to the memory by other components of the device, such as a CPU and a peripheral interface.
  • the storage device is used to store at least one program and image data to be encoded.
  • the program stored in the storage device includes an operating system, a communication module (or instruction set), a graphics module (or instruction set), a text input module (or instruction set), and an application (or instruction set).
  • the program in the storage device further includes an instruction set for performing an encoding operation on the image data in a time sequence based on the technical solution provided by the encoding method.
  • the processing device 13 includes but is not limited to: CPU, GPU, FPGA (Field-Programmable Gate Array), ISP (Image Signal Processing image processing chip), or other memory devices that are dedicated to processing At least one program processing chip (such as AI dedicated chip), etc.
  • the processing device calls and executes at least one program stored in the storage device to perform encoding processing on the stored original image or image data in the original image according to the encoding method.
  • processing devices such as FPGA that can process matrix data in parallel is more suitable for efficient and real-time encoding of the acquired image data.
  • the interface device includes, but is not limited to: a data line interface and a network interface; among them, examples of the data line interface include at least one of the following: serial interfaces such as USB, and parallel interfaces such as bus interfaces.
  • Examples of network interfaces include at least one of the following: short-range wireless network interfaces such as Bluetooth-based network interfaces and WiFi network interfaces, such as wireless network interfaces of mobile networks based on 3G, 4G, or 5G protocols, such as wired network interfaces that include network cards Wait.
  • the camera device is set on a pan-tilt above the road to monitor vehicle violations, such as speeding, red light running, etc.
  • the camera device is configured on a minimally invasive medical device, and the camera device is set at the front end of the hose through an optical fiber or other dedicated data cable.
  • the camera device is configured on a high-speed moving track of a stadium to capture high-definition pictures of competitive games.
  • the electronic terminal equipment for personal use includes desktop computers, notebook computers, tablet computers, and editing equipment dedicated to the production of TV programs, movies, TV series, and the like.
  • the electronic terminal equipment includes a storage device and a processing device.
  • the storage device and the processing device may be the same or similar to the corresponding devices in the aforementioned camera equipment, and will not be described in detail here.
  • the electronic terminal equipment may also include a camera device for capturing original images.
  • the hardware and software modules of the camera device may be the same as or similar to the corresponding device in the aforementioned camera device, and will not be repeated here.
  • the electronic terminal device may further include an image acquisition interface for acquiring image data derived from the original image or the original image.
  • the image acquisition interface may be a network interface, a data line interface, or a program interface.
  • the network interface and the data line interface can be the same or similar to the corresponding devices in the aforementioned camera equipment, and will not be described in detail here.
  • the processing device of the electronic terminal equipment downloads the original image from the Internet.
  • the processing device of the electronic terminal device obtains the original image or image data displayed by the drawing software on the display screen.
  • the drawing software is, for example, PS software, or screenshot software, etc.
  • the processing device of the electronic terminal equipment obtains an original frame of the unedited high-definition video from the storage device.
  • the server includes but is not limited to a single server, a server cluster, a distributed server, a server based on cloud technology, and the like.
  • the server includes a storage device, a processing device, an image acquisition interface, and the like.
  • the storage device and the processing device may be configured in the same physical server device, or be configured in multiple physical server devices according to the division of labor of each physical server device.
  • the image acquisition interface may be a network interface or a data line interface.
  • the storage device, processing device, image acquisition interface, etc. included in the server may be the same as the corresponding devices mentioned in the aforementioned terminal equipment; or specifically set for the server based on the server's throughput, processing capacity, and storage requirements The corresponding devices.
  • the storage device may also include a solid state drive or the like.
  • the processing device may also include a CPU dedicated to a server or the like.
  • the image acquisition interface in the server acquires image data and encoding instructions from the Internet, and the processing device executes the encoding method described in this application on the acquired image data based on the encoding instructions.
  • FIG. 1 shows a flowchart of the encoding method in an embodiment.
  • the processing device in any of the encoding device examples mentioned above executes at least one program and schedules the hardware in the encoding device to perform the following steps.
  • the acquired image data is divided into a plurality of bit-plane matrix data according to binary data bits.
  • the image data is a data matrix arranged based on pixel positions.
  • the color depth of the data at each pixel position in the corresponding data matrix can be expressed by multi-bit binary data. For example, if the color depth of the image data is 256, the data at each pixel position in the data matrix is expressed by an 8-bit binary number. Based on each channel of image data divided by color, the same type of color from the high bit to the low bit of the multi-bit binary data can be regarded as set according to the binary data bit from high to low.
  • Figure 2 shows an example of a bit plane of image data divided by color, where the red component of each pixel is represented by an 8-bit binary number ⁇ b7, b6,..., b0 ⁇ , adjacent pixels
  • the relative frequency of the b7 bit in the red component of the red component is lower than the b0 bit.
  • the bit-plane matrix data composed of the b7 bit of each pixel in the image data can be regarded as the higher binary data bit in the image data.
  • the bit-plane matrix data of the image data, and the bit-plane matrix data composed of the b0 bits of each pixel in the image data can be regarded as the bit-plane matrix data of the lower binary data bits in the image data.
  • the color value of each pixel in each channel of image data may also be represented by a value of more than 8 bits or a value of less than 8 bits.
  • the pixel bit of each channel of image data is represented by a 10-bit value.
  • this step can be divided into multiple bit-plane matrix data by the position of each data bit in the binary data expressing the color in the image data. .
  • the frequency domain conversion method can be used to obtain the bit-plane matrix data based on the frequency spectrum more accurately.
  • the step S110 includes: performing frequency domain conversion on the acquired image data, and dividing the converted frequency domain image data into a plurality of bit plane matrix data according to preset binary data bits.
  • the encoding device performs frequency domain conversion on the image data to obtain the distribution of each frequency spectrum of the image data in the frequency domain, divides the frequency domain image data into multiple pixel data blocks based on the frequency spectrum, and divides the frequency domain image data into a plurality of pixel data blocks according to the constituent pixel data blocks.
  • the binary data bits of the pixel data are divided into multiple bit plane matrix data for each pixel data block.
  • the frequency domain conversion method includes Fourier transform, cosine transform, etc., for example.
  • the frequency domain transform may adopt Discrete Fourier Transform (DFT).
  • the frequency domain transform may adopt a discrete cosine transform (Discrete Fourier Transform, DCT).
  • the frequency domain transform may also adopt wavelet transform (Wavelet Transform, WT).
  • FIG. 3 shows a schematic diagram of the spectrum distribution of image data after three-level wavelet transform.
  • LLi in the figure represents the low frequency subband
  • LHi represents the horizontal detail component, which belongs to the high frequency subband
  • HLi represents the vertical detail component, which belongs to the high frequency subband
  • HHi represents the diagonal detail component, which also belongs to the high frequency subband.
  • i 1, 2, 3.
  • an image data After an image data is converted to the frequency domain through a three-level wavelet transform, it can be divided into pixel image blocks distributed in ten subbands, as shown in Figure 3, LL3, HL3, HL2, HL1, LH3, LH2, LH1, HH3, HH2 , HH1 ten sub-band pixel image blocks, wherein the pixel value in each pixel image block is represented by 8-bit or 10-bit binary for example.
  • the encoding device performs bit plane division on the pixel data in each obtained pixel data block. For example, if the color value in the image data is represented by 10-bit binary, the encoding device divides the pixel data block located in HL3 into 10 bit-plane matrix data. By analogy, the encoding device can divide the pixel data blocks in at least HL3, HL2, HL1, LH3, LH2, LH1, HH3, HH2, HH1 subbands into 10 bit-plane matrices each. Among them, for the low-frequency subband LL3, bit-plane matrix data can be processed or processed separately according to encoding methods such as H.264 and JPEG.
  • this step can divide the original image into multiple channels of image data according to the color, and operate the frequency domain conversion processing as mentioned in any of the above examples on each channel of image data, thereby obtaining the The bit-plane matrix data of each channel of image data.
  • step S130 may be performed to serialize the bit-plane matrix data.
  • the encoding method further includes: step S120, which is to perform block processing on the obtained bit-plane matrix data.
  • the block processing aims to block the bit-plane matrix data according to the preset number of rows and columns to obtain a plurality of matrix data blocks, wherein each adjacent block has no overlapping data.
  • the block processing method adopts block processing of bit-plane matrix data according to a preset number of rows or columns.
  • the block processing method adopts the block processing of the bit-plane matrix data according to the maximum M*N matrix data amount.
  • the block processing performs block processing on the obtained bit-plane matrix data according to a preset serialization cycle for serialization processing.
  • the serialization cycle includes an m*n matrix used to describe serialization processing rules, m and n are both natural numbers greater than 1, and m and n may be the same or different.
  • m is an integer multiple of n.
  • the block processing method includes: performing block processing on the obtained bit-plane matrix data according to the number of rows/columns of the matrix described by the serialization period.
  • the block processing method is that a*m acts as a block unit to block the bit-plane matrix data, where a is a coefficient, and a ⁇ 1.
  • the block processing method is to block the bit-plane matrix data according to b*n as the block unit, where b is a coefficient, and b ⁇ 1.
  • the block processing method is to block the bit-plane matrix data according to the (a*m, b*n) matrix as the block unit, where a and b are coefficients, and both a and b are greater than An integer equal to 1, a and b can be equal or unequal.
  • the block processing method also includes the remaining data of less than one block unit in the bit-plane matrix data Into a separate matrix data block.
  • step S130 may be performed to perform serialization processing on each matrix data block in each bit-plane matrix data to obtain a sequence data block, and according to each matrix data block The position in the bit-plane matrix data connects each sequence data block into bit-plane sequence data.
  • step S130 based on a preset serialization period, at least part of the bit-plane matrix data of the bit-plane is serialized to obtain bit-plane sequence data.
  • the serialization period is a period set by the preset m*n matrix according to the serialization of adjacent data.
  • the serialization period describes the rule of serialized data obtained by traversing adjacent data in a preset m*n matrix.
  • the rules include: starting data and ending data in the matrix determined for serialization, and in the matrix determined for serialization from the position of the starting data to the position of the ending data, the data in the matrix are determined according to The sequence relationship of each position when the sequence is arranged.
  • the adjacent position relationship means that the adjacent data after serialization are adjacent in the matrix, that is, after the data in the matrix is serialized into sequence segments, the adjacent data corresponds to the matrix having adjacent data in the same row or column. Positional relationship.
  • the data in the matrix constructs a serialization cycle based on the area enclosed by adjacent data in the same row and the same column, forming a sequence segment with start data and end data.
  • the start data and end data of a sequence segment are located in the same row or column in the corresponding matrix data.
  • Figure 4 shows a schematic diagram of the serialization rule of the 4*4 matrix as the serialization cycle, where the area enclosed by every 2 adjacent data in the 4*4 matrix is serialized according to the arrow.
  • a11 and a12 are adjacent data
  • a12 and a22 are adjacent data
  • the serialization cycle starts with a11 and a14 as the end point to serialize all the data in the 4*4 matrix into a row of 16-bit sequence segments: a11 , A12, a22, a21, a31, a41, a42, a32, a33, a43, a44, a34, a24, a23, a13, a14.
  • Figure 5 shows a schematic diagram of the serialization rule of an 8*8 matrix as the serialization period. The area enclosed by every 4 adjacent data in the 8*8 matrix is called Wi.
  • the data at d0 and d1, d1 and d2, and d2 and d3 in the area Wi are all adjacent data; the serialization cycle starts from the data at the d0 position of W0 and takes the d3 position in the area WF As the end point, all data in the 8*8 matrix is serialized into a row of 64-bit sequence segments, that is, the sequence segments connected by arrows as shown in Figure 5.
  • the serialization period may be a predetermined fixed period based on the statistics of the frequency spectrum of the sample image.
  • the statistical method may determine the serialization period by pre-setting the cohesion condition of the image information; or may determine the serialization period by statistically calculating the data volume change ratio before and after encoding.
  • the serialization period may be obtained by using the Hilbert polyline algorithm.
  • the fourth-order Hilbert polyline algorithm is used to generate multiple candidate serialization periods, and the coded image data obtained by serializing each sample image in each candidate serialization period is counted to compare the phases of the coded image data.
  • the serialization period is selected and configured as the serialization period used when the encoding method is executed.
  • the serialization period can also be obtained by other broken line algorithms set based on the aforementioned broken line principle, which will not be described in detail here.
  • the serialization period is set based on a bit plane.
  • a serialization period that can be universally applied to each bit plane can be preset.
  • each bit plane uses the same serialization cycle for serialization.
  • different serialization periods are set corresponding to different bit planes.
  • each bit plane corresponds to a serialization period.
  • the bit plane is divided into multiple groups in the order of binary bits, and each group of bit planes corresponds to a serialization period.
  • the bit planes belonging to each subband use the same one or more serialization cycles.
  • the serialization period is set according to the frequency spectrum segment where the subbands are located.
  • each bit plane in each subband corresponds to a serialization period separately.
  • each subband separately divides the bit plane into multiple groups in the order of binary bits, and each group of bit planes individually corresponds to a serialization period.
  • each sub-band is divided into multiple groups according to the spectrum section where the sub-bands are located.
  • Each bit plane in each sub-band can have a one-to-one correspondence with multiple serialization periods, or divide the sub-bands in each group. The bit planes continue to be grouped, and the bit plane groups obtained after multiple groupings have a one-to-one correspondence with multiple serialization periods.
  • the step S130 includes: serializing the bit plane matrix data of the corresponding bit plane according to the serialization period set based on the preset bit plane.
  • an 8-bit binary number is used to represent a color value (b7, b6,..., b1, b0) of a pixel position in the image data as an example.
  • the bit-plane matrix data obtained by the b7-b6 bits can be divided into a group, the bit-plane matrix data obtained by the b5-b2 bits can be divided into a group, and the bit-plane matrix data obtained by the b1-b0 bits can be divided into a group.
  • the encoding device can at least perform the steps of serializing the bit-plane matrix data of the b7-b6 bits according to the preset serialization cycle corresponding to the b7-b6 bits, and according to the preset b5-b2 bits corresponding
  • the serialization cycle is a step of serializing the bit-plane matrix data of the b5-b2 bits.
  • bit-plane matrix data obtained based on each pixel data block Take the bit-plane matrix data obtained based on each pixel data block as an example.
  • the pixel data blocks are distributed in LL3, HL3, LH3, HH3, HL2, LH2, HH2, H1, HL1, and HH1 spectrum sub-bands; among them, the binary data in each pixel data block is divided into 10 bit planes according to the high to low bits, and the corresponding The bit plane matrix data of the 10 bit planes are distributed in each pixel data block.
  • the encoding device can perform at least the bit-plane matrix data of each sub-band: the step of serializing the bit-plane matrix data of the b9-b6 bits according to the preset serialization cycle corresponding to the b9-b6 bits, and the step It is assumed that the serialization period corresponding to the b5-b0 bits is a step of serializing the bit-plane matrix data of the b5-b0 bits.
  • the coding method can be used in combination with the existing serialization processing method.
  • some bit-plane matrix data divided into low frequencies can be serialized according to the existing serialization method, for example,
  • the bit plane matrix data of the pixel data block in the LL3 subband can be processed by Zigzag serialization.
  • the bit-plane matrix data corresponding to the bit-plane located in the lower bits can be processed in a Zigzag serialization manner.
  • the encoding method can also be used in combination with existing encoding methods.
  • bit-plane matrix data divided into low frequencies can be encoded according to the existing encoding methods. For example, for the pixel data block in the LL3 subband, step S130 may not be executed and step S140 may be executed directly. For another example, the bit-plane matrix data corresponding to the bit-plane located in the lower bits (such as bits b1-b0) may not perform step S130 but directly perform step S140.
  • the serialization period of the high-order interval in the binary data bit can be obtained by serializing the matrix with a larger amount of data.
  • the serialization of the low-order interval in the binary data bit The period can be obtained by serializing a matrix with a small amount of data. In other words, the length of the sequence segment described in the serialization period set at a higher position is greater than the length of the sequence segment described in the serialization period set at a lower position.
  • the encoding device executes step S140.
  • the pixel data in the pixel data block LL3 can be sequenced using the existing serialization processing method; or the serialization period T1 can be used for the serialization processing; or the encoding processing can be directly performed.
  • the length of the sequence segment described in the serialization period set for the higher bit plane is greater than that of the lower bit plane.
  • Set the length of the sequence segment described in the serialization period. Take the serialization period shown in Figure 4 and Figure 5, and the bit planes determined by binary bits from low to high, including: bit plane 0, bit plane 1,..., bit plane 9 as examples, including 8*8 matrix
  • the serialization period is configured to serialize the bit-plane matrix data of bit planes 6-9; the serialization period including the 4*4 matrix is configured to serialize the bit-plane matrix data of at least bit planes 2-5.
  • bit-plane 0-1 bit-plane matrix data in the above example can also be directly encoded or sequenced using a serialization cycle containing a 4*4 matrix.
  • existing serialization processing methods include but are not limited to Zigzag polyline processing methods.
  • the step S130 includes: directly serializing the obtained bit-plane matrix data according to a preset serialization period to obtain bit-plane sequence data .
  • this step may perform serialization processing on the bit plane matrix data in the higher bit plane of the acquired image data according to the preset serialization cycle. For example, according to a preset serialization cycle, the bit plane matrix data of each bit plane except bit planes 0 and 1 is serialized.
  • serialization processing is performed on each bit plane matrix data in all bit planes corresponding to the image data according to a preset serialization cycle. For example, according to a preset serialization cycle, the bit-plane matrix data of all bit-planes including 10 bit-planes are serialized.
  • the serialization processing method includes: serializing the corresponding bit-plane matrix data into a plurality of sequence segments according to the serialization period; according to the start data and end data of the sequence segment described in the serialization period , Connect the sequence segments of the corresponding bit plane to obtain the corresponding bit plane sequence data.
  • Figure 6 shows a schematic diagram of serializing bit-plane matrix data (8*16) according to the serialization cycle shown in Figure 4, where the number of rows and columns of the matrix described in the serialization cycle The number is the traversal window.
  • the traversal window is traversed in the bit-plane matrix data, and the matrix data in the traversal window is in the sequence described by the serialization period each time it moves.
  • the serialization rule performs serialization processing to obtain the corresponding sequence segment, which includes the sequence segment described by the arrow (x i-1,0 ,x i-1,1 ,x i,1 ,x i,0 ,...
  • x j, k in FIG. 6 are data at the (j, k)th position in the bit plane matrix data.
  • the direction traversed by the traversal window is related to the row/column of the start data and the end data in the serialization cycle. Therefore, the above-mentioned method of moving the traversal window in the row direction of the bit-plane matrix data It is only an example, not a limitation of this application.
  • the step S130 when processing the bit-plane matrix data after block processing in step S120, includes: based on a preset serialization period, at least part of the bit-plane bit-plane matrix data Each matrix data block is serialized to obtain each sequence data block; and according to the position of each matrix data block in the bit plane matrix data, the sequence data blocks are connected into bit plane sequence data.
  • the number of rows and columns of the matrix described in the serialization cycle is used as the traversal window, and the matrix The number of rows (or the number of columns) is the step size, and each matrix data block is serialized, and the obtained serialized data is called a sequence data block, which will not be described in detail here. Then, according to the preset position sequence of each matrix data block in the bit plane matrix data, and the start data and end data of each sequence data block, the sequence data blocks are connected end to end to obtain the bit plane sequence data.
  • step S140 encoding processing is performed on each of the obtained bit-plane sequence data, and encoded image data of the image data is generated.
  • the encoding process aims to convert each of the bit-plane sequence data into a code stream described by encoding symbols at the cost of a minimum amount of information loss.
  • the encoding processing method is an example of a lossless encoding processing method.
  • the lossless encoding processing method is an entropy encoding method.
  • the step S140 includes using an entropy encoding method to encode each bit plane sequence data.
  • the entropy coding method includes but is not limited to: Shannon coding and Huffman coding.
  • the lossless encoding processing method is an improved encoding method based on entropy coding, for example, an entropy encoding method based on run length is adopted.
  • the encoding process is also based on the adjacent relationship between the divided bit planes, the color type expressed by the image data, the additional information of the original image, etc., to add header information to the code stream.
  • the encoded image data obtained according to the encoding process also includes a file of code streams and header information obtained by encoding multiple channels of image data separately.
  • the step S140 includes: encoding the bit-plane sequence data according to the coding method corresponding to the preset bit-plane.
  • the bit planes divided according to any method in step S130 are correspondingly set with different encoding methods, and the bit plane sequence data is encoded.
  • the bit plane sequence data corresponding to the b9-b2th bit plane is coded according to entropy coding, and other data to be coded is coded according to the byte coding method.
  • the step S140 further includes encoding the corresponding bit-plane sequence data with an encoding unit set based on the serialization period.
  • bit-plane matrix data divided according to the serialization cycle has better cohesion, so according to the code word or byte, the bit-plane sequence data in each serialization cycle is encoded.
  • the sequence segment corresponding to each serialization cycle in the bit-plane sequence data is encoded with a set of 4 bits of binary to obtain a 4-bit encoding
  • the symbol represents a sequence segment to describe the coding symbol of the bit-plane sequence data.
  • the pixel data blocks HL3, LH3, HH3, HL2, LH2, HH2, and HH1 in the upper 4 bit plane sequence data are serialized to obtain
  • the coding symbol composed of 8 bits represents a sequence segment to describe the coding symbol of each bit plane sequence data; and adopts the byte coding method corresponding to the serialization period of the 4*4 matrix, and the bit plane sequence of the lower 6 bits in each pixel data block is used.
  • the data is serialized, and a coding symbol composed of 4 bits is obtained to represent a sequence segment to describe the coding symbol of each bit plane sequence data.
  • Entropy-based coding can be used to encode each bit plane sequence data and pixel data; or, an existing encoding method can be used for encoding.
  • any of the above examples are not mutually exclusive, but can combine multiple examples based on coding requirements to obtain encoded image data.
  • this application uses a serialization cycle to serialize bit-plane matrix data, which is beneficial to improve the cohesion of the original image, especially the cohesion of 4K and above HD images Sex.
  • different serialization cycles are adopted based on the frequency spectrum, which effectively improves the compression rate of the high frequency spectrum segment.
  • the encoded image data encoded by the technical ideas provided by the above encoding method can be transmitted between devices or within devices through transmission media such as data lines and the Internet.
  • the hardware constituting the encoding device encodes the captured original image into corresponding encoded image data under the instruction of the software, and saves it in the storage device.
  • each hardware constituting the decoding device decodes the encoded image data under the instruction scheduling of the software and plays it (or called display).
  • a camera device that can perform the encoding method encodes the captured original image into corresponding encoded image data (such as an encoded file or code stream), and transmits the encoded image data to a server using the Internet or a dedicated network cable,
  • the decoding device provided in the server decodes the encoded image data and plays it (or called display).
  • This application also provides an image decoding method for decoding encoded image data encoded based on the foregoing encoding method.
  • the decoding method is mainly executed by a decoding device.
  • the decoding device may be a terminal device or a server.
  • the terminal equipment includes, but is not limited to, playback equipment, personal electronic terminal equipment, and the like.
  • the playback device includes a storage device, a processing device, and may also include an interface device.
  • the storage device may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
  • the storage device also includes a memory controller, which can control access to the memory by other components of the device, such as a CPU and a peripheral interface.
  • the storage device is used to store at least one program and image data to be decoded.
  • the program stored in the storage device includes an operating system, a communication module (or instruction set), a graphics module (or instruction set), a text input module (or instruction set), and an application (or instruction set).
  • the program in the storage device also includes an instruction set for performing a decoding operation on the image data in time sequence based on the technical solution provided by the decoding method.
  • the processing device includes, but is not limited to: CPU, GPU, FPGA (Field-Programmable Gate Array), ISP (Image Signal Processing image processing chip), or other including at least data stored in a storage device dedicated to processing A program processing chip (such as AI dedicated chip), etc.
  • the processing device calls and executes at least one program stored in the storage device to decode the stored original image or image data in the original image according to the decoding method.
  • the interface device includes, but is not limited to: a data line interface and a network interface; examples of the data line interface include: display interfaces such as VGA interface and HDMI interface, serial interfaces such as USB, and parallel interfaces such as data bus.
  • Examples of network interfaces include at least one of the following: short-range wireless network interfaces such as Bluetooth-based network interfaces and WiFi network interfaces, such as wireless network interfaces of mobile networks based on 3G, 4G, or 5G protocols, such as wired network interfaces that include network cards Wait.
  • the playback device also includes a display device for displaying the decoded image data, wherein the image data is one of multiple channels of image data set based on the color of an original image.
  • the display device at least includes a display screen, a display screen controller, etc., where the display screen includes, for example, a liquid crystal display screen, a curved display screen, a touch screen, and the like.
  • the display screen controller includes, for example, a processor dedicated to the display device, a processor integrated with the processor in the processing device, and the like.
  • the playback device is set up with a traffic command center for decoding and displaying the encoded image data transmitted from the camera device.
  • the playback device is configured on a computer device that is communicatively connected with the minimally invasive medical device, which is connected to the minimally invasive medical device through an optical fiber or other dedicated data line, and connects the current minimally invasive medical device
  • the encoded image data is decoded and played.
  • the playback device is configured in the computer room of the TV forwarding center, and is used to decode and play the encoded image data transmitted by the camera set on the stadium for video editing.
  • the playback device is a set-top box, which is used to decode the code stream in the corresponding TV channel in the TV signal and output it to the TV for display.
  • the electronic terminal equipment for personal use includes desktop computers, notebook computers, tablet computers, and editing equipment dedicated to the production of TV programs, movies, TV series, and the like.
  • the electronic terminal equipment includes a storage device and a processing device. Wherein, the storage device and the processing device may be the same or similar to the corresponding devices in the aforementioned camera equipment, and will not be described in detail here.
  • the electronic terminal equipment may also include a display device for displaying the decoded image data.
  • the hardware and software modules of the electronic terminal may be the same as or similar to the corresponding devices in the aforementioned playback device, and will not be repeated here.
  • the electronic terminal device may further include an image acquisition interface for acquiring encoded image data derived from the encoding.
  • the image acquisition interface may be a network interface, a data line interface, or a program interface.
  • the network interface and the data line interface can be the same or similar to the corresponding devices in the aforementioned playback device, and will not be described in detail here.
  • the processing device of the electronic terminal device downloads encoded image data from the Internet.
  • the processing device of the electronic terminal device obtains the edited file from the storage device.
  • the server includes but is not limited to a single server, a server cluster, a distributed server, a server based on cloud technology, and the like.
  • the server includes a storage device, a processing device, an image acquisition interface, and the like.
  • the storage device and the processing device may be configured in the same physical server device, or be configured in multiple physical server devices according to the division of labor of each physical server device.
  • the image acquisition interface may be a network interface or a data line interface.
  • the storage device, processing device, image acquisition interface, etc. included in the server may be the same as the corresponding devices mentioned in the aforementioned terminal equipment; or specifically set for the server based on the server's throughput, processing capacity, and storage requirements The corresponding devices.
  • the storage device may also include a solid state drive or the like.
  • the processing device may also include a CPU dedicated to a server or the like.
  • the image acquisition interface in the server acquires coded image data and playback instructions from the Internet, and the processing device executes the decoding method described in this application on the acquired encoded image data based on the playback instructions.
  • step S210 the acquired encoded image data is decoded to extract bit-plane sequence data describing multiple bit-planes of the image data.
  • the encoded image data includes the aforementioned encoded file and code stream.
  • the acquired encoded image data is a file in a complete format that is downloaded and stored locally.
  • the acquired encoded image data is a video stream transmitted in real time using a streaming protocol.
  • the encoded image data may contain the following header information: used to describe the encoding method of the encoded image data, the starting data position of the image data obtained by dividing the original image based on color, and the bit plane sequence data in each image data The starting position and so on.
  • the method of performing decoding processing on the acquired encoded image data in this step is the inverse processing of the encoding processing method in the foregoing step S140.
  • the encoding processing manner is a lossless encoding processing manner.
  • the lossless encoding processing method is an entropy encoding method.
  • the step S210 includes adopting an entropy decoding method to de-encode the encoded image data.
  • the entropy decoding method includes, but is not limited to: Shannon decoding and Huffman decoding.
  • the lossless encoding processing method is an improved encoding method based on entropy encoding, for example, an entropy encoding method based on run length is adopted.
  • the step S210 includes adopting an entropy decoding method based on run length to The encoded image data is decoded.
  • the encoding processing method includes: encoding each bit plane sequence data according to the encoding method corresponding to the preset frequency spectrum segment.
  • different decoding modes are set correspondingly based on the bit plane, and the encoded image file is decoded.
  • the bit plane sequence data corresponding to the b9-b2th bit plane is decoded according to the decoding scheme corresponding to the entropy encoding, and other data to be decoded is encoded and decoded according to the decoding method corresponding to the byte encoding.
  • the encoding processing method further includes encoding the corresponding bit-plane sequence data with an encoding unit set based on the serialization period.
  • the step S210 includes: setting a decoding unit based on the serialization period to decode the encoded bit plane sequence data in the encoded image data.
  • each encoded bit-plane sequence data is decoded according to words or bytes.
  • the sequence segment corresponding to each serialization cycle in the encoded bit-plane sequence data is represented by a set of 4bit encoding symbols, and then according to the encoding symbols
  • the corresponding 4-bit set of binary data is decoded to obtain the bit-plane sequence data represented by four sets of 4-bit binary data and described by multiple sequence sections.
  • different decoding units are set. For example, using an 8*8 matrix serialization cycle T1 corresponding word encoding method to decode the encoded bit-plane sequence data of the upper 6-bit bit-plane to obtain a sequence segment represented by 4 groups of 8-bit binary data, and The above-mentioned bit-plane sequence data described by multiple sequence segments; and using the corresponding word encoding method of the serialization period T2 containing a 4*4 matrix, the coded bit-plane sequence data of the lower 4 bit-planes is decoded to obtain a 4 A group of 4bit binary data represents a sequence segment, and the above-mentioned bit plane sequence data described by multiple sequence segments.
  • bit plane sequence data corresponding to low data bit planes such as b1 and b0 bit planes
  • decoding methods for each pixel data of pixel data blocks corresponding to low frequency spectrum subbands such as LL3 subband
  • the encoded bit plane sequence data and pixel data can be decoded by a decoding scheme based on entropy coding; or, the existing decoding method corresponding to the encoding method can be used for the decoding processing.
  • any of the above examples are not mutually exclusive, but can be decoded based on a decoding rule set correspondingly including an encoding rule set using a serialization period to obtain multiple bit-plane sequence data.
  • step S220 the plane sequence data of the multiple bit planes will be matrixed.
  • the corresponding bit plane serialized data is selected to execute the following step S220.
  • step S220 based on a preset serialization period, the bit-plane sequence data of the corresponding bit-plane is converted into bit-plane matrix data; wherein, the serialization period is to convert the preset m*n matrix according to the sequence of adjacent data
  • the serialization period is consistent with the serialization period mentioned in the foregoing encoding method, and will not be described in detail here.
  • the serialization period is set based on a bit plane.
  • each plane sequence data is converted into bit-plane matrix data according to the serialization cycle.
  • the serialization cycle of the matrix converts the bit-plane sequence data of bit planes 6-9 into corresponding bit-plane matrix data; the serialization cycle containing the 4*4 matrix converts the bit-plane sequence data of bit planes 2-5 into the corresponding bit planes. Plane matrix data.
  • bit-plane 0-1 bit-plane matrix data in the above example can also be converted directly according to the matrix information provided in the packet header to obtain the bit-plane matrix after decoding.
  • bit-plane 0-1 bit-plane matrix data in the above example can also be converted directly according to the matrix information provided in the packet header to obtain the bit-plane matrix after decoding.
  • the existing conversion processing methods include, but are not limited to, Zigzag polyline processing methods.
  • the step S220 includes: directly performing the conversion processing on the obtained bit-plane sequence data according to the preset serialization period , To get the bit plane matrix data.
  • the step S220 includes: directly performing the conversion processing on the obtained bit-plane sequence data according to the preset serialization period , To get the bit plane matrix data.
  • this step can convert the acquired bit-plane sequence data in the higher bit plane according to the preset serialization cycle; or, in this step, the bit-plane sequence data in all bit planes can be converted according to The preset serialization cycle performs conversion processing.
  • the conversion processing method includes: serializing the corresponding bit-plane sequence data into a plurality of sequence segments according to the serialization period; according to the start data and end data of the sequence segment described in the serialization period, Convert each sequence segment of the corresponding bit plane into a matrix form, and merge the data in each matrix form into bit plane matrix data according to the position of each sequence segment in the plane sequence data.
  • bit-plane sequence data is divided by the length of the sequence segment described in the serialization cycle, and each segment of the segmented sequence is converted according to the matrix form described in the serialization cycle to obtain 4 *4 Data in matrix form.
  • the data in the form of each matrix is merged into bit-plane matrix data.
  • x j, k in FIG. 4 is the data at the (j, k)th position in the bit plane matrix data.
  • the position of adjacent sequence segments in the bit-plane matrix data is related to the row/column of the matrix where the start data and the end data of the serialization period are located.
  • the way to merge the directions is only an example, not a limitation of the application.
  • the decoded image data is obtained by performing step S230 on the obtained bit-plane matrix data.
  • the step S220 includes: block the bit-plane sequence data of the corresponding bit-plane to obtain multiple sequences Data block; based on a preset serialization cycle, convert each sequence data block of the corresponding bit plane into a matrix data block; and based on the position of each sequence data block in the corresponding bit plane sequence data, merge each of the blocks into Bit plane matrix data.
  • the extracted bit-plane sequence data is composed of a plurality of sequence data blocks, and the decoding device converts each sequence data block into a matrix data block according to the conversion method provided in the above example, wherein The conversion method is the same as or similar to the conversion method in any of the aforementioned examples, and will not be described in detail here.
  • the sequence and position of the sequence data blocks in the same bit-plane sequence data the corresponding matrix data blocks are merged into bit-plane matrix data, and step S230 is executed.
  • step S230 according to the binary data bits of each bit plane, all the obtained bit-plane matrix data are merged into the described image data.
  • bit plane matrix data is correspondingly filled in to obtain the image data.
  • the image data provided based on any of the above examples can be that the acquired original image is divided into one of the multiple channels of image data according to color, and the multiple channels of image data corresponding to the same original image are combined according to the decoding header information, etc., Obtain the decoded original image, and output the original image to the display screen, which is the image content displayed on the display screen.
  • an image transmission system is composed of at least the encoding equipment and decoding equipment.
  • FIG. 8 shows a schematic structural diagram of an image transmission system in an embodiment.
  • the encoding device can be configured in a computer device used to produce a TV program, and the original image (such as the main frame image) in the original video of the TV program is encoded based on the foregoing encoding method. And through the video coding technology to make the encoded image data into a video file.
  • the video file can be transmitted to the decoding device via the Internet, a dedicated channel for television signals, and the like.
  • the decoding device may be configured in a set-top box or a TV set for playing television programs, and the decoding device decodes the received video file based on a decoding method set corresponding to the encoding method, and decodes the original image after the decoding method.
  • the video is displayed on the TV screen.
  • the television can be regarded as a specific example of a playback device.
  • the image transmission system shown in FIG. 8 may include an encoding device and a playback device.
  • the encoding device shown in FIG. 8 can be implemented by a camera device, and the decoding device can be implemented by a playback device including a display screen.
  • the encoding device can be configured in a camera device for producing and acquiring road monitoring images, and each original image captured is encoded according to the above-mentioned encoding method to obtain an image code Stream, the image code stream can be transmitted to the playback device via the Internet, a specially constructed data line (such as optical fiber, etc.).
  • the playback device can be configured in a computer room for monitoring roads, and is equipped with at least one display screen.
  • the playback device obtains the image code stream provided by the designated camera device based on the user's operation, decodes the received image code stream according to the decoding method set corresponding to the encoding method, and displays the decoded original image on the display On the screen.
  • the unplayed graphics stream will be saved in the form of video files, and when you need to read them, the saved video files will be decoded, and the decoded original images will be displayed on the decoding device one by one.
  • the image transmission device shown in FIG. 8 may also include a camera device and a decoding device. I will not give examples one by one here.
  • this application also provides an image transmission system. Please refer to FIG. 9 which shows a schematic structural diagram of the image transmission system in another embodiment.
  • the encoding equipment and decoding equipment included in the image transmission system may at least partially share hardware devices. Examples of the image transmission system are a recording and playback camera, an electronic terminal including a display screen, and the like.
  • the image transmission system includes an image acquisition interface, a storage device, and a processing device.
  • the image acquisition interface may include a network interface, a data line interface, or a program interface.
  • the processing device executes the encoding operation by calling the program stored in the storage device to encode the acquired original image into encoded image data, And stored in the storage device.
  • the processing device executes the decoding operation by calling the program in the storage device, and displays the original image obtained after decoding on the display screen.
  • the encoding and decoding operations in the image transmission system can be performed based on the corresponding methods provided in this application, and will not be repeated here.
  • this application can be implemented by means of software in combination with a necessary general hardware platform. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on this understanding, this application also provides a computer-readable storage medium that stores at least one program that, when executed, implements any of the foregoing encoding methods or decoding methods, such as The foregoing corresponds to the method described in FIG. 1 or FIG. 7.
  • the technical solution of the present application essentially or the part that contributes to the prior art can be embodied in the form of a software product.
  • the computer software product can include one or more machine executable instructions stored thereon.
  • a machine-readable medium when these instructions are executed by one or more machines, such as a computer, a computer network, or other electronic devices, can cause the one or more machines to perform operations according to the embodiments of the present application. For example, the steps in the encoding method or the decoding method.
  • Machine-readable media may include, but are not limited to, floppy disks, optical disks, CD-ROM (compact disk-read only memory), magneto-optical disks, ROM (read only memory), RAM (random access memory), EPROM (erasable Except programmable read-only memory), EEPROM (electrically erasable programmable read-only memory), magnetic or optical cards, flash memory, or other types of media/machine-readable media suitable for storing machine-executable instructions.
  • any connection is properly termed a computer-readable medium.
  • the instruction is sent from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology such as infrared, radio, and microwave
  • coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave
  • computer readable and writable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are intended for non-transitory, tangible storage media.
  • the magnetic disks and optical disks used in the application include compact disks (CD), laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks.
  • CD compact disks
  • laser disks optical disks
  • DVD digital versatile disks
  • floppy disks floppy disks
  • Blu-ray disks disks usually copy data magnetically
  • optical disks use lasers for optical Copy data locally.
  • the size of the sequence numbers of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, rather than corresponding to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.

Abstract

The present application provides an image encoding method and decoding method, and a device and a system to which said methods are applicable. Said encoding method comprises: dividing acquired image data into a plurality of bit plane matrix data according to binary data bits; performing serialization processing on bit plane matrix data of at least a part of bit planes on the basis of a preset serialization period to obtain bit plane serialized data, the serialization period being a period set by serializing a preset m*n matrix according to neighboring data; and encoding the obtained bit plane serialized data, and generating encoded image data of the image data. The present application uses a serialization period to implement serialization processing on bit plane matrix data, and is beneficial in improving the cohesiveness of an original image, particularly the cohesiveness of high definition images of 4K or more.

Description

图像的编码方法、解码方法及所适用的设备、系统Image coding method, decoding method and applicable equipment and system 技术领域Technical field
本申请涉及图像处理技术领域,特别是涉及一种图像的编码方法、解码方法及所适用的设备、系统。This application relates to the field of image processing technology, and in particular to an image encoding method, decoding method, and applicable equipment and systems.
背景技术Background technique
高清图像具有广泛应用,如城市安防、医疗影像、赛事转播等方面。为此,前端设备,如红外摄像机、阵列式摄像机等,通常配置能够摄取4K甚至4K以上的镜头、图像芯片等。然而,前端设备所获取的高清视频文件由于数据量巨大,对数据保存和网络传输提出了挑战。为此,前端设备通常采用图像编码方式对所获取的高清图像进行编码压缩,以希望降低原始图像数据的数据量。High-definition images have a wide range of applications, such as urban security, medical imaging, and event broadcasting. For this reason, front-end equipment, such as infrared cameras, array cameras, etc., are usually equipped with lenses and image chips that can capture 4K or even above 4K. However, high-definition video files acquired by front-end equipment pose a challenge to data storage and network transmission due to the huge amount of data. For this reason, the front-end equipment usually uses an image encoding method to encode and compress the acquired high-definition images, in the hope of reducing the data volume of the original image data.
然而,现有的图像编码标准,如H.264等,均为有损压缩,这使得既希望获取高清图像又为了传输和保存不得不损失高清图像中的部分信息成为一对矛盾需求。However, the existing image coding standards, such as H.264, etc., are all lossy compression, which makes it a pair of contradictory requirements that both want to obtain high-definition images and have to lose part of the high-definition images for transmission and storage.
发明内容Summary of the invention
鉴于以上所述现有技术的缺点,本申请的目的在于提供一种图像的编码方法、解码方法及所适用的设备、系统,用于解决现有技术中高清图像的数据量巨大而不便于保存和传输的问题。In view of the above-mentioned shortcomings of the prior art, the purpose of this application is to provide an image encoding method, decoding method, and applicable equipment and systems, which are used to solve the problem of the large amount of high-definition image data in the prior art that is difficult to save. And transmission problems.
为实现上述目的及其他相关目的,本申请的第一方面提供一种图像的编码方法,其包括:将所获取的图像数据按照二进制数据位分成多个位平面矩阵数据;基于预设的序列化周期,将至少部分位平面的位平面矩阵数据进行序列化处理,以得到位平面序列数据;其中,所述序列化周期是将预设m*n矩阵依据相邻数据的序列化而设置的周期;将所得到的各所述位平面序列数据进行编码处理,并生成所述图像数据的编码图像数据。In order to achieve the above and other related purposes, the first aspect of this application provides an image encoding method, which includes: dividing the acquired image data into multiple bit-plane matrix data according to binary data bits; and based on preset serialization Cycle, serialize at least part of the bit-plane matrix data of the bit-plane to obtain bit-plane sequence data; wherein, the serialization cycle is a cycle set by the preset m*n matrix according to the serialization of adjacent data ; Perform encoding processing on each of the obtained bit-plane sequence data, and generate encoded image data of the image data.
在第一方面的某些实施方式中,所述将所获取的图像数据按照二进制数据位分成多个位平面矩阵数据的步骤包括:将所获取的图像数据进行频域转换,并按照预设二进制数据位将转换后的频域图像数据分成多个位平面矩阵数据。In some implementation manners of the first aspect, the step of dividing the acquired image data into a plurality of bit-plane matrix data according to binary data bits includes: performing frequency domain conversion on the acquired image data, and according to a preset binary The data bits divide the converted frequency domain image data into multiple bit plane matrix data.
在第一方面的某些实施方式中,所述编码方法还包括按照颜色将所获取的原始图像分成多路图像数据的步骤;以便对每路所述图像数据进行频域转换处理的步骤。In some implementations of the first aspect, the encoding method further includes a step of dividing the acquired original image into multiple channels of image data according to colors; so as to perform frequency domain conversion processing on each channel of the image data.
在第一方面的某些实施方式中,所述编码方法还包括将所得到的位平面矩阵数据进行分块处理的步骤;对应地,所述基于预设的序列化周期,将至少部分位平面的位平面矩阵数据 进行序列化处理的步骤包括:基于预设的序列化周期,将至少部分位平面的位平面矩阵数据中的各矩阵数据块进行序列化处理,以得到各序列数据块;以及按照各矩阵数据块在位平面矩阵数据中的位置,将各序列数据块连接成位平面序列数据。In some implementations of the first aspect, the encoding method further includes a step of performing block processing on the obtained bit-plane matrix data; correspondingly, based on the preset serialization period, at least part of the bit-plane The step of serializing the bit-plane matrix data of the bit-plane includes: serializing each matrix data block in the bit-plane matrix data of at least part of the bit-plane based on a preset serialization cycle to obtain each serial data block; and According to the position of each matrix data block in the bit plane matrix data, the sequence data blocks are connected into bit plane sequence data.
在第一方面的某些实施方式中,所述基于预设的序列化周期,将所得到的至少部分位平面矩阵数据进行序列化处理的步骤包括:按照基于预设的位平面而设置的序列化周期,将对应位平面的位平面矩阵数据进行序列化处理。In some implementation manners of the first aspect, the step of serializing at least part of the obtained bit-plane matrix data based on a preset serialization period includes: following a sequence set based on the preset bit-plane In the conversion cycle, the bit-plane matrix data of the corresponding bit-plane is serialized.
在第一方面的某些实施方式中,所述基于预设的位平面而设置的序列化周期的数量为多个,对应较高位的位平面而设置的序列化周期中所描述的序列段的长度大于对应较低位的位平面而设置的序列化周期中所描述的序列段的长度。In some implementation manners of the first aspect, the number of serialization periods set based on a preset bit plane is multiple, and the number of the sequence segments described in the serialization period set corresponding to a higher bit plane The length is greater than the length of the sequence segment described in the serialization period set corresponding to the lower bit plane.
在第一方面的某些实施方式中,所述基于预设的序列化周期,将所得到的至少部分位平面矩阵数据进行序列化处理的步骤包括:按照所述序列化周期,将相应位平面矩阵数据序列化成多个序列段;按照所述序列化周期所描述的序列段的起始数据和结束数据,将相应位平面的各序列段予以衔接,以得到相应位平面序列数据。In some implementation manners of the first aspect, the step of serializing at least part of the obtained bit-plane matrix data based on a preset serialization period includes: according to the serialization period, the corresponding bit-plane The matrix data is serialized into a plurality of sequence segments; according to the start data and the end data of the sequence segment described in the serialization period, the sequence segments of the corresponding bit planes are connected to obtain the corresponding bit plane sequence data.
在第一方面的某些实施方式中,所述将各位平面序列数据进行编码处理的步骤包括:按照预设的各位平面所对应的编码方式,将各位平面序列数据进行编码处理。In some implementation manners of the first aspect, the step of encoding each bit plane sequence data includes: performing encoding processing on each bit plane sequence data according to a preset encoding method corresponding to each bit plane.
在第一方面的某些实施方式中,所述将各位平面序列数据进行编码处理的步骤包括:以基于所述序列化周期而设置的编码单元,将相应位平面序列数据进行编码处理。In some implementations of the first aspect, the step of encoding each bit-plane sequence data includes: encoding the corresponding bit-plane sequence data with a coding unit set based on the serialization period.
在第一方面的某些实施方式中,所述将各位平面序列数据进行编码处理的步骤包括:采用熵编码方式,将各位平面序列数据进行编码处理。In some implementation manners of the first aspect, the step of encoding each bit plane sequence data includes: using an entropy coding method to encode each bit plane sequence data.
在第一方面的某些实施方式中,所述频域转换的方式包括小波变换。In some embodiments of the first aspect, the frequency domain conversion method includes wavelet transform.
在第一方面的某些实施方式中,所述序列化周期为基于希尔伯特折线算法得到的。In some implementations of the first aspect, the serialization period is obtained based on the Hilbert polyline algorithm.
在第一方面的某些实施方式中,所述图像数据包括4K及4K以上的图像数据。In some embodiments of the first aspect, the image data includes 4K and above image data.
本申请第二方面提供一种图像的解码方法,包括:将所获取的编码图像数据进行解码,以提取用于描述图像数据多个位平面的位平面序列数据;基于预设的序列化周期,将相应位平面的位平面序列数据转换成位平面矩阵数据;其中,所述序列化周期是将预设m*n矩阵依据相邻数据的序列化而设置的周期;按照各位平面所在二进制数据位,将所得到的所有位平面矩阵数据合并成所描述的图像数据。A second aspect of the present application provides an image decoding method, including: decoding the acquired encoded image data to extract bit-plane sequence data used to describe multiple bit-planes of the image data; based on a preset serialization period, Convert the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data; wherein, the serialization period is a period set by the preset m*n matrix according to the serialization of adjacent data; according to the binary data bits of each bit plane , Merge all the obtained bit-plane matrix data into the described image data.
在第二方面的某些实施方式中,所述解码方法还包括:按照颜色将所得到的多路图像数据合并成一幅原始图像。In some implementation manners of the second aspect, the decoding method further includes: combining the obtained multiple image data into an original image according to colors.
在第二方面的某些实施方式中,所述将所获取的编码图像数据进行解码的步骤包括:基于所述序列化周期而设置编码单元,将编码图像数据中已编码的各位平面序列数据进行解码 处理。In some implementation manners of the second aspect, the step of decoding the acquired encoded image data includes: setting an encoding unit based on the serialization period, and processing the encoded bit plane sequence data in the encoded image data Decoding processing.
在第二方面的某些实施方式中,所述将所获取的编码图像数据进行解码的步骤包括:采用熵解码方式,将所获取的编码图像数据进行解码处理。In some implementation manners of the second aspect, the step of decoding the acquired encoded image data includes: using an entropy decoding method to decode the acquired encoded image data.
在第二方面的某些实施方式中,所述基于预设的序列化周期,将相应位平面的位平面序列数据转换成位平面矩阵数据的步骤包括:将相应位平面的位平面序列数据进行分块处理,以得到多个序列数据块;基于预设的序列化周期,将相应位平面的各序列数据块转换成矩阵数据块;基于各序列数据块在相应位平面序列数据中的位置,将各所述分块合并成位平面矩阵数据。In some implementation manners of the second aspect, the step of converting the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period includes: performing bit-plane sequence data of the corresponding bit-plane Block processing to obtain multiple sequence data blocks; based on the preset serialization cycle, convert each sequence data block of the corresponding bit plane into a matrix data block; based on the position of each sequence data block in the corresponding bit plane sequence data, Combine the blocks into bit-plane matrix data.
在第二方面的某些实施方式中,所述基于预设的序列化周期,将相应位平面的位平面序列数据转换成位平面矩阵数据的步骤包括:按照基于预设位平面而设置的序列化周期,将对应位平面的位平面序列数据转换成位平面矩阵数据。In some implementations of the second aspect, the step of converting the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period includes: according to a sequence set based on the preset bit-plane The conversion cycle converts the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data.
在第二方面的某些实施方式中,所述基于预设位平面而设置的序列化周期的数量为多个,对应较高位的位平面而设置的序列化周期中所描述的序列段的长度大于对应较低位的位平面而设置的序列化周期中所描述的序列段的长度。In some implementations of the second aspect, the number of serialization periods set based on the preset bit plane is multiple, and the length of the sequence segment described in the serialization period set corresponding to the higher bit plane It is greater than the length of the sequence segment described in the serialization period set corresponding to the lower bit plane.
在第二方面的某些实施方式中,所述基于预设的序列化周期,将相应位平面的位平面序列数据转换成位平面矩阵数据的步骤包括:按照所述序列化周期,将相应位平面序列数据序列化成多个序列段;按照所述序列化周期所描述的序列段的起始数据和结束数据,将相应位平面的各序列段转换成矩阵形式,以及将各矩阵形式的数据合并成位平面矩阵数据。In some implementation manners of the second aspect, the step of converting the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period includes: according to the serialization period, converting the corresponding bit-plane The plane sequence data is serialized into multiple sequence segments; according to the start data and end data of the sequence segment described in the serialization cycle, each sequence segment of the corresponding bit plane is converted into a matrix form, and the data in each matrix form is merged Into bit plane matrix data.
在第二方面的某些实施方式中,所述将所获取的编码图像数据进行解码的步骤包括:按照预设的位平面所对应的解码方式,将编码图像数据中已编码的各位平面序列数据进行解码处理。In some implementation manners of the second aspect, the step of decoding the acquired coded image data includes: according to a decoding method corresponding to a preset bit plane, the coded bit plane sequence data in the coded image data Perform decoding processing.
在第二方面的某些实施方式中,所述按照各位平面所在二进制数据位,将所得到的所有位平面矩阵数据合并成所描述的图像数据的步骤包括:按照各位平面所在二进制数据位,将所得到的所有位平面矩阵数据进行频域反变换,得到所描述的图像数据。In some implementation manners of the second aspect, the step of combining all the obtained bit-plane matrix data into the described image data according to the binary data bits of each bit plane includes: according to the binary data bits of each bit plane, combining All the obtained bit-plane matrix data undergoes frequency domain inverse transformation to obtain the described image data.
在第二方面的某些实施方式中,所述频域反转换的方式包括小波变换的反变换。In some embodiments of the second aspect, the frequency domain inverse transformation method includes wavelet transform inverse transformation.
在第二方面的某些实施方式中,所述序列化周期为基于希尔伯特折线算法配置得到的。In some embodiments of the second aspect, the serialization period is configured based on the Hilbert polyline algorithm.
在第二方面的某些实施方式中,解码后得到的图像数据包括8K图像数据。In some embodiments of the second aspect, the image data obtained after decoding includes 8K image data.
本申请第三方面提供一种图像的编码设备,包括:图像获取接口,用于获取所述图像数据;存储装置,用于存储至少一个程序和待编码的图像数据;处理装置,用于调用并执行所述程序,以按照如第一方面中任一所述的图像编码方法将所述图像数据进行编码处理。A third aspect of the present application provides an image encoding device, including: an image acquisition interface for acquiring the image data; a storage device for storing at least one program and image data to be encoded; and a processing device for calling and The program is executed to perform encoding processing on the image data according to the image encoding method described in any one of the first aspect.
本申请第四方面提供一种摄像设备,包括:摄取装置,用于获取原始图像,其中,所述 原始图像是由基于颜色而设置的多路图像数据组成的;存储装置,用于存储至少一个程序和待编码的图像数据;处理装置,用于调用并执行所述程序,以按照如第一方面中任一所述的图像编码方法将所述图像数据进行编码处理。A fourth aspect of the present application provides a camera device, including: a capturing device for acquiring an original image, wherein the original image is composed of multiple image data set based on color; and a storage device for storing at least one A program and image data to be encoded; a processing device for calling and executing the program to perform encoding processing on the image data according to the image encoding method according to any one of the first aspects.
本申请第五方面提供一种图像的解码设备,包括:存储装置,用于存储至少一个程序和待解码的编码图像数据;处理装置,用于调用并执行所述程序,以按照如第二方面中任一所述的图像解码方法将所述编码图像数据进行解码处理以得到可被显示的图像数据。A fifth aspect of the present application provides an image decoding device, which includes: a storage device for storing at least one program and encoded image data to be decoded; a processing device for calling and executing the program to perform as described in the second aspect The image decoding method described in any one of the image decoding methods decodes the encoded image data to obtain image data that can be displayed.
本申请第六方面提供一种图像的播放设备,包括:存储装置,用于存储至少一个程序和待解码的编码图像数据;处理装置,用于调用并执行所述程序,以按照如第二方面中任一所述的图像解码方法将所述编码图像数据进行解码处理;接口装置,用于将解码的图像数据传输给所连接的显示屏。A sixth aspect of the present application provides an image playback device, including: a storage device for storing at least one program and encoded image data to be decoded; and a processing device for calling and executing the program to perform as described in the second aspect The image decoding method described in any one of the image decoding methods decodes the encoded image data; the interface device is used to transmit the decoded image data to the connected display screen.
本申请第七方面提供一种图像传输系统,包括:图像获取接口,用于获取所述图像数据;存储装置,用于存储至少一个程序、待编码的图像数据和待解码的编码图像数据;处理装置,用于调用并执行所述程序,以按照如第一方面中任一所述的图像的编码方法将所述图像数据进行编码处理;和/或按照如第二方面中任一所述的图像解码方法将所述编码图像数据进行编码处理。A seventh aspect of the present application provides an image transmission system, including: an image acquisition interface for acquiring the image data; a storage device for storing at least one program, image data to be encoded, and encoded image data to be decoded; processing A device for calling and executing the program to perform encoding processing on the image data according to the image encoding method as described in any one of the first aspect; and/or according to any one of the second aspect The image decoding method performs encoding processing on the encoded image data.
本申请第八方面提供一种图像传输系统,包括:如权第三方面所示的图像的编码设备、或如第四方面所示的摄像设备;以及如第五方面所示的解码设备、或如第六方面所示的播放设备。An eighth aspect of the present application provides an image transmission system, including: the image encoding device as shown in the third aspect, or the imaging device as shown in the fourth aspect; and the decoding device as shown in the fifth aspect, or The playback device shown in the sixth aspect.
本申请第九方面提供一种计算机存储介质,其特征在于,包括:存储有至少一程序;所述至少一程序在被调用时执行如第一方面中任一所述的图像的编码方法;或者,所述至少一程序在被调用时执行如第二方面中任一所述的解码方法。A ninth aspect of the present application provides a computer storage medium, which is characterized by including: storing at least one program; when called, the at least one program executes the image encoding method according to any one of the first aspects; or , When the at least one program is called, the decoding method as described in any one of the second aspect is executed.
如上所述,本申请的图像的编码方法、解码方法及所适用的设备、系统,具有以下有益效果:本申请采用序列化周期来实现对位平面矩阵数据进行序列化处理,有利于提高原始图像的内聚性,特别是4K及4K以上的高清图像的内聚性。另外,基于二进制数据位采用不同的序列化周期,有效提高图像的压缩率。As mentioned above, the image encoding method, decoding method, and applicable equipment and system of this application have the following beneficial effects: this application uses a serialization period to implement serialization of bit-plane matrix data, which is beneficial to improve the original image The cohesion, especially the cohesion of high-definition images of 4K and above. In addition, the use of different serialization cycles based on binary data bits effectively improves the image compression rate.
附图说明Description of the drawings
图1显示为本申请编码方法在一实施方式中的流程图。Figure 1 shows a flowchart of an embodiment of the coding method of this application.
图2显示为本申请按照颜色而划分的一路图像数据的位平面示意图。FIG. 2 shows a schematic diagram of a bit plane of a channel of image data divided by color in this application.
图3显示为本申请图像数据经三级小波变换后的频谱分布示意图。Figure 3 shows a schematic diagram of the spectrum distribution of the image data of this application after three-level wavelet transformation.
图4显示为本申请中以4*4矩阵的序列化规则为序列化周期的示意图。FIG. 4 shows a schematic diagram of the serialization rule of the 4*4 matrix in this application as the serialization cycle.
图5显示为本申请中以8*8矩阵的序列化规则为序列化周期的示意图。FIG. 5 shows a schematic diagram of the serialization rule of the 8*8 matrix in this application as the serialization cycle.
图6显示为按照图4所示的序列化周期将位平面矩阵数据(8*16)进行序列化处理的示意图。FIG. 6 shows a schematic diagram of serializing bit-plane matrix data (8*16) according to the serialization cycle shown in FIG. 4.
图7显示为本申请解码方法在一实施方式中的流程图。FIG. 7 shows a flowchart of an embodiment of the decoding method of this application.
图8显示为本申请图像传输系统在一实施方式中的结构示意图。FIG. 8 shows a schematic structural diagram of an image transmission system of this application in an embodiment.
图9显示为本申请图像传输系统在又一实施方式中的结构示意图。FIG. 9 shows a schematic diagram of the structure of the image transmission system of this application in another embodiment.
具体实施方式detailed description
以下由特定的具体实施例说明本申请的实施方式,熟悉此技术的人士可由本说明书所揭露的内容轻易地了解本申请的其他优点及功效。The following specific examples illustrate the implementation of this application. Those familiar with this technology can easily understand other advantages and effects of this application from the content disclosed in this specification.
如同在本文中所使用的,单数形式“一”、“一个”和“该”旨在也包括复数形式,除非上下文中有相反的指示。应当进一步理解,术语“包含”、“包括”表明存在所述的特征、步骤、操作、元件、组件、项目、种类、和/或组,但不排除一个或多个其他特征、步骤、操作、元件、组件、项目、种类、和/或组的存在、出现或添加。此处使用的术语“或”和“和/或”被解释为包括性的,或意味着任一个或任何组合。因此,“A、B或C”或者“A、B和/或C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A、B和C”。仅当元件、功能、步骤或操作的组合在某些方式下内在地互相排斥时,才会出现该定义的例外。As used herein, the singular forms "a", "an" and "the" are intended to also include the plural forms, unless the context dictates to the contrary. It should be further understood that the terms "comprising" and "including" indicate the existence of the described features, steps, operations, elements, components, items, types, and/or groups, but do not exclude one or more other features, steps, operations, The existence, appearance or addition of elements, components, items, categories, and/or groups. The terms "or" and "and/or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and/or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C" . An exception to this definition will only occur when the combination of elements, functions, steps or operations is inherently mutually exclusive in some way.
既希望获取高清图像又采用有损压缩来保存和传输高清图像的矛盾需求促使人们在图像的无损编码方面进行深入研究。在一些实际应用中,针对标清图像的无损压缩可采用香农信息熵计算处理的方式,其压缩效率取决于图像中各信息出现的概率分布。因此,对于高清图像中包含丰富细节的情况,其压缩效率不尽如人意。The contradictory demands of obtaining high-definition images and using lossy compression to save and transmit high-definition images have prompted people to conduct in-depth research on lossless encoding of images. In some practical applications, the Shannon information entropy calculation method can be used for lossless compression of SD images, and the compression efficiency depends on the probability distribution of each information in the image. Therefore, for high-definition images containing rich details, the compression efficiency is not satisfactory.
为此,本申请提供一种图像的编码方法,其旨在达到即保留尽可能多的图像信息又有效减少图像的数据量的编码目的。所述编码方法主要通过按照图像数据中的二进制数据位对图像数据进行重新序列化处理,并将序列化处理后的序列化数据进行编码,利用内聚性更好的序列化方式实现图像信息集中化,由此达到上述目的。其中,所述图像数据可来自于原始图像。其中:所述原始图像包括但不限于:高清图像(如2K图像)、标清图像(如720*576图像)、超高清图像(如4K图像或8K图像)、以及已被压缩处理并解压缩后的图像等。例如,所述原始图像为来源于高清摄像机所摄取的原始视频中的高清图像。又如,所述原始图像为藉由专用数据通道传输得到的高清图像。再如,所述原始图像为来源于互联网且需要被重新编码的图像。其中,所述图像数据可以是原始图像,或者所述图像数据为按照颜色将原始图像分成多路而得到的。例如,按照RGB将原始图像分成三路图像数据,利用所述编码方 法对每路图像数据进行编码处理。又如,按照YUN将原始图像分成三路图像数据,利用所述编码方法对每路图像数据进行编码处理。To this end, the present application provides an image encoding method, which aims to achieve the encoding purpose of not only retaining as much image information as possible, but also effectively reducing the amount of image data. The encoding method mainly re-serializes the image data according to the binary data bits in the image data, and encodes the serialized data after the serialization processing, and realizes the image information concentration by using a more cohesive serialization method To achieve the above purpose. Wherein, the image data may come from the original image. Wherein: the original image includes but is not limited to: high-definition images (such as 2K images), standard-definition images (such as 720*576 images), ultra-high-definition images (such as 4K images or 8K images), and compressed and decompressed Images etc. For example, the original image is a high-definition image from an original video captured by a high-definition camera. For another example, the original image is a high-definition image transmitted through a dedicated data channel. For another example, the original image is an image that comes from the Internet and needs to be re-encoded. Wherein, the image data may be an original image, or the image data is obtained by dividing the original image into multiple paths according to colors. For example, the original image is divided into three channels of image data according to RGB, and each channel of image data is encoded using the encoding method. For another example, the original image is divided into three channels of image data according to YUN, and each channel of image data is encoded using the encoding method.
所述编码方法主要由图像的编码设备来执行。其中,所述编码设备可以为一种终端设备、或者服务器。The encoding method is mainly executed by an image encoding device. Wherein, the encoding device may be a terminal device or a server.
其中,所述终端设备包括但不限于摄像设备、个人使用的电子终端设备等。其中所述摄像设备包括摄像装置、存储装置、处理装置,还可以包含接口装置等。其中,所述摄像装置用于获取原始图像,其中,所述原始图像是由基于颜色而设置的多路图像数据组成的。所述摄像装置至少包含由透镜组构成的镜头、光感器件等,其中光感器件举例包含CCD器件、CMOS器件等。所述存储装置可包括高速随机存取存储器,并且还可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。所述存储装置还包括存储器控制器,其可控制设备的诸如CPU和外设接口之类的其他组件对存储器的访问。所述存储装置用于存储至少一个程序和待编码的图像数据。存储在存储装置中的程序包括操作系统、通信模块(或指令集)、图形模块(或指令集)、文本输入模块(或指令集)、以及应用(或指令集)。所述存储装置中的程序还包括基于所述编码方法所提供的技术方案而依时序对图像数据执行编码操作的指令集。所述处理装置13包括但不限于:CPU、GPU、FPGA(Field-Programmable Gate Array现场可编程门阵列)、ISP(Image Signal Processing图像处理芯片)、或者其他包含专用于处理存储装置中所存储的至少一个程序的处理芯片(如AI专用芯片)等。所述处理装置调用并执行存储装置中所存储的至少一个程序,以按照所述编码方法对所保存的原始图像或原始图像中的图像数据进行编码处理。其中,利用如FPGA等可并行处理矩阵数据的处理装置更适合高效、实时对所获取的图像数据进行编码处理。所述接口装置包括但不限于:数据线接口和网络接口;其中,数据线接口举例包括以下至少一种:如USB等串行接口、如总线接口能够并行接口等。网络接口举例包括以下至少一种:如基于蓝牙协议的网络接口、WiFi网络接口等短距离无线网络接口,如基于3G、4G或5G协议的移动网络的无线网络接口,如包含网卡的有线网络接口等。在一些场景中,所述摄像设备设置在道路上方的云台上,用于监控车辆违章,如超速、闯红灯等。在另一些场景中,所述摄像装置被配置在微创医疗设备上,其摄像装置通过光纤或其他专用数据线设置在软管前端。在另一些场景中,所述摄像装置被配置在体育场的高速移动的轨道上,用于摄取竞技比赛的高清画面。Wherein, the terminal equipment includes but is not limited to camera equipment, personal electronic terminal equipment, etc. The camera equipment includes a camera device, a storage device, a processing device, and may also include an interface device. Wherein, the camera device is used to obtain an original image, wherein the original image is composed of multi-channel image data set based on colors. The imaging device includes at least a lens composed of a lens group, a light sensing device, etc., where the light sensing device includes, for example, a CCD device, a CMOS device, and the like. The storage device may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The storage device also includes a memory controller, which can control access to the memory by other components of the device, such as a CPU and a peripheral interface. The storage device is used to store at least one program and image data to be encoded. The program stored in the storage device includes an operating system, a communication module (or instruction set), a graphics module (or instruction set), a text input module (or instruction set), and an application (or instruction set). The program in the storage device further includes an instruction set for performing an encoding operation on the image data in a time sequence based on the technical solution provided by the encoding method. The processing device 13 includes but is not limited to: CPU, GPU, FPGA (Field-Programmable Gate Array), ISP (Image Signal Processing image processing chip), or other memory devices that are dedicated to processing At least one program processing chip (such as AI dedicated chip), etc. The processing device calls and executes at least one program stored in the storage device to perform encoding processing on the stored original image or image data in the original image according to the encoding method. Among them, the use of processing devices such as FPGA that can process matrix data in parallel is more suitable for efficient and real-time encoding of the acquired image data. The interface device includes, but is not limited to: a data line interface and a network interface; among them, examples of the data line interface include at least one of the following: serial interfaces such as USB, and parallel interfaces such as bus interfaces. Examples of network interfaces include at least one of the following: short-range wireless network interfaces such as Bluetooth-based network interfaces and WiFi network interfaces, such as wireless network interfaces of mobile networks based on 3G, 4G, or 5G protocols, such as wired network interfaces that include network cards Wait. In some scenarios, the camera device is set on a pan-tilt above the road to monitor vehicle violations, such as speeding, red light running, etc. In other scenarios, the camera device is configured on a minimally invasive medical device, and the camera device is set at the front end of the hose through an optical fiber or other dedicated data cable. In other scenes, the camera device is configured on a high-speed moving track of a stadium to capture high-definition pictures of competitive games.
所述个人使用的电子终端设备包括台式电脑、笔记本电脑、平板电脑、和专用于制作电视节目、电影、电视剧等的剪接设备等。所述电子终端设备包含存储装置、处理装置。其中,存储装置和处理装置可与前述摄像设备中的对应装置相同或相似,在此不再详述。所述电子 终端设备还可以包含摄像装置,用于摄取原始图像。在此,在一些示例中,所述摄像装置的硬件及软件模块可与前述摄像设备中的对应装置相同或相似,在此也不再重述。在又一些示例中,所述电子终端设备还可以包括图像获取接口,用于获取源自于原始图像的图像数据、或者原始图像。所述图像获取接口可以为网络接口、数据线接口、或程序接口。其中,所述网络接口和数据线接口可与前述摄像设备中的对应装置相同或相似,在此不再详述。例如,藉由所述网络接口,所述电子终端设备的处理装置从互联网中下载的原始图像。又如,藉由所述程序接口,所述电子终端设备的处理装置获取绘图软件展示在显示屏上的原始图像或图像数据。其中,所述绘图软件举例为PS软件、或截屏软件等。再如,藉由所述数据线接口,所述电子终端设备的处理装置从存储装置中获取未经剪辑处理的高清视频中的一帧原始图像。The electronic terminal equipment for personal use includes desktop computers, notebook computers, tablet computers, and editing equipment dedicated to the production of TV programs, movies, TV series, and the like. The electronic terminal equipment includes a storage device and a processing device. Wherein, the storage device and the processing device may be the same or similar to the corresponding devices in the aforementioned camera equipment, and will not be described in detail here. The electronic terminal equipment may also include a camera device for capturing original images. Here, in some examples, the hardware and software modules of the camera device may be the same as or similar to the corresponding device in the aforementioned camera device, and will not be repeated here. In still other examples, the electronic terminal device may further include an image acquisition interface for acquiring image data derived from the original image or the original image. The image acquisition interface may be a network interface, a data line interface, or a program interface. Wherein, the network interface and the data line interface can be the same or similar to the corresponding devices in the aforementioned camera equipment, and will not be described in detail here. For example, through the network interface, the processing device of the electronic terminal equipment downloads the original image from the Internet. For another example, through the program interface, the processing device of the electronic terminal device obtains the original image or image data displayed by the drawing software on the display screen. Wherein, the drawing software is, for example, PS software, or screenshot software, etc. For another example, through the data line interface, the processing device of the electronic terminal equipment obtains an original frame of the unedited high-definition video from the storage device.
所述服务器包括但不限于单台服务器、服务器集群、分布式服务器、基于云技术的服务端等。其中,所述服务器包括存储装置、处理装置和图像获取接口等。其中所述存储装置和处理装置可配置于同一台实体服务器设备中,或根据各实体服务器设备的分工而配置在多台实体服务器设备中。所述图像获取接口可以为网络接口、或数据线接口。所述服务器中所包含的存储装置、处理装置和图像获取接口等可与前述终端设备中所提及的对应装置相同;或基于服务器的吞吐量、处理能力、存储要求而专门设置的用于服务器的各对应装置。例如,所述存储装置还可包含固态硬盘等。例如,所述处理装置还可包含专用于服务器的CPU等。所述服务器中的图像获取接口获取来自互联网中的图像数据和编码指令,处理装置基于所述编码指令对所获取的图像数据执行本申请所述的编码方法。The server includes but is not limited to a single server, a server cluster, a distributed server, a server based on cloud technology, and the like. Wherein, the server includes a storage device, a processing device, an image acquisition interface, and the like. The storage device and the processing device may be configured in the same physical server device, or be configured in multiple physical server devices according to the division of labor of each physical server device. The image acquisition interface may be a network interface or a data line interface. The storage device, processing device, image acquisition interface, etc. included in the server may be the same as the corresponding devices mentioned in the aforementioned terminal equipment; or specifically set for the server based on the server's throughput, processing capacity, and storage requirements The corresponding devices. For example, the storage device may also include a solid state drive or the like. For example, the processing device may also include a CPU dedicated to a server or the like. The image acquisition interface in the server acquires image data and encoding instructions from the Internet, and the processing device executes the encoding method described in this application on the acquired image data based on the encoding instructions.
基于上述任一场景所产生的对图像数据进行编码的需求,本申请提供一种编码方法。请参阅图1,其显示为所述编码方法在一实施方式中的流程图。上述所提及的任一编码设备示例中的处理装置通过执行至少一个程序,并调度编码设备中的硬件以执行下述各步骤。Based on the requirements for encoding image data generated in any of the foregoing scenarios, the present application provides an encoding method. Please refer to FIG. 1, which shows a flowchart of the encoding method in an embodiment. The processing device in any of the encoding device examples mentioned above executes at least one program and schedules the hardware in the encoding device to perform the following steps.
在步骤S110中,将所获取的图像数据按照二进制数据位分成多个位平面矩阵数据。其中,所述图像数据为基于像素位置排布的数据矩阵。根据图像数据所使用的颜色深度,对应的数据矩阵中各像素位置的数据的颜色深度可由多位二进制数据表达。例如,图像数据的颜色深度为256,则数据矩阵中每个像素位置的数据由8位二进制数表达。基于颜色划分的每一路图像数据,同一类颜色从该多位二进制数据的高位至低位可被视为依二进制数据位由高到低而设置的。请参阅图2,其显示为按照颜色而划分的一路图像数据的位平面示例,其中,每个像素点的红色分量由8位二进制数{b7,b6,…,b0}表示,相邻像素点的红色分量中b7位相对变化的频繁程度低于b0位,由此可见,由图像数据中各像素点的b7位构成的位平面矩阵数据可被视为该图像数据中处于较高二进制数据位的位平面矩阵数据,而由图像数据中各像素 点的b0位构成的位平面矩阵数据可被视为该图像数据中处于较低二进制数据位的位平面矩阵数据。In step S110, the acquired image data is divided into a plurality of bit-plane matrix data according to binary data bits. Wherein, the image data is a data matrix arranged based on pixel positions. According to the color depth used by the image data, the color depth of the data at each pixel position in the corresponding data matrix can be expressed by multi-bit binary data. For example, if the color depth of the image data is 256, the data at each pixel position in the data matrix is expressed by an 8-bit binary number. Based on each channel of image data divided by color, the same type of color from the high bit to the low bit of the multi-bit binary data can be regarded as set according to the binary data bit from high to low. Please refer to Figure 2, which shows an example of a bit plane of image data divided by color, where the red component of each pixel is represented by an 8-bit binary number {b7, b6,..., b0}, adjacent pixels The relative frequency of the b7 bit in the red component of the red component is lower than the b0 bit. It can be seen that the bit-plane matrix data composed of the b7 bit of each pixel in the image data can be regarded as the higher binary data bit in the image data. The bit-plane matrix data of the image data, and the bit-plane matrix data composed of the b0 bits of each pixel in the image data can be regarded as the bit-plane matrix data of the lower binary data bits in the image data.
需要说明的是,按照图像色彩深度需要,每路图像数据中各像素的颜色值还可以由多于8bit的数值或小于8bit的数值表示。例如,对于4K及4K以上的图像,其每路图像数据的像素位由10bit的数值表示。It should be noted that, according to the requirements of the image color depth, the color value of each pixel in each channel of image data may also be represented by a value of more than 8 bits or a value of less than 8 bits. For example, for 4K and above 4K images, the pixel bit of each channel of image data is represented by a 10-bit value.
根据上述基于二进制数据位而划分的位平面矩阵数据的举例可见,在一些示例中,本步骤可藉由图像数据中表达颜色的二进制数据中各数据位的位置而划分成多个位平面矩阵数据。According to the above example of bit-plane matrix data divided based on binary data bits, it can be seen that in some examples, this step can be divided into multiple bit-plane matrix data by the position of each data bit in the binary data expressing the color in the image data. .
在一些应用中,可先藉由频域转换方式更能准确得到基于频谱而划分得到的位平面矩阵数据。所述步骤S110包括:将所获取的图像数据进行频域转换,并按照预设二进制数据位将转换后的频域图像数据分成多个位平面矩阵数据。In some applications, the frequency domain conversion method can be used to obtain the bit-plane matrix data based on the frequency spectrum more accurately. The step S110 includes: performing frequency domain conversion on the acquired image data, and dividing the converted frequency domain image data into a plurality of bit plane matrix data according to preset binary data bits.
在此,所述编码设备将图像数据进行频域转换,得到图像数据在频域内各频谱的分布情况,基于频谱将频域图像数据划分为多个像素数据块,并按照构成像素数据块中各像素数据的二进制数据位,对每个像素数据块分成多个位平面矩阵数据。Here, the encoding device performs frequency domain conversion on the image data to obtain the distribution of each frequency spectrum of the image data in the frequency domain, divides the frequency domain image data into multiple pixel data blocks based on the frequency spectrum, and divides the frequency domain image data into a plurality of pixel data blocks according to the constituent pixel data blocks. The binary data bits of the pixel data are divided into multiple bit plane matrix data for each pixel data block.
其中,所述频域转换的方式举例包括傅里叶变换、余弦变换等。例如,所述频域变换可采用离散傅里叶变换(Discrete Fourier Transform,DFT)。例如所述频域变换可采用离散余弦变换(Discrete Fourier Transform,DCT)。所述频域变换还可以采用小波变换(Wavelet Transform,WT)。Wherein, the frequency domain conversion method includes Fourier transform, cosine transform, etc., for example. For example, the frequency domain transform may adopt Discrete Fourier Transform (DFT). For example, the frequency domain transform may adopt a discrete cosine transform (Discrete Fourier Transform, DCT). The frequency domain transform may also adopt wavelet transform (Wavelet Transform, WT).
请参阅图3所示,其显示为一图像数据经三级小波变换后的频谱分布示意图。其中,图示中LLi表示低频子带;LHi表示水平细节分量,属于高频子带;HLi表示垂直细节分量,属于高频子带;HHi为对角细节分量,也属于高频子带。其中,i=1、2、3。一个图像数据通过三级小波变换转换至频域后,可划分为分布于十个子带的像素图像块,即图3所示,LL3、HL3、HL2、HL1、LH3、LH2、LH1、HH3、HH2、HH1十个子带的像素图像块,其中,每个像素图像块中的像素数值举例为由8位或10位二进制表示。Please refer to FIG. 3, which shows a schematic diagram of the spectrum distribution of image data after three-level wavelet transform. Among them, LLi in the figure represents the low frequency subband; LHi represents the horizontal detail component, which belongs to the high frequency subband; HLi represents the vertical detail component, which belongs to the high frequency subband; HHi represents the diagonal detail component, which also belongs to the high frequency subband. Among them, i=1, 2, 3. After an image data is converted to the frequency domain through a three-level wavelet transform, it can be divided into pixel image blocks distributed in ten subbands, as shown in Figure 3, LL3, HL3, HL2, HL1, LH3, LH2, LH1, HH3, HH2 , HH1 ten sub-band pixel image blocks, wherein the pixel value in each pixel image block is represented by 8-bit or 10-bit binary for example.
编码设备将所得到的各像素数据块中的像素数据进行位平面划分。例如,图像数据中的颜色值以10位二进制表示,则编码设备将位于HL3中的像素数据块分成10个位平面矩阵数据。以此类推,所述编码设备可将至少HL3、HL2、HL1、LH3、LH2、LH1、HH3、HH2、HH1子带中的像素数据块各自划分成10个位平面矩阵。其中,对于低频子带LL3可以进行位平面矩阵数据的处理,或按照如H.264、JPEG等编码方式进行单独处理。The encoding device performs bit plane division on the pixel data in each obtained pixel data block. For example, if the color value in the image data is represented by 10-bit binary, the encoding device divides the pixel data block located in HL3 into 10 bit-plane matrix data. By analogy, the encoding device can divide the pixel data blocks in at least HL3, HL2, HL1, LH3, LH2, LH1, HH3, HH2, HH1 subbands into 10 bit-plane matrices each. Among them, for the low-frequency subband LL3, bit-plane matrix data can be processed or processed separately according to encoding methods such as H.264 and JPEG.
对于包含多种颜色的原始图像,本步骤可按照颜色将所述原始图像分成多路图像数据,并对每路图像数据操作如上述任一示例所提及的频域转换处理,由此得到针对每路图像数据 的位平面矩阵数据。在得到位平面矩阵数据后,可执行步骤S130,以对位平面矩阵数据进行序列化处理。For the original image containing multiple colors, this step can divide the original image into multiple channels of image data according to the color, and operate the frequency domain conversion processing as mentioned in any of the above examples on each channel of image data, thereby obtaining the The bit-plane matrix data of each channel of image data. After the bit-plane matrix data is obtained, step S130 may be performed to serialize the bit-plane matrix data.
在一些实施方式中,为提高编码设备中的硬件处理序列化的效率,所述编码方法还包括:步骤S120,即将所得到的位平面矩阵数据进行分块处理。In some embodiments, in order to improve the efficiency of hardware processing serialization in the encoding device, the encoding method further includes: step S120, which is to perform block processing on the obtained bit-plane matrix data.
在此,所述分块处理旨在将位平面矩阵数据按照预设行数和列数进行分块,以得到多个矩阵数据块,其中,各相邻分块无重叠数据。例如,所述分块处理的方式采用按照预设行数或列数将位平面矩阵数据进行分块处理。又如,所述分块处理的方式采用按照以最大M*N的矩阵数据量将位平面矩阵数据进行分块处理。Here, the block processing aims to block the bit-plane matrix data according to the preset number of rows and columns to obtain a plurality of matrix data blocks, wherein each adjacent block has no overlapping data. For example, the block processing method adopts block processing of bit-plane matrix data according to a preset number of rows or columns. For another example, the block processing method adopts the block processing of the bit-plane matrix data according to the maximum M*N matrix data amount.
在一些示例中,所述分块处理依据预设的用于序列化处理的序列化周期将所得到的位平面矩阵数据进行分块处理。其中,所述序列化周期中包含用于描述序列化处理规则的m*n矩阵,m和n均为大于1的自然数,且m和n可以相同或不同。例如,m是n的整数倍等。为此,所述分块处理方式包括:按照所述序列化周期所描述的矩阵的行数/列数,将所得到的位平面矩阵数据进行分块处理。例如,所述分块处理方式为a*m行为分块单位,将位平面矩阵数据进行分块,其中,a为系数,a≥1。再如,所述分块处理方式为按照b*n为分块单位,将位平面矩阵数据进行分块,其中,b为系数,b≥1。又如,所述分块处理方式为按照(a*m,b*n)矩阵为分块单位,将位平面矩阵数据进行分块,其中,a和b均为系数,a和b均为大于等于1的整数,a和b可以相等或不等。在利用上述任一示例进行分块处理时,均可能出现行数或列数不足一个分块单位的情况,所述分块处理方式还包括将位平面矩阵数据中不足一个分块单位的剩余数据划入单独的矩阵数据块中。In some examples, the block processing performs block processing on the obtained bit-plane matrix data according to a preset serialization cycle for serialization processing. Wherein, the serialization cycle includes an m*n matrix used to describe serialization processing rules, m and n are both natural numbers greater than 1, and m and n may be the same or different. For example, m is an integer multiple of n. To this end, the block processing method includes: performing block processing on the obtained bit-plane matrix data according to the number of rows/columns of the matrix described by the serialization period. For example, the block processing method is that a*m acts as a block unit to block the bit-plane matrix data, where a is a coefficient, and a≥1. For another example, the block processing method is to block the bit-plane matrix data according to b*n as the block unit, where b is a coefficient, and b≥1. For another example, the block processing method is to block the bit-plane matrix data according to the (a*m, b*n) matrix as the block unit, where a and b are coefficients, and both a and b are greater than An integer equal to 1, a and b can be equal or unequal. When using any of the above examples for block processing, there may be cases where the number of rows or columns is less than one block unit, and the block processing method also includes the remaining data of less than one block unit in the bit-plane matrix data Into a separate matrix data block.
在按照上述任一示例而得到的矩阵数据块后,可执行步骤S130,以对每个位平面矩阵数据中的各矩阵数据块执行序列化处理以得到序列数据块,并按照各矩阵数据块在位平面矩阵数据中的位置,将各序列数据块连接成位平面序列数据。After the matrix data block obtained according to any of the above examples, step S130 may be performed to perform serialization processing on each matrix data block in each bit-plane matrix data to obtain a sequence data block, and according to each matrix data block The position in the bit-plane matrix data connects each sequence data block into bit-plane sequence data.
在步骤S130中,基于预设的序列化周期,将至少部分位平面的位平面矩阵数据进行序列化处理,以得到位平面序列数据。In step S130, based on a preset serialization period, at least part of the bit-plane matrix data of the bit-plane is serialized to obtain bit-plane sequence data.
其中,所述序列化周期是将预设m*n矩阵依据相邻数据的序列化而设置的周期。在此,所述序列化周期描述了依据预设m*n矩阵中相邻数据进行遍历而得到的序列化数据的规则。所述规则包括:为序列化而确定的矩阵中的起始数据和结束数据,为序列化而确定的所述矩阵中从起始数据所在位置开始直至结束数据所在位置,将矩阵中各数据依序相邻位置关系进行排列时各位置的次序关系。其中所述相邻位置关系是指序列化后相邻的数据在矩阵中位置相邻,即将矩阵中的数据序列化成序列段后,相邻数据对应到矩阵中具有在同行或同列中相邻的位置关系。在一些示例中,矩阵中的数据依据同行及同列中的相邻数据所围成的区域构 建序列化周期,构成具有起始数据和结束数据的序列段。其中,在一些具体示例中,一个序列段的起始数据和结束数据在所对应的矩阵数据中位于同行或同列。例如,请参阅图4,其显示为以4*4矩阵的序列化规则为序列化周期的示意图,其中,4*4矩阵中以每2个相邻数据围成的区域依箭头序列化处理,a11与a12为相邻数据,a12与a22为相邻数据;所述序列化周期以a11为起点、a14为终点将该4*4矩阵中所有数据序列化成一行16位的序列段依次为:a11、a12、a22、a21、a31、a41、a42、a32、a33、a43、a44、a34、a24、a23、a13、a14。又如,请参阅图5,其显示为以8*8矩阵的序列化规则为序列化周期的示意图,其中,8*8矩阵中每4个相邻数据所围成的区域称为Wi,在区域Wi内d0位置与d1位置、d1位置与d2位置、及d2位置与d3位置的数据均为相邻数据;所述序列化周期以W0的d0位置的数据为起点、以区域WF中d3位置的数据为终点,将该8*8矩阵中所有数据序列化成一行64位的序列段,即如图5所示用箭头所连成的序列段。Wherein, the serialization period is a period set by the preset m*n matrix according to the serialization of adjacent data. Here, the serialization period describes the rule of serialized data obtained by traversing adjacent data in a preset m*n matrix. The rules include: starting data and ending data in the matrix determined for serialization, and in the matrix determined for serialization from the position of the starting data to the position of the ending data, the data in the matrix are determined according to The sequence relationship of each position when the sequence is arranged. The adjacent position relationship means that the adjacent data after serialization are adjacent in the matrix, that is, after the data in the matrix is serialized into sequence segments, the adjacent data corresponds to the matrix having adjacent data in the same row or column. Positional relationship. In some examples, the data in the matrix constructs a serialization cycle based on the area enclosed by adjacent data in the same row and the same column, forming a sequence segment with start data and end data. Among them, in some specific examples, the start data and end data of a sequence segment are located in the same row or column in the corresponding matrix data. For example, please refer to Figure 4, which shows a schematic diagram of the serialization rule of the 4*4 matrix as the serialization cycle, where the area enclosed by every 2 adjacent data in the 4*4 matrix is serialized according to the arrow. a11 and a12 are adjacent data, a12 and a22 are adjacent data; the serialization cycle starts with a11 and a14 as the end point to serialize all the data in the 4*4 matrix into a row of 16-bit sequence segments: a11 , A12, a22, a21, a31, a41, a42, a32, a33, a43, a44, a34, a24, a23, a13, a14. For another example, please refer to Figure 5, which shows a schematic diagram of the serialization rule of an 8*8 matrix as the serialization period. The area enclosed by every 4 adjacent data in the 8*8 matrix is called Wi. The data at d0 and d1, d1 and d2, and d2 and d3 in the area Wi are all adjacent data; the serialization cycle starts from the data at the d0 position of W0 and takes the d3 position in the area WF As the end point, all data in the 8*8 matrix is serialized into a row of 64-bit sequence segments, that is, the sequence segments connected by arrows as shown in Figure 5.
在此,所述序列化周期可根据对样本图像频谱的统计而预先确定的固定周期。其中,所述统计方式可通过预设图像信息的内聚性条件来确定序列化周期;或者可通过统计编码前后的数据量变化比例来确定序列化周期。在一些示例中,所述序列化周期可采用希尔伯特折线算法而得到的。例如,利用四阶希尔伯特折线算法生成多个候选序列化周期,并通过统计每个样本图像在藉由每个候选序列化周期序列化处理而得到的编码图像数据,比较编码图像数据相比于原始样本图像的数据量变化比例,选择其中的序列化周期,并配置为当执行所述编码方法时所使用的序列化周期。需要说明的是,所述序列化周期还可以基于上述提及的折线原则而设置的其他折线算法得到,在此不再一一详述。Here, the serialization period may be a predetermined fixed period based on the statistics of the frequency spectrum of the sample image. Wherein, the statistical method may determine the serialization period by pre-setting the cohesion condition of the image information; or may determine the serialization period by statistically calculating the data volume change ratio before and after encoding. In some examples, the serialization period may be obtained by using the Hilbert polyline algorithm. For example, the fourth-order Hilbert polyline algorithm is used to generate multiple candidate serialization periods, and the coded image data obtained by serializing each sample image in each candidate serialization period is counted to compare the phases of the coded image data. Compared with the data volume change ratio of the original sample image, the serialization period is selected and configured as the serialization period used when the encoding method is executed. It should be noted that the serialization period can also be obtained by other broken line algorithms set based on the aforementioned broken line principle, which will not be described in detail here.
在一些实施方式中,所述序列化周期是基于位平面而设置的。在一些示例中,可预先设置可普适各位平面的序列化周期。例如,各位平面采用同一种序列化周期进行序列化处理。在又一示例中,对应不同的位平面设置不同的序列化周期。例如,每一个位平面对应一种序列化周期。又如,将位平面依二进制位的次序划分为多个组,每组位平面对应一种序列化周期。在另一些示例中,属于各子带的位平面采用同一种或多种序列化周期。例如,序列化周期依据子带所在频谱段而设置,又如,每个子带中的每个位平面单独对应一种序列化周期。再如,每个子带单独地将位平面依二进制位的次序划分为多组,每组位平面单独对应一种序列化周期。还如,依据子带所在频谱段将各子带划分为多个组,每组子带中的各位平面可单独与多种序列化周期具有一一对应的关系,或将每组子带中的各位平面继续分组,并经多次分组后得到的位平面组与多种序列化周期具有一一对应的关系。In some embodiments, the serialization period is set based on a bit plane. In some examples, a serialization period that can be universally applied to each bit plane can be preset. For example, each bit plane uses the same serialization cycle for serialization. In another example, different serialization periods are set corresponding to different bit planes. For example, each bit plane corresponds to a serialization period. For another example, the bit plane is divided into multiple groups in the order of binary bits, and each group of bit planes corresponds to a serialization period. In other examples, the bit planes belonging to each subband use the same one or more serialization cycles. For example, the serialization period is set according to the frequency spectrum segment where the subbands are located. For another example, each bit plane in each subband corresponds to a serialization period separately. For another example, each subband separately divides the bit plane into multiple groups in the order of binary bits, and each group of bit planes individually corresponds to a serialization period. For another example, each sub-band is divided into multiple groups according to the spectrum section where the sub-bands are located. Each bit plane in each sub-band can have a one-to-one correspondence with multiple serialization periods, or divide the sub-bands in each group. The bit planes continue to be grouped, and the bit plane groups obtained after multiple groupings have a one-to-one correspondence with multiple serialization periods.
根据编码设置,所述步骤S130包括:按照基于预设位平面而设置的序列化周期,将对应位平面的位平面矩阵数据进行序列化处理。According to the encoding setting, the step S130 includes: serializing the bit plane matrix data of the corresponding bit plane according to the serialization period set based on the preset bit plane.
其中,以基于图像数据直接划分的位平面进而得到的位平面矩阵数据,利用8位二进制数表示图像数据中一个像素位置的一种颜色值(b7,b6,…,b1,b0)为例,可将由第b7-b6位分别得到的位平面矩阵数据划分一组,将第b5-b2位分别得到的位平面矩阵数据划分一组,以及将第b1-b0位分别得到的位平面矩阵数据划分一组;每组对应一个序列化周期。编码设备至少可以执行:按照预设的第b7-b6位所对应序列化周期对第b7-b6位的位平面矩阵数据进行序列化处理的步骤,以及按照预设的第b5-b2位所对应序列化周期对第b5-b2位的位平面矩阵数据进行序列化处理的步骤。Among them, taking the bit-plane matrix data obtained based on the bit-plane directly divided by the image data, an 8-bit binary number is used to represent a color value (b7, b6,..., b1, b0) of a pixel position in the image data as an example. The bit-plane matrix data obtained by the b7-b6 bits can be divided into a group, the bit-plane matrix data obtained by the b5-b2 bits can be divided into a group, and the bit-plane matrix data obtained by the b1-b0 bits can be divided into a group. One group; each group corresponds to a serialization cycle. The encoding device can at least perform the steps of serializing the bit-plane matrix data of the b7-b6 bits according to the preset serialization cycle corresponding to the b7-b6 bits, and according to the preset b5-b2 bits corresponding The serialization cycle is a step of serializing the bit-plane matrix data of the b5-b2 bits.
以基于各像素数据块而划分的得到的位平面进而得到的位平面矩阵数据为例,如图3所示,在利用小波变换而得到的10个像素数据块中,像素数据块分布在LL3、HL3、LH3、HH3、HL2、LH2、HH2、H1、HL1和HH1频谱子带上;其中,各像素数据块中的二进制数据依据由高到低的位而划分10个位平面,由此得到对应各像素数据块中分布在该10个位平面的位平面矩阵数据。编码设备对每个子带的位平面矩阵数据至少可以执行:按照预设的第b9-b6位所对应序列化周期对第b9-b6位的位平面矩阵数据进行序列化处理的步骤,以及按照预设的第b5-b0位所对应序列化周期对第b5-b0位的位平面矩阵数据进行序列化处理的步骤。Take the bit-plane matrix data obtained based on each pixel data block as an example. As shown in FIG. 3, in the 10 pixel data blocks obtained by wavelet transform, the pixel data blocks are distributed in LL3, HL3, LH3, HH3, HL2, LH2, HH2, H1, HL1, and HH1 spectrum sub-bands; among them, the binary data in each pixel data block is divided into 10 bit planes according to the high to low bits, and the corresponding The bit plane matrix data of the 10 bit planes are distributed in each pixel data block. The encoding device can perform at least the bit-plane matrix data of each sub-band: the step of serializing the bit-plane matrix data of the b9-b6 bits according to the preset serialization cycle corresponding to the b9-b6 bits, and the step It is assumed that the serialization period corresponding to the b5-b0 bits is a step of serializing the bit-plane matrix data of the b5-b0 bits.
需要说明的是,上述示例仅为举例,而非对本申请的限制。根据实际编码设计,所述编码方法可与现有的序列化处理方式结合使用,在一些具体示例中,一些划分至低频的位平面矩阵数据可按照现有序列化方式进行序列化处理,例如,处于LL3子带的像素数据块的各位平面矩阵数据可采用Zigzag序列化方式进行处理。又如位于低位(如b1-b0位)的位平面所对应的位平面矩阵数据可采用Zigzag序列化方式进行处理。所述编码方法还可以与现有的编码方式结合使用,在一些具体示例中,一些划分至低频的位平面矩阵数据可按照现有的编码方式进行编码处理。例如,处于LL3子带的像素数据块可不予执行步骤S130而直接执行步骤S140。又如,位于低位(如b1-b0位)的位平面所对应的位平面矩阵数据可不予执行步骤S130而直接执行步骤S140。It should be noted that the above examples are only examples, and are not limitations on the application. According to the actual coding design, the coding method can be used in combination with the existing serialization processing method. In some specific examples, some bit-plane matrix data divided into low frequencies can be serialized according to the existing serialization method, for example, The bit plane matrix data of the pixel data block in the LL3 subband can be processed by Zigzag serialization. For another example, the bit-plane matrix data corresponding to the bit-plane located in the lower bits (such as bits b1-b0) can be processed in a Zigzag serialization manner. The encoding method can also be used in combination with existing encoding methods. In some specific examples, some bit-plane matrix data divided into low frequencies can be encoded according to the existing encoding methods. For example, for the pixel data block in the LL3 subband, step S130 may not be executed and step S140 may be executed directly. For another example, the bit-plane matrix data corresponding to the bit-plane located in the lower bits (such as bits b1-b0) may not perform step S130 but directly perform step S140.
由于二进制数据的位越高其信息量越集中,为此,二进制数据位中高位区间的序列化周期可选择将数据量较大的矩阵进行序列化而得,二进制数据位中低位区间的序列化周期可选择将数据量较小的矩阵进行序列化而得。换言之,位于较高位而设置的序列化周期中所描述的序列段的长度大于位于较低位而设置的序列化周期中所描述的序列段的长度。以图5所示的八阶希尔伯特折线算法所得到的序列化周期T1,以及图4所示的四阶希尔伯特折线算法所得到的序列化周期T2为例,基于序列化周期T1对像素数据块HL3、LH3和HH3中各位平面矩阵数据进行序列化处理,基于序列化周期T2对像素数据块HL2、LH2和HH2中各位平面矩阵数据进行序列化处理。在得到各位平面序列数据后,编码设备执行步骤S140。其中, 像素数据块LL3中的像素数据可采用现有序列化处理方式进行序列处理;或者采用序列化周期T1进行序列化处理;再或者直接进行编码处理等。Because the higher the bit of the binary data, the more concentrated the amount of information. Therefore, the serialization period of the high-order interval in the binary data bit can be obtained by serializing the matrix with a larger amount of data. The serialization of the low-order interval in the binary data bit The period can be obtained by serializing a matrix with a small amount of data. In other words, the length of the sequence segment described in the serialization period set at a higher position is greater than the length of the sequence segment described in the serialization period set at a lower position. Take the serialization period T1 obtained by the eighth-order Hilbert polyline algorithm shown in Fig. 5 and the serialization period T2 obtained by the fourth-order Hilbert polyline algorithm shown in Fig. 4 as examples, based on the serialization period T1 serializes the bit plane matrix data in the pixel data blocks HL3, LH3, and HH3, and serializes the bit plane matrix data in the pixel data blocks HL2, LH2, and HH2 based on the serialization period T2. After obtaining the bit plane sequence data, the encoding device executes step S140. Among them, the pixel data in the pixel data block LL3 can be sequenced using the existing serialization processing method; or the serialization period T1 can be used for the serialization processing; or the encoding processing can be directly performed.
其中,当基于预设位平面而设置的序列化周期的数量为多个时,位于较高位的位平面而设置的序列化周期中所描述的序列段的长度大于位于较低位的位平面而设置的序列化周期中所描述的序列段的长度。以图4和图5所示的序列化周期,以及按二进制位由低到高而确定的位平面包括:位平面0、位平面1、…、位平面9为例,包含8*8矩阵的序列化周期配置在用于序列化位平面6-9的各位平面矩阵数据;包含4*4矩阵的序列化周期则配置在用于序列化至少位平面2-5的各位平面矩阵数据。需要说明的是,上述序列化周期与位平面的对应关系仅为举例,而非对本申请的限制。事实上,根据实际编码需要,低位的位平面数据,如上述示例中的位平面0-1的各位平面矩阵数据也可通过直接进行编码处理,或者采用包含4*4矩阵的序列化周期进行序列化处理,再或者采用其他现有序列化处理方式进行序列化处理。其中,现有序列化处理方式包括但不限于Zigzag折线处理方式等。Wherein, when the number of serialization periods set based on the preset bit plane is multiple, the length of the sequence segment described in the serialization period set for the higher bit plane is greater than that of the lower bit plane. Set the length of the sequence segment described in the serialization period. Take the serialization period shown in Figure 4 and Figure 5, and the bit planes determined by binary bits from low to high, including: bit plane 0, bit plane 1,..., bit plane 9 as examples, including 8*8 matrix The serialization period is configured to serialize the bit-plane matrix data of bit planes 6-9; the serialization period including the 4*4 matrix is configured to serialize the bit-plane matrix data of at least bit planes 2-5. It should be noted that the foregoing correspondence between the serialization period and the bit plane is only an example, and is not a limitation of the present application. In fact, according to actual coding needs, low-order bit-plane data, such as the bit-plane 0-1 bit-plane matrix data in the above example, can also be directly encoded or sequenced using a serialization cycle containing a 4*4 matrix. Or use other existing serialization processing methods for serialization processing. Among them, existing serialization processing methods include but are not limited to Zigzag polyline processing methods.
基于上述任一示例所确定的序列化周期,在一些示例中,所述步骤S130包括:直接将所得到的位平面矩阵数据按照预设的序列化周期进行序列化处理,以得到位平面序列数据。换言之,无需对位平面矩阵数据进行分块处理,而直接按照预设的序列化周期将所得到的至少部分位平面的位平面矩阵数据进行序列化处理。按照上述示例的描述,本步骤可对所获取的图像数据中较高位的位平面中各位平面矩阵数据,按照预设的序列化周期进行序列化处理。例如,按照预设的序列化周期,对除了位平面0和1之外的各位平面的位平面矩阵数据进行序列化处理。或者,本步骤对所述图像数据对应全部的位平面中各位平面矩阵数据,按照预设的序列化周期进行序列化处理。例如,按照预设的序列化周期,对包含10个位平面的所有位平面的位平面矩阵数据进行序列化处理。Based on the serialization period determined in any of the foregoing examples, in some examples, the step S130 includes: directly serializing the obtained bit-plane matrix data according to a preset serialization period to obtain bit-plane sequence data . In other words, there is no need to block the bit-plane matrix data, and the obtained bit-plane matrix data of at least a part of the bit-plane is directly serialized according to the preset serialization cycle. According to the description of the above example, this step may perform serialization processing on the bit plane matrix data in the higher bit plane of the acquired image data according to the preset serialization cycle. For example, according to a preset serialization cycle, the bit plane matrix data of each bit plane except bit planes 0 and 1 is serialized. Alternatively, in this step, serialization processing is performed on each bit plane matrix data in all bit planes corresponding to the image data according to a preset serialization cycle. For example, according to a preset serialization cycle, the bit-plane matrix data of all bit-planes including 10 bit-planes are serialized.
在此,所述序列化处理的方式包括:按照所述序列化周期,将相应位平面矩阵数据序列化成多个序列段;按照所述序列化周期所描述的序列段的起始数据和结束数据,将相应位平面的各序列段予以衔接,以得到相应位平面序列数据。Here, the serialization processing method includes: serializing the corresponding bit-plane matrix data into a plurality of sequence segments according to the serialization period; according to the start data and end data of the sequence segment described in the serialization period , Connect the sequence segments of the corresponding bit plane to obtain the corresponding bit plane sequence data.
请参阅图6,其显示为按照图4所示的序列化周期将位平面矩阵数据(8*16)进行序列化处理的示意图,其中,以序列化周期中所描述的矩阵的行数和列数为遍历窗,以所述矩阵的行数为步长,将所述遍历窗在位平面矩阵数据中进行遍历,并将每次移动时遍历窗内的矩阵数据按照序列化周期所描述的序列化规则进行序列化处理,以得到相应的序列段,其包括依箭头描述的序列段(x i-1,0,x i-1,1,x i,1,x i,0,...,x i-1,3)、序列段(x i-1,4,x i-1,5,x i,4,x i+1,4,...,x i-1,7)等等;按照各序列段的起始数据和结束数据,将遍历得到的各序列段首尾衔接,由此得到位平面序 列数据。其中,图6中x j,k为位平面矩阵数据中第(j,k)位置的数据。 Please refer to Figure 6, which shows a schematic diagram of serializing bit-plane matrix data (8*16) according to the serialization cycle shown in Figure 4, where the number of rows and columns of the matrix described in the serialization cycle The number is the traversal window. Using the number of rows of the matrix as the step size, the traversal window is traversed in the bit-plane matrix data, and the matrix data in the traversal window is in the sequence described by the serialization period each time it moves The serialization rule performs serialization processing to obtain the corresponding sequence segment, which includes the sequence segment described by the arrow (x i-1,0 ,x i-1,1 ,x i,1 ,x i,0 ,... ,x i-1,3 ), sequence segment (x i-1,4 ,x i-1,5 ,x i,4 ,x i+1,4 ,...,x i-1,7 ), etc. Etc.; According to the start data and end data of each sequence segment, the sequence segments obtained by the traversal are connected to the end to obtain the bit-plane sequence data. Among them, x j, k in FIG. 6 are data at the (j, k)th position in the bit plane matrix data.
藉由上述示例可见,所述遍历窗所遍历的方向与所述序列化周期中的起始数据和结束数据所在行/列相关,因此,上述以位平面矩阵数据的行方向移动遍历窗的方式仅为举例,而非对本申请的限制。It can be seen from the above example that the direction traversed by the traversal window is related to the row/column of the start data and the end data in the serialization cycle. Therefore, the above-mentioned method of moving the traversal window in the row direction of the bit-plane matrix data It is only an example, not a limitation of this application.
在另一些示例中,在处理经由步骤S120分块处理后的位平面矩阵数据的方案时,所述步骤S130包括:基于预设的序列化周期,将至少部分位平面的位平面矩阵数据中的各矩阵数据块进行序列化处理,以得到各序列数据块;以及按照各矩阵数据块在位平面矩阵数据中的位置,将各序列数据块连接成位平面序列数据。In some other examples, when processing the bit-plane matrix data after block processing in step S120, the step S130 includes: based on a preset serialization period, at least part of the bit-plane bit-plane matrix data Each matrix data block is serialized to obtain each sequence data block; and according to the position of each matrix data block in the bit plane matrix data, the sequence data blocks are connected into bit plane sequence data.
在此,在将同一位平面而划分的多个矩阵数据块来说,与前述序列化过程类似,以序列化周期中所描述的矩阵的行数和列数为遍历窗,以所述矩阵的行数(或列数)为步长,将各矩阵数据块进行序列化处理,所得到的序列化数据被称为序列数据块,在此不再详述。接着,按照预设的各矩阵数据块在位平面矩阵数据的位置顺序,以及各序列数据块的起始数据和结束数据,将各序列数据块进行首尾衔接,如此得到位平面序列数据。Here, for multiple matrix data blocks divided into the same bit plane, similar to the aforementioned serialization process, the number of rows and columns of the matrix described in the serialization cycle is used as the traversal window, and the matrix The number of rows (or the number of columns) is the step size, and each matrix data block is serialized, and the obtained serialized data is called a sequence data block, which will not be described in detail here. Then, according to the preset position sequence of each matrix data block in the bit plane matrix data, and the start data and end data of each sequence data block, the sequence data blocks are connected end to end to obtain the bit plane sequence data.
在步骤S140中,将所得到的各所述位平面序列数据进行编码处理,并生成所述图像数据的编码图像数据。其中,所述编码处理旨在以最小的信息量损失为代价,将各所述位平面序列数据转换成由编码符号描述的码流。其中,所述编码处理方式举例为无损编码处理方式。在一些示例中,所述无损编码处理方式为熵编码方式,对应地,所述步骤S140包括采用熵编码方式,将各位平面序列数据进行编码处理。其中,所述熵编码方式包括但不限于:香农编码、哈夫曼编码。在另一些示例中,所述无损编码处理方式为基于熵编码而改进的编码方式,例如,采用基于行程长度的熵编码方式。In step S140, encoding processing is performed on each of the obtained bit-plane sequence data, and encoded image data of the image data is generated. Wherein, the encoding process aims to convert each of the bit-plane sequence data into a code stream described by encoding symbols at the cost of a minimum amount of information loss. Wherein, the encoding processing method is an example of a lossless encoding processing method. In some examples, the lossless encoding processing method is an entropy encoding method. Correspondingly, the step S140 includes using an entropy encoding method to encode each bit plane sequence data. Wherein, the entropy coding method includes but is not limited to: Shannon coding and Huffman coding. In other examples, the lossless encoding processing method is an improved encoding method based on entropy coding, for example, an entropy encoding method based on run length is adopted.
可选地,所述编码处理的过程还基于所划分的各位平面之间的相邻关系、图像数据所表达的颜色类型、原始图像的附加信息等,为码流添加头信息。除此之外,按照所述编码处理得到的编码图像数据还包含将多路图像数据分别编码处理后的码流和头信息的文件。Optionally, the encoding process is also based on the adjacent relationship between the divided bit planes, the color type expressed by the image data, the additional information of the original image, etc., to add header information to the code stream. In addition, the encoded image data obtained according to the encoding process also includes a file of code streams and header information obtained by encoding multiple channels of image data separately.
在上述提及的任一示例所述的编码方式基础上,所述步骤S140包括:按照预设的位平面所对应的编码方式,将各位平面序列数据进行编码处理。在此,根据步骤S130中任一方式所划分的位平面对应设置不同的编码方式,并将各位平面序列数据进行编码处理。例如,将对应第b9-b2位平面的各位平面序列数据按照熵编码进行编码处理,以及将其他待编码数据按照字节编码方式进行编码处理等。On the basis of the coding method in any of the above-mentioned examples, the step S140 includes: encoding the bit-plane sequence data according to the coding method corresponding to the preset bit-plane. Here, the bit planes divided according to any method in step S130 are correspondingly set with different encoding methods, and the bit plane sequence data is encoded. For example, the bit plane sequence data corresponding to the b9-b2th bit plane is coded according to entropy coding, and other data to be coded is coded according to the byte coding method.
在上述提及的任一示例所述的编码方式基础上,所述步骤S140还包括以基于所述序列化周期而设置的编码单元,将相应位平面序列数据进行编码处理。On the basis of the encoding method described in any of the above-mentioned examples, the step S140 further includes encoding the corresponding bit-plane sequence data with an encoding unit set based on the serialization period.
在此,依据序列化周期所划分的位平面矩阵数据具有更好的内聚性,故,按照编码字或 字节,并将各序列化周期内的位平面序列数据进行编码处理。以图4所示的序列化周期,并按照字节编码进行编码处理为例,位平面序列数据中对应各序列化周期的序列段,采用4bit一组二进制进行编码处理,得到以4bit构成的编码符号表示一个序列段来描述位平面序列数据的编码符号。Here, the bit-plane matrix data divided according to the serialization cycle has better cohesion, so according to the code word or byte, the bit-plane sequence data in each serialization cycle is encoded. Taking the serialization cycle shown in Figure 4 and encoding according to the byte encoding as an example, the sequence segment corresponding to each serialization cycle in the bit-plane sequence data is encoded with a set of 4 bits of binary to obtain a 4-bit encoding The symbol represents a sequence segment to describe the coding symbol of the bit-plane sequence data.
另外,由于二进制数据中的位越高其信息量越集中,因此,对应不同位平面的序列化周期,可设置不同的编码单元。例如,采用包含8*8矩阵的序列化周期T1对应字编码方式,对像素数据块HL3、LH3、HH3、HL2、LH2、HH2和HH1中高4位的位平面序列数据进行序列化处理,得到以8bit构成的编码符号表示一个序列段来描述各位平面序列数据的编码符号;以及采用包含4*4矩阵的序列化周期对应字节编码方式,对上述各像素数据块中低6位的位平面序列数据进行序列化处理,得到以4bit构成的编码符号表示一个序列段来描述各位平面序列数据的编码符号。In addition, because the higher the bit in the binary data, the more concentrated the amount of information. Therefore, corresponding to the serialization period of different bit planes, different coding units can be set. For example, using an 8*8 matrix serialization cycle T1 corresponding word encoding method, the pixel data blocks HL3, LH3, HH3, HL2, LH2, HH2, and HH1 in the upper 4 bit plane sequence data are serialized to obtain The coding symbol composed of 8 bits represents a sequence segment to describe the coding symbol of each bit plane sequence data; and adopts the byte coding method corresponding to the serialization period of the 4*4 matrix, and the bit plane sequence of the lower 6 bits in each pixel data block is used. The data is serialized, and a coding symbol composed of 4 bits is obtained to represent a sequence segment to describe the coding symbol of each bit plane sequence data.
在此,一些对应低数据位位平面(如b1、b0位平面)的各位平面序列数据的编码方式,以及对应低频谱子带(如LL3子带)的像素数据块的各像素数据的编码方式,可采用基于熵编码将各位平面序列数据及像素数据进行编码处理;或者,利用现有编码方式进行编码处理。Here, some coding methods for each bit plane sequence data corresponding to low data bit planes (such as b1 and b0 bit planes), and coding methods for each pixel data of pixel data blocks corresponding to low frequency spectrum subbands (such as LL3 subband) , Entropy-based coding can be used to encode each bit plane sequence data and pixel data; or, an existing encoding method can be used for encoding.
需要说明的是,上述任一示例并非相互排斥,而是可基于编码需求对多示例进行结合,并得到编码图像数据。It should be noted that any of the above examples are not mutually exclusive, but can combine multiple examples based on coding requirements to obtain encoded image data.
基于上述各示例所描述的编码方法,本申请采用序列化周期来实现对位平面矩阵数据进行序列化处理,有利于提高原始图像的内聚性,特别是4K及4K以上的高清图像的内聚性。另外,基于频谱采用不同的序列化周期,有效提高高频谱段的压缩率。Based on the encoding methods described in the above examples, this application uses a serialization cycle to serialize bit-plane matrix data, which is beneficial to improve the cohesion of the original image, especially the cohesion of 4K and above HD images Sex. In addition, different serialization cycles are adopted based on the frequency spectrum, which effectively improves the compression rate of the high frequency spectrum segment.
经上述编码方法所提供的技术思想而编码的编码图像数据,可藉由数据线、互联网等传输介质进行设备之间、或设备内部的数据传输。例如,在录放一体的摄录机中,构成编码设备的各硬件在软件的指令调度下将所摄取的原始图像编码成相应的编码图像数据,并保存在存储装置中。当用户操作摄录机播放所述编码图像数据时,构成解码设备的各硬件在软件的指令调度下将编码图像数据进行解码,并予以播放(或称为显示)。又如,可执行所述编码方法的摄像设备将所摄取的原始图像编码成相应的编码图像数据(如编码文件、或码流),并利用互联网或专用网线将编码图像数据传输至一服务器,设置在所述服务器内的解码设备将所述编码图像数据进行解码,并予以播放(或称为显示)。The encoded image data encoded by the technical ideas provided by the above encoding method can be transmitted between devices or within devices through transmission media such as data lines and the Internet. For example, in a camcorder with integrated recording and playback, the hardware constituting the encoding device encodes the captured original image into corresponding encoded image data under the instruction of the software, and saves it in the storage device. When the user operates the camcorder to play the encoded image data, each hardware constituting the decoding device decodes the encoded image data under the instruction scheduling of the software and plays it (or called display). For another example, a camera device that can perform the encoding method encodes the captured original image into corresponding encoded image data (such as an encoded file or code stream), and transmits the encoded image data to a server using the Internet or a dedicated network cable, The decoding device provided in the server decodes the encoded image data and plays it (or called display).
本申请还提供一种图像的解码方法,用于解码基于前述编码方法所编码的编码图像数据。所述解码方法主要由解码设备来执行。其中,所述解码设备可以为一种终端设备、或者服务器。This application also provides an image decoding method for decoding encoded image data encoded based on the foregoing encoding method. The decoding method is mainly executed by a decoding device. Wherein, the decoding device may be a terminal device or a server.
其中,所述终端设备包括但不限于播放设备、个人使用的电子终端设备等。其中所述播 放设备包括存储装置、处理装置,还可以包含接口装置等。其中,所述存储装置可包括高速随机存取存储器,并且还可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。所述存储装置还包括存储器控制器,其可控制设备的诸如CPU和外设接口之类的其他组件对存储器的访问。所述存储装置用于存储至少一个程序和待解码的图像数据。存储在存储装置中的程序包括操作系统、通信模块(或指令集)、图形模块(或指令集)、文本输入模块(或指令集)、以及应用(或指令集)。所述存储装置中的程序还包括基于所述解码方法所提供的技术方案而依时序对图像数据执行解码操作的指令集。所述处理装置包括但不限于:CPU、GPU、FPGA(Field-Programmable Gate Array现场可编程门阵列)、ISP(Image Signal Processing图像处理芯片)、或者其他包含专用于处理存储装置中所存储的至少一个程序的处理芯片(如AI专用芯片)等。所述处理装置调用并执行存储装置中所存储的至少一个程序,以按照所述解码方法对所保存的原始图像或原始图像中的图像数据进行解码处理。其中,利用如FPGA等可并行处理矩阵数据的处理装置更适合高效、实时对所获取的图像数据进行解码处理。所述接口装置包括但不限于:数据线接口和网络接口;其中,数据线接口举例包括:如VGA接口、HDMI接口等显示接口、如USB等串行接口、和如数据总线等并行接口。网络接口举例包括以下至少一种:如基于蓝牙协议的网络接口、WiFi网络接口等短距离无线网络接口,如基于3G、4G或5G协议的移动网络的无线网络接口,如包含网卡的有线网络接口等。所述播放设备还包括显示装置用于将经解码得到的图像数据予以显示,其中,所述图像数据是一原始图像基于颜色而设置的多路图像数据中之一。所述显示装置至少包含由显示屏、显示屏控制器等,其中显示屏举例包含液晶显示屏、曲面显示屏、触摸屏等。所述显示屏控制器举例包括专用于显示装置的处理器、与处理装置中的处理器集成在一起的处理器等。在一些场景中,所述播放设备设置交通指挥中心,用于将来自摄像装置所传输的编码图像数据予以解码和显示。在另一些场景中,所述播放设备被配置在与微创医疗设备通信连接的计算机设备上,其通过光纤或其他专用数据线与微创医疗设备相连,并将当前微创医疗设备所提供的编码图像数据予以解码并播放。在另一些场景中,所述播放设备被配置在电视转发中心的机房中,用于将赛场上所设置的摄像装置所传输来的编码图像数据予以解码并播放,以供视频编辑。在另一些场景中,所述播放设备为机顶盒,其用于将电视信号中相应电视频道中的码流予以解码并输出给电视机以供显示。Wherein, the terminal equipment includes, but is not limited to, playback equipment, personal electronic terminal equipment, and the like. The playback device includes a storage device, a processing device, and may also include an interface device. Wherein, the storage device may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The storage device also includes a memory controller, which can control access to the memory by other components of the device, such as a CPU and a peripheral interface. The storage device is used to store at least one program and image data to be decoded. The program stored in the storage device includes an operating system, a communication module (or instruction set), a graphics module (or instruction set), a text input module (or instruction set), and an application (or instruction set). The program in the storage device also includes an instruction set for performing a decoding operation on the image data in time sequence based on the technical solution provided by the decoding method. The processing device includes, but is not limited to: CPU, GPU, FPGA (Field-Programmable Gate Array), ISP (Image Signal Processing image processing chip), or other including at least data stored in a storage device dedicated to processing A program processing chip (such as AI dedicated chip), etc. The processing device calls and executes at least one program stored in the storage device to decode the stored original image or image data in the original image according to the decoding method. Among them, the use of processing devices such as FPGA that can process matrix data in parallel is more suitable for efficient and real-time decoding processing of the acquired image data. The interface device includes, but is not limited to: a data line interface and a network interface; examples of the data line interface include: display interfaces such as VGA interface and HDMI interface, serial interfaces such as USB, and parallel interfaces such as data bus. Examples of network interfaces include at least one of the following: short-range wireless network interfaces such as Bluetooth-based network interfaces and WiFi network interfaces, such as wireless network interfaces of mobile networks based on 3G, 4G, or 5G protocols, such as wired network interfaces that include network cards Wait. The playback device also includes a display device for displaying the decoded image data, wherein the image data is one of multiple channels of image data set based on the color of an original image. The display device at least includes a display screen, a display screen controller, etc., where the display screen includes, for example, a liquid crystal display screen, a curved display screen, a touch screen, and the like. The display screen controller includes, for example, a processor dedicated to the display device, a processor integrated with the processor in the processing device, and the like. In some scenarios, the playback device is set up with a traffic command center for decoding and displaying the encoded image data transmitted from the camera device. In other scenarios, the playback device is configured on a computer device that is communicatively connected with the minimally invasive medical device, which is connected to the minimally invasive medical device through an optical fiber or other dedicated data line, and connects the current minimally invasive medical device The encoded image data is decoded and played. In other scenarios, the playback device is configured in the computer room of the TV forwarding center, and is used to decode and play the encoded image data transmitted by the camera set on the stadium for video editing. In other scenarios, the playback device is a set-top box, which is used to decode the code stream in the corresponding TV channel in the TV signal and output it to the TV for display.
所述个人使用的电子终端设备包括台式电脑、笔记本电脑、平板电脑、和专用于制作电视节目、电影、电视剧等的剪接设备等。所述电子终端设备包含存储装置、处理装置。其中,存储装置和处理装置可与前述摄像设备中的对应装置相同或相似,在此不再详述。所述电子终端设备还可以包含显示装置,用于显示经解码得到的图像数据。在此,在一些示例中,所 述电子终端的硬件及软件模块可与前述播放设备中的对应装置相同或相似,在此也不再重述。在又一些示例中,所述电子终端设备还可以包括图像获取接口,用于获取源自于经编码的编码图像数据。所述图像获取接口可以为网络接口、数据线接口、或程序接口。其中,所述网络接口和数据线接口可与前述播放设备中的对应装置相同或相似,在此不再详述。例如,藉由所述网络接口,所述电子终端设备的处理装置从互联网中下载的编码图像数据。再如,藉由所述数据线接口,所述电子终端设备的处理装置从存储装置中获取编辑文件。The electronic terminal equipment for personal use includes desktop computers, notebook computers, tablet computers, and editing equipment dedicated to the production of TV programs, movies, TV series, and the like. The electronic terminal equipment includes a storage device and a processing device. Wherein, the storage device and the processing device may be the same or similar to the corresponding devices in the aforementioned camera equipment, and will not be described in detail here. The electronic terminal equipment may also include a display device for displaying the decoded image data. Here, in some examples, the hardware and software modules of the electronic terminal may be the same as or similar to the corresponding devices in the aforementioned playback device, and will not be repeated here. In still other examples, the electronic terminal device may further include an image acquisition interface for acquiring encoded image data derived from the encoding. The image acquisition interface may be a network interface, a data line interface, or a program interface. Wherein, the network interface and the data line interface can be the same or similar to the corresponding devices in the aforementioned playback device, and will not be described in detail here. For example, through the network interface, the processing device of the electronic terminal device downloads encoded image data from the Internet. For another example, through the data line interface, the processing device of the electronic terminal device obtains the edited file from the storage device.
所述服务器包括但不限于单台服务器、服务器集群、分布式服务器、基于云技术的服务端等。其中,所述服务器包括存储装置、处理装置和图像获取接口等。其中所述存储装置和处理装置可配置于同一台实体服务器设备中,或根据各实体服务器设备的分工而配置在多台实体服务器设备中。所述图像获取接口可以为网络接口、或数据线接口。所述服务器中所包含的存储装置、处理装置和图像获取接口等可与前述终端设备中所提及的对应装置相同;或基于服务器的吞吐量、处理能力、存储要求而专门设置的用于服务器的各对应装置。例如,所述存储装置还可包含固态硬盘等。例如,所述处理装置还可包含专用于服务器的CPU等。所述服务器中的图像获取接口获取来自互联网中的编码图像数据、和播放指令,处理装置基于所述播放指令对所获取的编码图像数据执行本申请所述的解码方法。The server includes but is not limited to a single server, a server cluster, a distributed server, a server based on cloud technology, and the like. Wherein, the server includes a storage device, a processing device, an image acquisition interface, and the like. The storage device and the processing device may be configured in the same physical server device, or be configured in multiple physical server devices according to the division of labor of each physical server device. The image acquisition interface may be a network interface or a data line interface. The storage device, processing device, image acquisition interface, etc. included in the server may be the same as the corresponding devices mentioned in the aforementioned terminal equipment; or specifically set for the server based on the server's throughput, processing capacity, and storage requirements The corresponding devices. For example, the storage device may also include a solid state drive or the like. For example, the processing device may also include a CPU dedicated to a server or the like. The image acquisition interface in the server acquires coded image data and playback instructions from the Internet, and the processing device executes the decoding method described in this application on the acquired encoded image data based on the playback instructions.
请参阅图7,显示为所述解码方法在一实施方式中的流程图。在步骤S210中,将所获取的编码图像数据进行解码,以提取用于描述图像数据多个位平面的位平面序列数据。在此,所述编码图像数据包括前述提及的编码文件和码流。例如,所获取的编码图像数据为经下载而存储在本地的完整格式的文件。又如,所获取的编码图像数据为利用流传输协议实时传输的视频流等。Please refer to FIG. 7, which shows a flowchart of the decoding method in an embodiment. In step S210, the acquired encoded image data is decoded to extract bit-plane sequence data describing multiple bit-planes of the image data. Here, the encoded image data includes the aforementioned encoded file and code stream. For example, the acquired encoded image data is a file in a complete format that is downloaded and stored locally. For another example, the acquired encoded image data is a video stream transmitted in real time using a streaming protocol.
其中,所述编码图像数据中可包含以下头信息:用于描述编码图像数据编码方式、基于颜色将原始图像分路而得的图像数据的起始数据位置,各图像数据中的各位平面序列数据的起始位置等。根据所述头信息,本步骤对所获取的编码图像数据进行解码处理的方式为前述步骤S140中编码处理的方式的逆处理。Wherein, the encoded image data may contain the following header information: used to describe the encoding method of the encoded image data, the starting data position of the image data obtained by dividing the original image based on color, and the bit plane sequence data in each image data The starting position and so on. According to the header information, the method of performing decoding processing on the acquired encoded image data in this step is the inverse processing of the encoding processing method in the foregoing step S140.
在一些示例中,所述编码处理方式举例为无损编码处理方式。在一些示例中,所述无损编码处理方式为熵编码方式,对应地,所述步骤S210包括采用熵解码方式,将编码图像数据进解编码处理。其中,所述熵解码方式包括但不限于:香农解码、哈夫曼解码。在另一些示例中,所述无损编码处理方式为基于熵编码而改进的编码方式,例如,采用基于行程长度的熵编码方式,对应地,所述步骤S210包括采用基于行程长度的熵解码方式对编码图像数据进行解码处理。In some examples, the encoding processing manner is a lossless encoding processing manner. In some examples, the lossless encoding processing method is an entropy encoding method. Correspondingly, the step S210 includes adopting an entropy decoding method to de-encode the encoded image data. Wherein, the entropy decoding method includes, but is not limited to: Shannon decoding and Huffman decoding. In other examples, the lossless encoding processing method is an improved encoding method based on entropy encoding, for example, an entropy encoding method based on run length is adopted. Correspondingly, the step S210 includes adopting an entropy decoding method based on run length to The encoded image data is decoded.
在上述提及的任一示例所述的编码方式基础上,所述编码处理方式包括:按照预设的频 谱段所对应的编码方式,将各位平面序列数据进行编码处理。对应地,所述步骤S210按照基于位平面对应设置不同的解码方式,并将编码图像文件进行解码处理。例如,按照熵编码所对应的解码方案将对应第b9-b2位平面的各位平面序列数据进行解码处理,以及按照字节编码所对应的解码方式将其他待解码数据进行编解码处理等。On the basis of the encoding method in any of the above-mentioned examples, the encoding processing method includes: encoding each bit plane sequence data according to the encoding method corresponding to the preset frequency spectrum segment. Correspondingly, in the step S210, different decoding modes are set correspondingly based on the bit plane, and the encoded image file is decoded. For example, the bit plane sequence data corresponding to the b9-b2th bit plane is decoded according to the decoding scheme corresponding to the entropy encoding, and other data to be decoded is encoded and decoded according to the decoding method corresponding to the byte encoding.
在上述提及的任一示例所述的编码方式基础上,所述编码处理方式还包括以基于所述序列化周期而设置的编码单元,将相应位平面序列数据进行编码处理。对应地,所述步骤S210包括:基于所述序列化周期而设置解码单元,将编码图像数据中已编码的各位平面序列数据进行解码处理。On the basis of the encoding method in any of the aforementioned examples, the encoding processing method further includes encoding the corresponding bit-plane sequence data with an encoding unit set based on the serialization period. Correspondingly, the step S210 includes: setting a decoding unit based on the serialization period to decode the encoded bit plane sequence data in the encoded image data.
在此,依据序列化周期所划分的位平面矩阵数据具有更好的内聚性,故,按照字或字节,并将各已编码的位平面序列数据进行解码处理。以图4所示的序列化周期,并按照字节编码进行编码处理为例,编码后的位平面序列数据中对应各序列化周期的序列段,采用4bit一组编码符号表示,则按照编码符号所对应的4bit一组的二进制进行解码处理,得到以4组4bit的二进制数据表示一个序列段,并由多个序列段描述的位平面序列数据。Here, the bit-plane matrix data divided according to the serialization period has better cohesion. Therefore, each encoded bit-plane sequence data is decoded according to words or bytes. Taking the serialization cycle shown in Figure 4 and encoding according to byte encoding as an example, the sequence segment corresponding to each serialization cycle in the encoded bit-plane sequence data is represented by a set of 4bit encoding symbols, and then according to the encoding symbols The corresponding 4-bit set of binary data is decoded to obtain the bit-plane sequence data represented by four sets of 4-bit binary data and described by multiple sequence sections.
另外,由于二进制数据中的位越高其信息量越集中,因此,根据编码设备所提供的不同位平面的序列化周期,设置不同的解码单元。例如,采用包含8*8矩阵的序列化周期T1对应字编码方式,对高6位位平面的编码后的位平面序列数据进行解码处理,得到以4组8bit二进制数据表示一个序列段,以及由多个序列段描述的上述各位平面序列数据;以及采用包含4*4矩阵的序列化周期T2对应字编码方式,对低4位位平面的编码后的位平面序列数据进行解码处理,得到以4组4bit二进制数据表示一个序列段,以及由多个序列段描述的上述各位平面序列数据。In addition, because the higher the bit in the binary data, the more concentrated the amount of information. Therefore, according to the serialization period of different bit planes provided by the encoding device, different decoding units are set. For example, using an 8*8 matrix serialization cycle T1 corresponding word encoding method to decode the encoded bit-plane sequence data of the upper 6-bit bit-plane to obtain a sequence segment represented by 4 groups of 8-bit binary data, and The above-mentioned bit-plane sequence data described by multiple sequence segments; and using the corresponding word encoding method of the serialization period T2 containing a 4*4 matrix, the coded bit-plane sequence data of the lower 4 bit-planes is decoded to obtain a 4 A group of 4bit binary data represents a sequence segment, and the above-mentioned bit plane sequence data described by multiple sequence segments.
在此,一些对应低数据位位平面(如b1、b0位平面)的各位平面序列数据的解码方式,以及对应低频谱子带(如LL3子带)的像素数据块的各像素数据的解码方式,可采用基于熵编码所对应的解码方案将已编码的各位平面序列数据及像素数据进行解码处理;或者,利用现有的对应编码方式的解码方式进解编码处理。Here, some decoding methods for each bit plane sequence data corresponding to low data bit planes (such as b1 and b0 bit planes), and decoding methods for each pixel data of pixel data blocks corresponding to low frequency spectrum subbands (such as LL3 subband) , The encoded bit plane sequence data and pixel data can be decoded by a decoding scheme based on entropy coding; or, the existing decoding method corresponding to the encoding method can be used for the decoding processing.
需要说明的是,上述任一示例并非相互排斥,而是可基于包含利用序列化周期而设置的编码规则而对应设置的解码规则进行解码处理并得到多个位平面序列数据。It should be noted that any of the above examples are not mutually exclusive, but can be decoded based on a decoding rule set correspondingly including an encoding rule set using a serialization period to obtain multiple bit-plane sequence data.
在此,根据头信息中所描述的各位平面序列数据的起始位置,将通过执行步骤S220将多个位平面的为平面序列数据进行矩阵化处理。其中,根据编码所设定的位平面及所对应的序列化周期,选择相应的位平面序列化数据执行下述步骤S220。Here, according to the starting position of the bit-plane sequence data described in the header information, by performing step S220, the plane sequence data of the multiple bit planes will be matrixed. Among them, according to the bit plane set by the encoding and the corresponding serialization period, the corresponding bit plane serialized data is selected to execute the following step S220.
在步骤S220中,基于预设的序列化周期,将相应位平面的位平面序列数据转换成位平面矩阵数据;其中,所述序列化周期是将预设m*n矩阵依据相邻数据的序列化而设置的周期。 其中,所述序列化周期与前述编码方法中所提及的序列化周期一致,在此不再详述。In step S220, based on a preset serialization period, the bit-plane sequence data of the corresponding bit-plane is converted into bit-plane matrix data; wherein, the serialization period is to convert the preset m*n matrix according to the sequence of adjacent data The cycle set by Wherein, the serialization period is consistent with the serialization period mentioned in the foregoing encoding method, and will not be described in detail here.
在一些实施方式中,所述序列化周期是基于位平面而设置的。根据所得到的各位平面序列数据所对应的位平面,按照序列化周期将各为平面序列数据转换成位平面矩阵数据。以图4和图5所示的序列化周期,以及按二进制数据为由低到高而确定的位平面包括:位平面0、位平面1、…、位平面9为例,利用包含8*8矩阵的序列化周期将位平面6-9的各位平面序列数据转换成相应位平面矩阵数据;利用包含4*4矩阵的序列化周期将位平面2-5的各位平面序列数据转换成相应的位平面矩阵数据。In some embodiments, the serialization period is set based on a bit plane. According to the bit plane corresponding to the obtained bit-plane sequence data, each plane sequence data is converted into bit-plane matrix data according to the serialization cycle. Take the serialization period shown in Figures 4 and 5, and the bit planes determined from low to high according to binary data, including: bit plane 0, bit plane 1,..., bit plane 9 as an example, using 8*8 The serialization cycle of the matrix converts the bit-plane sequence data of bit planes 6-9 into corresponding bit-plane matrix data; the serialization cycle containing the 4*4 matrix converts the bit-plane sequence data of bit planes 2-5 into the corresponding bit planes. Plane matrix data.
需要说明的是,上述序列化周期与位平面的对应关系仅为举例,而非对本申请的限制。事实上,根据实际编码需要,低频位平面数据,如上述示例中的位平面0-1的各位平面矩阵数据也可在解码后直接按照包头中所提供的矩阵信息进行矩阵转换以得到位平面矩阵数据,或者采用包含4*4矩阵的序列化周期进行所述转换处理,再或者采用对应编码方案中的现有转换处理方式进行所述转换处理。其中,现有转换处理方式包括但不限于Zigzag折线处理方式等。It should be noted that the foregoing correspondence between the serialization period and the bit plane is only an example, and is not a limitation of the present application. In fact, according to actual coding needs, low-frequency bit-plane data, such as the bit-plane 0-1 bit-plane matrix data in the above example, can also be converted directly according to the matrix information provided in the packet header to obtain the bit-plane matrix after decoding. For the data, either a serialization cycle including a 4*4 matrix is used for the conversion process, or an existing conversion process in the corresponding coding scheme is used for the conversion process. Among them, the existing conversion processing methods include, but are not limited to, Zigzag polyline processing methods.
按照由编码方法中所提及任一示例所确定的序列化周期,在一些示例中,所述步骤S220包括:直接将所得到的位平面序列数据按照预设的序列化周期进行所述转换处理,以得到位平面矩阵数据。换言之,无需对位平面序列数据进行对应编码方案中分块处理的逆处理,而直接按照预设的序列化周期将相应的各位平面序列数据转换成位平面矩阵数据。按照上述示例的描述,本步骤可对所获取的较高位的位平面中各位平面序列数据,按照预设的序列化周期进行转换处理;或者,本步骤对全部位平面中各位平面序列数据,按照预设的序列化周期进行转换处理。According to the serialization period determined by any of the examples mentioned in the encoding method, in some examples, the step S220 includes: directly performing the conversion processing on the obtained bit-plane sequence data according to the preset serialization period , To get the bit plane matrix data. In other words, there is no need to perform the inverse processing of the block processing in the corresponding coding scheme on the bit-plane sequence data, but directly convert the corresponding bit-plane sequence data into bit-plane matrix data according to the preset serialization cycle. According to the description of the above example, this step can convert the acquired bit-plane sequence data in the higher bit plane according to the preset serialization cycle; or, in this step, the bit-plane sequence data in all bit planes can be converted according to The preset serialization cycle performs conversion processing.
在此,所述转换处理的方式包括:按照所述序列化周期,将相应位平面序列数据序列化成多个序列段;按照所述序列化周期所描述的序列段的起始数据和结束数据,将相应位平面的各序列段转换成矩阵形式,以及按照各序列段在为平面序列数据中的位置,将各矩阵形式的数据合并成位平面矩阵数据。Here, the conversion processing method includes: serializing the corresponding bit-plane sequence data into a plurality of sequence segments according to the serialization period; according to the start data and end data of the sequence segment described in the serialization period, Convert each sequence segment of the corresponding bit plane into a matrix form, and merge the data in each matrix form into bit plane matrix data according to the position of each sequence segment in the plane sequence data.
如图4,以序列化周期中所描述的序列段的长度分割相应的位平面序列数据,并将所分割的每段序列段,按照序列化周期中所描述的矩阵形式进行转换,以得到4*4矩阵形式的数据。按照各序列段的起始数据和结束数据在相应矩阵中的位置,将各矩阵形式的数据合并成位平面矩阵数据。其中,图4中x j,k为位平面矩阵数据中第(j,k)位置的数据。 As shown in Figure 4, the corresponding bit-plane sequence data is divided by the length of the sequence segment described in the serialization cycle, and each segment of the segmented sequence is converted according to the matrix form described in the serialization cycle to obtain 4 *4 Data in matrix form. According to the position of the start data and end data of each sequence segment in the corresponding matrix, the data in the form of each matrix is merged into bit-plane matrix data. Among them, x j, k in FIG. 4 is the data at the (j, k)th position in the bit plane matrix data.
藉由上述示例可见,相邻序列段在位平面矩阵数据中的位置与所述序列化周期中的起始数据和结束数据所在矩阵的行/列相关,因此,上述以位平面序列数据沿行方向进行合并的方式仅为举例,而非对本申请的限制。通过对所得到的位平面矩阵数据执行步骤S230得到解码 后的图像数据。It can be seen from the above example that the position of adjacent sequence segments in the bit-plane matrix data is related to the row/column of the matrix where the start data and the end data of the serialization period are located. The way to merge the directions is only an example, not a limitation of the application. The decoded image data is obtained by performing step S230 on the obtained bit-plane matrix data.
在另一些示例中,根据编码过程中采用了对位平面矩阵数据进行分块操作,对应地,所述步骤S220包括:将相应位平面的位平面序列数据进行分块处理,以得到多个序列数据块;基于预设的序列化周期,将相应位平面的各序列数据块转换成矩阵数据块;以及基于各序列数据块在相应位平面序列数据中的位置,将各所述分块合并成位平面矩阵数据。In other examples, according to the block operation of the bit-plane matrix data used in the encoding process, correspondingly, the step S220 includes: block the bit-plane sequence data of the corresponding bit-plane to obtain multiple sequences Data block; based on a preset serialization cycle, convert each sequence data block of the corresponding bit plane into a matrix data block; and based on the position of each sequence data block in the corresponding bit plane sequence data, merge each of the blocks into Bit plane matrix data.
根据采用包含步骤S120的编码方法,所提取出的位平面序列数据由多个序列数据块组成,所述解码设备依据上述示例所提供的转换方式,将各序列数据块转换成矩阵数据块,其中,所述转换方式与前述提及的任一示例中的转换方式相同或相似,在此不再详述。按照同一位平面序列数据中各序列数据块的顺序和位置,将所对应的各矩阵数据块合并成位平面矩阵数据,并执行步骤S230。According to the encoding method including step S120, the extracted bit-plane sequence data is composed of a plurality of sequence data blocks, and the decoding device converts each sequence data block into a matrix data block according to the conversion method provided in the above example, wherein The conversion method is the same as or similar to the conversion method in any of the aforementioned examples, and will not be described in detail here. According to the sequence and position of the sequence data blocks in the same bit-plane sequence data, the corresponding matrix data blocks are merged into bit-plane matrix data, and step S230 is executed.
在步骤S230中,按照各位平面所在二进制数据位,将所得到的所有位平面矩阵数据合并成所描述的图像数据。In step S230, according to the binary data bits of each bit plane, all the obtained bit-plane matrix data are merged into the described image data.
以前述编码中所使用的小波变换而确定的频谱及其位平面为例,如图3所示,按照各位平面矩阵数据所描述的位平面的区域位置将各位平面矩阵数据对应填入,得到在频域内一个图像数据所对应的全频谱的矩阵数据;将所述全频谱的矩阵数据进行小波变换的逆变换得到图像数据。Take the frequency spectrum and its bit plane determined by the wavelet transform used in the aforementioned encoding as an example. As shown in Figure 3, fill in the bit plane matrix data corresponding to the bit plane location described by the bit plane matrix data to obtain Full-spectrum matrix data corresponding to one image data in the frequency domain; performing inverse wavelet transformation on the full-spectrum matrix data to obtain image data.
以前述编码中所使用的二进制数确定位平面为例,如图2所示,按照各位平面矩阵数据所描述的二进制数据位,将各位平面矩阵数据对应填入,得到图像数据。Taking the binary number used in the foregoing encoding as an example to determine the bit plane, as shown in FIG. 2, according to the binary data bits described by the bit plane matrix data, the bit plane matrix data is correspondingly filled in to obtain the image data.
基于上述任一示例所提供的图像数据可为按照颜色将所获取的原始图像分成多路图像数据中的一路图像数据,根据解码包头信息等,将对应同一幅原始图像的多路图像数据合并,得到解码后的原始图像,将所述原始图像输出至显示屏,则为显示屏上所展现的图像内容。The image data provided based on any of the above examples can be that the acquired original image is divided into one of the multiple channels of image data according to color, and the multiple channels of image data corresponding to the same original image are combined according to the decoding header information, etc., Obtain the decoded original image, and output the original image to the display screen, which is the image content displayed on the display screen.
基于上述任一提供的编码设备和解码设备,在一些应用中,一种图像传输系统由至少所述编码设备和解码设备构成。请参阅图8,其显示为图像传输系统在一实施方式中的结构示意图。以电视节目的传输为例,所述编码设备可配置于用于制作电视节目的计算机设备中,并将电视节目的原始视频中的原始图像(如主帧图像)基于上述编码方法执行编码操作,并藉由视频编码技术将编码后的编码图像数据制作成视频文件。所述视频文件可通过互联网、电视信号专用信道等传输至解码设备。所述解码设备可配置于用于播放电视节目的机顶盒或电视机中,所述解码设备基于对应于编码方法而设置的解码方法对所接收的视频文件进行解码,并将解码后的包含原始图像的视频显示在电视机的显示屏上。Based on any one of the encoding equipment and decoding equipment provided above, in some applications, an image transmission system is composed of at least the encoding equipment and decoding equipment. Please refer to FIG. 8, which shows a schematic structural diagram of an image transmission system in an embodiment. Taking the transmission of a TV program as an example, the encoding device can be configured in a computer device used to produce a TV program, and the original image (such as the main frame image) in the original video of the TV program is encoded based on the foregoing encoding method. And through the video coding technology to make the encoded image data into a video file. The video file can be transmitted to the decoding device via the Internet, a dedicated channel for television signals, and the like. The decoding device may be configured in a set-top box or a TV set for playing television programs, and the decoding device decodes the received video file based on a decoding method set corresponding to the encoding method, and decodes the original image after the decoding method. The video is displayed on the TV screen.
需要说明的是,所述电视机可视为是播放设备的一种具体示例,换言之,图8所示的图像传输系统可包含编码设备和播放设备。It should be noted that the television can be regarded as a specific example of a playback device. In other words, the image transmission system shown in FIG. 8 may include an encoding device and a playback device.
在另一些应用中,图8中所示的编码设备可由摄像设备来实现,以及解码设备可由包含显示屏的播放设备来实现。以道路监控的高清画面的传输为例,所述编码设备可配置于用于制作获取道路监控图像的摄像设备中,并将所摄取的每一幅原始图像按照上述编码方法执行编码操作得到图像码流,所述图像码流可通过互联网、专门架设的数据线(如光纤等)等传输至播放设备。所述播放设备可配置于用于监控道路的机房中,并配置有至少一个显示屏。所述播放设备基于用户的操作获取指定摄像设备所提供的图像码流,并按照对应于编码方法而设置的解码方法对所接收的图像码流进行解码,并将解码后的原始图像显示在显示屏上。In other applications, the encoding device shown in FIG. 8 can be implemented by a camera device, and the decoding device can be implemented by a playback device including a display screen. Taking the transmission of high-definition pictures of road monitoring as an example, the encoding device can be configured in a camera device for producing and acquiring road monitoring images, and each original image captured is encoded according to the above-mentioned encoding method to obtain an image code Stream, the image code stream can be transmitted to the playback device via the Internet, a specially constructed data line (such as optical fiber, etc.). The playback device can be configured in a computer room for monitoring roads, and is equipped with at least one display screen. The playback device obtains the image code stream provided by the designated camera device based on the user's operation, decodes the received image code stream according to the decoding method set corresponding to the encoding method, and displays the decoded original image on the display On the screen.
需要说明的是,对于未被播放的图形码流将以视频文件形式保存,并在需要调阅时,对所保存的视频文件进行解码处理,并将解码后的原始图像逐一显示在与解码设备相连的显示屏上。由此可见,图8所示的图像传输设备还可以包含摄像设备和解码设备。在此不再一一举例。It should be noted that the unplayed graphics stream will be saved in the form of video files, and when you need to read them, the saved video files will be decoded, and the decoded original images will be displayed on the decoding device one by one. On the connected display. It can be seen that the image transmission device shown in FIG. 8 may also include a camera device and a decoding device. I will not give examples one by one here.
基于上述任一提供的编码和解码方式,本申请还提供一种图像传输系统,请参阅图9其显示为图像传输系统在又一实施方式中的结构示意图。所述图像传输系统所包含的编码设备和解码设备可至少部分地共用硬件装置。所述图像传输系统举例为录放相机、包含显示屏的电子终端等。Based on any of the encoding and decoding methods provided above, this application also provides an image transmission system. Please refer to FIG. 9 which shows a schematic structural diagram of the image transmission system in another embodiment. The encoding equipment and decoding equipment included in the image transmission system may at least partially share hardware devices. Examples of the image transmission system are a recording and playback camera, an electronic terminal including a display screen, and the like.
在此,所述图像传输系统包含图像获取接口、存储装置和处理装置。其中,所述图像获取接口可以包含网络接口、数据线接口、或程序接口等。在编码期间,通过所述图形获取接口获取摄像装置或互联网中的原始图像,处理装置通过调取存储装置中所存储的程序来执行编码操作,以将所获取的原始图像编码成编码图像数据,并存储在存储装置中。当所述图像传输系统基于用户操显示该原始图像时,处理装置通过调用存储装置中的程序来执行解码操作,并将解码后所得到的原始图像显示在显示屏中。其中,该图像传输系统中的编码和解码操作均可基于本申请所提供的相应方法来执行,在此不再重述。Here, the image transmission system includes an image acquisition interface, a storage device, and a processing device. Wherein, the image acquisition interface may include a network interface, a data line interface, or a program interface. During encoding, the original image in the camera device or the Internet is acquired through the graphic acquisition interface, and the processing device executes the encoding operation by calling the program stored in the storage device to encode the acquired original image into encoded image data, And stored in the storage device. When the image transmission system displays the original image based on a user operation, the processing device executes the decoding operation by calling the program in the storage device, and displays the original image obtained after decoding on the display screen. Wherein, the encoding and decoding operations in the image transmission system can be performed based on the corresponding methods provided in this application, and will not be repeated here.
需要说明的是,通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请的部分或全部可借助软件并结合必需的通用硬件平台来实现。所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,还可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请还提供一种计算机可读存储介质,所述存储介质存储有至少一个程序,所述程序在被执行时实现前述的任一所述的编码方法或解码方法,比如实现前述对应图1或图7所描述的方法。It should be noted that through the description of the above implementation manners, those skilled in the art can clearly understand that part or all of this application can be implemented by means of software in combination with a necessary general hardware platform. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on this understanding, this application also provides a computer-readable storage medium that stores at least one program that, when executed, implements any of the foregoing encoding methods or decoding methods, such as The foregoing corresponds to the method described in FIG. 1 or FIG. 7.
基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可包括其上存储有机器可执行指令的一个或多个机器可读介质,这些指令在由诸如计算机、计算机网络或其他电子设备等一个或多个机器执 行时可使得该一个或多个机器根据本申请的实施例来执行操作。例如编码方法或解码方法中的各步骤等。机器可读介质可包括,但不限于,软盘、光盘、CD-ROM(紧致盘-只读存储器)、磁光盘、ROM(只读存储器)、RAM(随机存取存储器)、EPROM(可擦除可编程只读存储器)、EEPROM(电可擦除可编程只读存储器)、磁卡或光卡、闪存、或适于存储机器可执行指令的其他类型的介质/机器可读介质。Based on this understanding, the technical solution of the present application essentially or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can include one or more machine executable instructions stored thereon. A machine-readable medium, when these instructions are executed by one or more machines, such as a computer, a computer network, or other electronic devices, can cause the one or more machines to perform operations according to the embodiments of the present application. For example, the steps in the encoding method or the decoding method. Machine-readable media may include, but are not limited to, floppy disks, optical disks, CD-ROM (compact disk-read only memory), magneto-optical disks, ROM (read only memory), RAM (random access memory), EPROM (erasable Except programmable read-only memory), EEPROM (electrically erasable programmable read-only memory), magnetic or optical cards, flash memory, or other types of media/machine-readable media suitable for storing machine-executable instructions.
另外,任何连接都可以适当地称为计算机可读介质。例如,如果指令是使用同轴电缆、光纤光缆、双绞线、数字订户线(DSL)或者诸如红外线、无线电和微波之类的无线技术,从网站、服务器或其它远程源发送的,则所述同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线电和微波之类的无线技术包括在所述介质的定义中。然而,应当理解的是,计算机可读写存储介质和数据存储介质不包括连接、载波、信号或者其它暂时性介质,而是旨在针对于非暂时性、有形的存储介质。如申请中所使用的磁盘和光盘包括压缩光盘(CD)、激光光盘、光盘、数字多功能光盘(DVD)、软盘和蓝光光盘,其中,磁盘通常磁性地复制数据,而光盘则用激光来光学地复制数据。In addition, any connection is properly termed a computer-readable medium. For example, if the instruction is sent from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology such as infrared, radio, and microwave, the Coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer readable and writable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are intended for non-transitory, tangible storage media. For example, the magnetic disks and optical disks used in the application include compact disks (CD), laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks. Among them, disks usually copy data magnetically, while optical disks use lasers for optical Copy data locally.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, rather than corresponding to the embodiments of the present application. The implementation process constitutes any limitation.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
上述实施例仅例示性说明本申请的原理及其功效,而非用于限制本申请。任何熟悉此技术的人士皆可在不违背本申请的精神及范畴下,对上述实施例进行修饰或改变。因此,举凡所属技术领域中具有通常知识者在未脱离本申请所揭示的精神与技术思想下所完成的一切等效修饰或改变,仍应由本申请的权利要求所涵盖。The foregoing embodiments only exemplarily illustrate the principles and effects of the present application, and are not used to limit the present application. Anyone familiar with this technology can modify or change the above-mentioned embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or changes made by persons with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed in this application should still be covered by the claims of this application.

Claims (33)

  1. 一种图像的编码方法,其特征在于,包括:An image coding method, characterized in that it comprises:
    将所获取的图像数据按照二进制数据位分成多个位平面矩阵数据;Dividing the acquired image data into multiple bit plane matrix data according to binary data bits;
    基于预设的序列化周期,将至少部分位平面的位平面矩阵数据进行序列化处理,以得到位平面序列数据;其中,所述序列化周期是将预设m*n矩阵依据相邻数据的序列化而设置的周期;Based on the preset serialization period, serialize at least part of the bit-plane matrix data of the bit-plane to obtain bit-plane serial data; wherein, the serialization period is based on the preset m*n matrix according to adjacent data The period set for serialization;
    将所得到的各所述位平面序列数据进行编码处理,并生成所述图像数据的编码图像数据。Perform encoding processing on each of the obtained bit-plane sequence data, and generate encoded image data of the image data.
  2. 根据权利要求1所述的图像的编码方法,其特征在于,所述将所获取的图像数据按照二进制数据位分成多个位平面矩阵数据的步骤包括:将所获取的图像数据进行频域转换,并按照预设二进制数据位将转换后的频域图像数据分成多个位平面矩阵数据。The image encoding method according to claim 1, wherein the step of dividing the acquired image data into a plurality of bit-plane matrix data according to binary data bits comprises: performing frequency domain conversion on the acquired image data, And divide the converted frequency domain image data into a plurality of bit-plane matrix data according to the preset binary data bits.
  3. 根据权利要求1所述的图像的编码方法,其特征在于,还包括按照颜色将所获取的原始图像分成多路图像数据的步骤;以便对每路所述图像数据进行频域转换处理的步骤。The image encoding method according to claim 1, further comprising a step of dividing the acquired original image into multiple channels of image data according to colors; so as to perform frequency domain conversion processing on each channel of the image data.
  4. 根据权利要求1所述的图像的编码方法,其特征在于,还包括将所得到的位平面矩阵数据进行分块处理的步骤;The image encoding method according to claim 1, further comprising a step of performing block processing on the obtained bit-plane matrix data;
    对应地,所述基于预设的序列化周期,将至少部分位平面的位平面矩阵数据进行序列化处理的步骤包括:Correspondingly, the step of serializing at least part of the bit-plane matrix data based on the preset serialization period includes:
    基于预设的序列化周期,将至少部分位平面的位平面矩阵数据中的各矩阵数据块进行序列化处理,以得到各序列数据块;以及Based on a preset serialization cycle, serialize each matrix data block in the bit-plane matrix data of at least a part of the bit-plane to obtain each serial data block; and
    按照各矩阵数据块在位平面矩阵数据中的位置,将各序列数据块连接成位平面序列数据。According to the position of each matrix data block in the bit plane matrix data, the sequence data blocks are connected into bit plane sequence data.
  5. 根据权利要求1或2所述的图像的编码方法,其特征在于,所述基于预设的序列化周期,将所得到的至少部分位平面矩阵数据进行序列化处理的步骤包括:The image encoding method according to claim 1 or 2, wherein the step of serializing at least part of the obtained bit-plane matrix data based on a preset serialization period comprises:
    按照基于预设的位平面而设置的序列化周期,将对应位平面的位平面矩阵数据进行序列化处理。According to the serialization period set based on the preset bit plane, the bit plane matrix data of the corresponding bit plane is serialized.
  6. 根据权利要求5所述的图像的编码方法,其特征在于,所述基于预设位平面而设置的序列化周期的数量为多个,对应较高位的位平面而设置的序列化周期中所描述的序列段的长度 大于对应较低位的位平面而设置的序列化周期中所描述的序列段的长度。The image encoding method according to claim 5, wherein the number of serialization periods set based on a preset bit plane is multiple, as described in the serialization period set corresponding to a higher bit plane The length of the sequence segment is greater than the length of the sequence segment described in the serialization period set corresponding to the lower bit plane.
  7. 根据权利要求1所述的图像的编码方法,其特征在于,所述基于预设的序列化周期,将所得到的至少部分位平面矩阵数据进行序列化处理的步骤包括:The image encoding method according to claim 1, wherein the step of serializing at least part of the obtained bit-plane matrix data based on a preset serialization period comprises:
    按照所述序列化周期,将相应位平面矩阵数据序列化成多个序列段;Serialize the corresponding bit-plane matrix data into multiple sequence segments according to the serialization cycle;
    按照所述序列化周期所描述的序列段的起始数据和结束数据,将相应位平面的各序列段予以衔接,以得到相应位平面序列数据。According to the start data and the end data of the sequence segment described in the serialization period, the sequence segments of the corresponding bit plane are connected to obtain the corresponding bit plane sequence data.
  8. 根据权利要求1所述的图像的编码方法,其特征在于,所述将各位平面序列数据进行编码处理的步骤包括:按照预设的各位平面所对应的编码方式,将各位平面序列数据进行编码处理。The image encoding method according to claim 1, wherein the step of encoding each bit plane sequence data comprises: encoding each bit plane sequence data according to a preset encoding method corresponding to each bit plane .
  9. 根据权利要求1或8所述的图像的编码方法,其特征在于,所述将各位平面序列数据进行编码处理的步骤包括:以基于所述序列化周期而设置的编码单元,将相应位平面序列数据进行编码处理。The image encoding method according to claim 1 or 8, wherein the step of encoding each bit plane sequence data comprises: using a coding unit set based on the serialization period to convert the corresponding bit plane sequence The data is encoded.
  10. 根据权利要求1或8所述的图像的编码方法,其特征在于,所述将各位平面序列数据进行编码处理的步骤包括:采用熵编码方式,将各位平面序列数据进行编码处理。The image encoding method according to claim 1 or 8, wherein the step of encoding each bit plane sequence data includes: using an entropy coding method to encode each bit plane sequence data.
  11. 根据权利要求2所述的图像的编码方法,其特征在于,所述频域转换的方式包括小波变换。The image encoding method according to claim 2, wherein the frequency domain conversion method includes wavelet transform.
  12. 根据权利要求1所述的图像的编码方法,其特征在于,所述序列化周期为基于希尔伯特折线算法得到的。The image encoding method according to claim 1, wherein the serialization period is obtained based on the Hilbert polyline algorithm.
  13. 根据权利要求1所述的图像的编码方法,其特征在于,所述图像数据包括4K及4K以上的图像数据。The image encoding method according to claim 1, wherein the image data includes 4K and above image data.
  14. 一种图像的解码方法,其特征在于,包括:An image decoding method, characterized in that it comprises:
    将所获取的编码图像数据进行解码,以提取用于描述图像数据多个位平面的位平面序列数据;Decoding the acquired encoded image data to extract bit-plane sequence data used to describe multiple bit-planes of the image data;
    基于预设的序列化周期,将相应位平面的位平面序列数据转换成位平面矩阵数据;其 中,所述序列化周期是将预设m*n矩阵依据相邻数据的序列化而设置的周期;Convert the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period; wherein, the serialization period is a period set by the preset m*n matrix according to the serialization of adjacent data ;
    按照各位平面所在二进制数据位,将所得到的所有位平面矩阵数据合并成所描述的图像数据。According to the binary data bits of each bit plane, all the obtained bit plane matrix data are merged into the described image data.
  15. 根据权利要求14所述的图像的解码方法,其特征在于,还包括:按照颜色将所得到的多路图像数据合并成一幅原始图像。The image decoding method according to claim 14, further comprising: combining the obtained multiple image data into one original image according to the color.
  16. 根据权利要求14所述的图像的解码方法,其特征在于,所述将所获取的编码图像数据进行解码的步骤包括:基于所述序列化周期而设置编码单元,将编码图像数据中已编码的各位平面序列数据进行解码处理。The image decoding method according to claim 14, wherein the step of decoding the acquired encoded image data comprises: setting an encoding unit based on the serialization period, and transforming the encoded image data into Each bit plane sequence data is decoded.
  17. 根据权利要求14所述的图像的解码方法,其特征在于,所述将所获取的编码图像数据进行解码的步骤包括:采用熵解码方式,将所获取的编码图像数据进行解码处理。The image decoding method according to claim 14, wherein the step of decoding the acquired encoded image data comprises: using an entropy decoding method to decode the acquired encoded image data.
  18. 根据权利要求14所述的图像的解码方法,其特征在于,所述基于预设的序列化周期,将相应位平面的位平面序列数据转换成位平面矩阵数据的步骤包括:The image decoding method according to claim 14, wherein the step of converting the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period comprises:
    将相应位平面的位平面序列数据进行分块处理,以得到多个序列数据块;Block the bit-plane sequence data of the corresponding bit-plane to obtain multiple sequence data blocks;
    基于预设的序列化周期,将相应位平面的各序列数据块转换成矩阵数据块;Based on the preset serialization period, convert each sequence data block of the corresponding bit plane into a matrix data block;
    基于各序列数据块在相应位平面序列数据中的位置,将各所述分块合并成位平面矩阵数据。Based on the position of each sequence data block in the corresponding bit-plane sequence data, each of the blocks is merged into bit-plane matrix data.
  19. 根据权利要求14所述的图像的解码方法,其特征在于,所述基于预设的序列化周期,将相应位平面的位平面序列数据转换成位平面矩阵数据的步骤包括:The image decoding method according to claim 14, wherein the step of converting the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period comprises:
    按照基于预设位平面而设置的序列化周期,将对应位平面的位平面序列数据转换成位平面矩阵数据。According to the serialization period set based on the preset bit plane, the bit plane sequence data of the corresponding bit plane is converted into bit plane matrix data.
  20. 根据权利要求19所述的图像的解码方法,其特征在于,所述基于预设位平面而设置的序列化周期的数量为多个,对应较高位的位平面而设置的序列化周期中所描述的序列段的长度大于对应较低位的位平面而设置的序列化周期中所描述的序列段的长度。The image decoding method according to claim 19, wherein the number of serialization periods set based on a preset bit plane is multiple, as described in the serialization period set corresponding to a higher bit plane The length of the sequence segment is greater than the length of the sequence segment described in the serialization period set corresponding to the lower bit plane.
  21. 根据权利要求14所述的图像的解码方法,其特征在于,所述基于预设的序列化周期,将 相应位平面的位平面序列数据转换成位平面矩阵数据的步骤包括:The image decoding method according to claim 14, wherein the step of converting the bit-plane sequence data of the corresponding bit-plane into bit-plane matrix data based on a preset serialization period comprises:
    按照所述序列化周期,将相应位平面序列数据序列化成多个序列段;According to the serialization cycle, serialize the corresponding bit-plane sequence data into multiple sequence segments;
    按照所述序列化周期所描述的序列段的起始数据和结束数据,将相应位平面的各序列段转换成矩阵形式,以及将各矩阵形式的数据合并成位平面矩阵数据。According to the start data and end data of the sequence segment described by the serialization period, each sequence segment of the corresponding bit plane is converted into a matrix form, and the data in each matrix form is merged into bit plane matrix data.
  22. 根据权利要求21所述的图像的解码方法,其特征在于,所述将所获取的编码图像数据进行解码的步骤包括:按照预设的位平面所对应的解码方式,将编码图像数据中已编码的各位平面序列数据进行解码处理。The image decoding method according to claim 21, wherein the step of decoding the acquired coded image data comprises: according to a decoding method corresponding to a preset bit plane, the coded image data is coded Each bit plane sequence data is decoded.
  23. 根据权利要求14所述的图像的解码方法,其特征在于,所述按照各位平面所在二进制数据位,将所得到的所有位平面矩阵数据合并成所描述的图像数据的步骤包括:按照各位平面所在二进制数据位,将所得到的所有位平面矩阵数据进行频域反变换,得到所描述的图像数据。The image decoding method according to claim 14, wherein the step of combining all the obtained bit-plane matrix data into the described image data according to the binary data bits of each bit plane comprises: For binary data bits, all the obtained bit-plane matrix data is subjected to frequency domain inverse transformation to obtain the described image data.
  24. 根据权利要求23所述的图像的解码方法,其特征在于,所述频域反转换的方式包括小波变换的反变换。The image decoding method according to claim 23, wherein the frequency domain inverse transformation method includes wavelet transform inverse transformation.
  25. 根据权利要求14所述的图像的解码方法,其特征在于,所述序列化周期为基于希尔伯特折线算法配置得到的。The image decoding method according to claim 14, wherein the serialization period is configured based on the Hilbert polyline algorithm.
  26. 根据权利要求14所述的图像的解码方法,其特征在于,解码后得到的图像数据包括8K图像数据。The image decoding method according to claim 14, wherein the image data obtained after decoding includes 8K image data.
  27. 一种图像的编码设备,其特征在于,包括:An image encoding device, characterized in that it comprises:
    图像获取接口,用于获取所述图像数据;An image acquisition interface for acquiring the image data;
    存储装置,用于存储至少一个程序和待编码的图像数据;A storage device for storing at least one program and image data to be encoded;
    处理装置,用于调用并执行所述程序,以按照如权利要求1-14中任一所述的图像编码方法将所述图像数据进行编码处理。The processing device is configured to call and execute the program to perform encoding processing on the image data according to the image encoding method according to any one of claims 1-14.
  28. 一种摄像设备,其特征在于,包括:A camera device, characterized in that it comprises:
    摄取装置,用于获取原始图像,其中,所述原始图像是由基于颜色而设置的多路图像 数据组成的;A capturing device for acquiring an original image, wherein the original image is composed of multiple image data set based on color;
    存储装置,用于存储至少一个程序和待编码的图像数据;A storage device for storing at least one program and image data to be encoded;
    处理装置,用于调用并执行所述程序,以按照如权利要求1-13中任一所述的图像编码方法将所述图像数据进行编码处理。The processing device is configured to call and execute the program to perform encoding processing on the image data according to the image encoding method according to any one of claims 1-13.
  29. 一种图像的解码设备,其特征在于,包括:An image decoding device, characterized in that it comprises:
    存储装置,用于存储至少一个程序和待解码的编码图像数据;A storage device for storing at least one program and encoded image data to be decoded;
    处理装置,用于调用并执行所述程序,以按照如权利要求14-26中任一所述的图像解码方法将所述编码图像数据进行解码处理以得到可被显示的图像数据。The processing device is used to call and execute the program to decode the encoded image data according to the image decoding method according to any one of claims 14-26 to obtain image data that can be displayed.
  30. 一种图像的播放设备,其特征在于,包括:An image playback device, characterized in that it comprises:
    存储装置,用于存储至少一个程序和待解码的编码图像数据;A storage device for storing at least one program and encoded image data to be decoded;
    处理装置,用于调用并执行所述程序,以按照如权利要求14-26中任一所述的图像解码方法将所述编码图像数据进行解码处理;A processing device, configured to call and execute the program to decode the encoded image data according to the image decoding method according to any one of claims 14-26;
    接口装置,用于将解码的图像数据传输给所连接的显示屏。The interface device is used to transmit the decoded image data to the connected display screen.
  31. 一种图像传输系统,其特征在于,包括:An image transmission system, characterized by comprising:
    图像获取接口,用于获取所述图像数据;An image acquisition interface for acquiring the image data;
    存储装置,用于存储至少一个程序、待编码的图像数据和待解码的编码图像数据;A storage device for storing at least one program, image data to be encoded and encoded image data to be decoded;
    处理装置,用于调用并执行所述程序,以按照如权利要求1-13中任一所述的图像的编码方法将所述图像数据进行编码处理;和/或按照如权利要求14-26中任一所述的图像解码方法将所述编码图像数据进行编码处理。A processing device for calling and executing the program to perform encoding processing on the image data according to the image encoding method according to any one of claims 1-13; and/or according to claims 14-26 Any one of the image decoding methods performs encoding processing on the encoded image data.
  32. 一种图像传输系统,其特征在于,包括:An image transmission system, characterized by comprising:
    如权利要求27所示的图像的编码设备、或如权利要求28所示的摄像设备;以及The image encoding device as shown in claim 27, or the imaging device as shown in claim 28; and
    如权利要求29所示的解码设备、或如权利要求30所示的播放设备。The decoding device shown in claim 29, or the playback device shown in claim 30.
  33. 一种计算机存储介质,其特征在于,包括:存储有至少一程序;所述至少一程序在被调用时执行如权利要求1-13中任一所述的图像的编码方法;或者,所述至少一程序在被调用时执行如权利要求14-26中任一所述的解码方法。A computer storage medium, comprising: storing at least one program; when called, the at least one program executes the image encoding method according to any one of claims 1-13; or, the at least When a program is called, it executes the decoding method according to any one of claims 14-26.
PCT/CN2019/075642 2019-02-21 2019-02-21 Image encoding method and decoding method, and device and system to which said methods are applicable WO2020168501A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980005137.7A CN111316644B (en) 2019-02-21 2019-02-21 Image encoding method, decoding method, and applicable devices and systems
PCT/CN2019/075642 WO2020168501A1 (en) 2019-02-21 2019-02-21 Image encoding method and decoding method, and device and system to which said methods are applicable

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/075642 WO2020168501A1 (en) 2019-02-21 2019-02-21 Image encoding method and decoding method, and device and system to which said methods are applicable

Publications (1)

Publication Number Publication Date
WO2020168501A1 true WO2020168501A1 (en) 2020-08-27

Family

ID=71159511

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/075642 WO2020168501A1 (en) 2019-02-21 2019-02-21 Image encoding method and decoding method, and device and system to which said methods are applicable

Country Status (2)

Country Link
CN (1) CN111316644B (en)
WO (1) WO2020168501A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116962299A (en) * 2023-09-21 2023-10-27 广东云下汇金科技有限公司 Data center calculation force scheduling method, system, equipment and readable storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115134475B (en) * 2022-08-31 2022-11-08 智联信通科技股份有限公司 Weighing apparatus weight discrimination intelligent management system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6477280B1 (en) * 1999-03-26 2002-11-05 Microsoft Corporation Lossless adaptive encoding of finite alphabet data
CN1954614A (en) * 2004-05-13 2007-04-25 皇家飞利浦电子股份有限公司 Method and device for encoding blocks of values
CN107610037A (en) * 2017-09-29 2018-01-19 重庆第二师范学院 A kind of image encryption method and device for merging more chaotic maps and DNA encoding
CN108028928A (en) * 2015-09-18 2018-05-11 皇家飞利浦有限公司 For compression of images quickly and efficiently and the method and apparatus of decompression

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1255770C (en) * 2003-06-30 2006-05-10 大唐微电子技术有限公司 Hierarchy tree set partition image coding decoding method based of digital signal processor
WO2007066709A1 (en) * 2005-12-07 2007-06-14 Sony Corporation Encoding device, encoding method, encoding program, decoding device, decoding method, and decoding program
US9307248B2 (en) * 2013-03-08 2016-04-05 Mediatek Inc. Image encoding method and apparatus for performing bit-plane scanning coding upon pixel data and related image decoding method and apparatus
WO2018054506A1 (en) * 2016-09-23 2018-03-29 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Transform block coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6477280B1 (en) * 1999-03-26 2002-11-05 Microsoft Corporation Lossless adaptive encoding of finite alphabet data
CN1954614A (en) * 2004-05-13 2007-04-25 皇家飞利浦电子股份有限公司 Method and device for encoding blocks of values
CN108028928A (en) * 2015-09-18 2018-05-11 皇家飞利浦有限公司 For compression of images quickly and efficiently and the method and apparatus of decompression
CN107610037A (en) * 2017-09-29 2018-01-19 重庆第二师范学院 A kind of image encryption method and device for merging more chaotic maps and DNA encoding

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116962299A (en) * 2023-09-21 2023-10-27 广东云下汇金科技有限公司 Data center calculation force scheduling method, system, equipment and readable storage medium
CN116962299B (en) * 2023-09-21 2024-01-19 广东云下汇金科技有限公司 Data center calculation force scheduling method, system, equipment and readable storage medium

Also Published As

Publication number Publication date
CN111316644A (en) 2020-06-19
CN111316644B (en) 2022-06-28

Similar Documents

Publication Publication Date Title
US7701365B2 (en) Encoding device and method, composite device and method, and transmission system
KR101442273B1 (en) Information processing device and method
TWI733986B (en) Method, apparatus and system for encoding and decoding video data
US20190082185A1 (en) Efficient lossless compression of captured raw image information systems and methods
KR101266667B1 (en) Dual-mode compression of images and videos for reliable real-time transmission
US20180309991A1 (en) Video encoding with adaptive rate distortion control by skipping blocks of a lower quality video into a higher quality video
CN103945223A (en) Video processor with frame buffer compression and methods for use therewith
TW201415897A (en) Decoder and method
JP2004221836A (en) Image processor, program, storage medium, and code expanding method
WO2016110031A1 (en) Data flow decoding method and device
TWI626841B (en) Adaptive processing of video streams with reduced color resolution
US20180084279A1 (en) Video encoding by injecting lower-quality quantized transform matrix values into a higher-quality quantized transform matrix
WO2020168501A1 (en) Image encoding method and decoding method, and device and system to which said methods are applicable
RU2510589C2 (en) Method of encoding digital video image
JP2004172957A (en) Image processor, program and storage medium
EP2787738B1 (en) Tile-based compression for graphic applications
JP2004166124A (en) Image processor, program, storage medium, and image processing method
CN111406404B (en) Compression method, decompression method, system and storage medium for obtaining video file
CN105828082A (en) Video image rapid compression system and method
JP4841504B2 (en) Image coding apparatus and method
WO2021168827A1 (en) Image transmission method and apparatus
KR20110071204A (en) Parallel processing method in wavelet-based jpeg2000
WO2020215193A1 (en) Coder, coding system, and coding method
CN108419085B (en) Video transmission system and method based on table lookup
WO2020168520A1 (en) Encoder, encoding system, and encoding method

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: 19916245

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.12.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19916245

Country of ref document: EP

Kind code of ref document: A1