CN111107360B - A method and system for lossless compression of hyperspectral images combined with spectral-spatial dimension - Google Patents

A method and system for lossless compression of hyperspectral images combined with spectral-spatial dimension Download PDF

Info

Publication number
CN111107360B
CN111107360B CN201911420225.1A CN201911420225A CN111107360B CN 111107360 B CN111107360 B CN 111107360B CN 201911420225 A CN201911420225 A CN 201911420225A CN 111107360 B CN111107360 B CN 111107360B
Authority
CN
China
Prior art keywords
channel
image
hyperspectral
transformation
uniformity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911420225.1A
Other languages
Chinese (zh)
Other versions
CN111107360A (en
Inventor
张天序
陈阳
徐东
颜露新
陈立群
武少林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN201911420225.1A priority Critical patent/CN111107360B/en
Publication of CN111107360A publication Critical patent/CN111107360A/en
Application granted granted Critical
Publication of CN111107360B publication Critical patent/CN111107360B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

本发明公开了一种光谱‑空间维联合的高光谱图像无损压缩方法及系统,首先对原始的高光谱图像进行预处理,矫正成像仪器引起的非线性因素;对预处理后的高光谱图像进行可逆整数变换,去除谱间相关性;对可逆整数变换后的高光谱图像逐通道计算图像均匀性指标;对较均匀的图像通道采用FILF压缩器编码,对均匀性差的图像通道切换到算术编码器编码;通过相应的解码方式解码,去除谱间相关性,对去除谱间相关性的图像进行可逆整数逆变换,恢复出压缩前的原始的高光谱图像。本发明通过对高光谱图像做一个可逆的整数变换来去除其谱间相关性,以降低原始数据的信息熵,去除谱间的冗余信息,采取FILF压缩编码来提取得高压缩比,简单的算术编码器加快压缩速度。

Figure 201911420225

The invention discloses a spectral-spatial dimension combined hyperspectral image lossless compression method and system. First, the original hyperspectral image is preprocessed to correct nonlinear factors caused by imaging instruments; Reversible integer transform to remove spectral correlation; calculate image uniformity index channel by channel for hyperspectral images after reversible integer transformation; use FILF compressor to encode relatively uniform image channels, and switch to arithmetic encoder for image channels with poor uniformity Coding; decoding through corresponding decoding methods, removing the correlation between spectra, performing reversible integer inverse transformation on the image that has removed the correlation between spectra, and restoring the original hyperspectral image before compression. The invention removes the correlation between the spectra by performing a reversible integer transformation on the hyperspectral image, so as to reduce the information entropy of the original data, remove the redundant information between the spectra, and adopt FILF compression coding to extract a high compression ratio. Arithmetic encoder speeds up compression.

Figure 201911420225

Description

一种光谱-空间维联合的高光谱图像无损压缩方法及系统A method and system for lossless compression of hyperspectral images combined with spectral-spatial dimension

技术领域technical field

本发明属于图像处理领域,更具体地,涉及一种光谱-空间维联合的高光谱图像无损压缩方法及系统。The invention belongs to the field of image processing, and more particularly, relates to a method and system for lossless compression of hyperspectral images combined with spectral-spatial dimensions.

背景技术Background technique

高光谱遥感的光谱分辦率达到纳米量级,在可见光到短波红外光谱区间的波段数多达数十到数百个。较高的光谱分辨率使得高光谱图像能够提供更为精细的地物细节信息,在地质调查、矿床探测、精细农业海洋遥感、环境与灾害监测以及军事侦察等领域得到了广泛应用。在高光谱遥感技术发展过程中,随着光谱分辨率和空间分辨率的不断提高,成像光谱仪获取的数据量急剧膨胀,给数据的存储和传输带来了巨大的压力。The spectral resolution rate of hyperspectral remote sensing reaches the nanometer level, and the number of bands in the visible light to short-wave infrared spectral range is as many as tens to hundreds. Higher spectral resolution enables hyperspectral images to provide more detailed information on ground features, and has been widely used in geological surveys, mineral deposit detection, precision agriculture and marine remote sensing, environmental and disaster monitoring, and military reconnaissance. In the development of hyperspectral remote sensing technology, with the continuous improvement of spectral resolution and spatial resolution, the amount of data acquired by imaging spectrometers has expanded rapidly, which has brought enormous pressure to data storage and transmission.

由于遥感图像信息十分宝贵,应尽可能采用无损压缩。无损压缩不允许原始的图像信息有任何丢失,通过解码后还原的图像与原始图像之间没有任何误差。无损压缩是对文件本身的压缩,和其它数据文件的压缩一样,是对文件的数据存储方式进行优化,采用某种算法表示重复的数据信息,文件可以完全还原,不会影响文件内容,对于图像数据而言,也就不会使图像细节有任何损失。因此无损压缩可以看成是一个可逆过程。Since remote sensing image information is very valuable, lossless compression should be used as much as possible. Lossless compression does not allow any loss of original image information, and there is no error between the image restored after decoding and the original image. Lossless compression is the compression of the file itself. Like the compression of other data files, it is to optimize the data storage method of the file. A certain algorithm is used to represent the repeated data information. The file can be completely restored without affecting the content of the file. In terms of data, there will be no loss of image details. Therefore, lossless compression can be regarded as a reversible process.

在静止可见光图像压缩领域,已经制订了统一的国际压缩标准,而在高光谱图像压缩领域,还未形成压缩标准。目前,对于星载多光谱或高光谱图像的压缩,大多直接套用PNG,JPEG-LS,JPEG2000等流行的可见光压缩系统,这些可见光图像压缩系统只能压缩单通道灰度图或者三通道RGB 图像,只能消除图像谱内空间相关性,均未考虑波段之间的相关性,压缩性能较低,无法有效减小数据的传输带宽。关于如何消除谱间相关性,高光谱图像压缩领域有许多基于预测的方法,使用简单预测器(比如线性预测)往往预测误差降不下去,压缩能力弱,而使用复杂预测器(如BP神经网络)虽然能保证较小的预测误差,但是本身模型体积较大,算上模型文件的体积,压缩后图像文件体积可能不减反增。另外,简单地直接套用流行可见光压缩器压缩高光谱图像还会浪费大量压缩时间,因此,本领域亟需一种有效实用的高光谱图像数据无损压缩方法。In the field of still visible light image compression, a unified international compression standard has been formulated, while in the field of hyperspectral image compression, no compression standard has yet been formed. At present, for the compression of spaceborne multispectral or hyperspectral images, most popular visible light compression systems such as PNG, JPEG-LS, and JPEG2000 are directly applied. These visible light image compression systems can only compress single-channel grayscale images or three-channel RGB images. Only the spatial correlation in the image spectrum can be eliminated, and the correlation between the bands is not considered, the compression performance is low, and the data transmission bandwidth cannot be effectively reduced. Regarding how to eliminate the correlation between spectra, there are many prediction-based methods in the field of hyperspectral image compression. Using simple predictors (such as linear prediction) often cannot reduce the prediction error, and the compression ability is weak, while using complex predictors (such as BP neural network) ) can guarantee a small prediction error, but the size of the model itself is relatively large, and the volume of the compressed image file may not decrease but increase, including the size of the model file. In addition, simply applying a popular visible light compressor to compress hyperspectral images will waste a lot of compression time. Therefore, an effective and practical method for lossless compression of hyperspectral image data is urgently needed in the art.

发明内容SUMMARY OF THE INVENTION

针对现有技术的缺陷,本发明的目的在于提供一种光谱-空间维联合的高光谱图像无损压缩方法及系统,旨在解决高光谱图像数据无损压缩技术中仍沿用现有可见光图像领域的FILF压缩系统,从而无法实现去除高光谱图像的强谱间相关性,导致压缩性能有限的问题。In view of the defects of the prior art, the purpose of the present invention is to provide a method and system for lossless compression of hyperspectral images combined with spectrum-spatial dimension, aiming to solve the problem of FILF in the field of existing visible light images still used in the lossless compression technology of hyperspectral image data. Therefore, it is impossible to remove the strong inter-spectral correlation of hyperspectral images, resulting in the problem of limited compression performance.

为实现上述目的,按照本发明的一方面,提供了一种光谱-空间维联合的高光谱图像无损压缩方法,包括以下步骤:In order to achieve the above object, according to an aspect of the present invention, there is provided a method for lossless compression of hyperspectral images combined with spectrum-spatial dimension, comprising the following steps:

(1)对原始的高光谱图像进行预处理,矫正成像引起的非线性因素;(1) Preprocess the original hyperspectral image to correct the nonlinear factors caused by imaging;

