Hyperspectral image band sampling method and system based on FPGA

By using Chein-I Chang's band sampling method and an n-order linear feedback shift register to generate random index values ​​on an FPGA platform, band dimensionality reduction of hyperspectral images is achieved, solving the problems of high computational complexity and high resource consumption in existing technologies, and realizing efficient real-time processing.

CN122289627APending Publication Date: 2026-06-26XIDIAN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2026-03-30
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies for dimensionality reduction of hyperspectral image bands on hardware platforms suffer from high computational complexity and resource consumption, making it difficult to meet real-time requirements. In particular, matrix operations on FPGA platforms are too time-consuming and cannot meet real-time processing requirements.

Method used

A band sampling method based on Chein-I Chang is adopted, which combines the nth-order linear feedback shift register of FPGA and the random index value generated by the feedback polynomial. The band dimensionality reduction of hyperspectral images is achieved through linear mapping, avoiding matrix multiplication calculations and simplifying the data transmission and storage process.

Benefits of technology

It significantly shortens the algorithm's running time and resource consumption, reduces the amount of data, improves processing efficiency, meets real-time requirements, and maintains the properties of the image for target detection and endmember search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289627A_ABST
    Figure CN122289627A_ABST
Patent Text Reader

Abstract

This invention discloses a hyperspectral image band sampling method and system, mainly addressing the problems of complex search strategies and long matrix calculation times in existing band selection algorithms, resulting in poor real-time performance and low efficiency. The solution includes: using an FPGA to set an n-order linear feedback shift register, a feedback polynomial, and a seed value; calculating the first band index value for band sampling based on the number of input sampling bands; generating a series of uniformly sampled band index values ​​using the FPGA based on the first band index value; generating the address for storing the hyperspectral image in external space through linear mapping based on the uniformly sampled band index values; reading a portion of the hyperspectral image bands according to this address and storing them in the FPGA's block random access memory. This invention can reduce the complexity of band dimensionality reduction and computational load while preserving the original image information, greatly shortening the real-time sampling time for hyperspectral image bands and improving sampling efficiency. It can be used for efficient real-time hyperspectral information processing on hardware-restricted platforms such as spaceborne and airborne platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and further relates to a hyperspectral image band sampling method and system, which can be used for efficient real-time hyperspectral information processing on hardware resource-constrained platforms such as spaceborne and airborne platforms. Background Technology

[0002] Hyperspectral dimensionality reduction, as a research field in hyperspectral image processing, has significant military and civilian value. Hyperspectral remote sensing images are characterized by "image-spectrum integration," meaning that spectral dimension information is added to the "spatial dimension" of traditional images, so that each pixel corresponds to a spectral curve and contains imaging information from hundreds of continuous spectral bands, achieving spectral resolution down to the nanometer level. Therefore, hyperspectral images have more application scenarios compared to traditional RGB or infrared images. Hyperspectral target detection technology has received widespread attention and application in fields such as space exploration, vegetation pest and disease detection, resource exploration, and environmental pollution monitoring.

[0003] With the development of hyperspectral remote sensing technology, the increased spectral resolution has led to a geometric increase in the amount of image data acquired per unit time, thus increasing the difficulty of storing and processing hyperspectral image data, especially in the field of spaceborne hyperspectral remote sensing. On the one hand, due to the limitations of transmission channels, if the massive amounts of acquired data are compressed using traditional spatial dimension compression, information loss will occur, reducing the accuracy of image information and seriously affecting the precision of hyperspectral image processing. On the other hand, in application scenarios such as disaster emergency monitoring, early warning, and military countermeasures, real-time performance is crucial. Therefore, achieving a more efficient and stable hyperspectral data dimensionality reduction method is of great significance.

