Image compression method, device, computing equipment and storage medium based on narrowband image transmitter

By preprocessing and quantizing the original image, and dynamically adjusting the quantization matrix with the transmission parameters of the narrowband image transmitter, the problem of image quality degradation in narrowband image transmission is solved, and the performance and efficiency of narrowband image transmission is improved.

CN118827990BActive Publication Date: 2024-12-03BEIJING ZHAOKE HENGXING SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411297245.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-03
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

Standard compression algorithms such as JPEG are commonly used in existing narrowband image transmission, resulting in the problem of image quality degradation in application scenarios of narrowband image transmitters.

Method used

By acquiring the original image for preprocessing, including color space conversion, image size standardization and noise removal, it is divided into sub-blocks and performed discrete cosine transformation, the quantization matrix and quantization step size are dynamically adjusted according to the transmission parameters of the narrowband graph transmitter, and the quantization process is performed. and entropy encoding to generate compressed images.

Benefits of technology

The performance of narrowband image transmission is improved, unnecessary bandwidth waste is reduced, high image quality is maintained, the amount of image data is significantly reduced, and the balance between compression ratio and image quality is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118827990B_ABST
    Figure CN118827990B_ABST
Patent Text Reader

Abstract

The present application provides an image compression method, device, computing equipment and storage medium based on a narrowband image transmitter. Among them, the original image is obtained; the original image is preprocessed to generate a spatial domain image; the spatial domain image is divided into multiple sub-blocks, and each sub-block is discrete cosine transformed to obtain a sub-block in the form of a frequency domain representation; the quantization matrix is ​​determined according to the transmission parameters of the narrowband image transmitter and the dynamically adjusted quantization step size; the quantization matrix is ​​applied to quantize the sub-blocks in the frequency domain representation, and the quantized sub-blocks are entropy encoded to generate a compressed image. The technical solution provided by the present application can effectively improve the quality of image compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image compression technology, and in particular to an image compression method, apparatus, computing device and storage medium based on a narrowband image transmitter. Background Art

[0002] Image compression technology becomes particularly important in application scenarios such as remote monitoring, drone image transmission, and satellite communications that require image transmission through channels with limited bandwidth. These scenarios are often limited by bandwidth and require efficient compression of image data to ensure real-time and reliability. For narrowband image transmitters, their bandwidth resources are limited, so efficient image compression technology is required to ensure high-quality image transmission.

[0003] Currently, standard compression algorithms such as JPEG are commonly used in narrowband image transmission. Although these algorithms can effectively compress images, in the specific application scenarios of narrowband image transmitters, in order to adapt to narrowband transmission, more image details usually need to be sacrificed, resulting in a decrease in image quality. Summary of the invention

[0004] The embodiments of the present application provide an image compression method, apparatus, computing device and storage medium based on a narrowband image transmitter, so as to solve the problem of poor image compression effect in the prior art.

[0005] In a first aspect, an embodiment of the present application provides an image compression method based on a narrowband image transmitter, comprising:

[0006] Get the original image;

[0007] Preprocessing the original image to generate a spatial domain image, wherein the preprocessing includes at least color space conversion, image size standardization, and noise removal;

[0008] Dividing the spatial domain image into a plurality of sub-blocks, and performing discrete cosine transform on each sub-block to obtain a sub-block in a frequency domain representation form;

[0009] Determine a quantization matrix according to transmission parameters of the narrowband image transmitter and a dynamically adjusted quantization step size;

[0010] The sub-blocks in the frequency domain representation are quantized using the quantization matrix, and entropy coding is performed on the quantized sub-blocks to generate a compressed image.

[0011] Optionally, preprocessing the original image to generate a spatial domain image includes:

[0012] Converting the RGB color space of the original image into a YCbCr color space to generate a spatial domain image; or

[0013] Adjusting the image size of the original image to a standard size suitable for transmission by a narrowband image transmitter to generate a spatial domain image; or

[0014] An adaptive filter is used to remove image noise in the original image to generate a spatial domain image.

[0015] Optionally, the quantization matrix is ​​determined according to the transmission parameters of the narrowband image transmitter and the dynamically adjusted quantization step size:

[0016] Acquire transmission parameters of the narrowband image transmitter, wherein the transmission parameters include at least: effective channel capacity, bit error rate, and transmission delay;

[0017] Adjusting element values ​​of a quantization matrix according to the transmission parameters to adapt to the transmission limitation of the narrowband image transmitter;

[0018] Calculating the quantization step size of the quantization matrix;

[0019] Calculating the relationship between the element value of the quantization matrix and the bit error rate;

[0020] Determine a quantization matrix according to element values ​​of the quantization matrix, a quantization step size of the quantization matrix, and a relationship between element values ​​of the quantization matrix and the bit error rate;

[0021] The step of adjusting the element values ​​of the quantization matrix according to the transmission parameters includes:

[0022] By formula: , adjust the element values ​​of the quantization matrix ;

[0023] in, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter;

[0024] The step of calculating the quantization step of the quantization matrix includes:

[0025] By formula:

[0026] , calculate the quantization step size;

[0027] in, represents the quantization step size, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter, M is the width of the sub-block, is the adjustment coefficient;

[0028] The calculating of the relationship between the element value of the quantization matrix and the bit error rate includes:

[0029] By formula: , calculating the relationship between the element value of the quantization matrix and the bit error rate;

[0030] in, Expressed as bit error rate, Represented as the element value of the quantization matrix, represents the effective channel capacity of the narrowband image transmitter, Represents a constant related to the transmission parameters of the narrowband image transmitter.

[0031] Optionally, acquiring the transmission parameters of the narrowband image transmitter includes:

[0032] Measuring a bit error rate of the narrowband image transmitter;

[0033] Determining a transmission delay of the narrowband image transmitter;

[0034] Calculating the effective channel capacity of the narrowband image transmitter according to the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter;

[0035] The calculating the effective channel capacity of the narrowband image transmitter by using the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter comprises:

[0036] By formula: , calculate the effective channel capacity of the narrowband image transmitter;

[0037] in, It is represented as the effective channel capacity of the narrowband image transmitter, represents the maximum transmission rate of the narrowband image transmitter, Expressed as bit error rate, Expressed as transmission delay, It is the attenuation coefficient of the amount of data transmitted per unit time.

[0038] Optionally, performing entropy coding on the quantized sub-blocks includes:

[0039] Determining a corresponding encoding method according to the distribution density of non-zero quantized coefficients in the quantized sub-block, the encoding method including: Huffman encoding and arithmetic coding;

[0040] Encoding the quantized sub-blocks by using the encoding method;

[0041] The distribution density of non-zero quantized coefficients in the quantized sub-block is By formula: Determined, if <50%, determine that the corresponding encoding method includes arithmetic coding; if ≥50%, it is determined that the corresponding encoding method includes Huffman coding.

[0042] Optionally, it also includes:

[0043] Decoding the compressed image at the receiving end to restore the original image;

[0044] The step of decoding the compressed image at the receiving end to restore the original image includes:

[0045] Performing entropy decoding on the compressed image to obtain a spatial domain image;

[0046] The spatial domain image is inversely quantized, and the inversely transformed spatial domain image after the inverse quantization is performed to restore the original image.

[0047] Optionally, it also includes:

[0048] The element values ​​of the quantization matrix are dynamically adjusted according to the real-time transmission status of the narrowband image transmitter.

[0049] In a second aspect, an embodiment of the present application provides an image compression device based on a narrowband image transmitter, comprising:

[0050] An acquisition module, used for acquiring the original image;

[0051] A generating module, configured to preprocess the original image to generate a spatial domain image, wherein the preprocessing includes at least color space conversion, image size standardization, and noise removal; divide the spatial domain image into a plurality of sub-blocks, and perform discrete cosine transform on each sub-block to obtain a sub-block in frequency domain representation;

[0052] A determination module, used to determine a quantization matrix according to a transmission parameter of a narrowband image transmitter and a dynamically adjusted quantization step size;

[0053] The generating module is further used to apply the quantization matrix to quantize the sub-blocks in the frequency domain representation form, and to perform entropy coding on the quantized sub-blocks to generate a compressed image.

[0054] In a third aspect, an embodiment of the present application provides a computing device, comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the image compression method based on a narrowband image transmitter as described in the first aspect above.

[0055] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program, which, when executed by a computer, implements the image compression method based on a narrowband image transmitter as described in the first aspect above.

[0056] In an embodiment of the present application, an original image is obtained; the original image is preprocessed to generate a spatial domain image, and the preprocessing includes at least color space conversion, image size standardization, and noise removal; the spatial domain image is divided into a plurality of sub-blocks, and a discrete cosine transform is performed on each sub-block to obtain a sub-block in a frequency domain representation form; a quantization matrix is ​​determined based on the transmission parameters of a narrowband image transmitter and a dynamically adjusted quantization step size; the quantization matrix is ​​applied to quantize the sub-blocks in the frequency domain representation form, and entropy coding is performed on the quantized sub-blocks to generate a compressed image.

[0057] The present application scheme optimizes the image compression process by dynamically adjusting the quantization step size, and can flexibly adjust according to the actual transmission parameters of the narrowband image transmitter, thereby improving bandwidth utilization. This method can more accurately match the transmission parameters of the narrowband image transmitter and reduce unnecessary bandwidth waste. By performing discrete cosine transform on the spatial domain image and then performing quantization processing, the present application scheme can significantly reduce the amount of image data while maintaining high image quality. Through sophisticated quantization matrix design, a better balance can be achieved between compression ratio and image quality. The present application scheme adopts a preprocessing step to improve the efficiency of the subsequent compression process. Preprocessing not only includes color space conversion, but also image size standardization and noise removal, which all help to improve compression efficiency, making the entire compression process more efficient and more suitable for the real-time transmission needs of narrowband image transmitters.

[0058] In summary, the present application scheme effectively improves the performance of narrowband image transmission through the above-mentioned improvement measures.

[0059] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0061] Figure 1 A flowchart of an image compression method based on a narrowband image transmitter provided in an embodiment of the present application;

[0062] Figure 2 A schematic diagram of the structure of an image compression device based on a narrowband image transmitter provided in an embodiment of the present application;

[0063] Figure 3 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0065] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0066] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0067] Figure 1 A flowchart of an image compression method based on a narrowband image transmitter is provided for an embodiment of the present application. Figure 1 As shown, the method includes:

[0068] 101. Obtain an original image;