(2)对预处理后的高光谱图像进行可逆整数变换,去除谱间相关性,并保存变换矩阵;(2) Perform reversible integer transformation on the preprocessed hyperspectral image, remove the correlation between spectra, and save the transformation matrix;

(3)对可逆整数变换后的高光谱图像逐通道计算图像均匀性,确定均匀性评价指标后分为较均匀的图像通道和均匀性差的图像通道;(3) Calculate the image uniformity channel-by-channel for the hyperspectral image after reversible integer transformation, determine the uniformity evaluation index and divide it into a relatively uniform image channel and an image channel with poor uniformity;

(4)对较均匀的图像通道采用FILF压缩器编码,对所述均匀性差的图像通道采用算术编码器编码,实现高光谱图像的无损压缩;(4) adopting FILF compressor encoding for relatively uniform image channels, and adopting arithmetic encoder encoding for image channels with poor uniformity to realize lossless compression of hyperspectral images;

(5)对压缩后的高光谱图像逐通道解码,采用算术编码器编码和采用 FILF压缩器编码的待解码的图像通道通过相应的解码方式解码出去除谱间相关性的图像;(5) decoding the compressed hyperspectral image channel-by-channel, adopting arithmetic encoder encoding and adopting the image channel to be decoded of FILF compressor encoding to decode the image that removes the correlation between spectra by corresponding decoding mode;

(6)读取步骤(2)得到的变换矩阵,对去除谱间相关性的图像进行可逆整数逆变换,恢复出压缩前的原始的高光谱图像。(6) Read the transformation matrix obtained in step (2), perform reversible integer inverse transformation on the image whose spectral correlation has been removed, and restore the original hyperspectral image before compression.

进一步地,步骤(2)具体包括:Further, step (2) specifically includes:

(2.1)计算预处理后的高光谱图像数据谱间的Pearson相关矩阵Coeff:(2.1) Calculate the Pearson correlation matrix Coeff between the spectra of the preprocessed hyperspectral image data:

Figure GDA0002653770480000031
Figure GDA0002653770480000031

其中,ρ(pi,pj)表示第i个谱段和第j个谱段的Pearson相关系数,具体计算公式如下:Among them, ρ(p i , p j ) represents the Pearson correlation coefficient between the i-th spectral segment and the j-th spectral segment, and the specific calculation formula is as follows:

Figure GDA0002653770480000032
Figure GDA0002653770480000032

其中,Cov(pi,pj)表示谱段间的协方差,D(pi)、D(pj)为第i个谱段和第j个谱段的方差;Among them, Cov(pi , p j ) represents the covariance between spectral segments, D( pi ), D(p j ) are the variances of the i- th spectral segment and the j-th spectral segment;

(2.2)对Pearson相关矩阵Coeff进行主成分分析得到变换矩阵A上述变换矩阵A仅能实现实数到实数的变换,通过分解得到变换矩阵 A=PLUS实现整数到整数的映射,其中L和U分别为单位下三角和上三角阵,P为置换矩阵,S为单位元素可逆矩阵。A的具体分解过程如下:(2.2) Perform principal component analysis on the Pearson correlation matrix Coeff to obtain the transformation matrix A. The transformation matrix A above can only realize the transformation from real numbers to real numbers, and the transformation matrix A=PLUS is obtained through decomposition to realize the mapping from integers to integers, where L and U are respectively Unit lower triangular and upper triangular matrix, P is a permutation matrix, S is a unit-element invertible matrix. The specific decomposition process of A is as follows:

假设A为满足分解条件的非奇异矩阵:Suppose A is a non-singular matrix that satisfies the decomposition conditions:

Figure GDA0002653770480000033
Figure GDA0002653770480000033

(2-3)首先,存在行变换矩阵P1使(2-3) First, there is a row transformation matrix P 1 such that

Figure GDA0002653770480000034
Figure GDA0002653770480000034

的第N列的第一个元素

Figure GDA0002653770480000035
不为零,可以找到s1使
Figure GDA0002653770480000036
Figure GDA0002653770480000037
于是构造一个单位元素可逆矩阵S1:The first element of the Nth column of
Figure GDA0002653770480000035
is not zero, s 1 can be found such that
Figure GDA0002653770480000036
which is
Figure GDA0002653770480000037
Then construct a unit-element invertible matrix S 1 :

Figure GDA0002653770480000038
Figure GDA0002653770480000038

则有then there are

Figure GDA0002653770480000041
Figure GDA0002653770480000041

接着采用传统的高斯消去法,定义初等高斯矩阵:Then use the traditional Gaussian elimination method to define the elementary Gaussian matrix:

Figure GDA0002653770480000042
Figure GDA0002653770480000042

则有:Then there are:

Figure GDA0002653770480000043
Figure GDA0002653770480000043

(2-4)重复以上过程N-1次,可得:(2-4) Repeat the above process N-1 times to obtain:

LN-1PN-1…L2P2L1P1AS1S2…SN-1=DRUL N-1 P N-1 …L 2 P 2 L 1 P 1 AS 1 S 2 …S N-1 =D R U

其中k=1,2,…N-1;DR为旋转因子,DR=±1where k=1, 2,...N-1; DR is the twiddle factor, DR =±1

(2-5)变换矩阵A最终可分解为下式:(2-5) The transformation matrix A can be finally decomposed into the following formula:

A=PLUSA=PLUS

其中:in:

P=(PN-1…P2P1)T P=(P N-1 …P 2 P 1 ) T

Figure GDA0002653770480000044
Figure GDA0002653770480000044

U=±LN-1PN-1…L2P2L1P1AS1S2…SN-1 U=±L N-1 P N-1 …L 2 P 2 L 1 P 1 AS 1 S 2 …S N-1

Figure GDA0002653770480000045
Figure GDA0002653770480000045

(2-6)由于L为下三角矩阵,U为上三角矩阵,S矩阵仅仅最后一行存在有效数据,因此可将LUS合并为一个实数矩阵保存下来。(2-6) Since L is a lower triangular matrix, U is an upper triangular matrix, and only the last row of the S matrix has valid data, the LUS can be combined into a real matrix and saved.

(2-7)依次用S,U,L,P变换矩阵左乘高光谱图像数据data,每次乘完矩阵便取整,以实现整数KLT变换,具体公式如下:(2-7) Multiply the hyperspectral image data data with the S, U, L, P transformation matrix to the left in turn, and round the matrix after each multiplication to realize the integer KLT transformation. The specific formula is as follows:

Y=P*round(L*round(U*round(S*data)))Y=P*round(L*round(U*round(S*data)))

其中,round表示四舍五入取整操作。Among them, round represents the rounding and rounding operation.

进一步地,步骤(3)具体包括:Further, step (3) specifically includes:

(3.1)对可逆整数变换后的高光谱图像逐通道计算求最小值并保存,再逐通道减去对应通道的最小值,使得通道图像数据为大于等于0的正整数;(3.1) Calculate the minimum value of the hyperspectral image after reversible integer transformation channel by channel and save it, and then subtract the minimum value of the corresponding channel channel by channel, so that the channel image data is a positive integer greater than or equal to 0;

(3.2)对步骤(3.1)处理后得到的通道图像数据逐通道检查是否有最大值溢出问题,如果该通道图像数据存在溢出,将该通道拆开为2个通道,一个保存高位数据,另一个保存低位数据;(3.2) Check the channel image data obtained after the processing in step (3.1) whether there is a maximum overflow problem one by one. If there is an overflow in the channel image data, split the channel into 2 channels, one saves the high-order data, and the other save low-order data;

(3.3)对步骤(3.2)处理后得到的通道图像数据计算图像均匀性,确定均匀性指标后分为较均匀的图像通道和均匀性差的图像通道。(3.3) Calculate the image uniformity of the channel image data obtained after the processing in step (3.2), and then divide the uniformity index into a relatively uniform image channel and an image channel with poor uniformity.

进一步地,一个图像通道有M行N列,行像素均值为ui,均匀性评价指标的确定过程为:Further, an image channel has M rows and N columns, and the average value of row pixels is u i , and the determination process of the uniformity evaluation index is as follows:

图像通道内相邻行像素的自相关系数ρx,具体公式如下:The autocorrelation coefficient ρ x of adjacent row pixels in the image channel, the specific formula is as follows:

Figure GDA0002653770480000051
Figure GDA0002653770480000051

图像通道行自相关系数均值

Figure GDA0002653770480000052
Image channel row autocorrelation coefficient mean
Figure GDA0002653770480000052

Figure GDA0002653770480000053
Figure GDA0002653770480000053