[0004] Currently, the academic community generally believes that dimensionality reduction can be achieved using spectral dimension reduction, employing band selection or compressed sensing. The former suggests selecting a representative set of bands from the original band data, effectively reducing band information redundancy and computational load while preserving the original spectral characteristics and physical meaning of the hyperspectral data bands. The latter argues that hyperspectral data possesses both spatial and spectral correlations, making all bands meaningful, and designs specialized sampling matrices for dimensionality reduction. However, in recent years, some scholars have proposed random, equally spaced sampling based on the maximum entropy principle in information theory, termed band sampling, which has demonstrated superior performance compared to most band selection algorithms. Platforms for hyperspectral image processing algorithms can be implemented using either software or hardware. However, software processing is inefficient and typically time-consuming, making it difficult to meet the real-time requirements of hyperspectral images in practical applications. Therefore, to fully realize the advantages of hyperspectral images in practical applications, dedicated processing devices are needed for fast and accurate data processing. With the development of hardware technology in recent years, Field-Programmable Gate Arrays (FPGAs) have significant advantages in parallel computing and customizable pipelined operations due to their low power consumption and high reliability. More and more researchers, both domestically and internationally, are inclined to implement algorithms on dedicated hardware such as FPGAs, leveraging their hardware characteristics to accelerate algorithm detection speed.

[0005] Patent document CN202510426988.6 discloses "A Hyperspectral Band Selection and Extraction Method and System Based on FPGA". Its implementation scheme is as follows: Data storage and addresses are generated using a three-layer nested counter, and a storage address for the hyperspectral image is generated. Based on this address, the original hyperspectral image is read into the external memory and cached in RAM. An n-order linear feedback shift register, a feedback polynomial, and a seed value are set to generate a sparse random binary matrix, which linearly outputs 0-1 random numbers to the subsequent calculation module. The input original hyperspectral data and the sparse random binary matrix are processed using a judgment-accumulation method to obtain the dimensionality-reduced hyperspectral data, i.e., the selected hyperspectral data. The selected hyperspectral data is stored in the random access memory (RAM) within the FPGA. This method is complex because compressed sensing typically requires constructing a sensing matrix in the front-end sampling stage and performing compression through operations between the matrix and the original hyperspectral data. This process not only introduces additional storage requirements but also requires a large number of multiplication and addition operations, placing high demands on the FPGA's logic resources, storage resources, and timing design. Especially when the sensing matrix is ​​very large, generating a 0-1 sensing matrix through LFSR takes a lot of time, and therefore cannot meet the requirements for dimensionality reduction of hyperspectral images in real-time scenarios in terms of computational complexity and operation time. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of the above-mentioned situation by proposing a low-computational-complexity hyperspectral band sampling method and system based on FPGA, so as to avoid matrix multiplication calculations, reduce the amount of computation, and realize real-time sampling of hyperspectral image bands.

[0007] The technical approach to achieve the purpose of this invention is as follows: based on a new method for reducing the spectral dimension of hyperspectral data proposed by Professor Chein-I Chang—band sampling, combined with the band selection method and the idea of ​​compressed sensing random sampling, the bands of the hyperspectral image are reduced in dimension through random uniform sampling, and the sampled image after the hyperspectral image is reduced in dimension is obtained.

[0008] Based on the above ideas, the technical solution of the present invention includes:

[0009] 1. A method for hyperspectral band sampling based on FPGA, characterized in that it includes:

[0010] (1) Use FPGA to set the nth-order linear feedback shift register, feedback polynomial and seed value, and calculate the first band index value of the band sampling based on the number of input sampling bands;

[0011] (2) Based on the first band index value of the band sampling, use FPGA to generate a series of uniformly sampled band index values;

[0012] (3) Based on the uniform sampling band index value, the address of the hyperspectral image stored in the external space is generated by using the linear mapping method. Part of the hyperspectral image is read in according to the address and stored in the BRAM of the FPGA.

[0013] Furthermore, in step (1), the FPGA is used to set the nth-order linear feedback shift register, the feedback polynomial, and the seed value, which includes:

[0014] Determine the number of independent registers and cascade them into a single linear feedback shift register;

[0015] Determine the feedback mode of a single linear feedback shift register, set the feedback polynomial and seed value and determine the taps. After the single linear feedback shift register outputs, it will be missing one bit. XOR the taps and fill in the missing bit so that the single linear feedback shift register can output a value of 0 or 1 in any state.

[0016] Given an order n, use n linear feedback shift registers connected in parallel to simultaneously output from 1 to 2 in any given state. n A value of -1 is used, and this value is called the output N of the nth-order linear feedback shift register.

[0017] Furthermore, the calculation of the first band index value for band sampling based on the number of input sampling bands in (1) includes:

[0018] 1a) Based on the number of input bands m and the original number of hyperspectral bands L, calculate the number of sampling combinations p within one clock cycle:

