Satellite image compression method, device, equipment and storage medium
Through the prediction and training of satellite images and the depth of the lightweight position, the total code flow is generated and transmitted to the decoding end, which solves the problem of the existing technology that is difficult to take into account the compression ratio and reconstruction quality of satellite image, and achieve efficient efficiency. Data compression and rapid image reconstruction.
Patent Information
- Application Number
- CN202411351928.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The prior art is difficult to take into account both the reconstruction quality and the compression ratio in the process of satellite multispectral image compression. Improving the reconstruction quality will lead to too low compression ratio and increasing the transmission time, while increasing the compression ratio will lead to a decrease in the reconstruction quality.
A satellite image compression method is proposed. By obtaining the displacement parameter, the original image is divided, and the first processing image containing the highest effective position and the second processing image containing the lowest effective position are obtained. Then, calculate the pixel feature vector of each pixel in the first process of the image, restore the input of lightweight to the network for prediction, adjust the network parameters until the iterative termination conditions are achieved, and the target network parameters are obtained. In the end, the total code flow is generated according to the first processing image, displacement parameter, and target network parameters, and sent to the decoding end.
While ensuring the quality of compressed image reconstruction, reduce transmission time, and achieve efficient data compression and rapid image reconstruction by transmitting the first processing image and target network parameters that contain the most important position.
Smart Images