图像通道内相邻列像素的自相关系数ρy,具体公式如下:The autocorrelation coefficient ρ y of adjacent column pixels in the image channel, the specific formula is as follows:

Figure GDA0002653770480000054
Figure GDA0002653770480000054

图像通道列自相关系数均值

Figure GDA0002653770480000055
Image channel column autocorrelation coefficient mean
Figure GDA0002653770480000055

Figure GDA0002653770480000056
Figure GDA0002653770480000056

结合图像通道行自相关系数均值

Figure GDA0002653770480000061
和图像通道列自相关系数均值
Figure GDA0002653770480000062
定义图像均匀性评价指标psr,具体公式如下:Combined image channel row autocorrelation coefficient mean
Figure GDA0002653770480000061
and image channel column autocorrelation coefficient mean
Figure GDA0002653770480000062
Define the image uniformity evaluation index psr, and the specific formula is as follows:

Figure GDA0002653770480000063
Figure GDA0002653770480000063

进一步地,步骤(4)具体包括:Further, step (4) specifically includes:

对较均匀的图像通道采用FILF压缩器编码,对均匀性差的图像通道计算灰度值分布,使用高斯函数拟合其灰度值分布,并保存拟合的高斯函数参数,结合算术编码器和拟合的高斯函数参数对该通道图像做熵编码。Use the FILF compressor to encode the more uniform image channels, calculate the gray value distribution for the image channels with poor uniformity, use the Gaussian function to fit the gray value distribution, and save the fitted Gaussian function parameters. The combined Gaussian function parameters are used to entropy encode the channel image.

进一步地,步骤(5)具体包括:Further, step (5) specifically includes:

对压缩后的高光谱图像逐通道解码,对采用算术编码器编码的待解码的图像通道,先读取拟合的高斯函数参数,结合算术编码器和拟合的高斯函数参数对该通道图像数据解码;对采用FILF压缩器编码的待解码的图像通道,由FILF压缩器解码。Decode the compressed hyperspectral image channel by channel. For the image channel to be decoded encoded by the arithmetic encoder, first read the fitted Gaussian function parameters, and combine the arithmetic encoder and the fitted Gaussian function parameters for the channel image data. Decoding: The image channel to be decoded encoded by the FILF compressor is decoded by the FILF compressor.

进一步地,步骤(6)具体包括:Further, step (6) specifically includes:

读取步骤(2)得到的变换矩阵,对所述去除谱间相关性的图像进行可逆整数逆变换;Read the transformation matrix obtained in step (2), and perform reversible integer inverse transformation on the image that has removed the inter-spectral correlation;

检查被拆的通道记录,将被拆的通道按照高位低位进行合并;Check the records of the dismantled channels, and combine the dismantled channels according to the high order and low order;

读取合并后每个通道图像数据的最小值,并将最小值加到相应的通道,恢复出压缩前的原始的高光谱图像。Read the minimum value of the image data of each channel after merging, and add the minimum value to the corresponding channel to restore the original hyperspectral image before compression.

传统的直接使用可见光压缩器来压缩高光谱图像的方法,通常对高光谱图像相邻的三通道分组进行压缩,虽然可见光压缩器也具备消除组内谱间冗余的能力,但是却无法消除组间的谱间冗余信息。去除谱间相关性的方法有很多,但是绝大多数的变换都是实数变换,不适合做图像无损压缩,只能用在图像有损压缩上。要想实现数据的无损压缩,除了要求算法为整数变换,还要求算法必须可逆。目前,可逆整数变换方法仅有可逆整数KLT 变换和整数小波变换,但是整数小波变换属于频域变换更适合消除图像谱内空间信息相关性,不能保证把谱间相关性去除彻底,而整数KLT变换属于正交变换,变换后谱间数据正交,消除谱间相关性的本领更强;之所以选择FILF压缩器,是因为该压缩器是目前可见光图像领域压缩能力最好的压缩器,性能超过了PNG、JPEG-LS和JPEG2000等流行压缩器。不管是什么谱段的高光谱图像,相邻通道图像的成像波段都十分靠近,一般都有较强的谱间相关性。The traditional method of directly using visible light compressors to compress hyperspectral images usually compresses adjacent three-channel groups of hyperspectral images. Although visible light compressors also have the ability to eliminate intra-group spectral redundancy, they cannot eliminate grouping. Inter-spectral redundancy information. There are many ways to remove the correlation between spectra, but most of the transformations are real transformations, which are not suitable for image lossless compression, and can only be used for image lossy compression. To achieve lossless compression of data, in addition to requiring the algorithm to be an integer transformation, the algorithm must also be reversible. At present, there are only reversible integer KLT transform and integer wavelet transform in the reversible integer transform method. However, the integer wavelet transform belongs to the frequency domain transform and is more suitable for eliminating the spatial information correlation in the image spectrum. It cannot guarantee the complete removal of the inter-spectral correlation. It belongs to orthogonal transformation. After transformation, the data between spectra are orthogonal, and the ability to eliminate the correlation between spectra is stronger. The reason why FILF compressor is selected is because it is the best compressor in the field of visible light image compression, and its performance exceeds popular compressors such as PNG, JPEG-LS and JPEG2000. Regardless of the spectral band of the hyperspectral image, the imaging bands of adjacent channel images are very close, and generally have strong inter-spectral correlation.

按照本发明的另一方面,提供了一种适用全谱段高光谱图像的无损压缩系统,其特征在于,包括预处理模块、去谱间相关性模块、图像均匀性评价模块、FILF编码器和算术编码器、FILF解码器和算术解码器、图像恢复模块;According to another aspect of the present invention, there is provided a lossless compression system suitable for full-spectrum hyperspectral images, characterized in that it includes a preprocessing module, a de-correlation module, an image uniformity evaluation module, a FILF encoder, and a Arithmetic encoder, FILF decoder and arithmetic decoder, image restoration module;

预处理模块用于对原始的高光谱图像进行预处理,矫正成像引起的非线性因素;The preprocessing module is used to preprocess the original hyperspectral image to correct the nonlinear factors caused by imaging;

去谱间相关性模块用于对预处理后的高光谱图像进行可逆整数变换,去除谱间相关性,并保存变换矩阵;The inter-spectral correlation removal module is used to perform reversible integer transformation on the preprocessed hyperspectral image, remove the inter-spectral correlation, and save the transformation matrix;

图像均匀性评价模块用于对可逆整数变换后的高光谱图像逐通道计算图像均匀性,确定均匀性评价指标后分为较均匀的图像通道和均匀性差的图像通道;The image uniformity evaluation module is used to calculate the image uniformity channel-by-channel for the hyperspectral image after reversible integer transformation, and after determining the uniformity evaluation index, it is divided into relatively uniform image channels and poor uniformity image channels;

FILF编码器和算术编码器分别用于对所述较均匀的图像通道采和所述均匀性差的图像通道编码,实现高光谱图像的无损压缩;The FILF encoder and the arithmetic encoder are respectively used for sampling the relatively uniform image channel and encoding the image channel with poor uniformity, so as to realize lossless compression of hyperspectral images;

所述FILF解码器和算术解码器用于对所述压缩后的高光谱图像逐通道解码,采用算术编码器编码和采用FILF压缩器编码的待解码的图像通道通过相应的解码方式解码出去除谱间相关性的图像;The FILF decoder and the arithmetic decoder are used for channel-by-channel decoding of the compressed hyperspectral image, and the to-be-decoded image channels encoded by the arithmetic encoder and encoded by the FILF compressor are decoded by corresponding decoding methods to remove spectral noise. Relevant images;

图像恢复模块用于读取所述去谱间相关性模块得到的变换矩阵,对去除谱间相关性的图像进行可逆整数逆变换,恢复出压缩前的原始的高光谱图像。The image restoration module is used to read the transformation matrix obtained by the de-inter-spectral correlation module, perform reversible integer inverse transformation on the image from which the inter-spectral correlation has been removed, and restore the original hyperspectral image before compression.

进一步地,图像均匀性评价模块包括:Further, the image uniformity evaluation module includes:

高低位拆分单元,用于对可逆整数变换后的高光谱图像逐通道计算求最小值并保存,再逐通道减去对应通道的最小值,使得通道图像数据为大于等于0的正整数,逐通道检查是否有最大值溢出问题,如果该通道图像数据存在溢出,将该通道拆开为2个通道,一个保存高位数据,另一个保存低位数据;The high and low bit splitting unit is used to calculate the minimum value of the hyperspectral image after reversible integer transformation channel by channel and save it, and then subtract the minimum value of the corresponding channel channel by channel, so that the channel image data is a positive integer greater than or equal to 0. Check whether there is a maximum overflow problem in the channel. If there is an overflow in the image data of the channel, split the channel into 2 channels, one saves the high-order data, and the other saves the low-order data;