[0019] 1b) Based on the current output value N of the nth-order linear feedback shift register and the number of band sampling combinations p, calculate the first band index value of the band sampling within one clock cycle. .

[0020] 2. A system for hyperspectral band sampling based on FPGA, characterized in that it comprises:

[0021] The first band index value generation module is used to input the number of sampled bands m and the number of original hyperspectral bands L, and to calculate the number of sampled combinations p and the first band index value using double-layer modulus taking. ;

[0022] The band index value generation module is used to generate the band index value based on the number of sampling combinations p and the first band index value. Generate a series of uniformly sampled band index values;

[0023] The raw data storage module is used to generate the address for storing data in external space based on a series of uniformly sampled band index values, and to read the band data that needs to be sampled from the raw hyperspectral data and store it in BRAM.

[0024] The control module is used to control the data flow coordination and operation status of the first band index value generation module, the band index value generation module, and the raw data storage module.

[0025] Compared with the prior art, the present invention has the following advantages:

[0026] Firstly, addressing the issues that traditional band selection requires complex strategies and compressed sensing requires generating random matrices and performing numerous multiplication and addition operations, thus consuming significant time and computing resources, the algorithm designed in this invention does not involve matrix operations or complex band search processes within the FPGA. This simplifies the data transmission link and computation process, resolves the pressure on hardware caused by the large amount of data during transmission and storage, and can significantly shorten the algorithm's running time and resource consumption.

[0027] Secondly, to address the issue that the uniform band sampling method lacks a corresponding random number generation function in the software algorithm during hardware implementation, this invention employs an n-order linear feedback shift register and obtains the first band index value through a two-layer modulo calculation method, simulating the random number generation function in the software algorithm. This allows the generation of the first band index value to be completed in a very short time.

[0028] Thirdly, addressing the problem of low processing efficiency caused by the large amount of data and the complexity of the algorithm process when performing endmember search in hyperspectral images on existing algorithm hardware implementation platforms, this invention designs a system for hyperspectral band sampling based on FPGA. It can provide different initial parameters to perform band sampling on the original hyperspectral image and store the sampled data in the BRAM of the FPGA.

[0029] Simulation results show that, for hyperspectral images with various spatial and spectral dimensions in different scenarios, this invention can significantly reduce the size of the original image and ensure that the sampled image retains the properties of the original image in practical applications. It can be directly used in algorithms such as target detection and endmember search, while effectively controlling the algorithm execution time and resource consumption. Attached Figure Description

[0030] Figure 1 This is a flowchart of the implementation of a hyperspectral image band sampling method based on FPGA;

[0031] Figure 2 This is a block diagram of a hyperspectral image band sampling system based on FPGA;

[0032] Figure 3 These are hyperspectral images used in the simulation;

[0033] Figure 4 The present invention and existing band selection methods are used respectively for... Figure 3 Comparison of simulation results for endmember extraction. Detailed Implementation

[0034] To enable those skilled in the art to better understand the present invention, specific embodiments will be clearly and completely described in conjunction with the accompanying drawings. The described specific embodiments will be illustrated through examples, which are merely a part, not all, of the embodiments of the present invention. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort should all fall within the protection scope of the present invention.

[0035] Example 1: FPGA-based hyperspectral image band sampling method

[0036] Reference Figure 1 The implementation steps of this embodiment include the following:

[0037] Step 1: Generate the sampling first band index.

[0038] This step uses an FPGA to read the number of sampled bands *m* and the number of original bands *L* of the hyperspectral image from the external input, sets up an n-order linear feedback shift register and iteratively outputs random numbers, and calculates the index value of the first band sampled based on the input data. Its implementation includes:

[0039] 1.1) Obtain the TI3_TE3 hyperspectral dataset, which is 200*200*189 in size, and the length of a single element in the FPGA is 16 bits;

[0040] 1.2) Set up 16*16 independent registers in the FPGA. First, connect the 16 independent registers in series to form a single linear feedback shift register. In a single linear feedback shift register, each output bit will be missing a bit. The data for this bit is generated using a feedback polynomial. Feedback padding is performed by XORing the values ​​of the 4th, 13th, 15th, and 16th independent registers to fill in the missing bits. Then, the 16 linear feedback shift registers are connected in parallel, each using a different seed value 1H-16H as its initial state. Each clock cycle outputs 16 different 0-1 values, which are combined to obtain a value between 0 and 2. 16 A random number N equal to -1;