[0069] In this step, acquiring the raw image involves obtaining the image data from the image source without any processing. The raw image can come from various sources, such as a camera, a scanner, or a storage device. The purpose of acquiring the raw image is to prepare it for further processing and compression.

[0070] In the embodiment of this application, it is assumed that we are developing a system for real-time video transmission of drones, in which the images taken by the drones need to be compressed so that they can be efficiently transmitted through a narrowband image transmitter. The following is a specific embodiment:

[0071] Get the original image: Use a high-definition camera mounted on a drone (assuming the model is DJI Mavic Pro), which can capture images with a resolution of 1920×1080 pixels. When the drone is flying, the camera continuously captures images, capturing 30 frames per second. The original images obtained are directly stored in RAW format, that is, image data without any processing.

[0072] Next, we will move on to the next step - preprocessing the acquired raw images.

[0073] 102. Preprocessing the original image to generate a spatial domain image, wherein the preprocessing at least includes color space conversion, image size standardization, and noise removal;

[0074] In this step, the preprocessing steps include operations such as color space conversion, image size standardization, and noise removal, in order to improve the efficiency and quality of subsequent compression processing. Color space conversion usually converts the original image from RGB color space to YCbCr color space, because YCbCr color space is more conducive to image compression. Image size standardization is to ensure that the image size meets the requirements of subsequent processing. Noise removal is to reduce random noise in the image and improve image quality.

[0075] Optionally, in an embodiment of the present application, step 102 may specifically include: converting the RGB color space of the original image into a YCbCr color space to generate a spatial domain image; or adjusting the image size of the original image to a standard size suitable for transmission by a narrowband image transmitter to generate a spatial domain image; or using an adaptive filter to remove image noise in the original image to generate a spatial domain image.

[0076] In an embodiment of the present application, the acquired RAW format image is first converted into a YCbCr color space. Then, the image size is standardized to a size suitable for transmission by a narrowband image transmitter, assuming it is 640×480 pixels. Next, an adaptive filter is used to remove noise from the image. After the preprocessing is completed, the generated spatial domain image will be represented in a YCbCr color space with a size of 640×480 pixels.

[0077] Next, we will move to the next step - dividing the spatial domain image into multiple sub-blocks.

[0078] 103. Divide the spatial domain image into a plurality of sub-blocks, and perform discrete cosine transform on each sub-block to obtain a sub-block in a frequency domain representation form;

[0079] In this step, the preprocessed spatial domain image is divided into multiple smaller sub-blocks to facilitate subsequent discrete cosine transform (DCT) processing. The size of the sub-block is usually 8×8 pixels or 16×16 pixels.

[0080] In the embodiment of the present application, the preprocessed spatial domain image (size is 640×480 pixels) is divided into multiple sub-blocks of 8×8 pixels. Assuming that the size of the spatial domain image obtained after image size standardization is 640×480 pixels, it can be divided into 80×60 sub-blocks.

[0081] Next, we will move to the next step - performing discrete cosine transform on each sub-block.

[0082] Among them, discrete cosine transform (DCT) is a mathematical transform used to convert images from the spatial domain to the frequency domain. Through DCT transform, image data is represented as a combination of different frequency components, which can be more easily compressed.

[0083] In the embodiment of the present application, each 8×8 pixel sub-block is converted from the spatial domain to the frequency domain using discrete cosine transform. After DCT transformation, each sub-block will be composed of 8×8 frequency coefficients, which represent different frequency components in the sub-block.

[0084] Specifically, the two-dimensional discrete cosine transform formula can be used:

[0085]

[0086] in, It is expressed as a coefficient in the frequency domain, which indicates the amplitude of a specific frequency component in the image. u and v are frequency coordinates, corresponding to the frequencies in the horizontal and vertical directions, respectively. and Expressed as a normalization coefficient, used to adjust The values ​​of these two coefficients depend on the values ​​of the frequency coordinates u and v and are defined as follows:

[0087] ,

[0088] It is represented as a double-layer summation symbol, which means that the sum is performed on each pixel position x and y in the spatial domain, assuming that the size of the sub-block is 8×8 pixels. Represented as the pixel value in the spatial domain image, representing the grayscale value or color value at the position (x, y). For black and white images represents the grayscale value; for color images, Usually represents the value of a color channel; and It is represented as a cosine function, which is used to calculate the contribution of each pixel position to different frequency components. The parameters of these cosine functions are determined according to the frequency coordinates u and v and the spatial positions x and y; and Expressed as the product of the frequency coordinate and the spatial position, it is used to calculate the input value of the cosine function.

[0089] For example, suppose we have a sub-block of 8×8 pixels, and the grayscale value of each pixel ranges from 0 to 255. We need to calculate the DCT transform coefficients of this sub-block using the above formula.

[0090] Initialize variables:

[0091] (u,v): frequency coordinate, ranging from 0 to 7.

[0092] (x, y): spatial position coordinates, also ranging from 0 to 7.

[0093] f(x,y): pixel value in the spatial domain image.

[0094] Calculate the normalization coefficient:

[0095] For u=0 or v=0, and .

[0096] For u≠0 and v≠0, C(u)=1 and C(v)=1.

[0097] Calculate the frequency domain coefficients:

[0098] For each combination of u and v, calculate F(u,v) using the above formula.