均匀性确定单元,用于对得到的通道图像数据计算图像均匀性,确定均匀性指标后分为较均匀的图像通道和均匀性差的图像通道。The uniformity determining unit is used for calculating the image uniformity for the obtained channel image data, and after determining the uniformity index, it is divided into a relatively uniform image channel and an image channel with poor uniformity.

进一步地,对较均匀的图像通道采用FILF压缩器编码,对均匀性差的图像通道计算灰度值分布,使用高斯函数拟合其灰度值分布,并保存所述拟合的高斯函数参数,结合算术编码器和拟合的高斯函数参数对该通道图像做熵编码;Further, the FILF compressor is used to encode the relatively uniform image channel, the gray value distribution is calculated for the image channel with poor uniformity, the Gaussian function is used to fit the gray value distribution, and the fitted Gaussian function parameters are saved, combined with The arithmetic encoder and the fitted Gaussian function parameters perform entropy encoding on the channel image;

对压缩后的高光谱图像逐通道解码,对采用算术编码器编码的待解码的图像通道,先读取拟合的高斯函数参数,结合算术编码器和拟合的高斯函数参数对该通道图像数据解码;对采用FILF压缩器编码的待解码的图像通道,由FILF压缩器解码。Decode the compressed hyperspectral image channel by channel. For the image channel to be decoded encoded by the arithmetic encoder, first read the fitted Gaussian function parameters, and combine the arithmetic encoder and the fitted Gaussian function parameters for the channel image data. Decoding: The image channel to be decoded encoded by the FILF compressor is decoded by the FILF compressor.

通过本发明所构思的以上技术方案,与现有技术相比,能够取得以下有益效果:Through the above technical solutions conceived by the present invention, compared with the prior art, the following beneficial effects can be achieved:

1、本发明提出的光谱-空间维联合的高光谱图像无损压缩方法适用于全波段高光谱图像,通过可逆整数KLT变换去除了高光谱图像所有谱段间的强相关性,降低了高光谱图像的信息熵,消除了谱间的信息冗余,提高了 FILF压缩器的性能;并且还解决了可能出现的整数溢出问题,提高了FILF 压缩器的鲁棒性。1. The spectral-spatial dimension combined hyperspectral image lossless compression method proposed by the present invention is suitable for full-band hyperspectral images, and the strong correlation between all spectral segments of the hyperspectral image is removed through the reversible integer KLT transformation, reducing the hyperspectral image. The information entropy can eliminate the information redundancy between spectra and improve the performance of the FILF compressor; it also solves the possible integer overflow problem and improves the robustness of the FILF compressor.

2、本发明采用的FILF压缩器属于复杂压缩系统,压缩性能强,但是内部算法复杂度高,耗时长;而算术编码器属于简单压缩系统,速度快,但是压缩能力弱。为了尽可能不损失压缩性能的前提下缩短压缩时间,本发明采用了根据图像均匀程度灵活地在FILF压缩器与算术编码器之间切换的策略,对均匀图像应该选择FILF压缩器以提升压缩能力;但是对于噪声大的非均匀图像FILF压缩器与算术编码器性能相当,此时选择更快的算术编码器以缩短压缩时间。2. The FILF compressor used in the present invention belongs to a complex compression system, with strong compression performance, but the internal algorithm is complex and time-consuming; while the arithmetic encoder belongs to a simple compression system, with high speed but weak compression capability. In order to shorten the compression time without losing the compression performance as much as possible, the present invention adopts a strategy of flexibly switching between the FILF compressor and the arithmetic encoder according to the uniformity of the image, and the FILF compressor should be selected for a uniform image to improve the compression ability. ; But for the non-uniform image with large noise, the performance of FILF compressor is comparable to that of arithmetic coder, and at this time, a faster arithmetic coder is selected to shorten the compression time.

附图说明Description of drawings

图1为本发明提供的改进FILF的实用高光谱图像无损压缩的流程图;Fig. 1 is the flow chart of the practical hyperspectral image lossless compression of improving FILF provided by the present invention;

图2为本发明提供的公开高光谱数据Salinas图像;Fig. 2 is the public hyperspectral data Salinas image provided by the present invention;

图3(a)为本发明提供的KLT变换后图像Salinas的第1通道图;Fig. 3 (a) is the first channel diagram of image Salinas after KLT transformation provided by the present invention;

图3(b)为本发明提供的KLT变换后图像Salinas的第2通道图;Fig. 3 (b) is the 2nd channel diagram of image Salinas after KLT transformation provided by the present invention;

图3(c)为本发明提供的KLT变换后图像Salinas的第203通道图;Fig. 3 (c) is the 203rd channel diagram of image Salinas after KLT transformation provided by the present invention;

图3(d)为本发明提供的KLT变换后图像Salinas的第204通道图;Fig. 3 (d) is the 204th channel diagram of the image Salinas after KLT transformation provided by the present invention;

图4(a)为本发明提供的变换前相邻谱段的相关性曲线图;Fig. 4 (a) is the correlation curve diagram of the adjacent spectral section before transformation provided by the present invention;

图4(b)为本发明提供的变换后相邻谱段的相关性曲线图;Fig. 4 (b) is the correlation curve diagram of adjacent spectral sections after transformation provided by the present invention;

图5为本发明提供的图像Salinas处理后的各个通道像素值最大动态范围趋势图。FIG. 5 is a trend diagram of the maximum dynamic range of pixel values of each channel after the Salinas processing of the image provided by the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间不构成冲突就可以相互组合。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

本发明提供了对去除高光谱图像谱间相关性的方法,不同于常见的实数域KLT分析,该方法使用的一种可逆KLT算法,能保证变换后的数据依然是整数。因此,本发明设计的高光谱图像无损压缩方法尤其适用于高光谱图像数据无损压缩的应用场景。The present invention provides a method for removing the spectral correlation of hyperspectral images. Different from the common real number domain KLT analysis, the method uses a reversible KLT algorithm, which can ensure that the transformed data is still an integer. Therefore, the hyperspectral image lossless compression method designed in the present invention is especially suitable for the application scenario of the hyperspectral image data lossless compression.

如图1所示,本发明提出了一种光谱-空间维联合的高光谱图像无损压缩方法,包括以下步骤:As shown in FIG. 1, the present invention proposes a method for lossless compression of hyperspectral images combined with spectral-spatial dimension, which includes the following steps:

(1)对原始的高光谱图像进行预处理,矫正成像引起的图像变形和响应漂移等非线性因素;(1) Preprocess the original hyperspectral image to correct nonlinear factors such as image deformation and response drift caused by imaging;

(2)对预处理后的高光谱图像进行可逆整数变换,去除谱间相关性,并保存变换矩阵;(2) Perform reversible integer transformation on the preprocessed hyperspectral image, remove the correlation between spectra, and save the transformation matrix;

(3)对可逆整数变换后的高光谱图像逐通道计算图像均匀性,确定均匀性评价指标后分为较均匀的图像通道和均匀性差的图像通道;(3) Calculate the image uniformity channel-by-channel for the hyperspectral image after reversible integer transformation, determine the uniformity evaluation index and divide it into a relatively uniform image channel and an image channel with poor uniformity;

(4)对较均匀的图像通道采用FILF压缩器编码,对所述均匀性差的图像通道采用算术编码器编码,实现高光谱图像的无损压缩;(4) adopting FILF compressor encoding for relatively uniform image channels, and adopting arithmetic encoder encoding for image channels with poor uniformity to realize lossless compression of hyperspectral images;

(5)对压缩后的高光谱图像逐通道解码,采用算术编码器编码和采用 FILF压缩器编码的待解码的图像通道通过相应的解码方式解码出去除谱间相关性的图像;(5) decoding the compressed hyperspectral image channel-by-channel, adopting arithmetic encoder encoding and adopting the image channel to be decoded of FILF compressor encoding to decode the image that removes the correlation between spectra by corresponding decoding mode;

(6)读取步骤(2)得到的变换矩阵,对去除谱间相关性的图像进行可逆整数逆变换,恢复出压缩前的原始的高光谱图像。(6) Read the transformation matrix obtained in step (2), perform reversible integer inverse transformation on the image whose spectral correlation has been removed, and restore the original hyperspectral image before compression.

本发明还提供了一种适用全谱段高光谱图像的无损压缩系统,其特征在于,包括预处理模块、去谱间相关性模块、图像均匀性评价模块、FILF 编码器和算术编码器、FILF解码器和算术解码器、图像恢复模块;The present invention also provides a lossless compression system suitable for full-spectrum hyperspectral images, which is characterized in that it includes a preprocessing module, a de-inter-spectral correlation module, an image uniformity evaluation module, a FILF encoder and an arithmetic encoder, and a FILF encoder. Decoder and arithmetic decoder, image restoration module;