[0041] 1.3) Input the number of externally sampled bands m and the number of original hyperspectral image bands L into the FPGA for modulo calculation to obtain the number of sampling combinations within one clock cycle. ;

[0042] ;

[0043] 1.4) Number of sampling combinations Store the data in a register, then combine the random number N generated by the n parallel linear feedback shift registers with the number of sampled combinations. Perform modulo calculation to obtain the sampling first band index value within one clock cycle. ;

[0044] ,

[0045] The first band index value Store in the register.

[0046] Step 2: Generate a set of sampling band index values.

[0047] This step is based on the number of sampling combinations p calculated in step 1 and the first band index value. Generate a series of sampling band index values ​​with auxiliary flags:

[0048] 2.1) Set a counter to count the output band indices, incrementing by 1 for each generated index value, and then set the first band index value... As the first value generated,

[0049] 2.2) The generated value is added to the current value by a sampling combination number p. When the value of the counter reaches the number of sampling bands m, the generation stops, resulting in a series of sampling band index values.

[0050] 2.3) Synchronously generate two auxiliary flag bits. The first is the data validity flag bit, which is pulled high when generating the band index value and pulled low in other states. The second is the tail flag bit, which is pulled high when generating the last band index value and pulled low in other states.

[0051] 2.4) Combine a series of sampled band index values ​​with two auxiliary flags to obtain a series of sampled band index values ​​with auxiliary flags.

[0052] Step 3: Read and store the raw data.

[0053] This step, based on the series of uniformly sampled band index values ​​generated in step 2, uses a linear mapping method to generate the address for storing the hyperspectral image in external space, and reads a portion of the hyperspectral image according to the address and stores it in the FPGA's BRAM. Specifically:

[0054] 3.1) Obtain a series of sampling band index values ​​with auxiliary flags generated in step 2. Based on the characteristic that a single band of the original hyperspectral image occupies 160 sectors of the SD card, set the linear mapping factor to 160. Then multiply the series of sampling band index values ​​by 16 to obtain the address of the band data in the SD card.

[0055] 3.2) Based on the address of the band data in the SD card, after sector addressing of the SD card, one bit is read in sequence in each clock cycle. A counter cnt is set in the FPGA. The counter cnt is incremented every time a bit is received. A temporary register with 64*64 elements is set to store the data of a single band.

[0056] 3.3) Use a temporary register to receive data. Set combinational logic one. Since a complete data set contains 16 bits, determine whether 16 bits have been received by taking the value of the counter cnt in step 3.2) modulo 16 and checking if it is 0. If yes, it means that a complete data set has been received and the data is stored in the temporary register. If no, maintain the receiving state.

[0057] 3.4) Set up combinational logic two. Based on the fact that a complete band contains 64*64 data points, determine whether the temporary register is full by calculating whether the value of the counter cnt in step 3.2) modulo 16*64*64 is 0. If yes, it means that the current band data has been received, so store it in BRAM, clear the temporary register and prepare to receive new band data. If no, maintain the receiving state.

[0058] 3.5) Set up combinational logic three. Based on the number of band samples m, calculate whether the value of the counter cnt in step 3.2) modulo 16*64*64*m is 0. Determine whether data of m bands has been stored in BRAM. If yes, it means that all data storage is completed. Reset the counter in step 3.2) and wait to read the data of the next band. If no, maintain the receiving state.

[0059] It should be noted that the step numbers in the above examples and claims are only for the purpose of clearly describing the embodiments of the present invention and facilitating understanding, and their order is not limited.

[0060] Example 2: FPGA-based hyperspectral image band sampling system.

[0061] Reference Figure 2 This example includes: a first band index value generation module 1, a band index value generation module 2, a raw data storage module 3, and a control module 4. The fixed-range random number generation module 1 includes: a linear feedback shift register submodule 11, a double-layer modulo operation submodule 12, and an iteration submodule 13. The band sampling index generation module 2 includes: a counter submodule 21, a judgment submodule 22, and a band sampling generation submodule 23. The raw data storage module 3 includes: a reading submodule 31 and a storage submodule 32. The control module 4 includes: an idle submodule 41, a band sampling submodule 42, a data storage submodule 43, and a termination submodule 44.