[0099] For example, u=0 or v=0, and ,at this time:

[0100] ;

[0101] Since cos(0)=1, we can simplify it to:

[0102] ;

[0103] This means that F(0,0) is the average grayscale value of the entire sub-block.

[0104] Calculate other frequency domain coefficients:

[0105] For values ​​of u>0 and v>0, repeat the above process to calculate the corresponding F(u,v).

[0106] In this way, we can get the frequency domain representation of the entire 8×8 pixel sub-block, that is, an 8×8 F(u,v matrix, which contains the amplitude information of different frequency components in the sub-block.

[0107] Next, we will proceed to the next step - determining the quantization matrix based on the transmission parameters of the narrowband image transmitter and the dynamically adjusted quantization step size.

[0108] 104. Determine a quantization matrix according to a transmission parameter of the narrowband image transmitter and a dynamically adjusted quantization step size;

[0109] In this step, the quantization matrix is ​​used to quantize the sub-blocks in the frequency domain representation to reduce the amount of data. The element values ​​of the quantization matrix determine the degree of quantization of each frequency coefficient, which in turn affects the quality and amount of data after compression.

[0110] Dynamically adjust the quantization step size to optimize the compression effect by adjusting it in real time according to the transmission parameters of the narrowband image transmitter and the current network conditions. The larger the quantization step size, the smaller the compressed image data volume, but the image quality will be reduced; vice versa.

[0111] Optionally, in the embodiment of the present application, step 104 may specifically include:

[0112] 1041. Acquire transmission parameters of a narrowband image transmitter, where the transmission parameters at least include: effective channel capacity, bit error rate, and transmission delay;

[0113] In this step, the transmission parameters refer to the transmission characteristics of the narrowband image transmitter, including effective channel capacity, bit error rate, transmission delay, etc. These parameters are crucial to the design of the quantization matrix. Among them, the effective channel capacity reflects the actual transmission capacity of the narrowband image transmitter after considering factors such as bit error rate and transmission delay. It is an important basis for the design of the quantization matrix. The bit error rate refers to the proportion of error bits during the transmission process, reflecting the reliability of the transmission link. Transmission delay refers to the time required for data to reach the receiver from the sender, which affects real-time performance.

[0114] In an embodiment of the present application, it is assumed that we are developing a system for real-time video transmission of drones, in which images taken by the drone need to be compressed so as to be efficiently transmitted through a narrowband image transmitter.

[0115] The following is a specific embodiment:

[0116] Optionally, step 1041 may specifically include:

[0117] Obtaining the transmission parameters of the narrowband image transmitter includes:

[0118] Measuring a bit error rate of the narrowband image transmitter;

[0119] Determining a transmission delay of the narrowband image transmitter;

[0120] Calculating the effective channel capacity of the narrowband image transmitter according to the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter;

[0121] The calculating the effective channel capacity of the narrowband image transmitter by using the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter comprises:

[0122] By formula: , calculate the effective channel capacity of the narrowband image transmitter;

[0123] in, It is represented as the effective channel capacity of the narrowband image transmitter, represents the maximum transmission rate of the narrowband image transmitter, Expressed as bit error rate, Expressed as transmission delay, It is the attenuation coefficient of the amount of data transmitted per unit time.

[0124] For example, the bit error rate of a narrowband image transmitter is measured to be 1%, and the transmission delay of the narrowband image transmitter is determined to be 200ms. The maximum transmission rate of the narrowband image transmitter is 2Mbps.

[0125] Then use the above formula: , calculate the effective channel capacity of the narrowband image transmitter. Assuming that the attenuation coefficient of the amount of data transmitted per unit time is η = 0.001Mbps / ms, the effective channel capacity is:

[0126] ;

[0127] 1042. Adjust element values ​​of a quantization matrix according to the transmission parameter to adapt to a transmission limitation of the narrowband image transmitter;

[0128] 1043. Calculate the quantization step size of the quantization matrix;

[0129] 1044. Calculate the relationship between the element value of the quantization matrix and the bit error rate;

[0130] 1045. Determine a quantization matrix according to element values ​​of the quantization matrix, a quantization step size of the quantization matrix, and a relationship between the element values ​​of the quantization matrix and the bit error rate;

[0131] The step of adjusting the element values ​​of the quantization matrix according to the transmission parameters includes:

[0132] By formula:

[0133] , adjust the element values ​​of the quantization matrix ;

[0134] in, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter;

[0135] For example, assuming R=4, β=0.1, γ=0.5, σi=500, σj=1000, σi represents the average energy of the ith sub-block, and σj represents the average energy of all sub-blocks. Substituting the data into the above formula yields:

[0136] ;

[0137] The step of calculating the quantization step of the quantization matrix includes:

[0138] By formula:

[0139] , calculate the quantization step size;

[0140] in, represents the quantization step size, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter, M is the width of the sub-block, is the adjustment coefficient;

[0141] For example, assume that the maximum transmission rate of the narrowband image transmitter is 2Mbps, the bit error rate is 1%, and the transmission delay is 200ms. Based on these transmission parameters, we can dynamically adjust the quantization step size S through the following formula:

[0142]

[0143] For example, assuming R=4, β=0.1, γ=0.5, δ=0.05, M=8, σi=500, σj=1000, substituting the data into the above formula yields:

[0144] ;

[0145] It should be noted that the transmission parameters of the narrowband image transmitter (such as bit error rate, transmission delay, etc.) may change over time. For example, in the case of network congestion or signal quality deterioration, the bit error rate will increase and the transmission delay will also increase. These changes will affect the effective channel capacity of the narrowband image transmitter, thereby affecting the calculation of the quantization step size. Therefore, when the acquired transmission parameters change, it is necessary to dynamically adjust the quantization step size and then adjust the quantization matrix. In this way, the accuracy of the determined quantization matrix can be guaranteed, which is convenient for improving the subsequent compression effect.

[0146] The calculating of the relationship between the element value of the quantization matrix and the bit error rate includes:

[0147] By formula: , calculating the relationship between the element value of the quantization matrix and the bit error rate;

[0148] in, Expressed as bit error rate, Represented as the element value of the quantization matrix, represents the effective channel capacity of the narrowband image transmitter, Represents a constant related to the transmission parameters of the narrowband image transmitter.

[0149] For example, assuming α=0.5, then:

[0150] ;

[0151] Assumptions =0.068, we get:

[0152]

[0153] Through the above steps, the quantization step size is first calculated, then the element values ​​of the quantization matrix are calculated, and the relationship between the element values ​​of the quantization matrix and the bit error rate is calculated, and the quantization matrix is ​​determined based on these parameters. In this embodiment, our method can effectively improve the transmission efficiency of the narrowband image transmitter while maintaining a high image quality.

[0154] Next, we will proceed to the next step - applying the quantization matrix to quantize the sub-blocks in the frequency domain representation, and performing entropy coding on the quantized sub-blocks to generate a compressed image.

[0155] 105. Apply the quantization matrix to quantize the sub-blocks in the frequency domain representation form, and perform entropy coding on the quantized sub-blocks to generate a compressed image.

[0156] In this step, the quantization process is to quantize the sub-blocks in the frequency domain representation through the quantization matrix to reduce the amount of data. The quantized data will be used for subsequent entropy coding. Entropy coding is a lossless compression method used to reduce data redundancy and further reduce the amount of data. Common entropy coding methods include Huffman coding and arithmetic coding.

[0157] Optionally, in the embodiment of the present application, the process of "performing entropy coding on the quantized sub-blocks" in step 105 may include:

[0158] Determining a corresponding encoding method according to the distribution density of non-zero quantized coefficients in the quantized sub-block, the encoding method including: Huffman encoding and arithmetic coding;

[0159] Encoding the quantized sub-blocks by using the encoding method;

[0160] The distribution density of non-zero quantized coefficients in the quantized sub-block is By formula: Determined, if <50%, determine that the corresponding encoding method includes arithmetic coding; if ≥50%, it is determined that the corresponding encoding method includes Huffman coding.

[0161] For example, each sub-block is quantized using the quantization matrix determined in the previous step. Assume that the element value of the quantization matrix is ​​0.068. After quantization, the quantized sub-block is entropy encoded using Huffman coding to generate a compressed image.

[0162] Through the above steps, we have completed an embodiment of an image compression method based on a narrowband image transmitter. This method can effectively reduce the amount of image data, improve the transmission efficiency of the narrowband image transmitter, and maintain a high image quality.

[0163] Optionally, in an embodiment of the present application, the method also includes: decoding the compressed image at the receiving end to restore the original image; wherein, decoding the compressed image at the receiving end to restore the original image includes: entropy decoding the compressed image to obtain a spatial domain image; inverse quantizing the spatial domain image, and inverse transforming the inverse quantized spatial domain image to restore the original image.

[0164] In this step, entropy decoding is a decoding method for lossless data compression, which restores the compressed data to its original form. Common entropy decoding methods include Huffman decoding and arithmetic decoding. Inverse quantization refers to the process of restoring quantized data to its approximate value before quantization. This process is the reverse operation of the quantization process, and its purpose is to restore the details of the original image as much as possible. Inverse transformation refers to the process of performing some kind of transformation on the image (such as discrete cosine transform DCT or discrete wavelet transform DWT) during the image compression process to obtain coefficients that are more suitable for compression. Inverse transformation is to transform these transformed coefficients back to the image in the spatial domain.

[0165] In the embodiment of the present application, entropy decoding is a lossless data compression decoding method, which restores the compressed data to its original form. Common entropy decoding methods include Huffman decoding and arithmetic decoding.

[0166] Assume that the bit stream after entropy coding is 110010110100. Use the pre-built Huffman decoding table for decoding to obtain the quantized coefficient matrix [2, 3, 1, 0, -1, 0].

[0167] Inverse quantization is the process of restoring the quantized coefficients to their approximate values ​​in the transform domain. In this process, the element values ​​of the quantization matrix are used for the inverse operation.

[0168] Assume that the element value of the quantization matrix is ​​0.068, and the coefficient matrix after quantization is [2,3,1,0,-1,0]. The inverse quantization process can be implemented by the following formula:

[0169]

[0170] in, Represented as the elements in the transform domain coefficient matrix after inverse quantization, that is, the data before inverse transformation. These coefficients represent the transform domain coefficients close to the original image after inverse quantization. Represented as the elements in the quantized transform domain coefficient matrix, that is, the elements in the quantized coefficient matrix obtained after entropy decoding. Represented as the element values ​​of the quantization matrix, used for multiplication operations in the inverse quantization process. These values ​​determine how the quantization coefficients are amplified to approach the original coefficients. Substituting the specific values ​​into the above formula, we get the transform domain coefficient matrix [0.136, 0.204, 0.068, 0, -0.068, 0].

[0171] Inverse transformation is the process of converting transform domain coefficients back to spatial domain images. In this embodiment, we use the inverse discrete cosine transform (Inverse Discrete Cosine Transform, IDCT) to complete this task.

[0172] Given the transform domain coefficient matrix [0.136, 0.204, 0.068, 0, -0.068, 0], the spatial domain image matrix is ​​obtained by IDCT. Assuming that only a simple example is processed, a simplified IDCT formula is used:

[0173]

[0174] Where N is the size of the quantization matrix, C(u) is a constant term, for u=0, ,otherwise Here we assume that N=2, then the spatial domain image matrix can be calculated using the above formula.

[0175] Optionally, in an embodiment of the present application, the method further includes: dynamically adjusting element values ​​of the quantization matrix according to real-time transmission conditions of the narrowband image transmitter.

[0176] In this step, the element values ​​of the quantization matrix are adjusted to optimize the image compression efficiency and quality according to the actual transmission situation of the narrowband image transmitter. This can be done by monitoring parameters such as transmission rate and bandwidth occupancy.

[0177] The purpose of dynamically adjusting the quantization matrix is ​​to optimize the image compression effect according to the actual transmission conditions of the narrowband image transmitter. This can be achieved by dynamically adjusting the quantization step size by monitoring parameters such as the transmission rate and packet loss rate, and then dynamically adjusting the quantization matrix according to the dynamically adjusted quantization step size.

[0178] In the embodiment of the present application, it is assumed that the maximum transmission rate of the narrowband image transmitter is 20kbps and the current transmission rate is 15kbps. In order to maintain image quality while ensuring transmission efficiency, we can reduce the amount of data transmitted by increasing the element value of the quantization matrix. For example, the element value of the initial quantization matrix is ​​0.068, and when a decrease in the transmission rate is detected, it can be increased to 0.08 or higher. This can reduce the amount of data that needs to be transmitted, thereby adapting to a slower transmission rate.

[0179] Figure 2 A schematic diagram of the structure of an image compression device based on a narrowband image transmitter is provided for an embodiment of the present application. Figure 2 As shown, the device comprises:

[0180] An acquisition module 21, used for acquiring an original image;

[0181] A generating module 22 is used to preprocess the original image to generate a spatial domain image, wherein the preprocessing includes at least color space conversion, image size standardization, and noise removal; divide the spatial domain image into a plurality of sub-blocks, and perform discrete cosine transform on each sub-block to obtain a sub-block in frequency domain representation;

[0182] A determination module 23, configured to determine a quantization matrix according to a transmission parameter of the narrowband image transmitter and a dynamically adjusted quantization step size;

[0183] The generating module 22 is further configured to apply the quantization matrix to quantize the sub-blocks in the frequency domain representation form, and perform entropy coding on the quantized sub-blocks to generate a compressed image.

[0184] Optionally, in an embodiment of the present application, the generation module 22 is specifically used to convert the RGB color space of the original image into a YCbCr color space to generate a spatial domain image; or adjust the image size of the original image to a standard size suitable for transmission by a narrowband image transmitter to generate a spatial domain image; or use an adaptive filter to remove image noise in the original image to generate a spatial domain image.

[0185] Optionally, in an embodiment of the present application, the determination module 23 is specifically used to obtain transmission parameters of a narrowband image transmitter, the transmission parameters at least including: effective channel capacity, bit error rate, and transmission delay; adjusting element values ​​of a quantization matrix according to the transmission parameters to adapt to the transmission limitations of the narrowband image transmitter; calculating a quantization step size of the quantization matrix; calculating a relationship between element values ​​of the quantization matrix and the bit error rate; determining a quantization matrix according to element values ​​of the quantization matrix, the quantization step size of the quantization matrix, and a relationship between element values ​​of the quantization matrix and the bit error rate;

[0186] The step of adjusting the element values ​​of the quantization matrix according to the transmission parameters includes:

[0187] By formula: , adjust the element values ​​of the quantization matrix ;

[0188] in, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter;

[0189] The step of calculating the quantization step of the quantization matrix includes:

[0190] By formula:

[0191] , calculate the quantization step size;

[0192] in, represents the quantization step size, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter, M is the width of the sub-block, is the adjustment coefficient;

[0193] The calculating of the relationship between the element value of the quantization matrix and the bit error rate includes:

[0194] By formula: , calculating the relationship between the element value of the quantization matrix and the bit error rate;

[0195] in, Expressed as bit error rate, Represented as the element value of the quantization matrix, represents the effective channel capacity of the narrowband image transmitter, Represents a constant related to the transmission parameters of the narrowband image transmitter.

[0196] Optionally, in the embodiment of the present application, the acquisition module 21 is specifically used to measure the bit error rate of the narrowband image transmitter; determine the transmission delay of the narrowband image transmitter; calculate the effective channel capacity of the narrowband image transmitter through the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter;

[0197] The calculating the effective channel capacity of the narrowband image transmitter by using the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter comprises:

[0198] By formula: , calculate the effective channel capacity of the narrowband image transmitter;

[0199] in, It is represented as the effective channel capacity of the narrowband image transmitter, represents the maximum transmission rate of the narrowband image transmitter, Expressed as bit error rate, Expressed as transmission delay, It is the attenuation coefficient of the amount of data transmitted per unit time.

[0200] Optionally, in the embodiment of the present application, the generating module 22 is further used to determine a corresponding encoding method according to the distribution density of non-zero quantization coefficients in the quantized sub-block, and the encoding method includes: Huffman coding and arithmetic coding; the quantized sub-block is encoded by the encoding method;

[0201] The distribution density of non-zero quantized coefficients in the quantized sub-block is By formula: Determined, if <50%, determine that the corresponding encoding method includes arithmetic coding; if ≥50%, it is determined that the corresponding encoding method includes Huffman coding.

[0202] Optionally, in the embodiment of the present application, the device further includes: a recovery module 24;

[0203] The recovery module 24 is used to decode the compressed image at the receiving end to restore the original image; wherein, the decoding of the compressed image at the receiving end to restore the original image includes: entropy decoding the compressed image to obtain a spatial domain image; inverse quantizing the spatial domain image, and inverse transforming the inverse quantized spatial domain image to restore the original image.

[0204] Optionally, in the embodiment of the present application, the device further includes: an adjustment module 25;

[0205] The adjustment module 25 is used to dynamically adjust the element values ​​of the quantization matrix according to the real-time transmission status of the narrowband image transmitter.

[0206] Figure 2 The image compression device based on narrowband image transmitter can perform Figure 1 The implementation principle and technical effect of the image compression method based on the narrowband image transmitter described in the illustrated embodiment will not be described in detail. The specific manner in which each module and unit performs operations in the image compression device based on the narrowband image transmitter in the above embodiment has been described in detail in the embodiment of the method, and will not be described in detail here.

[0207] In one possible design, Figure 2 The image compression device based on the narrowband image transmitter of the embodiment shown can be implemented as a computing device, such as Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32;

[0208] The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 32 .

[0209] The processing component 32 is used to: obtain an original image; preprocess the original image to generate a spatial domain image, wherein the preprocessing includes at least color space conversion, image size standardization, and noise removal; divide the spatial domain image into multiple sub-blocks, and perform discrete cosine transform on each sub-block to obtain a sub-block in frequency domain representation; determine a quantization matrix based on the transmission parameters of the narrowband image transmitter and the dynamically adjusted quantization step size; apply the quantization matrix to quantize the sub-blocks in the frequency domain representation, and perform entropy coding on the quantized sub-blocks to generate a compressed image.

[0210] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0211] The storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0212] Of course, the computing device may also include other components, such as input / output interfaces, display components, communication components, etc.