预处理模块用于对原始的高光谱图像进行预处理,矫正成像引起的图像变形和响应漂移等非线性因素;The preprocessing module is used to preprocess the original hyperspectral image to correct nonlinear factors such as image deformation and response drift caused by imaging;

去谱间相关性模块用于对预处理后的高光谱图像进行可逆整数变换,去除谱间相关性,并保存变换矩阵;The inter-spectral correlation removal module is used to perform reversible integer transformation on the preprocessed hyperspectral image, remove the inter-spectral correlation, and save the transformation matrix;

图像均匀性评价模块用于对可逆整数变换后的高光谱图像逐通道计算图像均匀性,确定均匀性评价指标后分为较均匀的图像通道和均匀性差的图像通道;The image uniformity evaluation module is used to calculate the image uniformity channel-by-channel for the hyperspectral image after reversible integer transformation, and after determining the uniformity evaluation index, it is divided into relatively uniform image channels and poor uniformity image channels;

FILF编码器和算术编码器分别用于对所述较均匀的图像通道采和所述均匀性差的图像通道编码,实现高光谱图像的无损压缩;The FILF encoder and the arithmetic encoder are respectively used for sampling the relatively uniform image channel and encoding the image channel with poor uniformity, so as to realize lossless compression of hyperspectral images;

所述FILF解码器和算术解码器用于对所述压缩后的高光谱图像逐通道解码,采用算术编码器编码和采用FILF压缩器编码的待解码的图像通道通过相应的解码方式解码出去除谱间相关性的图像;The FILF decoder and the arithmetic decoder are used for channel-by-channel decoding of the compressed hyperspectral image, and the to-be-decoded image channels encoded by the arithmetic encoder and encoded by the FILF compressor are decoded by corresponding decoding methods to remove spectral noise. Relevant images;

图像恢复模块用于读取所述去谱间相关性模块得到的变换矩阵,对去除谱间相关性的图像进行可逆整数逆变换,恢复出压缩前的原始的高光谱图像。The image restoration module is used to read the transformation matrix obtained by the de-inter-spectral correlation module, perform reversible integer inverse transformation on the image from which the inter-spectral correlation has been removed, and restore the original hyperspectral image before compression.

具体地,图像均匀性评价模块包括:Specifically, the image uniformity evaluation module includes:

高低位拆分单元,用于对可逆整数变换后的高光谱图像逐通道计算求最小值并保存,再逐通道减去对应通道的最小值,使得通道图像数据为大于等于0的正整数,逐通道检查是否有最大值溢出问题,如果该通道图像数据存在溢出,将该通道拆开为2个通道,一个保存高位数据,另一个保存低位数据;The high and low bit splitting unit is used to calculate the minimum value of the hyperspectral image after reversible integer transformation channel by channel and save it, and then subtract the minimum value of the corresponding channel channel by channel, so that the channel image data is a positive integer greater than or equal to 0. Check whether there is a maximum overflow problem in the channel. If there is an overflow in the image data of the channel, split the channel into 2 channels, one saves the high-order data, and the other saves the low-order data;

均匀性确定单元,用于对得到的通道图像数据计算图像均匀性,确定均匀性指标后分为较均匀的图像通道和均匀性差的图像通道。The uniformity determining unit is used for calculating the image uniformity for the obtained channel image data, and after determining the uniformity index, it is divided into a relatively uniform image channel and an image channel with poor uniformity.

具体地,对较均匀的图像通道采用FILF压缩器编码,对均匀性差的图像通道计算灰度值分布,使用高斯函数拟合其灰度值分布,并保存所述拟合的高斯函数参数,结合算术编码器和拟合的高斯函数参数对该通道图像做熵编码;Specifically, the FILF compressor is used to encode the relatively uniform image channels, the gray value distribution is calculated for the image channels with poor uniformity, and the Gaussian function is used to fit the gray value distribution, and the fitted Gaussian function parameters are saved. The arithmetic encoder and the fitted Gaussian function parameters perform entropy encoding on the channel image;

对压缩后的高光谱图像逐通道解码,对采用算术编码器编码的待解码的图像通道,先读取拟合的高斯函数参数,结合算术编码器和拟合的高斯函数参数对该通道图像数据解码;对采用FILF压缩器编码的待解码的图像通道,由FILF压缩器解码。Decode the compressed hyperspectral image channel by channel. For the image channel to be decoded encoded by the arithmetic encoder, first read the fitted Gaussian function parameters, and combine the arithmetic encoder and the fitted Gaussian function parameters for the channel image data. Decoding: The image channel to be decoded encoded by the FILF compressor is decoded by the FILF compressor.

本发明通过利用整数KLT去除谱间相关性,以及灵活地切换压缩器的策略,提高了系统压缩性能,还缩短了压缩时间,在一个具体的实施例中,有如下主要步骤:The present invention improves the system compression performance and shortens the compression time by using the integer KLT to remove the inter-spectral correlation and flexibly switch the compressor strategy. In a specific embodiment, there are the following main steps:

(1)根据成像设备相应预的处理流程,对原始的高光谱图像数据先进行预处理,矫正成像仪器引起的图像变形和响应漂移等非线性因素。具体而言,输入图像为公开高光谱数据图像Salinas,如图2所示,图像Salinas 为有204个通道的512*217大小的16位灰度图,以下实验结果均在此条件下完成。利用ENVI软件工具对原始图像Salinas做预处理并保存为 Salinas_corrected。预处理步骤十分关键,没有经过预处理的数据谱间相关性差,会降低算法压缩性能。(1) According to the corresponding pre-processing procedure of the imaging equipment, the original hyperspectral image data is pre-processed to correct nonlinear factors such as image deformation and response drift caused by the imaging instrument. Specifically, the input image is the public hyperspectral data image Salinas. As shown in Figure 2, the image Salinas is a 16-bit grayscale image with a size of 512*217 with 204 channels. The following experimental results are all completed under this condition. The original image Salinas was preprocessed with ENVI software tool and saved as Salinas_corrected. The preprocessing step is very critical, and the correlation between the data spectra without preprocessing is poor, which will reduce the compression performance of the algorithm.

(2)对预处理后的高光谱图像Salinas_corrected进行可逆整数KLT正变换,去除谱间相关性,并保存变换矩阵。(2) Perform reversible integer KLT forward transformation on the preprocessed hyperspectral image Salinas_corrected, remove the correlation between spectra, and save the transformation matrix.

具体而言,首先计算图像Salinas_corrected谱间的Pearson相关矩阵 Coeff:Specifically, first calculate the Pearson correlation matrix Coeff between the image Salinas_corrected spectra:

Figure GDA0002653770480000121
Figure GDA0002653770480000121

其中,ρ(pi,pj)表示第i个谱段和第j个谱段的Pearson相关系数,具体计算公式如下:Among them, ρ(p i , p j ) represents the Pearson correlation coefficient between the i-th spectral segment and the j-th spectral segment, and the specific calculation formula is as follows:

Figure GDA0002653770480000122
Figure GDA0002653770480000122

其中,Cov(pi,pj)表示谱段间的协方差,D(pi)、D(pj)为第i个谱段和第j个谱段的方差。Among them, Cov(pi , p j ) represents the covariance between spectral segments, and D( pi ) and D(p j ) represent the variances of the i- th spectral segment and the j-th spectral segment.

接着,对谱间Pearson相关矩阵Coeff进行主成分分析得到变换矩阵A。Next, perform principal component analysis on the inter-spectral Pearson correlation matrix Coeff to obtain the transformation matrix A.

上述变换矩阵A仅能实现实数到实数的变换,通过分解得到变换矩阵 A*=PLUS实现整数到整数的映射,其中L和U分别为单位下三角和上三角阵,P为置换矩阵,S为单位元素可逆矩阵。A的具体分解过程如下:The above-mentioned transformation matrix A can only realize the transformation from real numbers to real numbers, and the transformation matrix A * = PLUS is obtained through decomposition to realize the mapping of integers to integers, wherein L and U are the unit lower triangular and upper triangular matrices respectively, P is the permutation matrix, and S is the A unit-element invertible matrix. The specific decomposition process of A is as follows:

假设A为满足分解条件的非奇异矩阵:Suppose A is a non-singular matrix that satisfies the decomposition conditions:

Figure GDA0002653770480000131
Figure GDA0002653770480000131