Figure CN119135886B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a satellite image compression method, device, equipment and storage medium. Background Art
[0002] Satellite imagery has been widely used in many fields, including environmental monitoring, agriculture, traffic monitoring, urban planning, and disaster management. With the advancement of satellite technology, the amount of data captured by observation satellites has increased dramatically, making the storage, transmission, and analysis of satellite multispectral images increasingly complex. Therefore, efficient data compression is essential for managing satellite data. Compression not only reduces storage costs and bandwidth requirements, but also speeds up data access and processing, thereby enabling timely analysis and decision-making.
[0003] In the related art, the compression process for satellite multispectral images often fails to balance reconstruction quality and compression ratio. If the reconstruction quality is improved, the compression ratio will be too low and the transmission process will be time-consuming, while if the compression ratio is increased, the reconstruction quality will be reduced. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a satellite image compression method, device, equipment and storage medium, which can reduce the transmission time while ensuring the reconstruction quality of the compressed image.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a satellite image compression method, which is applied to an encoding end. The method includes:
[0006] Acquire a shift parameter, and use the shift parameter to perform bit division on the original image to obtain a first processed image and a second processed image, wherein the first processed image includes the most significant bit of each pixel, and the second processed image includes the least significant bit of each pixel;
[0007] Calculating a pixel feature vector corresponding to each pixel in the first processed image;
[0008] Inputting the pixel feature vector and the shift parameter into a lightweight bit depth recovery network for prediction to obtain a predicted pixel value, obtaining a reference pixel value at a corresponding position in the second processed image, calculating a loss value based on the reference pixel value and the predicted pixel value, and adjusting the network parameters of the lightweight bit depth recovery network based on the loss value until an iteration termination condition is reached to obtain a target network parameter;
[0009] A total bitstream is obtained according to the first processed image, the shift parameter and the target network parameter, and the total bitstream is sent to a decoding end.
[0010] In one embodiment, the bit-splitting the original image using the shift parameter to obtain the first processed image and the second processed image includes:
[0011] Shifting the original image rightward by the shift parameter and then rounding it to an integer, to obtain the first processed image;
[0012] The number one is shifted leftward by the shift parameter and then subtracted by one to obtain an intermediate parameter, and a bitwise AND operation is performed on the original image and the intermediate parameter to obtain the second processed image.
[0013] In one embodiment, calculating the pixel feature vector corresponding to each pixel in the first processed image includes:
[0014] Selecting the pixels one by one as target pixels, obtaining pixel coordinates of the target pixels, and normalizing the pixel coordinates based on the image size of the original image to obtain normalized coordinates;
[0015] Performing position encoding on the coordinate values in the normalized coordinates based on preset position encoding parameters to obtain encoded coordinates;
[0016] Obtaining a preset distance threshold, and selecting at least one neighboring pixel of the pixel based on the pixel coordinates and the distance threshold;
[0017] Calculating a normalized pixel value corresponding to the neighboring pixel, and calculating a corrected pixel value obtained by subtracting a target pixel value of the target pixel from the normalized pixel value;
[0018] The pixel feature vector is obtained based on the encoded coordinates and the corrected pixel value.
[0019] In one embodiment, the preset position encoding parameter includes a scale parameter of a frequency parameter, and the position encoding of the coordinate value in the normalized coordinate based on the preset position encoding parameter to obtain the encoded coordinate includes:
[0020] Generate a coding function parameter based on the scale parameter and the frequency parameter, wherein the coding function parameter takes the scale parameter as a base and the frequency value as a power, and the frequency value ranges from zero to the frequency parameter minus one;
[0021] Selecting the encoding function parameters one by one, and calculating the first trigonometric function value and the second trigonometric function value according to the encoding function parameters and the coordinate value;
[0022] The encoded coordinates are obtained based on the coordinate values, the first trigonometric function values, and the second trigonometric function values.
[0023] In one embodiment, obtaining a total bitstream according to the first processed image, the shift parameter and the target network parameter includes:
[0024] Encoding the first processed image to obtain a basic bitstream;
[0025] At least encoding the shift parameter to obtain a header information code stream;
[0026] Encoding the target network parameters to obtain a network parameter code stream;
[0027] The total bitstream is obtained according to the header information bitstream, the basic bitstream and the network parameter bitstream.
[0028] In one embodiment, the lightweight bit depth recovery network includes an input layer, at least one hidden layer and an output layer, and the hidden layer and the output layer are connected to a nonlinear activation function.
[0029] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a satellite image compression method, which is applied to a decoding end. The method includes:
[0030] Receiving a total bitstream sent by an encoding end, and obtaining a first decoded image, a decoding shift parameter, and a decoding network parameter according to the total bitstream, wherein the total bitstream is generated by the encoding end according to the satellite image compression method according to any one of the first aspects;
[0031] Generate a lightweight reconstruction and recovery network using the decoding network parameters and the decoding shift parameters, wherein the lightweight reconstruction and recovery network has the same network structure as the lightweight bit depth recovery network;
[0032] Obtaining a decoded pixel feature vector corresponding to each pixel according to the first decoded image, and inputting the decoded pixel feature vector into the lightweight reconstruction and restoration network for prediction to obtain a decoded pixel value;
[0033] A predicted decoded image is obtained according to the decoded pixel value, and a reconstructed image corresponding to the original image is obtained according to the predicted decoded image, the first decoded image and the decoded shift parameter.
[0034] In one embodiment, obtaining a reconstructed image corresponding to the original image according to the predicted decoded image, the first decoded image and the decoded shift parameter includes:
[0035] Calculating a decoding intermediate value based on the decoding shift parameter;
[0036] Multiplying the decoded intermediate value by the first decoded image to obtain a reconstructed intermediate image;
[0037] The reconstructed intermediate image is added to the predicted decoded image to obtain the reconstructed image.
[0038] In one embodiment, obtaining a first decoded image, a decoding shift parameter, and a decoding network parameter according to the total bitstream includes:
[0039] Obtaining a basic bitstream, a header information bitstream and a network parameter bitstream according to the total bitstream;
[0040] The first decoded image is obtained by decoding the basic code stream, the header information code stream is obtained by decoding the header information code stream, and the decoded network parameters are obtained by decoding the network parameter code stream.
[0041] To achieve the above-mentioned purpose, a third aspect of an embodiment of the present application proposes a satellite image compression device, which is applied to an encoding end and includes:
[0042] A bit division module: used for obtaining a shift parameter, and performing bit division on the original image using the shift parameter to obtain a first processed image and a second processed image, wherein the first processed image includes the most significant bit of each pixel, and the second processed image includes the least significant bit of each pixel;
[0043] Image processing module: used for calculating the pixel feature vector corresponding to each pixel in the first processed image;
[0044] Model training module: used for inputting the pixel feature vector and the shift parameter into the lightweight bit depth recovery network for prediction, obtaining the predicted pixel value, obtaining the reference pixel value of the corresponding position in the second processed image, calculating the loss value based on the reference pixel value and the predicted pixel value, adjusting the network parameters of the lightweight bit depth recovery network based on the loss value, until the iteration termination condition is reached, and obtaining the target network parameters;
[0045] A code stream generation module is used to obtain a total code stream according to the first processed image, the shift parameter and the target network parameter, and send the total code stream to a decoding end.
[0046] To achieve the above-mentioned purpose, a fourth aspect of the embodiments of the present application proposes a satellite image compression device, which is applied to a decoding end and includes:
[0047] A code stream decoding module: used for receiving a total code stream sent by an encoding end, and obtaining a first decoded image, a decoding shift parameter, and a decoding network parameter according to the total code stream, wherein the total code stream is generated by the encoding end according to the satellite image compression method according to any one of the first aspects;
[0048] A network reconstruction module: used to generate a lightweight reconstruction and recovery network using the decoding network parameters and the decoding shift parameters, wherein the lightweight reconstruction and recovery network has the same network structure as the lightweight bit depth recovery network;
[0049] Prediction decoding module: used for obtaining a decoded pixel feature vector corresponding to each pixel according to the first decoded image, and inputting the decoded pixel feature vector into the lightweight reconstruction recovery network for prediction to obtain a decoded pixel value;
[0050] Image reconstruction module: used to obtain a predicted decoded image according to the decoded pixel value, and to obtain a reconstructed image corresponding to the original image according to the predicted decoded image, the first decoded image and the decoded shift parameter.
[0051] To achieve the above objectives, the fifth aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the method described in the first or second aspect when executing the computer program.
[0052] To achieve the above-mentioned purpose, the sixth aspect of an embodiment of the present application proposes a storage medium, which is a storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method described in the first aspect or the second aspect.
[0053] The present application proposes a satellite image compression method, device, equipment and storage medium. By obtaining a shift parameter, the original image is bit-divided using the shift parameter to obtain a first processed image and a second processed image, wherein the first processed image includes the most significant bit of each pixel. Then, the pixel feature vector corresponding to each pixel in the first processed image is calculated, and the pixel feature vector is input into a lightweight bit depth recovery network for prediction to obtain a predicted pixel value, and the reference pixel value at the corresponding position in the second processed image is obtained. The loss value is calculated based on the reference pixel value and the predicted pixel value, and the network parameters of the lightweight bit depth recovery network are adjusted based on the loss value until the iteration termination condition is reached to obtain the target network parameters. Finally, the total code stream is obtained according to the first processed image, the shift parameter and the target network parameter, and the total code stream is sent to the decoding end. The present application embodiment divides the original image into a first processed image containing the most important bit and a second processed image with relatively unimportant bits by bit division. Next, based on the process of predicting the second processed image from the first processed image, the lightweight bit depth recovery network is trained to obtain the target network parameters whose prediction effect is closest to the second processed image. Subsequently, the total code stream corresponding to the first processed image, shift parameters and target network parameters is sent to the decoding end for reconstruction. Since the first processed image containing the most important bits is transmitted to the decoding end, key image information can be obtained during the reconstruction process, thereby improving the reconstruction quality. At the same time, after the lightweight network is trained on the encoding end, only the target network parameters are transmitted to the decoding end. The decoding end performs a decoding process based on the received relevant network parameters to obtain the relevant content of the second processed image. Compared with the code stream related to the transmission image, the transmission parameters can reduce the overall data volume and reduce the transmission time. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flowchart of the satellite image compression method provided in an embodiment of the present application.
[0055] Figure 2 This is a flowchart of using a shift parameter to divide the original image into bits to obtain a first processed image and a second processed image provided by an embodiment of the present application.
[0056] Figure 3 It is a flowchart of calculating the pixel feature vector corresponding to each pixel in the first processed image provided by an embodiment of the present application.
[0057] Figure 4 It is a flowchart of performing position encoding on the coordinate values in the normalized coordinates based on preset position encoding parameters to obtain encoded coordinates provided in an embodiment of the present application.
[0058] Figure 5 It is a schematic diagram of the structure of a lightweight bit depth recovery network provided in an embodiment of the present application.
[0059] Figure 6 It is a flowchart of obtaining a total code stream according to a first processed image, a shift parameter and a target network parameter provided in an embodiment of the present application.
[0060] Figure 7 It is an overall flow chart of the satellite image compression method provided in the embodiment of the present application.
[0061] Figure 8 This is another flow chart of the satellite image compression method provided in the embodiment of the present application.
[0062] Fig. 9 It is a flowchart of obtaining a reconstructed image corresponding to an original image according to a predicted decoded image, a first decoded image and a decoded shift parameter provided by an embodiment of the present application.
[0063] Fig.10 It is an overall flow chart of the satellite image compression method provided in the embodiment of the present application.
[0064] Fig.11 This is a structural block diagram of a satellite image compression device provided in yet another embodiment of the present application.
[0065] Fig.12 This is a structural block diagram of a satellite image compression device provided in yet another embodiment of the present application.
[0066] Fig.13 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0068] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0069] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0070] First, some nouns involved in this application are analyzed:
[0071] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0072] Satellite imagery has been widely used in many fields, including environmental monitoring, agriculture, traffic monitoring, urban planning, and disaster management. With the advancement of satellite technology, the amount of data captured by observation satellites has increased dramatically, making the storage, transmission, and analysis of satellite multispectral images increasingly complex. Therefore, efficient data compression is essential for managing satellite data. Compression not only reduces storage costs and bandwidth requirements, but also speeds up data access and processing, thereby enabling timely analysis and decision-making.
[0073] Among them, multispectral images captured by satellites are usually stored in 16-bit depth to retain their high dynamic range. This data format results in a huge amount of data, so efficient compression technology is required. Compression methods in related technologies, such as JPEG2000, DEFLATE, and CCSDS 123.0-B-2, are effective to a certain extent, but these compression methods are mainly for 8-bit RGB images or standard natural images. When processing 16-bit multispectral images, it is often difficult to balance reconstruction quality and compression ratio. If the reconstruction quality is improved, the compression ratio will be too low and the transmission process will be time-consuming; if the compression ratio is increased, the reconstruction quality will be reduced. The compression methods in related technologies are difficult to cope with the high bit depth and large size characteristics of multispectral data, resulting in poor results in satellite images.
[0074] Based on this, the embodiment of the present application provides a satellite image compression method, device, equipment and storage medium, which divides the original image into a first processed image containing the most important bit and a second processed image of relatively unimportant bits by bit division. Next, based on the process of predicting the second processed image from the first processed image, the lightweight bit depth recovery network is trained to obtain the target network parameters whose prediction effect is closest to the second processed image. Subsequently, the total code stream corresponding to the first processed image, the shift parameter and the target network parameter is sent to the decoding end for reconstruction. Since the first processed image containing the most important bit is transmitted to the decoding end, key image information can be obtained during the reconstruction process, thereby improving the reconstruction quality. At the same time, after the lightweight network is trained at the encoding end, only the target network parameters are transmitted to the decoding end, and the decoding end performs a decoding process based on the received relevant network parameters to obtain the relevant content of the second processed image. Compared with the code stream related to the transmission image, the transmission parameters can reduce the overall data volume and reduce the transmission time.
[0075] The embodiments of the present application provide a satellite image compression method, apparatus, device and storage medium, which are specifically described through the following embodiments. First, the satellite image compression method in the embodiments of the present application is described.
[0076] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0077] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0078] The satellite image compression method provided in the embodiment of the present application relates to the field of image processing technology. The satellite image compression method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be a computer program running in a terminal or a server side. For example, a computer program can be a native program or software module in an operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a client that supports image compression, or it can be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form. Among them, the terminal communicates with the server through a network. The satellite image compression method can be executed by a terminal or a server, or by a terminal and a server in collaboration.
[0079] In some embodiments, the terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, or a smart watch. In addition, the terminal may also be an intelligent vehicle-mounted device. The intelligent vehicle-mounted device applies the satellite image compression method of this embodiment to provide related services to enhance the driving experience. The server may be an independent server, or it may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms; it may also be a service node in a blockchain system, and each service node in the blockchain system forms a peer-to-peer (P2P, Peer To Peer, P2P) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP) protocol. The terminal and the server may be connected via Bluetooth, Universal Serial Bus (USB) or a network or other communication connection methods, which are not limited in this embodiment.
[0080] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0081] The following describes a satellite image compression method in an embodiment of the present application, which is applied to the encoding end.
[0082] Figure 1 is an optional flowchart of the satellite image compression method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps 110 to 140. It can also be understood that this embodiment Figure 1 The order of step 110 to step 140 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0083] Step 110: Obtain shift parameters, and use the shift parameters to perform bit division on the original image to obtain a first processed image and a second processed image.
[0084] In one embodiment, the original image is a satellite multispectral image that needs to be compressed, such as an 8-bit or 16-bit image. It is understandable that the original image may also be other types of images, which are not limited in this embodiment and are only illustrated by way of example.
[0085] In one embodiment, the shift parameter K is used to perform bit division on the original image. The value of the shift parameter K is an integer greater than or equal to 1 and less than the number of image bits. The number of image bits here can be the above-mentioned 16 or 8 bits. The shift parameter can be set according to actual needs. Different shift parameters have different effects on the compression results. After obtaining the shift parameter, the original image can be bit-divided according to the shift parameter to obtain a first processed image and a second processed image. The purpose of bit division in this embodiment is to divide the original image into an image containing the most important bit and an image containing the least important bit, wherein the most important bit image is the first processed image, which contains the most significant bit of each pixel and contains the most important visual information of the original image, such as the outline and main structure of the original image, which directly affects the reconstruction quality during the reconstruction process. The least important image is the second processed image, which contains a small amount of information.
[0086] In one embodiment, referring to Figure 2 , Figure 2 The present invention provides a flowchart of using a shift parameter to divide the original image into bits to obtain a first processed image and a second processed image, which specifically includes the following steps:
[0087] Step 210: right-shift the original image by a shift parameter and then round it to an integer to obtain a first processed image.
[0088] In one embodiment, the original image is represented as: , where H is the height of the original image, W is the width of the original image, and C is the number of spectral segments of the original image, where the number of spectral segments can be color channels, etc.
[0089] The first processed image includes the most significant bit of each pixel. The pixel values of the original image are right-shifted by the shift parameter and then rounded to an integer, thereby obtaining the first processed image, which is expressed as:
[0090]
[0091] in, represents the first processed image, represents the right shift operator, Indicates rounding down.
[0092] In the above process, the pixel value of the image represents the color information, and the color information is represented in the form of an integer. If it is an 8-bit image, the color information of each channel is represented as an integer between 0-255. If it is a 16-bit image, the color information of each channel is represented as an integer between 0-65535. If there is only one channel, that is, when C=1, the color information is a grayscale value. The integer corresponding to the pixel value is represented in binary form for storage, so the leftmost digit of the pixel value is the highest bit and the rightmost digit is the lowest bit. At this time, the pixel value is shifted to the right by several bits until only the highest bit remains. For example, if the pixel value is 10110010, it is shifted to the right by 6 bits to obtain 00000010, that is, 2 in decimal. At this time, the first processed image represented by binary value is obtained. If you want to further ensure that the result is an integer, you can achieve it by rounding down. The rounding operation ensures that even in non-uniformly distributed pixel values, a clear binary first processed image can be obtained by right shifting the shift parameter and then rounding.
[0093] Step 220: Shift the number 1 to the left by the shift parameter and then subtract 1 to obtain an intermediate parameter, perform a bitwise AND operation on the original image and the intermediate parameter to obtain a second processed image.
[0094] In one embodiment, the second processed image includes the least significant bit of each pixel. The number 1 is shifted left by the shift parameter and then subtracted by one to obtain an intermediate parameter, and a bitwise AND operation is performed on the original image and the intermediate parameter to obtain the second processed image, which is expressed as:
[0095]
[0096] in, represents the second processed image, Indicates the intermediate parameter, & indicates the bitwise AND operation, is the left shift operator.
[0097] Through the above process, we obtain the first processed image containing the most significant bit of the original image and the second processed image containing the least significant bit, wherein the first processed image contains important visual features of the original image. For example, for the sake of simplicity in calculation, it is assumed that the original image is an 8-bit single-channel image, expressed as:
[0098]
[0099] At this time, K=1, C=1, and through the above calculation process we can get:
[0100]
[0101]
[0102] In one embodiment, if both the first processed image and the second processed image are compressed directly, and the first processed image and the second processed image are fully utilized during reconstruction, the original image can be completely restored in theory, but the second processed image usually has more information redundancy, and directly transmitting the relevant data of the second processed image usually consumes a lot of resources. However, if the least significant bit image is not considered, the original image cannot be completely reconstructed. Therefore, under the premise of transmitting the most significant bit of the first processed image, the embodiment of the present application predicts the least significant bit of the second processed image at the decoding end to achieve bit depth recovery, which can avoid directly transmitting the second processed image and still ensure the reconstruction quality.
[0103] For example, in some scenarios such as on-demand, such as compression encoding on the server side and decoding on the client side, the encoding may only be required once, while the decoding process may be very frequent. Therefore, in the embodiment of the present application, on the one hand, the relevant prediction model is trained on the encoding side, and the decoding side directly uses the training results of the encoding side for prediction. On the other hand, the prediction model used in the encoding and decoding process is a lightweight model with a relatively small number of model parameters, which can also improve the reasoning speed. In order to improve the accuracy of the prediction, it is necessary to perform corresponding data processing on the first processed image. The corresponding data processing process is described below.
[0104] Step 120: Calculate the pixel feature vector corresponding to each pixel in the first processed image.
[0105] Reference Figure 3 , Figure 3 This is a flowchart of calculating the pixel feature vector corresponding to each pixel in the first processed image provided by an embodiment of the present application, which specifically includes the following steps:
[0106] Step 310: Select pixels one by one as target pixels, obtain pixel coordinates of the target pixels, and normalize the pixel coordinates based on the image size of the original image to obtain normalized coordinates.
[0107] In one embodiment, a corresponding pixel feature vector needs to be calculated for each pixel of the first processed image, so pixels are selected one by one as target pixels. The process of calculating the pixel feature vector of the target pixel is described below.
[0108] First, get the pixel coordinates of the target pixel. Assume that the pixel coordinates of the current target pixel are , the image height of the original image is H, and the image width is W. At this time, the pixel coordinates are normalized based on the image size of the original image, and the normalized coordinates are expressed as:
[0109]
[0110]
[0111] in, Represents the normalized coordinate value corresponding to the coordinate value h in the pixel coordinates, Represents the normalized coordinate value corresponding to the coordinate value w in the pixel coordinate, Represents normalized coordinates.
[0112] Step 320: Position encoding is performed on the coordinate values in the normalized coordinates based on preset position encoding parameters to obtain encoded coordinates.
[0113] In one embodiment, the preset position encoding parameters include a frequency parameter R and a scale parameter . Reference Figure 4 , Figure 4 The present invention provides a flowchart of performing position encoding on the coordinate values in the normalized coordinates based on preset position encoding parameters to obtain encoded coordinates, which specifically includes the following steps:
[0114] Step 410: Generate encoding function parameters based on the scale parameter and the frequency parameter.
[0115] In one embodiment, the encoding function parameters are expressed as follows: { , ,…, }, where the frequency value ranges from zero to the frequency parameter R minus one.
[0116] Step 420: Select encoding function parameters one by one, and calculate the first trigonometric function value and the second trigonometric function value according to the encoding function parameters and the coordinate values.
[0117] In one embodiment, the first trigonometric function value is expressed as:
[0118] { , ,…, }
[0119] in, .
[0120] The second trigonometric function value is expressed as:
[0121] { , ,…, }
[0122] Step 430: Obtain the encoded coordinates based on the coordinate value, the first trigonometric function value and the second trigonometric function value.
[0123] In one embodiment, the encoded coordinates are expressed as:
[0124]
[0125] In one embodiment, it is assumed that the image height of the original image is 4 pixels, the image width is 4 pixels, a single channel, a frequency parameter R=12, and a scale parameter , taking the pixel coordinates {(1,2),(2,3)} as an example for explanation.
[0126] The normalized coordinates are:
[0127]
[0128] After position encoding, the encoding coordinates corresponding to the pixel coordinates (1,2) are expressed as:
[0129]
[0130] Step 330: Obtain a preset distance threshold, and select at least one neighboring pixel of the pixel based on the pixel coordinates and the distance threshold.
[0131] In one embodiment, the color information within the corresponding range of each pixel coordinate is aggregated by presetting the distance threshold. , the pixel coordinates of the target pixel are At this time, the color values corresponding to the pixels whose distance in each direction does not exceed the preset distance threshold D are aggregated. In the case of a single channel, the grayscale values are aggregated.
[0132] The obtained set of neighboring pixels contains the pixel corresponding to the target pixel. neighboring pixels, including the target pixel itself, the set It is expressed as:
[0133]
[0134] Step 340: Calculate the normalized pixel values corresponding to the neighboring pixels, and calculate a corrected pixel value obtained by subtracting the target pixel value from the normalized pixel value.
[0135] In one embodiment, the above set All neighboring pixels in the calculation process are normalized color values, and the calculation process is expressed as:
[0136]
[0137] in, Representing a collection The normalized color values of the neighboring pixels in , Represents the pixel value or color value of the neighboring pixel. Represents the maximum value of the pixel values of all pixels in the first processed image.
[0138] In one embodiment, in order to better utilize the information contained in the normalized color values of the neighboring pixels, the normalized color values of the neighboring pixels are subtracted from the color value of the current target pixel to obtain a corrected pixel value, which is expressed as:
[0139]
[0140]
[0141] in, represents the pixel position of the neighboring pixels, represents the pixel position of the target pixel, represents the corrected pixel value of the neighboring pixels at the corresponding position, Represents the normalized pixel value of the neighboring pixels at the corresponding position, Indicates the normalized pixel value corresponding to the target pixel.
[0142] Step 350: Obtain a pixel feature vector based on the encoded coordinates and the corrected pixel value.
[0143] In one embodiment, the pixel feature vector is obtained by concatenating the encoded coordinates and the corrected pixel value. , the pixel feature vector contains position-related information and color-related information, which can be used to predict the second processed image. Among them, the vector length of the pixel feature vector is .
[0144] In one embodiment, assuming that the original image is an 8-bit single-channel image, the image height is 6 pixels, and the image width is 6 pixels, the obtained first processed image is expressed as:
[0145]
[0146] Assume that the preset distance threshold D=1, the pixel coordinates of the target pixel are (1,1), and the set of its neighboring pixels is:
[0147]
[0148] The set of normalized color values of neighboring pixels is:
[0149]
[0150] The set of corrected color values is:
[0151]
[0152] The encoding coordinates corresponding to the pixel coordinate (1,1) are:
[0153]
[0154] The pixel feature vector corresponding to the target pixel (1,1) It is expressed as:
[0155]
[0156] Step 130: Input the pixel feature vector and the shift parameter into the lightweight bit depth recovery network for prediction to obtain the predicted pixel value, obtain the reference pixel value of the corresponding position in the second processed image, calculate the loss value based on the reference pixel value and the predicted pixel value, and adjust the network parameters of the lightweight bit depth recovery network based on the loss value until the iteration termination condition is reached to obtain the target network parameters.
[0157] In one embodiment, after obtaining the pixel feature vector, the pixel feature vector and the shift parameter can be used to perform the lightweight bit depth recovery network. The training is performed so that the trained lightweight bit depth recovery network can accurately predict the second processed image, wherein: Represents the network parameters of the lightweight bit depth recovery network.
[0158] In one embodiment, in order to further reduce the compression cost, the model structure in the lightweight bit depth recovery network is simple and the model parameters are few. Figure 5 , Figure 5 is a schematic diagram of the structure of the lightweight bit depth recovery network provided in the embodiment of the present application. The lightweight bit depth recovery network is a multi-layer perceptron, including an input layer, at least one hidden layer (two hidden layers are used as an example in the figure) and an output layer. The input data of the network is the pixel feature vector corresponding to the first processed image, and its dimension is , the reference pixel value at the corresponding position in the output second processed image, with dimension C. The prediction process based on pixel feature vector and shift parameter is expressed as:
[0159]
[0160] Among them, the number of neurons in the hidden layer of the lightweight bit depth recovery network is 64. A nonlinear activation function is connected after the hidden layer to enhance the nonlinear fitting ability of the model, so as to better capture and learn the high-frequency features in the data. A nonlinear activation function is also connected after the output layer to limit the output reference pixel value between [0, 1], so as to ensure the rationality and stability of the results.
[0161] Unlike common complex networks with millions of parameters, the lightweight bit depth recovery network in the embodiment of the present application It adopts an extremely concise design, with the total number of network parameters ranging from a few hundred to thousands. This lightweight design not only reduces the consumption of computing resources, but is also suitable for storage-sensitive application scenarios.
[0162] During the training process, the loss value is calculated based on the reference pixel value and the predicted pixel value, and the network parameters of the lightweight bit depth recovery network are adjusted based on the loss value until the iteration termination condition is reached to obtain the target network parameters. Among them, the loss value is calculated by the mean square error function (MSE), and the corresponding loss value is expressed as:
[0163]
[0164] in, represents pixel coordinates, Represents the loss value corresponding to the pixel coordinate, Indicates the predicted pixel value corresponding to the pixel coordinate, Represents the reference pixel value of the corresponding position in the second processed image.
[0165] For example, According to the above loss value calculation process, the loss value is .
[0166] It can be understood that since the original image contains multiple pixels, the predicted pixel value and reference pixel value of each pixel can constitute a sample. By using multiple samples to train the lightweight bit depth recovery network, a trained lightweight bit depth recovery network can be obtained after satisfying the iteration termination condition in multiple iterations. At this time, the network parameters of the lightweight bit depth recovery network are the target network parameters. , and the training process is an overfitting process, so the prediction result is closer to the real label. The iteration termination condition here can be that the number of iterations reaches a preset number of times, or that the loss value meets a preset condition, etc., which is not limited in this embodiment.
[0167] Step 140: Obtain a total bitstream according to the first processed image, the shift parameter and the target network parameter, and send the total bitstream to the decoding end.
[0168] In one embodiment, referring to Figure 6 , Figure 6 This is a flowchart of obtaining a total bitstream according to a first processed image, a shift parameter, and a target network parameter provided in an embodiment of the present application, and specifically includes the following steps:
[0169] Step 610: Encode the first processed image to obtain a basic code stream.
[0170] Step 620: Encode at least the shift parameter to obtain a header information code stream.
[0171] Step 630: Encode the target network parameters to obtain a network parameter code stream.
[0172] Step 640: Obtain the total bitstream according to the header information bitstream, the basic bitstream and the network parameter bitstream.
[0173] In one embodiment, the first processed image is losslessly encoded according to the lossless encoding technology in the related art, such as the JPEG 2000 standard, the target network parameters are encoded using the floating point codec tool fpzip encoding, and the shift parameters are encoded in a byte encoding manner to obtain the corresponding basic code stream, header information code stream and network parameter code stream. Among them, the header information code stream can also encode frequency parameters, scale parameters, etc. according to actual needs. Then, the header information code stream, the basic code stream and the network parameter code stream are spliced to obtain the total code stream. After the total code stream is obtained, it is sent to the decoding end for decoding, so as to obtain the reconstructed image corresponding to the original image.
[0174] In one embodiment, referring to Figure 7 , Figure 7 It is an overall flow chart of the satellite image compression method provided in the embodiment of the present application.
[0175] First, the shift parameters are obtained, and the original image is divided into bits using the shift parameters to obtain the first processed image. and the second processed image Then, the first processed image is processed accordingly to calculate the pixel feature vector corresponding to each pixel in the first processed image. . The pixel feature vector And the shift parameter K is input into the lightweight bit depth recovery network for prediction to obtain the predicted pixel value Then, according to the reference pixel value of the corresponding position in the second processed image Calculate the loss value, adjust the network parameters of the lightweight bit depth recovery network based on the loss value, until the iteration termination condition is reached, and obtain the target network parameters Next, the shift parameters are encoded using the header information encoder to obtain the header information code stream, the first processed image is encoded using the basic encoder to obtain the basic code stream, and the target network parameters are encoded using the network parameter encoder to obtain the network parameter code stream. Finally, the total code stream is obtained based on the header information code stream, the basic code stream and the network parameter code stream.
[0176] The satellite image compression method provided in the embodiment of the present application obtains the shift parameter, and uses the shift parameter to perform bit division on the original image to obtain the first processed image and the second processed image, wherein the first processed image includes the most significant bit of each pixel. Then, the pixel feature vector corresponding to each pixel in the first processed image is calculated, and the pixel feature vector is input into the lightweight bit depth recovery network for prediction to obtain the predicted pixel value, and the reference pixel value of the corresponding position in the second processed image is obtained. The loss value is calculated based on the reference pixel value and the predicted pixel value, and the network parameters of the lightweight bit depth recovery network are adjusted based on the loss value until the iteration termination condition is reached to obtain the target network parameter. Finally, the total code stream is obtained according to the first processed image, the shift parameter and the target network parameter, and the total code stream is sent to the decoding end. The embodiment of the present application divides the original image into a first processed image containing the most important bit and a second processed image with relatively unimportant bits by bit division. Next, based on the process of predicting the second processed image from the first processed image, the lightweight bit depth recovery network is trained to obtain the target network parameter whose prediction effect is closest to the second processed image. Subsequently, the total code stream corresponding to the first processed image, the shift parameter and the target network parameter is sent to the decoding end for reconstruction. Since the first processed image containing the most important bits is transmitted to the decoding end, key image information can be obtained during the reconstruction process, thereby improving the reconstruction quality. At the same time, after the lightweight network is trained on the encoding end, only the target network parameters are transmitted to the decoding end. The decoding end performs a decoding process based on the received relevant network parameters to obtain the relevant content of the second processed image. Compared with the code stream related to the transmission of the image, the transmission parameters can reduce the overall data volume and reduce the transmission time.
[0177] The following describes a satellite image compression method provided in an embodiment of the present application, which is applied to an encoding end.
[0178] Figure 8 is an optional flowchart of the satellite image compression method provided in the embodiment of the present application. Figure 8 The method in the embodiment may include but is not limited to steps 810 to 840. Figure 8 The order of step 810 to step 840 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0179] Step 810: Receive a total bitstream sent by the encoder, and obtain a first decoded image, a decoding shift parameter, and a decoding network parameter according to the total bitstream.
[0180] In one embodiment, the total bitstream is generated by the encoding end according to the satellite image compression method of any one of the above embodiments. After receiving the total bitstream, the decoding end obtains the basic bitstream, the header information bitstream and the network parameter bitstream from the total bitstream, and then decodes according to the corresponding decoding mode, decodes the basic bitstream to obtain the first decoded image corresponding to the first processed image, decodes the shift parameter from the header information bitstream to obtain the header information bitstream, and decodes the network parameter bitstream to obtain the decoded network parameters corresponding to the target network parameters.
[0181] Step 820: Generate a lightweight reconstruction recovery network using the decoding network parameters and the decoding shift parameters.
[0182] In one embodiment, the network structure of the lightweight reconstruction and restoration network is consistent with that of the lightweight bit depth restoration network, so a lightweight reconstruction and restoration network that is consistent with the encoding end and can accurately predict the least important bit image can be obtained according to the decoding network parameters. Among them, the decoding shift parameter is such as the lightweight bit depth restoration network in the encoding end, which is multiplied by the output result of the lightweight reconstruction and restoration network to perform the corresponding shift operation.
[0183] Step 830: Obtain a decoded pixel feature vector corresponding to each pixel according to the first decoded image, and input the decoded pixel feature vector into a lightweight reconstruction and recovery network for prediction to obtain a decoded pixel value.
[0184] In one embodiment, according to the method of calculating the pixel feature vector of each pixel in the first processed image at the encoding end, the decoded pixel feature vector corresponding to each pixel in the first decoded image is calculated, and then the decoded pixel feature vector is input into the lightweight reconstruction recovery network for prediction to obtain the decoded pixel value.
[0185] Step 840: Obtain a predicted decoded image according to the decoded pixel values, and obtain a reconstructed image corresponding to the original image according to the predicted decoded image, the first decoded image and the decoded shift parameter.
[0186] In one embodiment, a predicted decoded image having the same image size as the first decoded image can be obtained by arranging the decoded pixel values according to the pixel positions. At this time, the decoding end has not only the first decoded image of the most significant bit of lossless transmission, but also the predicted decoded image of the least significant bit obtained by prediction, so a reconstructed image corresponding to the original image can be obtained according to the predicted decoded image, the first decoded image and the decoding shift parameter.
[0187] In one embodiment, referring to Fig. 9 , Fig. 9 The flowchart of obtaining a reconstructed image corresponding to the original image according to the predicted decoded image, the first decoded image and the decoded shift parameter provided by the embodiment of the present application specifically includes the following steps:
[0188] Step 910: Calculate a decoded intermediate value based on the decoded shift parameter.
[0189] Step 920: Multiply the decoded intermediate value by the first decoded image to obtain a reconstructed intermediate image.
[0190] Step 930: Add the reconstructed intermediate image to the predicted decoded image to obtain a reconstructed image.
[0191] In one embodiment, the decoded intermediate value is represented as .
[0192] Therefore, the reconstructed image is expressed as:
[0193]
[0194] in, represents the reconstructed image, Indicates the decoding shift parameter, represents the first decoded picture, represents the reconstructed intermediate image, Represents the predicted decoded image.
[0195] For example, the original image is an 8-bit single-channel image, K=1, which is expressed as:
[0196]
[0197] And the first decoded image is:
[0198]
[0199] After prediction by the lightweight reconstruction recovery network, the predicted decoded image is:
[0200]
[0201] The calculated reconstructed image is:
[0202]
[0203] It can be seen that the reconstructed image differs from the original image only in the last value, and the overall reconstruction quality is high.
[0204] In one embodiment, referring to Fig.10 , Fig.10It is an overall flow chart of the satellite image compression method provided by an embodiment of the present application. First, the basic code stream, the header information code stream and the network parameter code stream are obtained from the received total code stream, and then decompressed to obtain the first decoded image, the decoding shift parameters and the decoding network parameters. Then, the decoding network parameters and the decoding shift parameters are used to generate a lightweight reconstruction and recovery network, and then the decoding pixel feature vector corresponding to each pixel is obtained according to the first decoded image, and the decoding pixel feature vector is input into the lightweight reconstruction and recovery network for prediction to obtain the decoded pixel value. A predicted decoded image is obtained according to the decoded pixel value, and a reconstructed image corresponding to the original image is obtained according to the predicted decoded image, the first decoded image and the decoding shift parameters.
[0205] As can be seen from the above, in scenarios similar to on-demand, it is only necessary to pre-compress the original image once, train a lightweight bit depth recovery network online, and then compress the most important bit image using lossless compression, and finally generate the total bit stream corresponding to each original image for storage. When needed at the decoding end, the most important bit image is directly obtained based on the transmitted total bit stream, and the overfitted target network parameters optimized by the encoding end are used as auxiliary information. During the decoding process, the least important bit image is predicted with high quality, thereby reconstructing the image. The complexity of the decoding end is greatly reduced, and a high compression ratio and high reconstruction quality of satellite multispectral images are achieved. In scenarios with large amounts of data, important image information can be retained while significantly reducing the data size, achieving high-quality compression and reducing the overall encoding and decoding time.
[0206] The embodiment of the present application has been tested on the Gaofen-2 dataset for image compression and image reconstruction, and the test results are shown in Table 1 below. The training process on the encoding end uses the Adam optimizer, the learning rate is set to 0.001, the batch size is set to 8192 points, and the total number of training rounds is 10. The encoding quality has significant BD-PSNR gain compared to the compression methods in the related technologies, such as JPEG 2000, JPEG XL, BitMore (D16), ABCD (EDSR), and ABCD (Swin). The BD-PSNR gain refers to the average peak signal-to-noise ratio (PSNR) at the same bit rate. For example, the satellite image compression method of the embodiment of the present application has an average gain of 0.877dB compared to JPEG 2000 and an average gain of 0.846dB compared to JPEG XL, which can reflect that the method of the embodiment of the present application significantly improves the compression performance of satellite multispectral images.
[0207]
[0208] Table 1 Test data of the embodiment of the present application
[0209] The present application also provides a satellite image compression device, which is applied to the encoding end and can implement the satellite image compression method. Fig.11 , the device comprises:
[0210] The bit division module 1110 is used to obtain a shift parameter, and use the shift parameter to perform bit division on the original image to obtain a first processed image and a second processed image, wherein the first processed image includes the most significant bit of each pixel, and the second processed image includes the least significant bit of each pixel.
[0211] Image processing module 1120: used to calculate the pixel feature vector corresponding to each pixel in the first processed image.
[0212] Model training module 1130: used to input pixel feature vectors and shift parameters into a lightweight bit depth recovery network for prediction, obtain predicted pixel values, obtain reference pixel values at corresponding positions in the second processed image, calculate loss values based on the reference pixel values and predicted pixel values, and adjust network parameters of the lightweight bit depth recovery network based on the loss values until the iteration termination conditions are reached to obtain target network parameters.
[0213] The bitstream generation module 1140 is used to obtain a total bitstream according to the first processed image, the shift parameter and the target network parameter, and send the total bitstream to the decoding end.
[0214] The specific implementation of the satellite image compression device of this embodiment is basically the same as the specific implementation of the satellite image compression method described above, and will not be described in detail here.
[0215] The present application also provides a satellite image compression device, which is applied to a decoding end and can implement the satellite image compression method. Fig.12 , the device comprises:
[0216] The bitstream decoding module 1210 is used to receive the total bitstream sent by the encoder, and obtain a first decoded image, a decoding shift parameter and a decoding network parameter according to the total bitstream, wherein the total bitstream is generated by the encoder according to the satellite image compression method described in any one of the above embodiments.
[0217] The network reconstruction module 1220 is used to generate a lightweight reconstruction and recovery network using the decoding network parameters and the decoding shift parameters. The network structure of the lightweight reconstruction and recovery network is consistent with that of the lightweight bit depth recovery network.
[0218] Prediction decoding module 1230: used to obtain a decoded pixel feature vector corresponding to each pixel according to the first decoded image, and input the decoded pixel feature vector into a lightweight reconstruction recovery network for prediction to obtain a decoded pixel value.
[0219] Image reconstruction module 1240: used to obtain a predicted decoded image according to the decoded pixel values, and obtain a reconstructed image corresponding to the original image according to the predicted decoded image, the first decoded image and the decoded shift parameter.
[0220] The specific implementation of the satellite image compression device of this embodiment is basically the same as the specific implementation of the satellite image compression method described above, and will not be described in detail here.
[0221] The present application also provides an electronic device, including:
[0222] at least one memory;
[0223] at least one processor;
[0224] at least one program;
[0225] The program is stored in the memory, and the processor executes the at least one program to implement the satellite image compression method implemented in the present application. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.
[0226] See also Fig.13 , Fig.13 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0227] The processor 1301 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0228] The memory 1302 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1302 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1302, and the processor 1301 calls and executes the satellite image compression method of the embodiment of this application;
[0229] Input / output interface 1303, used to implement information input and output;
[0230] Communication interface 1304, used to realize communication interaction between the device and other devices, which can be realized through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and
[0231] A bus 1305 that transmits information between various components of the device (e.g., the processor 1301, the memory 1302, the input / output interface 1303, and the communication interface 1304);
[0232] The processor 1301 , the memory 1302 , the input / output interface 1303 and the communication interface 1304 are connected to each other in communication within the device via a bus 1305 .
[0233] An embodiment of the present application further provides a storage medium, which is a storage medium storing a computer program, and the computer program implements the above-mentioned satellite image compression method when executed by a processor.
[0234] As a non-transitory storage medium, the memory can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0235] The present application proposes a satellite image compression method, device, equipment and storage medium, wherein the satellite image compression method obtains a shift parameter, uses the shift parameter to perform bit division on the original image, and obtains a first processed image and a second processed image, wherein the first processed image includes the most significant bit of each pixel. Then, the pixel feature vector corresponding to each pixel in the first processed image is calculated, and the pixel feature vector is input into a lightweight bit depth recovery network for prediction to obtain a predicted pixel value, and a reference pixel value at the corresponding position in the second processed image is obtained. The loss value is calculated based on the reference pixel value and the predicted pixel value, and the network parameters of the lightweight bit depth recovery network are adjusted based on the loss value until the iteration termination condition is reached to obtain the target network parameters. Finally, the total code stream is obtained according to the first processed image, the shift parameter and the target network parameter, and the total code stream is sent to the decoding end. The present application embodiment divides the original image into a first processed image containing the most important bit and a second processed image with relatively unimportant bits by bit division. Next, based on the process of predicting the second processed image from the first processed image, the lightweight bit depth recovery network is trained to obtain the target network parameters whose prediction effect is closest to the second processed image. Subsequently, the total code stream corresponding to the first processed image, shift parameters and target network parameters is sent to the decoding end for reconstruction. Since the first processed image containing the most important bits is transmitted to the decoding end, key image information can be obtained during the reconstruction process, thereby improving the reconstruction quality. At the same time, after the lightweight network is trained on the encoding end, only the target network parameters are transmitted to the decoding end. The decoding end performs a decoding process based on the received relevant network parameters to obtain the relevant content of the second processed image. Compared with the code stream related to the transmission image, the transmission parameters can reduce the overall data volume and reduce the transmission time.
[0236] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0237] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0238] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0239] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0240] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0241] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0242] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0243] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0244] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0245] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store programs.
[0246] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A satellite image compression method, characterized in that: Applied to the encoding end, the method includes: Acquire a shift parameter, and use the shift parameter to perform bit division on the original image to obtain a first processed image and a second processed image, wherein the first processed image includes the most significant bit of each pixel, and the second processed image includes the least significant bit of each pixel; Calculating a pixel feature vector corresponding to each pixel in the first processed image; Inputting the pixel feature vector and the shift parameter into a lightweight bit depth recovery network for prediction to obtain a predicted pixel value, obtaining a reference pixel value at a corresponding position in the second processed image, calculating a loss value based on the reference pixel value and the predicted pixel value, and adjusting the network parameters of the lightweight bit depth recovery network based on the loss value until an iteration termination condition is reached to obtain a target network parameter; Obtain a total bitstream according to the first processed image, the shift parameter and the target network parameter, and send the total bitstream to a decoding end; The calculating the pixel feature vector corresponding to each pixel in the first processed image includes: The pixels are selected one by one as target pixels, pixel coordinates of the target pixels are obtained, and the pixel coordinates are normalized based on the image size of the original image to obtain normalized coordinates; the coordinate values in the normalized coordinates are position-encoded based on preset position coding parameters to obtain coded coordinates, wherein the preset position coding parameters include frequency parameters and scale parameters; a preset distance threshold is obtained, and at least one neighboring pixel of the pixel is selected based on the pixel coordinates and the distance threshold; the normalized pixel values corresponding to the neighboring pixels are calculated, and a corrected pixel value is calculated by subtracting the target pixel value of the target pixel from the normalized pixel value; the pixel feature vector is obtained based on the coded coordinates and the corrected pixel value; The step of performing position encoding on the coordinate values in the normalized coordinates based on preset position encoding parameters to obtain encoded coordinates includes: Generate encoding function parameters based on the scale parameter and the frequency parameter, the encoding function parameters take the scale parameter as a base, raise the frequency value to a power, and the frequency value ranges from zero to the frequency parameter minus one; select the encoding function parameters one by one, calculate the first trigonometric function value and the second trigonometric function value according to the encoding function parameters and the coordinate value; obtain the encoding coordinates based on the coordinate value, the first trigonometric function value and the second trigonometric function value.
2. The satellite image compression method according to claim 1, characterized in that: The bit-segmenting the original image using the shift parameter to obtain a first processed image and a second processed image comprises: Shifting the original image rightward by the shift parameter and then rounding it to an integer, to obtain the first processed image; The number one is left-shifted according to the shift parameter to obtain a left-shifted result, one is subtracted from the left-shifted result to obtain an intermediate parameter, and a bitwise AND operation is performed on the original image and the intermediate parameter to obtain the second processed image.
3. The satellite image compression method according to claim 1, characterized in that: The obtaining a total bitstream according to the first processed image, the shift parameter and the target network parameter comprises: Encoding the first processed image to obtain a basic bitstream; At least encoding the shift parameter to obtain a header information code stream; Encoding the target network parameters to obtain a network parameter code stream; The total bitstream is obtained according to the header information bitstream, the basic bitstream and the network parameter bitstream.
4. The satellite image compression method according to any one of claims 1 to 3, characterized in that: The lightweight bit depth recovery network includes an input layer, at least one hidden layer and an output layer, and the hidden layer and the output layer are connected to a nonlinear activation function.
5. A satellite image compression method, characterized in that: Applied to a decoding end, the method comprises: receiving a total bitstream sent by an encoder, and obtaining a first decoded image, a decoding shift parameter, and a decoding network parameter according to the total bitstream, wherein the total bitstream is generated by the encoder according to the satellite image compression method according to any one of claims 1 to 4; Generate a lightweight reconstruction and recovery network using the decoding network parameters and the decoding shift parameters, wherein the lightweight reconstruction and recovery network has the same network structure as the lightweight bit depth recovery network; Obtaining a decoded pixel feature vector corresponding to each pixel according to the first decoded image, and inputting the decoded pixel feature vector into the lightweight reconstruction and restoration network for prediction to obtain a decoded pixel value; A predicted decoded image is obtained according to the decoded pixel value, and a reconstructed image corresponding to the original image is obtained according to the predicted decoded image, the first decoded image and the decoded shift parameter.
6. The satellite image compression method according to claim 5, characterized in that: The step of obtaining a reconstructed image corresponding to the original image according to the predicted decoded image, the first decoded image and the decoded shift parameter comprises: Calculating a decoding intermediate value based on the decoding shift parameter; Multiplying the decoded intermediate value by the first decoded image to obtain a reconstructed intermediate image; The reconstructed intermediate image is added to the predicted decoded image to obtain the reconstructed image.
7. The satellite image compression method according to claim 5, characterized in that: The obtaining, according to the total bitstream, a first decoded image, a decoding shift parameter, and a decoding network parameter comprises: Obtaining a basic bitstream, a header information bitstream and a network parameter bitstream according to the total bitstream; The first decoded image is obtained by decoding the basic code stream, the header information code stream is obtained by decoding the header information code stream, and the decoded network parameters are obtained by decoding the network parameter code stream.
8. A satellite image compression device, characterized in that: Applied to the encoding end, the device includes: A bit division module: used for obtaining a shift parameter, and performing bit division on the original image using the shift parameter to obtain a first processed image and a second processed image, wherein the first processed image includes the most significant bit of each pixel, and the second processed image includes the least significant bit of each pixel; Image processing module: used for calculating the pixel feature vector corresponding to each pixel in the first processed image; Model training module: used for inputting the pixel feature vector and the shift parameter into the lightweight bit depth recovery network for prediction, obtaining the predicted pixel value, obtaining the reference pixel value of the corresponding position in the second processed image, calculating the loss value based on the reference pixel value and the predicted pixel value, adjusting the network parameters of the lightweight bit depth recovery network based on the loss value, until the iteration termination condition is reached, and obtaining the target network parameters; A code stream generation module: used for obtaining a total code stream according to the first processed image, the shift parameter and the target network parameter, and sending the total code stream to a decoding end; The calculating the pixel feature vector corresponding to each pixel in the first processed image includes: The pixels are selected one by one as target pixels, pixel coordinates of the target pixels are obtained, and the pixel coordinates are normalized based on the image size of the original image to obtain normalized coordinates; the coordinate values in the normalized coordinates are position-encoded based on preset position coding parameters to obtain coded coordinates, wherein the preset position coding parameters include frequency parameters and scale parameters; a preset distance threshold is obtained, and at least one neighboring pixel of the pixel is selected based on the pixel coordinates and the distance threshold; the normalized pixel values corresponding to the neighboring pixels are calculated, and a corrected pixel value is calculated by subtracting the target pixel value of the target pixel from the normalized pixel value; the pixel feature vector is obtained based on the coded coordinates and the corrected pixel value; The step of performing position encoding on the coordinate values in the normalized coordinates based on preset position encoding parameters to obtain encoded coordinates includes: Generate encoding function parameters based on the scale parameter and the frequency parameter, the encoding function parameters take the scale parameter as a base, raise the frequency value to a power, and the frequency value ranges from zero to the frequency parameter minus one; select the encoding function parameters one by one, calculate the first trigonometric function value and the second trigonometric function value according to the encoding function parameters and the coordinate value; obtain the encoding coordinates based on the coordinate value, the first trigonometric function value and the second trigonometric function value.
9. A satellite image compression device, characterized in that: Applied to a decoding end, the device comprises: A code stream decoding module: used for receiving a total code stream sent by an encoder, and obtaining a first decoded image, a decoding shift parameter and a decoding network parameter according to the total code stream, wherein the total code stream is generated by the encoder according to the satellite image compression method according to any one of claims 1 to 4; A network reconstruction module: used to generate a lightweight reconstruction and recovery network using the decoding network parameters and the decoding shift parameters, wherein the lightweight reconstruction and recovery network has the same network structure as the lightweight bit depth recovery network; Prediction decoding module: used for obtaining a decoded pixel feature vector corresponding to each pixel according to the first decoded image, and inputting the decoded pixel feature vector into the lightweight reconstruction recovery network for prediction to obtain a decoded pixel value; Image reconstruction module: used to obtain a predicted decoded image according to the decoded pixel value, and to obtain a reconstructed image corresponding to the original image according to the predicted decoded image, the first decoded image and the decoded shift parameter.
10. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the satellite image compression method according to any one of claims 1 to 7 when executing the computer program.
11. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the satellite image compression method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Edge-enhanced multi-scale remote sensing image building semantic feature extraction method
CN110889449A
PolSAR data compression crop classification method based on NCSAE
CN113469077A