[0062] The working principle of the entire system is as follows:

[0063] The fixed-range random number generation module 1 is used to calculate the number of sampling combinations p and the first band index value. The linear feedback shift register submodule 11 is used to set the independent register to 16*16 and the feedback polynomial to... The seed value is set to a parameter ranging from 1H to 16H. Sixteen independent registers are connected in series to form a linear feedback shift register. Based on the property that a single bit output by a single linear feedback shift register will be missing a bit, the missing bit is filled by XORing the values ​​of the 4th, 13th, 15th, and 16th independent registers. The sixteen linear feedback shift registers are then connected in parallel, each using a different seed value as its initial state, generating a range from 1 to 2H within each clock cycle. 16The random integer N is set to -1 and transmitted to the dual-layer modulo operation submodule 12. The dual-layer modulo operation submodule 12 receives the number of sampling bands m and the number of original bands L of the hyperspectral image from the external input of the FPGA. It first uses m and L to calculate the number of band sampling combinations p in one clock cycle, and then uses N and p to calculate the index value of the first sampling band in one clock cycle. And sample the first band index value The sampling combination number p is transmitted to the band sampling index generation module 2; the iterative submodule 13 drives the linear feedback shift register submodule 11 to run repeatedly, continuously providing different random numbers N in each clock cycle;

[0064] The band sampling index generation module 2 is used to generate a sampling index based on the sampling combination number p and the first band index value output by module 1. A series of uniformly sampled band index values ​​are generated. The initialization counter submodule 21 sets the counter cnt to increment by 1 after each index value generation and passes the counter value cnt to the judgment submodule 22. The judgment submodule 22 determines whether the counter value cnt has reached the number of sampled bands m. If cnt has not reached m, the first band index value is reset. The sampling band index value with auxiliary flag bit within one clock cycle is generated by the band sampling generation submodule 23, and the judgment submodule 22 is restarted. When cnt reaches m, the sampling combination number is transmitted to the band sampling generation submodule 23 to generate a sampling band index value with auxiliary flag bit within one clock cycle, and the generation is stopped. Finally, all the generated series of sampling band index values ​​are transmitted to the storage original data module 3.

[0065] The raw data storage module 3 is used to generate an address for storing data in external space based on a series of uniformly sampled band index values, and to read the band data to be sampled from the raw hyperspectral data and store it in the BRAM of the FPGA. The reading submodule 31, based on the characteristic that a single band of the original hyperspectral image occupies 160 sectors of the SD card, sets the linear mapping factor to 160, multiplies a series of uniformly sampled band index values ​​by 160 to generate an address for storing data in external space, and then reads the sampled portion of the raw hyperspectral data according to the address and transmits it to the storage submodule 32; the storage submodule 32 stores the sampled portion of the raw hyperspectral data in the BRAM of the FPGA.

[0066] The control module 4 is used to switch the states of the first band index value generation module 1, the band index value generation module 2, and the raw data storage module 3, and to set the starting conditions for each module. The idle submodule 41 clears and initializes the system, and waits for the input of the number of sampling bands m and the number of raw hyperspectral image bands L. Once the data is input, it automatically jumps to the band sampling submodule 42, starts the band index value generation module 1, and calculates the first band index value based on m and L. And the number of sampling combinations p, then start the module 2 for storing the original data, based on the index value of the first sampling band. The system calculates a series of sampling band index values ​​with the sampling combination number p; then it automatically jumps to the data storage submodule 43 to start the original data storage module 3, generates the original hyperspectral data address according to the series of sampling band index values, reads the sampling data at the corresponding position and stores it into the FPGA's BRAM; finally, it jumps to the termination submodule 44 to clear the system, sends an operation completion flag signal and returns to the idle submodule 41 to prepare for the next band sampling task.

[0067] It should be noted that the above functional modules can be implemented, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, they can be implemented, in whole or in part, as program instruction products. A program instruction product includes one or a set of program instructions. When the program instructions are loaded and executed on a computer, the described process or function is generated, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The program instructions can be stored in a computer-readable and writable storage medium, or transferred from one computer's readable and writable storage medium to another.