首先,存在行变换矩阵P1使First, there is a row transformation matrix P 1 such that

Figure GDA0002653770480000132
Figure GDA0002653770480000132

的第N列的第一个元素

Figure GDA0002653770480000133
不为零,可以找到s1使
Figure GDA0002653770480000134
Figure GDA0002653770480000135
于是构造一个单位元素可逆矩阵S1:The first element of the Nth column of
Figure GDA0002653770480000133
is not zero, s 1 can be found such that
Figure GDA0002653770480000134
which is
Figure GDA0002653770480000135
Then construct a unit-element invertible matrix S 1 :

Figure GDA0002653770480000136
Figure GDA0002653770480000136

则有then there are

Figure GDA0002653770480000137
Figure GDA0002653770480000137

接着采用传统的高斯消去法,定义初等高斯矩阵:Then use the traditional Gaussian elimination method to define the elementary Gaussian matrix:

Figure GDA0002653770480000138
Figure GDA0002653770480000138

则有:Then there are:

Figure GDA0002653770480000139
Figure GDA0002653770480000139

重复以上过程N-1次,可得:Repeat the above process N-1 times to get:

LN-1PN-1…L2P2L1P1AS1S2…SN-1=DRUL N-1 P N-1 …L 2 P 2 L 1 P 1 AS 1 S 2 …S N-1 =D R U

其中k=1,2,…N-1;DR为旋转因子,DR=±1where k=1, 2,...N-1; DR is the twiddle factor, DR =±1

变换矩阵A最终可分解为下式:The transformation matrix A can finally be decomposed into the following formula:

A=PLUSA=PLUS

其中:in:

P=(PN-1…P2P1)T P=(P N-1 …P 2 P 1 ) T

Figure GDA0002653770480000141
Figure GDA0002653770480000141

Figure GDA0002653770480000142
Figure GDA0002653770480000142

由于L为下三角矩阵,U为上三角矩阵,S矩阵仅仅最后一行存在有效数据,因此可将LUS合并为一个实数矩阵保存下来。Since L is a lower triangular matrix, U is an upper triangular matrix, and only the last row of the S matrix has valid data, the LUS can be combined into a real matrix and saved.

依次用S,U,L,P变换矩阵左乘高光谱图像数据data,每次乘完矩阵便取整,以实现整数KLT变换,具体公式如下:Multiply the hyperspectral image data data by the S, U, L, P transformation matrix to the left in turn, and round the matrix after each multiplication to realize the integer KLT transformation. The specific formula is as follows:

Y=P*round(L*round(U*round(S*data)))Y=P*round(L*round(U*round(S*data)))

其中,round表示四舍五入取整操作。Among them, round represents the rounding and rounding operation.

(3)对KLT变换后的高光谱数据逐通道求最小值并保存,再逐通道减去对应通道的最小值,使得图像数据为大于等于0的正整数。(3) Calculate the minimum value of the hyperspectral data after KLT transformation channel by channel and save it, and then subtract the minimum value of the corresponding channel channel by channel, so that the image data is a positive integer greater than or equal to 0.

对于具体图像Salinas_corrected,抽取变换后图像第1,2,203,204 通道分别如图3(a),图3(b),图3(c),图3(d)所示;为了说明可逆整数KLT变换去除谱间相关性的效果,分别计算变换前以及变换后相邻谱段的相关性,如图4(a),图4(b)所示,从图4可以看出,KLT变换后谱间相关性基本消失。For the specific image Salinas_corrected, the 1st, 2nd, 203rd, and 204th channels of the transformed image are extracted as shown in Figure 3(a), Figure 3(b), Figure 3(c), and Figure 3(d) respectively; in order to illustrate the invertible integer KLT transformation removes the effect of correlation between spectra, and calculates the correlation between adjacent spectral segments before and after transformation, as shown in Figure 4(a) and Figure 4(b). It can be seen from Figure 4 that after KLT transformation The correlation between spectra basically disappeared.

(4)对步骤(3)处理后得到数据逐通道检查是否有最大值溢出问题,如果该通道图像数据存在溢出,将该通道数据拆开为2个通道,一个保存高位数据,另一个保存低位数据,并记录被拆的数据通道编号,重复检查数据直到不存在最大值溢出问题。(4) Check whether there is a maximum overflow problem on the data obtained after processing in step (3) channel by channel. If there is an overflow in the image data of this channel, split the channel data into 2 channels, one to save the high-order data, and the other to save the low-order data. data, and record the number of the data channel to be demolished, and repeatedly check the data until there is no maximum overflow problem.

对于具体图像Salinas_corrected,可以通过下面公式计算出KLT变换后的最大值为:For the specific image Salinas_corrected, the maximum value after KLT transformation can be calculated by the following formula:

Figure GDA0002653770480000151
Figure GDA0002653770480000151

其中,BIT表示图像位数,n表示图像谱段数。已知图像Salinas_corrected 为16位,有204个谱段,则可计算出最大值为1872054。因此,最多拆为 2个16位通道就可以解决最大值溢出问题。Among them, BIT represents the number of image bits, and n represents the number of image spectral bands. Knowing that the image Salinas_corrected is 16 bits and has 204 spectral bands, the maximum value can be calculated to be 1872054. Therefore, splitting into 2 16-bit channels at most can solve the maximum overflow problem.

处理后的各个通道像素值最大动态范围如下图5所示。The maximum dynamic range of the processed pixel values of each channel is shown in Figure 5 below.

(5)对步骤(4)处理后得到数据逐通道计算图像均匀性指标psr。(5) Calculate the image uniformity index psr on a channel-by-channel basis on the data obtained after processing in step (4).

计算图像内相邻行像素的自相关系数ρx,具体公式如下:Calculate the autocorrelation coefficient ρ x of the pixels of adjacent rows in the image, and the specific formula is as follows:

Figure GDA0002653770480000152
Figure GDA0002653770480000152

计算图像行自相关系数均值

Figure GDA0002653770480000153
Calculate the mean of the autocorrelation coefficient of the image row
Figure GDA0002653770480000153

Figure GDA0002653770480000154
Figure GDA0002653770480000154

计算图像内相邻列像素的自相关系数ρy,具体公式如下:Calculate the autocorrelation coefficient ρ y of adjacent column pixels in the image, and the specific formula is as follows:

Figure GDA0002653770480000155
Figure GDA0002653770480000155

计算图像列自相关系数均值

Figure GDA0002653770480000156
Calculate the mean of the autocorrelation coefficient of the image column
Figure GDA0002653770480000156

Figure GDA0002653770480000157
Figure GDA0002653770480000157

结合图像行自相关系数均值

Figure GDA0002653770480000158
和图像列自相关系数均值
Figure GDA0002653770480000159
定义图像均匀性评价指标psr,具体公式如下:Combined image row autocorrelation coefficient mean
Figure GDA0002653770480000158
and image column autocorrelation coefficient mean
Figure GDA0002653770480000159
Define the image uniformity evaluation index psr, and the specific formula is as follows:

Figure GDA00026537704800001510
Figure GDA00026537704800001510

(6)对均匀性强的图像通道采用FILF压缩器编码;对均匀性差的图像通道数据计算灰度值分布,使用高斯函数拟合其灰度值分布,并保存下来拟合的高斯函数参数,结合算术编码器和拟合的高斯分布函数对该通道图像数据做熵编码。(6) Use the FILF compressor to encode the image channel with strong uniformity; calculate the gray value distribution for the image channel data with poor uniformity, use the Gaussian function to fit the gray value distribution, and save the fitted Gaussian function parameters, The channel image data is entropy encoded by combining the arithmetic encoder and the fitted Gaussian distribution function.

对于具体图像Salinas_corrected,一般认为均匀性指标psr小于0.3的为非均匀图像。For the specific image Salinas_corrected, it is generally considered that the uniformity index psr less than 0.3 is a non-uniform image.

高光谱图像解码包括以下步骤:Hyperspectral image decoding includes the following steps:

(7)逐个通道解码出高光谱图像数据。如果待解码通道使用算术编码器压缩,先读取拟合的高斯函数参数,然后结合算术编码器和拟合的高斯分布函数对该通道图像数据解码。(7) Decode hyperspectral image data channel by channel. If the channel to be decoded is compressed by an arithmetic encoder, first read the parameters of the fitted Gaussian function, and then combine the arithmetic encoder and the fitted Gaussian distribution function to decode the image data of this channel.

(8)检查被拆的通道记录,将被拆的通道按照高位低位进行合并。(8) Check the records of the dismantled channels, and combine the dismantled channels according to the high order and low order.