[0213] The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc.

[0214] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.

[0215] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.

[0216] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The image compression method based on a narrowband image transmitter of the illustrated embodiment.

[0217] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0218] The device embodiments described above are merely illustrative, wherein 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 modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0219] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0220] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An image compression method based on a narrowband image transmitter, characterized in that: include: Get the original image; Preprocessing the original image to generate a spatial domain image, wherein the preprocessing includes at least color space conversion, image size standardization, and noise removal; Dividing the spatial domain image into a plurality of sub-blocks, and performing discrete cosine transform on each sub-block to obtain a sub-block in a frequency domain representation form; Determine a quantization matrix according to the transmission parameters of the narrowband image transmitter and the dynamically adjusted quantization step size; Applying the quantization matrix to quantize the sub-blocks in the frequency domain representation form, and performing entropy coding on the quantized sub-blocks to generate a compressed image; The step of determining the quantization matrix according to the transmission parameters of the narrowband image transmitter and the dynamically adjusted quantization step size includes: Acquire transmission parameters of the narrowband image transmitter, wherein the transmission parameters include at least: effective channel capacity, bit error rate, and transmission delay; Adjusting element values ​​of a quantization matrix according to the transmission parameters to adapt to the transmission limitation of the narrowband image transmitter; Calculating the quantization step size of the quantization matrix; Calculating the relationship between the element value of the quantization matrix and the bit error rate; Determine a quantization matrix according to element values ​​of the quantization matrix, a quantization step size of the quantization matrix, and a relationship between element values ​​of the quantization matrix and the bit error rate; The step of obtaining the transmission parameters of the narrowband image transmitter includes: Measuring a bit error rate of the narrowband image transmitter; Determining a transmission delay of the narrowband image transmitter; Calculating the effective channel capacity of the narrowband image transmitter according to the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter; The adjusting the element value of the quantization matrix according to the transmission parameter comprises: By formula: , adjust the element values ​​of the quantization matrix ; in, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter; The step of calculating the quantization step of the quantization matrix includes: By formula: , calculate the quantization step size; in, represents the quantization step size, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter, M is the width of the sub-block, is the adjustment coefficient; The calculating of the relationship between the element value of the quantization matrix and the bit error rate includes: By formula: , calculating the relationship between the element value of the quantization matrix and the bit error rate; in, Expressed as bit error rate, Represented as the element value of the quantization matrix, represents the effective channel capacity of the narrowband image transmitter, represents a constant related to the transmission parameters of the narrowband image transmitter; The calculating the effective channel capacity of the narrowband image transmitter by using the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter comprises: By formula: , calculate the effective channel capacity of the narrowband image transmitter; in, It is represented as the effective channel capacity of the narrowband image transmitter, represents the maximum transmission rate of the narrowband image transmitter, Expressed as bit error rate, Expressed as transmission delay, It is the attenuation coefficient of the amount of data transmitted per unit time.