[0068] In this embodiment, the direct coupling or communication connection between the modules can be achieved through indirect coupling or communication connection via interfaces, devices, or modules. The functional modules and sub-modules in this embodiment can dynamically reside within a single processing unit, or each module can exist physically independently, or two or more modules can dynamically reside within a single processing unit. When these dynamic components are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable and writable storage medium. This storage medium can be a memory, disk, or optical disc, etc.

[0069] The effects of this invention can be further illustrated by the following simulation experiments:

[0070] I. Simulation Conditions

[0071] Simulation deployment was performed on the Vivado 2020.1 integrated design environment. The FPGA chip model used on the development board was Zyn-7000 xc7z030clg484-1. The data used was preprocessed on the computer platform before being used for simulation.

[0072] The simulation uses TI3_TE3 simulation data, such as... Figure 3 As shown, the data spatial resolution is 200*200, with a total of 189 bands. The targets are composed of the real spectral signals of five substances extracted from the Cuprite data: Alunite, Buddingtonite, Calcite, Kaolinite, and Muscovite. The background is composed of the real spectrum of a background pixel extracted from the Cuprite data, containing five rows and five columns of targets. Targets in the same row are roughly the same substance but different in size, while targets in different rows are different substances. The first column contains 4*4 pixel pure spectral targets, the second column contains 2*2 pixel pure spectral targets, the third column contains 2*2 pixel mixed spectral targets of two substances each (50%), the fourth column contains 1*1 target and background spectra each (50%), and the fifth column contains 1*1 target (25%) and background spectra (75%) mixed spectral targets.

[0073] II. Simulation Content

[0074] Simulation 1: Under the above conditions, the ATGP algorithm was used to simulate endmember lookup on images after band sampling according to the present invention and images after band selection using existing methods, respectively. The total time for band dimensionality reduction and endmember lookup was recorded, and the results are as follows: Figure 4 ,in:

[0075] Figure 4 a represents the detection result and running time of the image simulation after sampling using the band of this invention.

[0076] Figure 4 b represents the detection results and running time of the image simulation after band selection using existing methods.

[0077] Depend on Figure 4 As can be seen, the detection results obtained by using the ATGP algorithm on the image after band sampling in this invention are the same as those obtained by performing ATGP endmember lookup on the image after band selection using existing methods, but the detection time of this invention is shorter. This is because the band dimensionality reduction of this invention does not involve complex processes and a large number of matrix operations, which reduces the dimensionality reduction time by 77%. At the same time, because only 18 bands are sampled from the original 189 bands of the hyperspectral image after sampling in this invention, the amount of data is greatly reduced, thereby reducing the overall endmember extraction time.

Claims

1. A method for implementing hyperspectral band sampling based on FPGA, characterized in that, include: (1) Use FPGA to set the nth-order linear feedback shift register, feedback polynomial and seed value, and calculate the first band index value of the band sampling based on the number of input sampling bands; (2) Based on the first band index value of the band sampling, use FPGA to generate a series of uniformly sampled band index values; (3) Based on the uniform sampling band index value, the address of the hyperspectral image stored in the external space is generated by using the linear mapping method. Part of the hyperspectral image is read in according to the address and stored in the block random access memory of the FPGA.

2. The method according to claim 1, characterized in that, In step (1), the FPGA is used to set the nth-order linear feedback shift register, the feedback polynomial, and the seed value, which includes: Determine the number of independent registers and cascade them into a single linear feedback shift register; Determine the feedback mode of a single linear feedback shift register, set the feedback polynomial and seed value and determine the taps. After the single linear feedback shift register outputs, it will be missing one bit. XOR the taps and fill in the missing bit so that the single linear feedback shift register can output a value of 0 or 1 in any state. Given an order n, use n linear feedback shift registers connected in parallel to simultaneously output from 1 to 2 in any given state. n A value of -1 is used, and this value is called the output N of the nth-order linear feedback shift register.

3. The method according to claim 1, characterized in that, The calculation of the first band index value of band sampling based on the number of input sampling bands in (1) includes: 1a) Based on the number of input bands m and the original number of hyperspectral bands L, calculate the number of sampling combinations p within one clock cycle: ; 1b) Based on the current output value N of the nth-order linear feedback shift register and the number of band sampling combinations p, calculate the first band index value of the band sampling within one clock cycle. : 。 4. The method according to claim 1, characterized in that, In step 2), based on the first band index value of the band sampling, a series of uniformly sampled band index values ​​are generated using the FPGA, including: Set up a counter to record the number of data that has been generated, and increment the counter by 1 for each data generated according to the clock, until the value of the counter reaches the number of sampling bands m; In the process of generating a series of uniformly sampled band index values, the first band index value is... As the first value, each subsequent value is based on the previous value with the number of band sampling combinations p, resulting in a series of uniformly sampled band index values.