(9)读取每个通道图像数据的最小值,并将最小值加到相应的通道。(9) Read the minimum value of the image data of each channel, and add the minimum value to the corresponding channel.

(10)读取可逆整数KLT变换矩阵,对步骤(9)处理后得到数据进行 KLT逆变换。具体变换流程如下:(10) Read the reversible integer KLT transformation matrix, and perform inverse KLT transformation on the data obtained after processing in step (9). The specific transformation process is as follows:

首先读取变换矩阵PLUS。First read the transformation matrix PLUS.

假设KLT变换后的高光谱数据为Y,变换前数据为X,为了恢复出X,依次解以下方程:Assuming that the hyperspectral data after KLT transformation is Y, and the data before transformation is X, in order to recover X, solve the following equations in turn:

PLUSX=YPLUSX=Y

由于P为初等矩阵,自身就是整数变换,可解出LUSX:Since P is an elementary matrix, it is itself an integer transformation, and LUSX can be solved:

LUSX=PTYLUSX=P T Y

L为下三角矩阵,逆变换的整数实现为自上而下计算:L is a lower triangular matrix, and the integer implementation of the inverse transformation is calculated from top to bottom:

Figure GDA0002653770480000161
Figure GDA0002653770480000161

此时,可解出USX。At this point, USX can be solved.

同理,U为上三角矩阵,逆变换的整数实现为自下而上计算,可解出 SX。In the same way, U is an upper triangular matrix, and the integer of the inverse transformation is implemented as a bottom-up calculation, and SX can be solved.

同理,S为下三角矩阵,求解方法同上,可解出变换前的高光谱图像数据X。Similarly, S is a lower triangular matrix, and the solution method is the same as above, and the hyperspectral image data X before transformation can be solved.

到此,整个压缩与解压缩流程如上所述。At this point, the entire compression and decompression process is as described above.

为了对比本发明的效果,对图像Salinas_corrected一种采用FILF压缩器直接压缩,另一种采用本发明的方法,定义压缩比CR为压缩后大小与压缩前的比值,最终测试结果如下表1。In order to compare the effect of the present invention, one uses the FILF compressor to directly compress the image Salinas_corrected, and the other uses the method of the present invention, and the compression ratio CR is defined as the ratio of the size after compression to the ratio before compression, and the final test results are shown in Table 1 below.

表1Table 1

压缩比(CR)Compression Ratio (CR) 压缩时间(秒)Compression time (seconds) 仅FILFFILF only 3.073.07 8484 本发明方法method of the invention 3.393.39 52 52

从上表可以看出,本发明能够有效提升图像压缩比,相比仅FILF方法提升了0.3;与此同时,压缩时间缩短接近一半。It can be seen from the above table that the present invention can effectively improve the image compression ratio, which is 0.3 higher than that of the FILF method; at the same time, the compression time is shortened by nearly half.

本发明先将输入图像进行预处理,然后再用可逆整数KLT正变换去除谱间相关性。接着逐个图像通道计算均匀性指标psr,根据图像均匀性灵活地切换压缩器。通过执行本发明的方法,可以有效的去除高光谱图像的谱间相关性,使得在FILF压缩性能大幅提高。此外,由于本发明灵活地切换到算术编码器,进一步降低了算法复杂度,提高了算法压缩速度。In the present invention, the input image is preprocessed first, and then the reversible integer KLT forward transformation is used to remove the inter-spectral correlation. Then, the uniformity index psr is calculated for each image channel, and the compressor is flexibly switched according to the uniformity of the image. By implementing the method of the present invention, the inter-spectral correlation of the hyperspectral image can be effectively removed, so that the compression performance in FILF is greatly improved. In addition, since the present invention flexibly switches to the arithmetic encoder, the complexity of the algorithm is further reduced, and the compression speed of the algorithm is improved.

本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。Those skilled in the art can easily understand that the above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention, etc., All should be included within the protection scope of the present invention.

Claims (6)

