Hyperspectral image processing method, device, storage medium and computer equipment
By performing least squares regression calculation on hyperspectral images to generate a channel filter coefficient matrix, and using this matrix in the decoding device for image quality enhancement, the problem of low image quality after lossy compression of hyperspectral images in the prior art is solved, and the effect of improving image quality with very little increase in data volume is achieved.
Patent Information
- Application Number
- CN202510037232.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-01-09
AI Technical Summary
After the prior art, after lossy compression of hyperspectral images, it is difficult for the decoding device to recover images similar to the original image in image quality, resulting in lower image quality.
By performing least squares regression calculations on the original hyperspectral image and lossy compressed images, a channel filter coefficient matrix is generated, and the compressed image and channel filter coefficient matrix are sent to the decoding device, and the compressed image and channel filter coefficient matrix are used to enhance the image quality of the compressed images.
In the case where very little data transmission amount is increased, the image quality is improved so that the decoding device can output a target image similar to the original hyperspectral image in image quality.
Smart Images

Figure CN119484818B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of hyperspectral image processing, and in particular to a hyperspectral image processing method, device, storage medium and computer equipment. Background Art
[0002] With the widespread application of hyperspectral images, the amount of data is growing rapidly. In practical applications, with the continuous improvement of spectral resolution and spatial resolution of imaging, the volume of hyperspectral image data is also increasing day by day. Especially in large-format detection in the industrial field, by increasing the pixel resolution of the hyperspectral camera or using a magnifying lens to improve the detection accuracy of the object to be tested, such as a hyperspectral area array camera or a linear array hyperspectral camera, ultra-high resolution hyperspectral images will occupy a very large storage space during acquisition, which improves the storage of hyperspectral data.
[0003] In the related art, the hyperspectral image to be transmitted is lossily compressed by means of lossy compression, and the data is transmitted to a decoding device with a smaller data volume. However, it is difficult for the decoding device to decompress the lossy compressed image into an image with similar image quality to the original hyperspectral image, resulting in lower image quality. Therefore, the related art urgently needs to propose a hyperspectral image processing method to solve the above technical problems. Summary of the invention
[0004] The main purpose of the present application is to provide a hyperspectral image processing method, device, storage medium and computer equipment, which can decompress a lossy compressed image into an image with similar image quality to the original hyperspectral image, thereby improving the image quality.
[0005] In a first aspect, an embodiment of the present application provides a hyperspectral image processing method, comprising:
[0006] Acquire a hyperspectral image to be compressed, and perform lossy compression on the hyperspectral image to obtain a compressed image;
[0007] Performing least square regression calculation on the hyperspectral image and the compressed image to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0008] Losslessly compressing the channel filter coefficient matrix to obtain compressed data;
[0009] The compressed image and the compressed data are sent to a decoding device, so that the decoding device performs image quality enhancement on the compressed image according to the compressed data to obtain a target image.
[0010] In a second aspect, an embodiment of the present application provides a hyperspectral image processing device, comprising:
[0011] Receiving compressed images and compressed data sent by an encoding device;
[0012] Decoding the compressed data to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0013] The image quality of the compressed image is enhanced by using the channel filter coefficient matrix to obtain a target image.
[0014] In a third aspect, an embodiment of the present application provides a hyperspectral image processing device, comprising:
[0015] A first compression unit is used to obtain a hyperspectral image to be compressed, and to perform lossy compression on the hyperspectral image to obtain a compressed image;
[0016] A calculation unit, used for performing least square regression calculation on the hyperspectral image and the compressed image to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0017] A second compression unit, used for losslessly compressing the channel filter coefficient matrix to obtain compressed data;
[0018] The sending unit is used to send the compressed image and the compressed data to the decoding device, so that the decoding device enhances the image quality of the compressed image according to the compressed data to obtain a target image.
[0019] In a fourth aspect, an embodiment of the present application provides a hyperspectral image processing device, comprising:
[0020] A receiving unit, used for receiving the compressed image and compressed data sent by the encoding device;
[0021] A decoding unit, used for decoding the compressed data to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0022] The image quality enhancement unit is used to enhance the image quality of the compressed image through the channel filter coefficient matrix to obtain a target image.
[0023] In a fifth aspect, an embodiment of the present application provides a storage medium, wherein the computer-readable storage medium stores a plurality of instructions, which are suitable for loading by a processor to execute any of the hyperspectral image processing methods above.
[0024] In a sixth aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above hyperspectral image processing methods when executing the computer program.
[0025] In an embodiment of the present application, a hyperspectral image to be compressed is acquired, and lossy compression is performed on the hyperspectral image to obtain a compressed image; least squares regression is performed on the hyperspectral image and the compressed image to obtain a channel filter coefficient matrix, and the channel filter coefficients of each column in the channel filter coefficient matrix constitute the channel filter of the corresponding spectral channel in the hyperspectral image; lossless compression is performed on the channel filter coefficient matrix to obtain compressed data; the compressed image and the compressed data are sent to a decoding device, so that the decoding device performs image quality enhancement on the compressed image according to the compressed data to obtain a target image, and the channel filter coefficient matrix is generated by solving the least squares regression by using the original hyperspectral image and the lossy compressed image, and the compressed image and the channel filter coefficient matrix are sent to a decoding end, so that the decoding end improves the quality of the compressed image through the channel filter coefficient matrix, thereby obtaining a target image with similar image quality to the original hyperspectral image, and improving the image quality with a very small increase in the amount of transmitted data.
[0026] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 A schematic diagram of a scenario of a hyperspectral image processing system provided in an embodiment of the present application.
[0029] Figure 2 A schematic diagram of the process of a hyperspectral image processing method provided in an embodiment of the present application.
[0030] Figure 3 A schematic diagram of the processing flow of the encoding device provided in an embodiment of the present application.
[0031] Figure 4Another schematic diagram of the process of processing hyperspectral images provided in the embodiment of the present application.
[0032] Figure 5 A schematic diagram of the processing flow of a decoding device provided in an embodiment of the present application.
[0033] Figure 6 A schematic diagram of the structure of a hyperspectral image processing method and device provided in an embodiment of the present application.
[0034] Figure 7 Another structural schematic diagram of a hyperspectral image processing method and device provided in an embodiment of the present application.
[0035] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] 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. 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 the present application.
[0037] It should be noted that in some processes described in the specification, claims and the above-mentioned drawings, multiple steps appearing in a specific order are included, but it should be clearly understood that these steps may not be executed in the order in which they appear in this document or may be executed in parallel. The step numbers are only used to distinguish different steps, and the numbers themselves do not represent any execution order. In addition, descriptions such as "first", "second" or "target" in this document are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0038] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations:
[0039] Hyperspectral images: are carefully segmented in the spectral dimension, not just the traditional black, white, or R (Red), G (Green), B (Blue), but also have N channels in the spectral dimension. Its data format is usually three-dimensional, including width (W), height (H) and number of channels (C) to represent the size of the image on the plane and the spectral channel information contained in each pixel.
[0040] For example: divide 400nm-1000nm into 300 channels. At one time, a data cube is obtained through the hyperspectral device, which not only contains image information, but also expands it in the spectral dimension. As a result, not only the spectral data of each point on the image can be obtained, but also the image information of any spectral segment can be obtained.
[0041] Hyperspectral imaging technology is based on a large number of narrow-band image data technology. It combines imaging technology with spectral technology to detect the two-dimensional geometric space and spectral information of the target and obtain high-resolution continuous, narrow-band image data.
[0042] The principle of hyperspectral imaging is: in classical physics, when light waves pass through obstacles such as slits, small holes or disks, light of different wavelengths will bend and spread to different degrees, and then be diffracted and split by gratings to form spectral bands. In other words: after the one-dimensional information in space passes through the lens and slits, light of different wavelengths will bend and spread to different degrees. Each point on this one-dimensional image will be diffracted and split by gratings to form a spectral band, which will be irradiated onto the detector. The position and intensity of each pixel on the detector represent the spectrum and intensity. One point corresponds to a spectrum segment, and one line corresponds to a spectrum surface. Therefore, each image of the detector is the spectral information on a line in space. In order to obtain a two-dimensional image in space, mechanical push scanning is used to complete the image and spectral data collection of the entire plane.
[0043] A basic codec is a software or hardware component used to implement basic encoding and decoding functions in image or video processing. It constitutes the basis of the entire compression and decompression system.
[0044] 1. Encoding function:
[0045] The basic codec uses a variety of algorithms to reduce the amount of data. For image data, it takes advantage of characteristics such as spatial redundancy (such as the similarity between adjacent pixels), temporal redundancy (the similarity between adjacent frames in a video), and visual redundancy (the human eye is insensitive to certain details and color changes) in the image. For example, in the spatial domain, predictive coding may be used to predict the value of the current pixel based on the values of the surrounding pixels, and then only the prediction error is recorded, which can reduce the amount of data that needs to be stored or transmitted. In the frequency domain, transform coding methods such as discrete cosine transform (DCT) are often used. After converting the image data from the spatial domain to the frequency domain, the high-frequency part (usually corresponding to image details, which the human eye is relatively insensitive to) is quantized more coarsely to reduce its accuracy, thereby reducing the amount of data. After that, entropy coding (such as Huffman coding or arithmetic coding) is performed to assign codes of different lengths according to the probability of data occurrence to further compress the data.
[0046] 2. Decoding function:
[0047] Decoding is the reverse process of encoding. When receiving the encoded bitstream, the basic codec will first perform initialization operations based on the information in the bitstream (such as encoding parameters, quantization table, etc.). Then, the encoded coefficients are restored to quantized coefficients through entropy decoding, and then the dequantization operation is performed to restore the coefficients to a numerical range close to the original value (since the quantization operation in the encoding process will cause certain information loss, it can only be restored approximately). Finally, an inverse transform (such as inverse DCT transform) is performed to convert the data from the frequency domain back to the spatial domain, and the decoded pixel values are reassembled into an image based on the structural information of the image (such as block size, image size, etc.). For example, for JPEG decoding, each image block will be decoded in sequence according to the order of encoding, restored to the pixel values of the original image, and finally a complete image will be reconstructed. For video codecs, inter-frame prediction information needs to be considered to correctly restore each frame of the video.
[0048] Although the related art achieves this by lossily compressing the hyperspectral image to be transmitted and transmitting the data to the decoding device with a smaller amount of data, it is difficult for the decoding device to decompress the lossy compressed image into an image with similar image quality to the original hyperspectral image, resulting in lower image quality.
[0049] In order to solve the above problems, the embodiment of the present application uses the original hyperspectral image and the lossy compressed image to solve the least squares regression to generate a channel filter coefficient matrix, and sends the compressed image and the channel filter coefficient matrix to the decoding end, so that the decoding end can improve the quality of the compressed image through the channel filter coefficient matrix, thereby obtaining a target image with a similar image quality to the original hyperspectral image, and improving the image quality while increasing the amount of transmitted data very little. Please continue to refer to the following specific embodiments for details.
[0050] See also Figure 1 , Figure 1 A schematic diagram of a scenario of a hyperspectral image processing system provided in an embodiment of the present application, which includes an encoding device 140, the Internet 130, a gateway 120, a decoding device 110, and the like.
[0051] The encoding device 140 includes but is not limited to a pre-configured personal computer, or electronic devices such as a tablet computer, a desktop computer, etc. that have data reporting capabilities. In addition, it can be a single device or a collection of multiple devices. The encoding device 140 can communicate with the Internet 130 in a wired or wireless manner to exchange data, and can also communicate directly with the decoding device 110 through a physical line to achieve data transmission interaction.
[0052] The encoding device 140 refers to a computer system that can decode data (such as compressed images) transmitted by the decoding device 110. Compared with ordinary terminals, the decoding device 110 has higher requirements in terms of stability, security, performance, etc. The decoding device 110 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a part of a high-performance computer (such as a virtual machine), a combination of parts of multiple high-performance computers (such as virtual machines), etc.
[0053] The gateway 120 is also called an internetwork connector or a protocol converter. The gateway realizes network interconnection at the transport layer and is a computer system or device that acts as a converter. The gateway is a translator between two systems that use different communication protocols, data formats or languages, or even have completely different architectures. At the same time, the gateway can also provide filtering and security functions. The message sent by the encoding device 140 to the decoding device 110 must be sent to the corresponding decoding device 110 through the gateway 120. The message sent by the decoding device 110 to the encoding device 140 must also be sent to the corresponding encoding device 140 through the gateway 120.
[0054] The hyperspectral image processing method according to the embodiment of the present disclosure may be implemented in the decoding device 110 .
[0055] It should be noted that Figure 1 The scene diagram of the hyperspectral image processing system shown is only an example. The hyperspectral image processing system and scene described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Those skilled in the art can know that with the evolution of hyperspectral image processing technology and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0056] In this embodiment, the hyperspectral image processing device will be described from the perspective of the hyperspectral image processing device. The hyperspectral image processing device can be integrated in an encoding device having a storage unit and a microprocessor installed therein and having computing capabilities.
[0057] See also Figure 2 , Figure 2 A schematic diagram of a process flow of a hyperspectral image processing method provided in an embodiment of the present application. The hyperspectral image processing method comprises:
[0058] In step 201, a hyperspectral image to be compressed is obtained, and lossy compression is performed on the hyperspectral image to obtain a compressed image.
[0059] Among them, due to the huge amount of hyperspectral image data, in order to reduce the amount of hyperspectral image data to meet the needs of storage and transmission, in some application scenarios, such as network transmission or limited storage devices, directly processing the original image data will face many difficulties. Therefore, it is necessary to perform lossy compression on the hyperspectral image to be transmitted.
[0060] Specific processing methods for lossy compression can include: using existing codecs (such as JPEG2000, JPEGXL, HEVC or VVC, etc.) to process hyperspectral images. These codecs use the spatial similarity of images (i.e. the similarity between adjacent pixels in terms of brightness, color, etc.) and the correlation of spectral dimensions (a certain correlation between different channels) to remove redundant information in the image through a series of algorithms.
[0061] For example, through quantization, the precision of pixel values in the image is reduced, and fewer bits are used to represent pixel values; or predictive coding is used to predict the value of the current pixel based on adjacent pixels, and then only the prediction error is recorded. The amount of data obtained after such processing will be significantly reduced, but the image quality will be reduced to a certain extent, so it is called lossy compression. The resulting compressed image is a data representation form after encoding, which retains the main features of the image but loses some detailed information.
[0062] In step 202, a least squares regression calculation is performed on the hyperspectral image and the compressed image to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image.
[0063] Among them, by analyzing the relationship between image residual quantization, image quality evaluation criteria and least squares regression, it is explained why least squares regression calculations are performed on hyperspectral images and compressed images.
[0064] Specifically, the image residual quantization method is generally to evaluate the military error of the original image and the compressed image. Mean Square Error (MSE) is an intuitive method for measuring the average square difference between two input values, which is particularly suitable for low-level data analysis and model optimization. For three-dimensional hyperspectral image data, its calculation method can refer to the following formula:
[0065] ,
[0066] in, Represents sub-pixels of a lossy compressed image; Represents the corresponding sub-pixel in the original image; , and Represent the width, height and number of spectral channels of the image respectively.
[0067] The Peak Signal-to-Noise Ratio (PSNR) calculation based on mean square error is a widely used image quality evaluation indicator that is closer to the human eye's perception of image quality. As a dimensionless indicator, the PSNR does not depend on the bit depth of the pixel value, making it more versatile. The calculation of the PSNR is shown in the formula:
[0068] ,
[0069] in, Indicates the peak value of the original pixel value. For example, for an 8-bit depth image, MAX is 2 8 -1=255, from the formula we can get and Inversely proportional, that is, the lower Corresponding to higher , while the higher indicates a higher image quality, so by reducing This improves image quality.
[0070] Least Squares Regression (LSR) is a mathematical optimization technique used to minimize the sum of the squared differences between the original value and the predicted value. Least Squares Regression can be formulated as follows:
[0071] ,
[0072] in, The compressed image matrix representing the compressed image, The hyperspectral image matrix representing the original hyperspectral image, is the parameter that needs to be solved, and its dimension is , in the context of improving image compression efficiency, least squares regression aims to find an optimal , to minimize the compressed image Compared with the original hyperspectral image The optimization problem is expressed as follows:
[0073] ,
[0074] To solve this equation, we can use the following formula to calculate :
[0075] ,
[0076] in, is the compressed image matrix of the compressed image The transposed matrix of . Therefore, improving image quality is to increase the peak signal-to-noise ratio value. Since the peak signal-to-noise ratio is inversely proportional to the mean square error, minimizing the mean square error becomes the main goal. A lower mean square error means that the difference between the compressed image and the original image is smaller, which directly improves the peak signal-to-noise ratio. This leads to the use of mathematical optimization methods: solving least squares regression. By solving least squares regression, the goal is to determine an optimal value to minimize the difference between images. Therefore, the task of improving image quality is actually transformed into finding a suitable After obtaining the hyperspectral image matrix of the hyperspectral image to be transmitted , and the compressed image matrix of the compressed image Then, we can calculate according to the above formula .
[0077] For hyperspectral images, spectral channels, so the corresponding channel filter is calculated for each spectral channel , each channel filter filters different channel pixels at the same position, so its dimension is The calculated For one A matrix where each column represents a channel filter for a spectral channel , and finally the channel filters corresponding to different spectral channels constitute The channel filter coefficient matrix .
[0078] In some implementations, the hyperspectral image and the compressed image have the same image width, image height, and number of spectral channels, and performing least squares regression calculation on the hyperspectral image and the compressed image to obtain a filter coefficient matrix includes:
[0079] (1) Obtaining the product of the image width and the image height to obtain the total number of pixels;
[0080] (2) using the total number of pixels as the number of matrix rows and the number of spectral channels as the number of matrix columns, performing image matrix conversion on the hyperspectral image and the compressed image to obtain a hyperspectral image matrix of the hyperspectral image and a compressed image matrix of the compressed image;
[0081] (3) Performing least squares regression calculation on the hyperspectral image matrix and the compressed image matrix to obtain a filter coefficient matrix.
[0082] Among them, the image width of the hyperspectral image and the compressed image , Image Height as well as Similarly, the hyperspectral image and the compressed image are transformed into The size of , that is, the image width With image height The total number of pixels obtained by multiplying As the number of rows of the image matrix of the two images, the number of spectral channels As the number of columns of the image matrix of the two images, the hyperspectral image matrix of the hyperspectral image is obtained , and the compressed image matrix of the compressed image , and then substitute it into the formula to get the hyperspectral image matrix With the compressed image matrix Perform least squares regression calculation to obtain the channel filter coefficient matrix .
[0083] For example, a hyperspectral image has a channel number of =3 (to simplify the example, the actual number of channels of hyperspectral images is usually more), image width =2, height =2. The original hyperspectral image is losslessly compressed by a basic codec (such as JPEG 2000) to obtain a lossy compressed image. We transform the compressed image and the original image data according to the above-mentioned transformation method (combining the width and height into = =4) is converted to That is size.
[0084] Compressed image matrix for compressed images (Here, simple numbers are used to represent pixel values) , hyperspectral image matrix for According to calculation The formula is: , calculate the final channel filter coefficient matrix .
[0085] In step 203, the channel filter coefficient matrix is losslessly compressed to obtain compressed data.
[0086] After the channel filter coefficient matrix is calculated in step 202, in order to further reduce the amount of data of the channel filter coefficient matrix while ensuring that the channel filter coefficient matrix can be accurately restored later for easy transmission, the channel filter coefficient matrix is losslessly compressed to obtain compressed data. The purpose of using lossless compression is that the channel filter coefficient matrix needs to be used for image quality enhancement at the decoding end. If lossy compression is used, coefficients may be distorted, thereby affecting the effect of image quality enhancement. Therefore, lossless compression is used.
[0087] Specifically, lossless compression can be performed using a floating point data compression method. The floating point data compression method is a type of compression technology specifically used to process floating point data, which aims to reduce the storage space required for floating point representation while maintaining the precision and accuracy of the data as much as possible to meet the requirements of high efficiency of data storage, transmission and processing.
[0088] In step 204, the compressed image and the compressed data are sent to a decoding device, so that the decoding device performs image quality enhancement on the compressed image according to the compressed data to obtain a target image.
[0089] Among them, the compressed image (image data after lossy compression) and compressed data (channel filter coefficient matrix after lossless compression) are sent to the decoding device through a communication link (such as network transmission, storage medium reading, etc.). After receiving these data, the decoding device will first perform a demultiplexing operation on them to separate the compressed image and compressed data, and then enhance the image quality of the compressed image according to the compressed data to obtain the target image. The target image is an image that is close in image quality to the hyperspectral image to be transmitted.
[0090] In some implementations, the lossy compression of the hyperspectral image to obtain a compressed image includes:
[0091] (1) performing lossy encoding on the hyperspectral image by a codec to obtain a lossy bitstream;
[0092] (2) decoding the lossy bitstream through a codec to obtain a compressed image;
[0093] The sending the compressed image and the compressed data to a decoding device comprises:
[0094] (1) splicing the first data stream of the compressed image and the second data stream of the compressed data to obtain a spliced data stream;
[0095] (2) writing the decoder mark of the codec and the data amount of the second data stream into the header information of the spliced data stream to obtain a total data stream;
[0096] (3) Sending the total data stream to a decoding device.
[0097] Among them, the codec has both encoding and decoding capabilities. In the encoding stage, the hyperspectral image is lossily encoded through the basic codec to obtain a lossy bit stream, and then the lossy bit stream is decoded to obtain a lossy compressed image.
[0098] Since data is transmitted in the form of a data stream, in order to enable the subsequent decoding device to correctly decode the data in the data stream, after splicing the first data stream of the compressed image and the second data stream of the compressed data to obtain the spliced data stream, it is necessary to encode the header information through a byte writer, write the decoder mark of the codec and the data amount of the second data stream into the header information of the spliced data stream, and obtain the total data stream; and send the total data stream to the decoding device.
[0099] Specifically, since different basic codecs may be used for encoding in the process of lossy encoding of hyperspectral images, correspondingly, a specific algorithm is also required to correctly restore the data during decoding. Therefore, the decoder mark of the codec needs to be written into the header information to inform the decoder to perform corresponding processing through the corresponding codec. In addition, since the spliced data stream is obtained by splicing the first data stream of the compressed image and the second data stream of the compressed data, the data volume of the second data stream also needs to be written into the header information so that the decoding device can correctly divide the spliced data stream according to the data volume. In addition, the image dimension information can also be written into the header information. Finally, the total data stream (that is, the total bit stream) obtained after the header information is written is sent to the decoding device for processing by the decoding device.
[0100] The complete process of encoding equipment can be referred to Figure 3 , Figure 3 A schematic diagram of a processing flow of an encoding device provided in an embodiment of the present application, wherein the lossy compressed hyperspectral image is the compressed image, the image bit stream is the first data stream, and the channel filtering bit stream is the second data stream.
[0101] As can be seen from the above, the embodiment of the present application obtains a hyperspectral image to be compressed, performs lossy compression on the hyperspectral image, and obtains a compressed image; performs least squares regression calculation on the hyperspectral image and the compressed image to obtain a channel filter coefficient matrix, and the channel filter coefficients of each column in the channel filter coefficient matrix constitute the channel filter of the corresponding spectral channel in the hyperspectral image; performs lossless compression on the channel filter coefficient matrix to obtain compressed data; sends the compressed image and the compressed data to a decoding device, so that the decoding device performs image quality enhancement on the compressed image according to the compressed data to obtain a target image, and generates a channel filter coefficient matrix by solving the least squares regression by using the original hyperspectral image and the lossy compressed image, and sends the compressed image and the channel filter coefficient matrix to the decoding end, so that the decoding end improves the quality of the compressed image through the channel filter coefficient matrix, thereby obtaining a target image with similar image quality to the original hyperspectral image, and improving the image quality with a very small increase in the amount of transmitted data.
[0102] In this embodiment, the hyperspectral image processing device will be described from the perspective of the hyperspectral image processing device. The hyperspectral image processing device can be integrated in a decoding device having a storage unit and a microprocessor installed therein and having computing capabilities.
[0103] See also Figure 4 , Figure 4 Another schematic diagram of a hyperspectral image processing method provided in an embodiment of the present application. The hyperspectral image processing method includes:
[0104] In step 301, a compressed image and compressed data sent by an encoding device are received.
[0105] The decoding device receives a compressed image and compressed data sent by the encoding device. The compressed image is an image obtained by the encoding device performing lossy compression on the hyperspectral image to be sent, and the compressed data is data obtained by the encoding device performing lossless compression on the channel filter coefficient matrix.
[0106] In step 302, the compressed data is decoded to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image.
[0107] Among them, since the compressed data is the data obtained by the encoding device losslessly compressing the channel filter coefficient matrix, in order to obtain the original channel filter coefficient matrix, the compressed data needs to be decoded to obtain the channel filter coefficient matrix , channel filter coefficient matrix The channel filter coefficients of each column in constitute the channel filter of the corresponding spectral channel in the hyperspectral image .
[0108] In step 303, the compressed image is enhanced in image quality by using a channel filter coefficient matrix to obtain a target image.
[0109] Among them, due to the calculated For one A matrix where each column represents a channel filter for a spectral channel , so the pixel values at the same position are extracted from all spectral channels and the corresponding channel filters are applied to enhance the image quality. These filters exploit the strong correlation inherent in the hyperspectral image data and minimize the difference between the compressed image and the original image. This method achieves significant improvement in reconstruction quality while adding only negligible overhead. Each hyperspectral image requires one Each Storage needs The storage cost is independent of the image width W and height H, but only depends on In addition, due to the use of floating point data compression , so each The actual storage space is less than .
[0110] In some implementations, the step of performing image quality enhancement on the compressed image using the channel filter coefficient matrix to obtain a target image includes:
[0111] (1) Obtaining a compressed image matrix of the compressed image;
[0112] (2) calculating the product of the channel filter coefficient matrix and the compressed image matrix to obtain a target image matrix;
[0113] (3) Transform the target image matrix to obtain the target image.
[0114] Among them, since the least squares regression can be formulated as follows:
[0115] ,
[0116] Therefore, the channel filter coefficient matrix is obtained After that, the channel filter coefficient matrix Perform image quality enhancement on the compressed image to obtain the target image matrix of the target image The calculation formula is as follows:
[0117] ,
[0118] In this way, the target image matrix is calculated After that, the target image can be converted.
[0119] For example, ,Right now , , , , and constitute The channel filter coefficient matrix, each channel filter The dimension is , it will filter the pixels of different channels at the same position (such as the coordinate (0,0) in the image), and finally calculate the target image matrix of the target image , thus obtaining the target image.
[0120] In some implementations, the receiving a compressed image and compressed data sent by an encoding device includes:
[0121] (1) receiving a total data stream, parsing header information in the total data stream, and obtaining a codec tag and a data volume of a second data stream of compressed data;
[0122] (2) Finding the corresponding codec according to the codec tag;
[0123] (3) removing the header information to obtain a spliced data stream;
[0124] (4) dividing the spliced data stream according to the data volume to obtain a first data stream and a second data stream;
[0125] (5) decoding the first data stream by the codec to obtain a compressed image;
[0126] (6) Decode the second data stream to obtain compressed data.
[0127] Among them, since data is transmitted in the form of data stream, the compressed image and compressed data are transmitted in the form of data stream (bit stream) along with the total data stream (total bit stream). In order to enable the decoding device to correctly obtain the compressed image and compressed data, the encoding device writes the codec mark and the data amount of the second data stream of the compressed data in the header information of the total data stream, so that the decoding device can obtain it by parsing the header information.
[0128] Specifically, since different basic codecs may be used for encoding in the process of lossy encoding of hyperspectral images, correspondingly, a specific algorithm is also required to correctly restore the data during decoding. Therefore, the decoding device will find the corresponding codec according to the codec tag. Remove the header information to obtain a spliced data stream obtained by the encoding device splicing the first data stream of the compressed image and the second data stream of the compressed data; divide the spliced data stream according to the amount of data parsed from the header information, and correctly divide the first data stream and the second data stream; decode the first data stream through the codec to obtain a compressed image; decode the second data stream to obtain compressed data.
[0129] See also Figure 5 , Figure 5 A schematic diagram of the processing flow of a decoding device provided in an embodiment of the present application. The channel filter coefficient matrix includes n, respectively to , and there are a total of n+1 pixels, For example, the corresponding channel filter coefficient Including from to The pixel values at the same position in different spectral channels can be expressed as For example, for pixel 0,0, each pixel value from spectral channel 1 to spectral channel n is represented by to .
[0130] From the above, it can be seen that the embodiment of the present application utilizes the original hyperspectral image and the lossy compressed image to solve the least squares regression to generate a channel filter coefficient matrix, and sends the compressed image and the channel filter coefficient matrix to the decoding end, so that the decoding end can improve the quality of the compressed image through the channel filter coefficient matrix, thereby obtaining a target image with an image quality similar to that of the original hyperspectral image, thereby improving the image quality with a very small increase in the amount of transmitted data.
[0131] The specific implementation of the above steps can be found in the previous embodiments, which will not be described in detail here.
[0132] In order to facilitate better implementation of the hyperspectral image processing method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above hyperspectral image processing method. The meanings of the terms are the same as those in the above hyperspectral image processing method, and the specific implementation details can refer to the description in the method embodiment.
[0133] See also Figure 6 , Figure 6A schematic diagram of the structure of a hyperspectral image processing method and apparatus provided in an embodiment of the present application, wherein the hyperspectral image processing method and apparatus is applied to an encoding device, wherein the hyperspectral image processing method and apparatus may include a first compression unit 601, a calculation unit 602, a second compression unit 603, a sending unit 604, and the like.
[0134] The first compression unit 601 is used to obtain a hyperspectral image to be compressed, and to perform lossy compression on the hyperspectral image to obtain a compressed image;
[0135] A calculation unit 602 is used to perform least square regression calculation on the hyperspectral image and the compressed image to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0136] A second compression unit 603 is used to perform lossless compression on the channel filter coefficient matrix to obtain compressed data;
[0137] The sending unit 604 is used to send the compressed image and the compressed data to the decoding device, so that the decoding device performs image quality enhancement on the compressed image according to the compressed data to obtain a target image.
[0138] In some embodiments, the hyperspectral image and the compressed image have the same image width, image height, and number of spectral channels. The calculation unit 602 includes:
[0139] A first acquisition subunit is used to obtain the product of the image width and the image height to obtain the total number of pixels;
[0140] A first matrix conversion subunit is used for performing image matrix conversion on the hyperspectral image and the compressed image by taking the total number of pixels as the number of matrix rows and the number of spectral channels as the number of matrix columns to obtain a hyperspectral image matrix of the hyperspectral image and a compressed image matrix of the compressed image;
[0141] The first calculation subunit is used to perform least square regression calculation on the hyperspectral image matrix and the compressed image matrix to obtain a channel filter coefficient matrix.
[0142] In some embodiments, the first compression unit 601 includes:
[0143] The encoding subunit is used to perform lossy encoding on the hyperspectral image through a codec to obtain a lossy bit stream;
[0144] A first decoding subunit, configured to decode the lossy code stream through a codec to obtain a compressed image;
[0145] The sending unit 604 includes:
[0146] a splicing subunit, configured to splice the first data stream of the compressed image and the second data stream of the compressed data to obtain a spliced data stream;
[0147] A writing subunit, used for writing a decoder mark of the codec and the data amount of the second data stream into the header information of the spliced data stream to obtain a total data stream;
[0148] The sending subunit is used to send the total data stream to the decoding device.
[0149] The specific implementation of each of the above units can be found in the previous embodiments, which will not be described in detail here.
[0150] As can be seen from the above, the embodiment of the present application obtains the hyperspectral image to be compressed through the first compression unit 601, performs lossy compression on the hyperspectral image, and obtains a compressed image; the calculation unit 602 performs least squares regression calculation on the hyperspectral image and the compressed image to obtain a channel filter coefficient matrix, and the channel filter coefficients of each column in the channel filter coefficient matrix constitute the channel filter of the corresponding spectral channel in the hyperspectral image; the second compression unit 603 performs lossless compression on the channel filter coefficient matrix to obtain compressed data; the sending unit 604 sends the compressed image and the compressed data to the decoding device, so that the decoding device enhances the image quality of the compressed image according to the compressed data to obtain the target image. By using the original hyperspectral image and the lossy compressed image, solving the least squares regression to generate the channel filter coefficient matrix, and sending the compressed image and the channel filter coefficient matrix to the decoding end, so that the decoding end improves the quality of the compressed image through the channel filter coefficient matrix, thereby obtaining a target image with similar image quality to the original hyperspectral image, and improving the image quality with a very small increase in the amount of transmitted data.
[0151] See also Figure 7 , Figure 7 Another structural schematic diagram of a hyperspectral image processing method and apparatus provided in an embodiment of the present application, wherein the hyperspectral image processing method and apparatus is applied to a decoding device, wherein the hyperspectral image processing method and apparatus may include a receiving unit 701, a decoding unit 702, and an image quality enhancement unit 703, etc.
[0152] The receiving unit 701 is used to receive the compressed image and compressed data sent by the encoding device;
[0153] A decoding unit 702 is used to decode the compressed data to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0154] The image quality enhancement unit 703 is used to enhance the image quality of the compressed image through the channel filter coefficient matrix to obtain a target image.
[0155] In some embodiments, the image quality enhancement unit 703 includes:
[0156] An acquisition subunit, used for acquiring a compressed image matrix of the compressed image;
[0157] A second calculation subunit is used to calculate the product of the channel filter coefficient matrix and the compressed image matrix to obtain a target image matrix;
[0158] The second matrix conversion subunit is used to convert the target image matrix to obtain a target image.
[0159] In some embodiments, the receiving unit 701 includes:
[0160] A receiving subunit, configured to receive the total data stream, parse the header information in the total data stream, and obtain a codec tag and a data amount of a second data stream of compressed data;
[0161] A search subunit, used to search for a corresponding codec according to the codec tag;
[0162] A removal subunit, used for removing the header information to obtain a spliced data stream;
[0163] A segmentation subunit, configured to segment the spliced data stream according to the data volume to obtain a first data stream and a second data stream;
[0164] A second decoding subunit, configured to decode the first data stream through the codec to obtain a compressed image;
[0165] The third decoding subunit is used to decode the second data stream to obtain compressed data.
[0166] The specific implementation of each of the above units can be found in the previous embodiments, which will not be described in detail here.
[0167] As can be seen from the above, the embodiment of the present application receives the compressed image and compressed data sent by the encoding device through the receiving unit 701; the decoding unit 702 decodes the compressed data to obtain a channel filter coefficient matrix, and the channel filter coefficients of each column in the channel filter coefficient matrix constitute the channel filter of the corresponding spectral channel in the hyperspectral image; the image quality enhancement unit 703 enhances the image quality of the compressed image through the channel filter coefficient matrix to obtain the target image. By using the original hyperspectral image and the lossy compressed image, solving the least squares regression to generate the channel filter coefficient matrix, and sending the compressed image and the channel filter coefficient matrix to the decoding end, so that the decoding end improves the quality of the compressed image through the channel filter coefficient matrix, thereby obtaining a target image with similar image quality to the original hyperspectral image, and improving the image quality with a very small increase in the amount of transmitted data.
[0168] Reference Figure 8 , Figure 8 The block diagram of the structure of part of the computer device 1000 for implementing the embodiment of the present disclosure. The computer device 1000 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 622 (for example, one or more processors) and memory 632, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 642 or data 644. Among them, the memory 632 and the storage medium 630 can be temporary storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server 600. Furthermore, the central processing unit 622 can be configured to communicate with the storage medium 630 and execute a series of instruction operations in the storage medium 630 on the server 600.
[0169] The computer device 1000 may also include one or more power supplies 626, one or more wired or wireless network interfaces 650, one or more input and output interfaces 658, and / or one or more operating systems 641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0170] The central processor 622 in the computer device 1000 may be used to execute the hyperspectral image processing method of the embodiment of the present disclosure, for example:
[0171] When the computer device 1000 is used as an encoding device, the following steps are performed:
[0172] Acquire a hyperspectral image to be compressed, and perform lossy compression on the hyperspectral image to obtain a compressed image;
[0173] Performing least square regression calculation on the hyperspectral image and the compressed image to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0174] Losslessly compressing the channel filter coefficient matrix to obtain compressed data;
[0175] The compressed image and the compressed data are sent to a decoding device, so that the decoding device performs image quality enhancement on the compressed image according to the compressed data to obtain a target image.
[0176] When the computer device 1000 is used as a decoding device, the following steps are performed:
[0177] Receiving compressed images and compressed data sent by an encoding device;
[0178] Decoding the compressed data to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0179] The image quality of the compressed image is enhanced by using the channel filter coefficient matrix to obtain a target image.
[0180] The embodiments of the present disclosure further provide a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the hyperspectral image processing methods of the aforementioned embodiments.
[0181] The present disclosure also provides a computer program product, which includes a computer program. The processor of the computer device reads and executes the computer program, so that the computer device executes the above-mentioned hyperspectral image processing method. For example:
[0182] When the computer device is used as the encoding device, the following steps are performed:
[0183] Acquire a hyperspectral image to be compressed, and perform lossy compression on the hyperspectral image to obtain a compressed image;
[0184] Performing least square regression calculation on the hyperspectral image and the compressed image to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0185] Losslessly compressing the channel filter coefficient matrix to obtain compressed data;
[0186] The compressed image and the compressed data are sent to a decoding device, so that the decoding device performs image quality enhancement on the compressed image according to the compressed data to obtain a target image.
[0187] When the computer device is used as a decoding device, the following steps are performed:
[0188] Receiving compressed images and compressed data sent by an encoding device;
[0189] Decoding the compressed data to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image;
[0190] The image quality of the compressed image is enhanced by using the channel filter coefficient matrix to obtain a target image.
[0191] In addition, the terms "comprises" and "includes" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product or apparatus.
[0192] It should be understood that in the present 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.
[0193] It should be understood that in the description of the embodiments of the present application, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.
[0194] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0195] The units described 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.
[0196] 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.
[0197] 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0198] It should also be understood that the various implementations provided in the embodiments of the present application can be combined arbitrarily to achieve different technical effects.
[0199] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0200] The above is a specific description of the implementation method of the present application, but the present application is not limited to the above-mentioned implementation method. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A hyperspectral image processing method, characterized in that: include: Acquire a hyperspectral image to be compressed, and perform lossy compression on the hyperspectral image to obtain a compressed image, wherein the hyperspectral image and the compressed image have the same image width, image height, and number of spectral channels; Obtain the product of the image width and the image height to obtain the total number of pixels; Using the total number of pixels as the number of matrix rows and the number of spectral channels as the number of matrix columns, performing image matrix conversion on the hyperspectral image and the compressed image to obtain a hyperspectral image matrix of the hyperspectral image and a compressed image matrix of the compressed image; Performing least square regression calculation on the hyperspectral image matrix and the compressed image matrix to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image, and the number of channel filter coefficients included in each of the channel filters is the same as the number of spectral channels of the hyperspectral image; Losslessly compressing the channel filter coefficient matrix to obtain compressed data; The compressed image and the compressed data are sent to a decoding device, so that the decoding device performs image quality enhancement on the compressed image according to the compressed data to obtain a target image.
2. The hyperspectral image processing method according to claim 1, characterized in that: The lossy compression of the hyperspectral image to obtain a compressed image includes: Performing lossy encoding on the hyperspectral image by a codec to obtain a lossy bitstream; Decoding the lossy code stream by a codec to obtain a compressed image; The sending the compressed image and the compressed data to a decoding device comprises: splicing the first data stream of the compressed image and the second data stream of the compressed data to obtain a spliced data stream; Writing the decoder mark of the codec and the data amount of the second data stream into the header information of the spliced data stream to obtain a total data stream; The total data stream is sent to a decoding device.
3. A hyperspectral image processing method, characterized in that: include: Receiving a compressed image and compressed data sent by an encoding device, wherein the compressed image and the compressed data are obtained by the hyperspectral image processing method according to claim 1; Decoding the compressed data to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image, and the number of channel filter coefficients included in each channel filter is the same as the number of spectral channels of the hyperspectral image; Obtaining a compressed image matrix of the compressed image; Calculating the product of the channel filter coefficient matrix and the compressed image matrix to obtain a target image matrix; The target image matrix is transformed to obtain a target image.
4. The hyperspectral image processing method according to claim 3, characterized in that: The receiving compressed image and compressed data sent by the encoding device includes: receiving a total data stream, parsing header information in the total data stream, and obtaining a codec tag and a data amount of a second data stream of compressed data; Find the corresponding codec according to the codec tag; Remove the header information to obtain a spliced data stream; Splitting the spliced data stream according to the data amount to obtain a first data stream and a second data stream; Decoding the first data stream by the codec to obtain a compressed image; The second data stream is decoded to obtain compressed data.
5. A hyperspectral image processing device, characterized in that: include: A first compression unit is used to obtain a hyperspectral image to be compressed, and to perform lossy compression on the hyperspectral image to obtain a compressed image, wherein the hyperspectral image and the compressed image have the same image width, image height, and number of spectral channels; Computing unit, including: A first acquisition subunit is used to obtain the product of the image width and the image height to obtain the total number of pixels; A first matrix conversion subunit is used for performing image matrix conversion on the hyperspectral image and the compressed image by taking the total number of pixels as the number of matrix rows and the number of spectral channels as the number of matrix columns to obtain a hyperspectral image matrix of the hyperspectral image and a compressed image matrix of the compressed image; A first calculation subunit is used to perform least square regression calculation on the hyperspectral image matrix and the compressed image matrix to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image, and the number of channel filter coefficients included in each of the channel filters is the same as the number of spectral channels of the hyperspectral image; A second compression unit, used for losslessly compressing the channel filter coefficient matrix to obtain compressed data; The sending unit is used to send the compressed image and the compressed data to the decoding device, so that the decoding device enhances the image quality of the compressed image according to the compressed data to obtain a target image.
6. A hyperspectral image processing device, characterized in that: include: A receiving unit, used for receiving a compressed image and compressed data sent by an encoding device, wherein the compressed image and the compressed data are obtained by the hyperspectral image processing method according to claim 1; A decoding unit, configured to decode the compressed data to obtain a channel filter coefficient matrix, wherein the channel filter coefficients of each column in the channel filter coefficient matrix constitute a channel filter of a corresponding spectral channel in the hyperspectral image, and the number of channel filter coefficients included in each of the channel filters is the same as the number of spectral channels of the hyperspectral image; Image quality enhancement unit, comprising: An acquisition subunit, used for acquiring a compressed image matrix of the compressed image; A second calculation subunit is used to calculate the product of the channel filter coefficient matrix and the compressed image matrix to obtain a target image matrix; The second matrix conversion subunit is used to convert the target image matrix to obtain a target image.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the hyperspectral image processing method according to any one of claims 1 to 2, or the hyperspectral image processing method according to any one of claims 3 to 4.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the hyperspectral image processing method according to any one of claims 1 to 2 or the hyperspectral image processing method according to any one of claims 3 to 4 is implemented.
Citation Information
Patent Citations
Coastal zone hyperspectral image distributed lossy coding and decoding method based on region of interest
CN105825530A