5. The method according to claim 1, characterized in that, In step 3), the address for storing the hyperspectral image in external space is generated by using a linear mapping method based on the uniform sampling band index value. This involves first determining the linear mapping factor as 16 based on the characteristic that a single band of the original hyperspectral image occupies 16 sectors of the SD card; then multiplying the uniform sampling band index value by 16 to obtain the sector position of the required sampling band in the SD card.

6. The method according to claim 1, characterized in that, The portion of the hyperspectral image read in according to the address stored in external space in step 3) includes: After addressing the SD card sectors, data is read sequentially. A counter is set up in the FPGA, incrementing each time a bit is received. A temporary register is set up to store data for a single band, and three combinational logics are configured: The first combinational logic is to determine whether 16 bits have been received: if yes, it means that a complete data has been received and it is stored in the corresponding position of the temporary register; if no, the receiving state is maintained. The second combinational logic is to determine whether 64*64 data points have been received: if yes, it means that data from a single band has been received, the data in the temporary register is stored in the BRAM and the temporary register is cleared; if no, the receiving state is maintained. The third combinational logic is to determine whether data from m bands has been received: if yes, it means all data has been received, the counter is reset and the system waits to read data from the next band; if no, the receiving state is maintained.

7. A system for implementing hyperspectral band sampling based on FPGA, characterized in that, include: The first band index value generation module is used to input the number of sampled bands m and the number of original hyperspectral bands L, and to calculate the number of sampled combinations p and the first band index value using double-layer modulus taking. ; The band index value generation module is used to generate the band index value based on the number of sampling combinations p and the first band index value. Generate a series of uniformly sampled band index values; The raw data storage module is used to generate the address for storing data in external space based on a series of uniformly sampled band index values, and to read the band data that needs to be sampled from the raw hyperspectral data and store it in BRAM. The control module is used to control the data flow coordination and operation status of the first band index value generation module, the band index value generation module, and the raw data storage module.

8. The system according to claim 7, characterized in that, The first band index value generation module includes: Linear feedback shift register submodule: Used to design the number of independent registers, feedback polynomial, seed value and order of an n-order linear feedback shift register, and to connect the independent registers in series to form a linear feedback shift register, and connect n linear feedback shift registers in parallel to form an n-order linear feedback shift register, with preset initial state; The dual-layer modulus operation submodule is used to first perform a modulus operation based on the input number of band samples m and the number of bands L in the original hyperspectral image, to obtain the number of band sample combinations p; then, it performs a second modulus operation based on the current value N of the parallel linear feedback shift register and the number of band sample combinations p, to obtain the index value of the first band sample. ; Iteration submodule: Used to repeatedly run the XOR operation specified by the feedback polynomial, continuously generating random numbers to meet the real-time calculation needs of the two-layer modulo operation submodule.

9. The system according to claim 7, characterized in that, The band index value generation module includes: Counter submodule: Used to record the number of generated band index values. A counter is set up, and the counter increments by 1 each time a band index value is generated. Judgment Submodule: Used to determine whether the band index value has been generated completely and whether the counter is equal to the number of band samples m: if yes, stop generating the band index value and send a clear signal; if no, keep generating the band index value. Band sampling generation submodule: Based on the number of sampling combinations p and the first band index value A band index value is generated at each clock cycle.

10. The system according to claim 7, characterized in that, The control module includes: The idle submodule is used to reset and initialize the registers when a start signal is received, and automatically jumps to the band sampling submodule. The band sampling submodule is used to perform two key operations: sequentially starting the first band index value generation module and the band index value generation module to perform the band sampling task. The data storage submodule is used to start the raw data storage module to perform data reading and storage tasks. Termination submodule: Used to reset the first band index value generation module, the band index value generation module, and the raw data storage module, and automatically return to the idle submodule after the reset is completed and wait for the next start signal.

Citation Information

Patent Citations

  • Hyperspectral band selection and extraction method and system based on FPGA (Field Programmable Gate Array)

    CN120411532A