2. The method according to claim 1, characterized in that The preprocessing of the original image to generate a spatial domain image includes: Converting the RGB color space of the original image into a YCbCr color space to generate a spatial domain image; or Adjusting the image size of the original image to a standard size suitable for transmission by a narrowband image transmitter to generate a spatial domain image; or An adaptive filter is used to remove image noise in the original image to generate a spatial domain image.

3. The method according to claim 1, characterized in that The entropy encoding of the quantized sub-blocks includes: Determining a corresponding encoding method according to the distribution density of non-zero quantized coefficients in the quantized sub-block, the encoding method including: Huffman encoding and arithmetic coding; Encoding the quantized sub-blocks by using the encoding method; The distribution density of non-zero quantized coefficients in the quantized sub-block is By formula: Determined, if <50%, determine that the corresponding encoding method includes arithmetic coding; if ≥50%, it is determined that the corresponding encoding method includes Huffman coding.

4. The method according to claim 1, characterized in that Also includes: Decoding the compressed image at the receiving end to restore the original image; The step of decoding the compressed image at the receiving end to restore the original image includes: Performing entropy decoding on the compressed image to obtain a spatial domain image; The spatial domain image is inversely quantized, and the inversely transformed spatial domain image after the inverse quantization is performed to restore the original image.

5. The method according to claim 1, characterized in that Also includes: The element values ​​of the quantization matrix are dynamically adjusted according to the real-time transmission status of the narrowband image transmitter.

6. An image compression device based on a narrowband image transmitter, characterized in that: The device is used to execute the image compression method based on a narrowband image transmitter according to any one of claims 1 to 5, comprising: An acquisition module, used for acquiring the original image; A generating module, configured to preprocess the original image to generate a spatial domain image, wherein the preprocessing includes at least color space conversion, image size standardization, and noise removal; divide the spatial domain image into a plurality of sub-blocks, and perform discrete cosine transform on each sub-block to obtain a sub-block in frequency domain representation; A determination module, used to determine a quantization matrix according to a transmission parameter of a narrowband image transmitter and a dynamically adjusted quantization step size; The generating module is further used to apply the quantization matrix to quantize the sub-blocks in the frequency domain representation form, and perform entropy coding on the quantized sub-blocks to generate a compressed image; The step of determining the quantization matrix according to the transmission parameters of the narrowband image transmitter and the dynamically adjusted quantization step size includes: Acquire transmission parameters of the narrowband image transmitter, wherein the transmission parameters include at least: effective channel capacity, bit error rate, and transmission delay; Adjusting element values ​​of a quantization matrix according to the transmission parameters to adapt to the transmission limitation of the narrowband image transmitter; Calculating the quantization step size of the quantization matrix; Calculating the relationship between the element value of the quantization matrix and the bit error rate; Determine a quantization matrix according to element values ​​of the quantization matrix, a quantization step size of the quantization matrix, and a relationship between element values ​​of the quantization matrix and the bit error rate; The step of obtaining the transmission parameters of the narrowband image transmitter includes: Measuring a bit error rate of the narrowband image transmitter; Determining a transmission delay of the narrowband image transmitter; Calculating the effective channel capacity of the narrowband image transmitter according to the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter; The adjusting the element value of the quantization matrix according to the transmission parameter comprises: By formula: , adjust the element values ​​of the quantization matrix ; in, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter; The step of calculating the quantization step of the quantization matrix includes: By formula: Calculate the quantization step size; in, represents the quantization step size, represents the maximum transmission rate of the narrowband image transmitter, R represents the desired compression ratio, represents the average energy of the i-th sub-block, represents the average energy of all sub-blocks, and is a constant related to the transmission parameters of the narrowband image transmitter, M is the width of the sub-block, is the adjustment coefficient; The calculating of the relationship between the element value of the quantization matrix and the bit error rate includes: By formula: , calculating the relationship between the element value of the quantization matrix and the bit error rate; in, Expressed as bit error rate, Represented as the element value of the quantization matrix, represents the effective channel capacity of the narrowband image transmitter, represents a constant related to the transmission parameters of the narrowband image transmitter; The calculating the effective channel capacity of the narrowband image transmitter by using the bit error rate of the narrowband image transmitter and the transmission delay of the narrowband image transmitter comprises: By formula: , calculate the effective channel capacity of the narrowband image transmitter; in, It is represented as the effective channel capacity of the narrowband image transmitter, represents the maximum transmission rate of the narrowband image transmitter, Expressed as bit error rate, Expressed as transmission delay, It is the attenuation coefficient of the amount of data transmitted per unit time.

7. A computing device, characterized in that It comprises a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the image compression method based on a narrowband image transmitter as described in any one of claims 1 to 5.

8. A computer storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a computer, the image compression method based on a narrow-band image transmitter as described in any one of claims 1 to 5 is implemented.