1. A spectrum-space dimension combined hyperspectral image lossless compression method is characterized by comprising the following steps:
(1) preprocessing an original hyperspectral image, and correcting nonlinear factors caused by imaging;
(2) reversible integer transformation is carried out on the preprocessed hyperspectral images, the correlation among spectrums is removed, and a transformation matrix is stored; the method specifically comprises the following steps:
(2.1) calculating a Pearson correlation matrix Coeff among the preprocessed hyperspectral image data spectrums:
Figure FDA0002653770470000011
where ρ (p)i,pj) The Pearson correlation coefficients of the ith and jth spectral bands are expressed, and the specific calculation formula is as follows:
Figure FDA0002653770470000012
wherein, Cov (p)i,pj) Denotes the covariance between spectral bands, D (p)i)、D(pj) Is the variance of the ith and jth spectral bands;
(2.2) carrying out principal component analysis on the Pearson correlation matrix Coeff to obtain a transformation matrix A, and decomposing the transformation matrix A into the following formula:
A=PLUS
wherein:
P=(PN-1…P2P1)T
Figure FDA0002653770470000013
U=±LN-1PN-1…L2P2L1P1AS1S2…SN-1
Figure FDA0002653770470000014
the transformation matrix A can only realize the transformation from real numbers to real numbers, and the decomposed transformation matrix realizes the mapping from integers to integers;
(3) calculating image uniformity of the hyperspectral images subjected to reversible integer transformation channel by channel, and dividing the hyperspectral images after determining uniformity evaluation indexes into a first image channel and a second image channel which are different in uniformity; the method specifically comprises the following steps:
(3.1) calculating and saving the minimum value of the hyperspectral images subjected to reversible integer transformation channel by channel, and subtracting the minimum value of the corresponding channel by channel so that the channel image data are positive integers which are more than or equal to 0;
(3.2) checking channel-by-channel whether the channel image data obtained after the processing of the step (3.1) has the maximum overflow problem, and if the channel image data has overflow, disassembling the channel into 2 channels, wherein one channel stores high-bit data, and the other channel stores low-bit data;
(3.3) calculating the image uniformity of the channel image data obtained after the processing in the step (3.2), and dividing the channel image data into a first image channel and a second image channel with different uniformity after determining the uniformity index;
wherein one image channel has M rows and N columns, and the average value of the pixels in the rows is uiThe process for determining the uniformity evaluation index comprises the following steps:
autocorrelation coefficients rho of adjacent rows of pixels within an image channelxThe concrete formula is as follows:
Figure FDA0002653770470000021
mean value of image channel row autocorrelation coefficients
Figure FDA0002653770470000022
Figure FDA0002653770470000023
Autocorrelation coefficients rho of adjacent columns of pixels within an image channelyThe concrete formula is as follows:
Figure FDA0002653770470000024
mean value of autocorrelation coefficients of image channel row
Figure FDA0002653770470000025
Figure FDA0002653770470000026
Combining image channel row autocorrelation coefficient mean values
Figure FDA0002653770470000027
And image channel column autocorrelation coefficient mean
Figure FDA0002653770470000028
Defining an image uniformity evaluation index psr, wherein a specific formula is as follows:
Figure FDA0002653770470000031
(4) the first image channel is coded by adopting a FILF compressor, and the second image channel is coded by adopting an arithmetic coder, so that lossless compression of the hyperspectral image is realized;
(5) decoding the compressed hyperspectral images channel by channel, and decoding the images without the inter-spectral correlation by adopting an arithmetic encoder to encode and adopting an image channel to be decoded encoded by a FILF compressor in a corresponding decoding mode;
(6) and (3) reading the transformation matrix obtained in the step (2), and performing reversible integer inverse transformation on the image without the inter-spectral correlation to restore the original hyperspectral image before compression.
2. The compression method according to claim 1, characterized in that said step (4) comprises in particular:
and encoding the first image channel by adopting a FILF compressor, calculating gray value distribution of the second image channel, fitting the gray value distribution by using a Gaussian function, storing the fitted Gaussian function parameters, and entropy encoding the channel image by combining the arithmetic encoder and the fitted Gaussian function parameters.
3. The compression method according to claim 1, characterized in that said step (5) comprises in particular:
decoding the compressed hyperspectral image channel by channel, reading a fitted Gaussian function parameter for an image channel to be decoded, which is coded by an arithmetic coder, and decoding channel image data by combining the arithmetic coder and the fitted Gaussian function parameter; the image channel to be decoded, which is encoded using the FILF compressor, is decoded by the FILF compressor.
4. The compression method according to claim 1, characterized in that said step (6) comprises in particular:
reading the transformation matrix obtained in the step (2), and performing reversible integer inverse transformation on the image without the inter-spectral correlation;
checking the record of the disassembled channel, and combining the disassembled channel according to the high order and the low order;
and reading the minimum value of the image data of each channel after combination, adding the minimum value to the corresponding channel, and recovering the original hyperspectral image before compression.
5. The spectrum-space dimension combined hyperspectral image lossless compression system is characterized by comprising a preprocessing module, a inter-spectrum correlation removing module, an image uniformity evaluation module, a FILF (first-class image frequency) encoder and arithmetic encoder, a FILF decoder and arithmetic decoder and an image restoration module;
the preprocessing module is used for preprocessing an original hyperspectral image and correcting nonlinear factors caused by imaging;
the inter-spectrum correlation removal module is used for performing reversible integer transformation on the preprocessed hyperspectral images, removing inter-spectrum correlation and storing a transformation matrix; the method specifically comprises the following steps: calculating a Pearson correlation matrix Coeff among the preprocessed hyperspectral image data spectrums:
Figure FDA0002653770470000041
where ρ (p)i,pj) The Pearson correlation coefficients of the ith and jth spectral bands are expressed, and the specific calculation formula is as follows:
Figure FDA0002653770470000042
wherein, Cov (p)i,pj) Denotes the covariance between spectral bands, D (p)i)、D(pj) Is the variance of the ith and jth spectral bands;
performing principal component analysis on the Pearson correlation matrix Coeff to obtain a transformation matrix A, and decomposing the transformation matrix A into the following formula:
A=PLUS
wherein:
P=(PN-1…P2P1)T
Figure FDA0002653770470000043
U=±LN-1PN-1…L2P2L1P1AS1S2…SN-1
Figure FDA0002653770470000051
the transformation matrix A can only realize the transformation from real numbers to real numbers, and the decomposed transformation matrix realizes the mapping from integers to integers;
the image uniformity evaluation module is used for calculating the image uniformity of the hyperspectral image subjected to reversible integer transform channel by channel, and dividing the hyperspectral image subjected to reversible integer transform into a first image channel and a second image channel with different uniformity after determining uniformity evaluation indexes; the image uniformity evaluation module comprises:
the high and low bit splitting unit is used for calculating and solving the minimum value of the hyperspectral image subjected to reversible integer transformation channel by channel and storing the hyperspectral image, then subtracting the minimum value of the corresponding channel by channel, so that the channel image data is a positive integer which is more than or equal to 0, checking whether the maximum value overflows channel by channel, and if the channel image data overflows, splitting the channel into 2 channels, wherein one channel stores high bit data and the other channel stores low bit data;
the uniformity determining unit is used for calculating the image uniformity of the obtained channel image data, and dividing the channel image data into a first image channel and a second image channel with different uniformity after determining the uniformity index; wherein one image channel has M rows and N columns, and the average value of the pixels in the rows is uiThe process for determining the uniformity evaluation index comprises the following steps:
autocorrelation coefficients rho of adjacent rows of pixels within an image channelxThe concrete formula is as follows:
Figure FDA0002653770470000052
mean value of image channel row autocorrelation coefficients
Figure FDA0002653770470000053
Figure FDA0002653770470000054
Autocorrelation coefficients rho of adjacent columns of pixels within an image channelyThe concrete formula is as follows:
Figure FDA0002653770470000055
mean value of autocorrelation coefficients of image channel row
Figure FDA0002653770470000056
Figure FDA0002653770470000061
Combining image channel row autocorrelation coefficient mean values
Figure FDA0002653770470000062
And image channel column autocorrelation coefficient mean
Figure FDA0002653770470000063
Defining an image uniformity evaluation index psr, wherein a specific formula is as follows:
Figure FDA0002653770470000064
the FILF encoder and the arithmetic encoder are respectively used for encoding the first image channel and the second image channel to realize lossless compression of the hyperspectral image;
the FILF decoder and the arithmetic decoder are used for decoding the compressed hyperspectral images channel by channel, and the images without the inter-spectral correlation are decoded by adopting arithmetic encoder coding and adopting the image channel to be decoded coded by the FILF compressor in a corresponding decoding mode;
the image recovery module is used for reading the transformation matrix obtained by the inter-spectrum correlation removal module, and performing reversible integer inverse transformation on the image without the inter-spectrum correlation to recover the original hyperspectral image before compression.
6. The system of claim 5, wherein the first image channel is encoded using a FILF compressor, the second image channel is encoded using a gray value distribution, the gray value distribution is fitted using a Gaussian function, the fitted Gaussian function parameters are stored, and the channel image is entropy encoded using the arithmetic encoder and the fitted Gaussian function parameters;
decoding the compressed hyperspectral image channel by channel, reading a fitted Gaussian function parameter for an image channel to be decoded, which is coded by an arithmetic coder, and decoding channel image data by combining the arithmetic coder and the fitted Gaussian function parameter; the image channel to be decoded, which is encoded using the FILF compressor, is decoded by the FILF compressor.
CN201911420225.1A 2019-12-31 2019-12-31 A method and system for lossless compression of hyperspectral images combined with spectral-spatial dimension Active CN111107360B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911420225.1A CN111107360B (en) 2019-12-31 2019-12-31 A method and system for lossless compression of hyperspectral images combined with spectral-spatial dimension

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911420225.1A CN111107360B (en) 2019-12-31 2019-12-31 A method and system for lossless compression of hyperspectral images combined with spectral-spatial dimension

Publications (2)

Publication Number Publication Date
CN111107360A CN111107360A (en) 2020-05-05
CN111107360B true CN111107360B (en) 2020-12-08

Family

ID=70425866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911420225.1A Active CN111107360B (en) 2019-12-31 2019-12-31 A method and system for lossless compression of hyperspectral images combined with spectral-spatial dimension

Country Status (1)

Country Link
CN (1) CN111107360B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113961886B (en) * 2021-09-28 2024-04-19 西安交通大学 Reversible information hiding method and system for hyperspectral image

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101754008A (en) * 2008-12-10 2010-06-23 解成俊 Uniform parametric three-band spectral integer reversible transformation
CN101883274B (en) * 2009-05-08 2013-05-22 中国科学院沈阳自动化研究所 A Hyperspectral Image Lossless Compression Method Based on Joint Prediction of Space and Spectrum
US8655091B2 (en) * 2012-02-24 2014-02-18 Raytheon Company Basis vector spectral image compression
CN104270642B (en) * 2014-10-22 2017-07-28 哈尔滨工业大学 A kind of lossless compression method for high spectrum image chosen based on RKLT and principal component
CN107730447A (en) * 2017-10-31 2018-02-23 北京信息科技大学 A kind of Hyperspectral imagery processing method, apparatus and system

Also Published As

Publication number Publication date
CN111107360A (en) 2020-05-05

Similar Documents

Publication Publication Date Title
CN111641832B (en) Encoding method, decoding method, device, electronic device and storage medium
Zemliachenko et al. Lossy compression of noisy remote sensing images with prediction of optimal operation point existence and parameters
Sonal A study of various image compression techniques
CN110753225A (en) Video compression method and device and terminal equipment
Kumar et al. A review: DWT-DCT technique and arithmetic-Huffman coding based image compression
CN100490494C (en) Decoding apparatus, dequantizing method, distribution determining method, and program thereof
Ahmed et al. Audio compression using transforms and high order entropy encoding
CN107770526A (en) It is a kind of that air infrared remote sensing Lossless Image Compression Algorithm method is composed based on the ultraphotic for quantifying ICA
CN110738666A (en) discrete cosine transform-based image semantic segmentation method and device
CN111107360B (en) A method and system for lossless compression of hyperspectral images combined with spectral-spatial dimension
Li et al. A fast method for visual quality prediction and providing in image lossy compression by spiht
Tabassum et al. A simplified image compression technique based on Haar Wavelet Transform
Sadkhan A proposed image compression technique based on DWT and predictive techniques
Alsayyh et al. A Novel Fused Image Compression Technique Using DFT, DWT, and DCT.
CN113038134B (en) Picture processing method, intelligent terminal and storage medium
CN117939128A (en) Image compression method and device and electronic equipment
Navaneethakrishnan Study of image compression techniques
Savitri et al. Digital medical image compression algorithm using adaptive Huffman coding and graph based quantization based on IWT-SVD
Annalakshmi Lossy image compression techniques
CN114663536A (en) Image compression method and device
CN100579169C (en) Decoding apparatus, dequantizing method, and program thereof
Ahmed et al. Audio Compression Using Transform Coding with LZW and Double Shift Coding
Panda et al. Competency assessment of image compression in the lossy and lossless domain
Kunwar Strategies in JPEG compression using Convolutional Neural Network (CNN)
Rani et al. Medical image compression using DCT with entropy encoding and huffman on MRI brain images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant