A method for spectral imaging alignment and calibration processing
By performing pooling processing and application of perspective transformation models on the images of the spectral imaging system, the alignment problem caused by jitter during multi-band shooting is solved, which significantly improves the alignment speed and effect, and provides an effective alignment decision-making method.
Patent Information
- Application Number
- CN202211646774.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-12-22
AI Technical Summary
When shooting multiple bands, the existing spectral imaging system causes image offset due to device jitter, resulting in the three-dimensional spectral images being unable to align. The traditional alignment algorithm takes a long time and lacks effective alignment decision-making methods.
A spectral imaging alignment calibration processing method is proposed, which reduces the number of pixels and reduces the calculation amount through image pooling processing, and is aligned with a perspective transformation model. At the same time, by analyzing the correlation coefficients between each channel, a basis for alignment decisions is provided.
It effectively reduces the calculation amount of traditional alignment algorithms, improves the alignment speed, shortens the time to the original 7 to 8 times, and significantly improves the alignment effect, providing a reliable decision-making basis for whether to perform alignment operations.
Smart Images

Figure CN115810035B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of spectral image alignment, and particularly relates to a spectral imaging alignment and calibration processing method. Background Art
[0002] For a spectral imaging system based on a Fabry-Perot interferometer cavity, an electrostatic / piezoelectric technology implementation method is adopted to sequentially capture two-dimensional spectral images of multiple bands and then combine them into a three-dimensional spectral image. As the number of spectral bands increases, the shooting time increases accordingly. Therefore, when the spectral imaging device or the target vibrates, the spectral images of each band will shift, resulting in misalignment of the three-dimensional spectral image.
[0003] Traditional spectral image alignment algorithms can effectively solve the above problems, but the disadvantage is that the speed is slow. Since the number of bands in spectral images is relatively large, possibly reaching dozens or hundreds, the time consumption is long. At the same time, there is a lack of a spectral image alignment decision method, that is, to judge whether there is misalignment in the images of each channel and first decide whether the images need to be aligned. Summary of the Invention
[0004] The present invention patent proposes a spectral imaging alignment and calibration processing method. By performing pooling processing on the image, the number of image pixels is reduced, thereby reducing the computational complexity of traditional image alignment algorithms, and then restoring it to the original image size after alignment. At the same time, a spectral image alignment decision method is proposed, that is, by analyzing the correlation coefficients between channels in both stable shooting and jitter shooting cases as the basis for deciding whether alignment operations are needed.
[0005] The first aspect of the present invention provides a spectral imaging alignment and calibration processing method, including the following steps:
[0006] Step 1, read the original intensity image data of the spectral image, judge whether alignment operations are needed. If alignment operations are needed, enter Step 2; the original intensity image data is three-dimensional spectral cube data of height × width × number of channels;
[0007] Step 2, perform n×n pooling operations with a step size of n on the image of each channel of the original image to obtain the reduced-size image data;
[0008] Step 3, select the image of any one channel as the reference image, and in subsequent steps, the images of all other channels should be aligned with it;
[0009] Step 4, select a perspective transformation model as the estimated motion model, set the iteration conditions, solve the parameters in the final transformation model, and thus obtain the final perspective transformation model;
[0010] Step 5: Apply the transformation model obtained in Step 4 to the images of all other channels except the reference channel to generate new aligned images.
[0011] Step 6: Perform an n×n reverse pooling operation on the images of all channels; first, restore them to the original size of the images, and then fill each value in the pooling result into the corresponding position in the corresponding original data area to obtain the aligned spectral image.
[0012] Preferably, the specific method for determining whether alignment is required in Step 1 is as follows:
[0013] Select the image data of any two channels, calculate the average correlation coefficient between the two-channel images using the Pearson product-moment correlation coefficient. If the coefficient is less than a certain initially set threshold, it is determined that alignment is required; the Pearson correlation coefficient between two variables is defined as the quotient of the covariance and the standard deviation between the two variables:
[0014]
[0015] For a spectral image, X is the two-dimensional matrix of the image intensity of a certain channel, Y is the two-dimensional matrix of the image intensity of another channel, E represents the expectation, μX represents the average value of image X, μY represents the average value of image Y, and σX and σY represent the standard deviations of X and Y respectively.
[0016] Preferably, the n×n pooling operation on the image of each channel in Step 2 is specifically a 2×2 pooling on each band of the original image, that is, sliding on the original image in the form of a 2×2 window with a step size of 2, and the operation result takes the average value or the maximum value within the window.
[0017] Preferably, the specific process of Step 4 is as follows: First, define a termination condition, that is, set the maximum number of iterations to k; then randomly initialize the transformation model parameters. According to the selected reference channel image and the perspective transformation model, calculate the similarity measure between the images of all other channels and the reference image. The similarity measure uses the Pearson correlation coefficient. Determine the possible range of parameter changes according to the similarity, and perform iterative search in the search space according to the optimization criterion of the maximum similarity; finally, as the number of iterations increases, all similarities will approach the maximum value and no longer change. When the number of loops reaches the set maximum value k, the iteration will end, thereby solving the parameters in the final transformation model.
[0018] Preferably, the iterative search in the search space according to the optimization criterion of the maximum similarity uses a grid search as a means of tuning parameters. Among all candidate parameter selections, by looping through and trying each possibility, the parameter with the maximum similarity, that is, the best-performing parameter, is the final result.
[0019] In a second aspect of the present invention, there is also provided a spectral imaging alignment and calibration processing device, which includes at least one processor and at least one memory; a computer execution program is stored in the memory; when the processor executes the execution program stored in the memory, the processor can execute the spectral imaging alignment and calibration processing method as described in the first aspect.
[0020] In a third aspect of the present invention, there is provided a computer-readable storage medium, in which a computer execution program is stored, and when the computer execution program is executed by a processor, the processor can execute the spectral imaging alignment and calibration processing method as described in the first aspect.
[0021] Advantages of the present invention: The spectral imaging alignment and calibration processing method provided by the present invention solves the problem of long time-consuming for image alignment in the prior art. For the first time, the image pooling operation is applied to the spectral image alignment processing scheme. By pooling the image, the number of image pixels can be reduced, effectively reducing the computational complexity of the traditional image alignment algorithm, and increasing the speed by 7 to 8 times. As the number of spectral image bands increases, the time reduction compared to the prior art solution will be more obvious. At the same time, the perspective transformation model used in combination as the estimated motion model provides a new alignment method with significantly improved alignment effect; the present invention also proposes a new spectral image alignment decision method, that is, by analyzing the correlation coefficients between channels in both stable shooting and jitter shooting cases as the basis for decision-making, providing a reliable basis for whether to perform image alignment operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flowchart of the spectral imaging alignment and calibration processing method of the present invention.
[0023] Figure 2 It is a schematic diagram of the three-dimensional spectral cube structure.
[0024] Figure 3 It is a schematic diagram of the sum of 10-band original images of leaf multispectrum.
[0025] Figure 4 It is a schematic diagram of the comparison between the jitter image and the stable image.
[0026] Figure 5 It is a schematic diagram of the comparison between the original image and the pooled image.
[0027] Figure 6 It is a schematic diagram of the comparison of the sums of the original image and the aligned image respectively.
[0028] Figure 7 It is a schematic diagram of the comparison between the original aligned image and the fast aligned image.
[0029] Figure 8 Schematic diagram of the simple structure of the alignment device in Embodiment 2 of the present invention. Detailed implementation manners
[0030] The invention will be further described below in conjunction with specific embodiments.
[0031] Embodiment 1:
[0032] In a typical image alignment problem, two images are associated through a motion model. Different image alignment algorithms aim to estimate the parameters of these motion models using different techniques and assumptions. Knowing these parameters, one image can be directly distorted to align it with the other image. These motion models include:
[0033] Translation: The first image can be translated (shifted) by (x, y) to obtain the second image.
[0034] Euclidean: The second image is a rotation and translation of the first image.
[0035] Affine: An affine transformation is a combination of rotation, translation (shift), scaling, and shearing.
[0036] Perspective transformation: Projects the image onto a new viewing plane, maps a quadrilateral region to another quadrilateral region, and achieves a linear transformation and translation.
[0037] Traditional image alignment algorithms can use perspective transformation, utilize the similarity metric between images to estimate the parameters of the motion model, and find the geometric transformation parameters between two images. The transformation formula is as follows:
[0038]
[0039] Where u and v represent the pixel coordinates of the original image, and w can take any non-zero number, such as w = 1.
[0040]
[0041]
[0042] Where x and y are the pixel coordinates of the transformed image, and the remaining variables are the parameters of the model. Input two pictures, knowing that one image is obtained by transforming the other image, and the transformation parameters are calculated by inversion. The common method is to substitute the feature points into the formula of image transformation for solution.
[0043] Although the existing technical solutions can solve the problem of image alignment, due to the large number of bands in spectral images, which may reach dozens or hundreds, the time consumption is relatively long.
[0044] The present invention provides a spectral imaging alignment and calibration processing method, and the operation process is as follows Figure 1 as shown:
[0045] Step 1: Read the original intensity image data of the spectral image, and determine whether alignment operation is required. If alignment operation is required, enter Step 2; the original intensity image data is a three-dimensional spectral cube data of height × width × number of channels;
[0046] Step 2: Perform a pooling operation with a step size of n for each channel of the original image to obtain the image data after reducing the size;
[0047] Step 3: Select the image of any one channel as the reference image, and in the subsequent steps, all the images of other channels should be aligned with it;
[0048] Step 4: Select the perspective transformation model as the estimated motion model, set the iteration conditions, and solve the parameters in the final transformation model to obtain the final perspective transformation model;
[0049] Step 5: Apply the transformation model obtained in Step 4 to the images of all other channels except the reference channel to generate new aligned images;
[0050] Step 6: Perform an unpooling operation of n×n reduction on the images of all channels; first restore them to the original size of the image, and then fill each value in the pooling result into the corresponding position in the corresponding original data area to obtain the aligned spectral image.
[0051] Regarding Step 1:
[0052] By reading the original intensity data of the spectral image, a three-dimensional cube data (height m×width n×number of channels k) can be obtained, as Figure 2 shown. Suppose a 10-channel multispectral camera is used to observe a leaf sample, and two-dimensional images of 10 bands are obtained (height × width × number of channels = m×n×k, where m = 1024, n = 1280, k = 10). In order to show the coincidence situation of the 10-band images, sum along the channel direction, and it can be seen that the leaf positions of the 10 bands do not completely coincide, as Figure 3 shown.
[0053] In practical applications, it can be decided first whether the image needs to be aligned, that is, to judge whether there is a misalignment phenomenon in the images of each channel. In the existing solutions, whether alignment is required mainly depends on subjective judgment, and an objective basis for whether alignment is required cannot be given. The present invention proposes a spectral image alignment decision method, that is, by analyzing the correlation coefficients between each channel in the cases of stable shooting and jitter shooting, as the basis for decision-making.
[0054] In statistics, the Pearson product-moment correlation coefficient is used to measure the correlation (linear correlation) between two variables X and Y, and its value ranges from -1 to 1. In the field of natural science, this coefficient is widely used to measure the degree of correlation between two variables. It evolved from a similar but slightly different idea proposed by Francis Galton in the 1880s by Karl Pearson. This correlation coefficient is also called "Pearson correlation coefficient r".
[0055] The Pearson correlation coefficient between two variables is defined as the quotient of the covariance and the standard deviation between the two variables:
[0056]
[0057] For spectral images, X is a two-dimensional matrix of image intensities in a certain wavelength band, Y is a two-dimensional matrix of image intensities in another wavelength band, E represents the expectation, μX represents the average value of image X, and μY represents the average value of image Y. σX and σY represent the standard deviations of X and Y respectively.
[0058] As Figure 4 shown, when analyzing the spectral images of peanuts, the left figure is the sum of the original peanut images in M (e.g., M = 10) wavelength bands under the jitter condition, and the right figure is the sum of the original peanut images in 10 wavelength bands under the stable condition. The average correlation coefficients between any two wavelength band images in the two cases are calculated to be 0.62 and 0.99 respectively. The results of multiple experiments show that the correlation coefficients between the wavelength bands of the stable peanut spectral images are relatively high, all above 0.9. Therefore, 0.9 can be set as the image alignment decision threshold. The specific threshold selection can be set according to the specific usage scenario.
[0059] Regarding step 2:
[0060] Perform a pooling operation with a step size of n for each channel of the original image in an n×n window, where n is a positive integer. A preferred way is to take n = 2. As Figure 5 shown, perform a 2×2 average pooling on each wavelength band of the original image, that is, slide in the form of a 2×2 window on the original image with a step size of 2, and the operation result takes the average value or the maximum value within the window. Figure 4 The figure shown is the effect diagram of taking the average value. After all the above operations, the size of the original image is reduced from 1024×1280 to 512×640.
[0061] Regarding step 3:
[0062] Based on the image data after pooling in step 2, select the image of any one channel (such as the 5th channel) as the reference image, and in the subsequent steps, the images of all other channels should be aligned with it.
[0063] Regarding step 4:
[0064] As described above, there are many kinds of motion models, such as translation, rotation, and perspective transformation. Among them, the perspective transformation model projects from one plane to another view plane by using the principle that the perspective center, the image point, and the target point are collinear. The advantage is that the lines after projection transformation do not necessarily remain parallel, and it has a stronger ability to distort the graph. It is also called projection transformation, collinearity, or homography transformation. Therefore, in order to obtain a better image alignment effect, the perspective transformation is selected as the motion model.
[0065] The perspective transformation model matrix is obtained by using the iterative method. First, a termination condition is defined, that is, the maximum number of iterations is set to k (such as k = 2000).
[0066] Then, the transformation model parameters are randomly initialized. According to the reference channel image selected in the third step and the perspective transformation model, the similarity measure between the images of all other channels and the reference image is calculated (the similarity measure uses the Pearson correlation coefficient, see the content in part of step 1). According to the similarity, the possible range of parameter changes is determined, and iterative search is carried out in the search space according to the optimization criterion of the maximum similarity.
[0067] The search method uses grid search. As a means of parameter tuning, among all candidate parameter selections, by looping through and trying each possibility, the parameter with the maximum similarity, that is, the best-performing parameter, is the final result. Taking a model with two parameters as an example, if parameter a has 3 possibilities and parameter b has 4 possibilities, listing all possibilities can be represented as a 3*4 table, that is, 12 grids are obtained, and the loop process traverses and searches in each grid.
[0068] Finally, as the number of iterations increases, all similarities will approach the maximum value and no longer change. When the number of loops reaches the set maximum value k, the iteration will end, thereby solving the parameters in the transformation model and obtaining the final perspective transformation model.
[0069] Regarding step 5:
[0070] Apply the transformation model obtained in step 4 to the images of all other channels except the reference channel to generate new aligned images. Those skilled in the art can implement this step without creative labor.
[0071] Regarding step 6:
[0072] Restore all channels of the image by n×n (such as n = 2). Enlarge the size of the image to restore it to the original image size, and restore the pooled values to the positions in the original array, that is, the unpooling operation. Just fill each value in the pooling result into the corresponding position in the corresponding original data area. After step 2 Figure 5For example, through the fast alignment method, finally, images of 10 bands can be obtained, and their sizes are the same as the original images. For better visualization, as Figure 6 shown, the intensity values of 10 bands of the original image and the aligned image can be summed respectively. By comparing the effects after alignment, it can be seen that the coincidence phenomenon of the leaves in 10 bands after alignment is more obvious.
[0073] Performance comparison between the fast spectral image alignment method and the original alignment method:
[0074] (1) Time performance
[0075] Experiments show that the time consumption of the original alignment method is about 22s, and the time consumption of the fast alignment method is about 2.8s, and the processing speed is increased to 7.8 times.
[0076] (2) Comparison of algorithm accuracy
[0077] Taking the output result of the original alignment algorithm as the comparison benchmark, the accuracy of the fast alignment method can be evaluated. Figure 7 The first and second upper figures in show the sixth band of the fast-aligned image and the sixth band of the original-aligned image respectively, both with obvious alignment effects; the first lower figure quantitatively represents the difference between the sixth band of the fast-aligned image and the sixth band of the original-aligned image. It can be seen that the intensity difference in most areas is within 20. Due to the error caused by pooling at the leaf edge, the intensity difference is slightly larger, and in a very small part of the area, the intensity difference is about 40; the second lower figure quantitatively represents the difference between the average value of all bands of the fast-aligned image and the average value of all bands of the original-aligned image, and a similar conclusion can be obtained, that is, the intensity difference in most areas is within 15, and only in a small part of the edge area, the intensity difference is about 30.
[0078] Example 2:
[0079] Such as Figure 8As shown, the present invention also provides a spectral imaging alignment and calibration processing device, which includes at least one processor, at least one memory, and an internal bus; a computer execution program is stored in the memory; when the processor executes the execution program stored in the memory, the processor can execute the spectral imaging alignment and calibration processing method as described in Embodiment 1. The internal bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus. The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disc, etc. The device can be provided as a terminal, a server, or other forms of devices.
[0080] Figure 8 is a block diagram of an exemplary device. The device may include one or more of the following components: a processing component, a memory, a power component, a multimedia component, an audio component, an input / output (I / O) interface, a sensor component, and a communication component. The processing component generally controls the overall operation of the electronic device, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component may include one or more processors to execute instructions to complete all or part of the steps of the above method. In addition, the processing component may include one or more modules to facilitate the interaction between the processing component and other components. For example, the processing component may include a multimedia module to facilitate the interaction between the multimedia component and the processing component.
[0081] The memory is configured to store various types of data to support the operation of the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disc.
[0082] The power supply component provides power for various components of the electronic device. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device. The multimedia component includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component includes a front camera and / or a rear camera. When the electronic device is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0083] The audio component is configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) that is configured to receive external audio signals when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory or sent via the communication component. In some embodiments, the audio component further includes a speaker for outputting audio signals. The I / O interface provides an interface between the processing component and the peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power-on button, and a lock button.
[0084] The sensor component includes one or more sensors for providing a status assessment of various aspects of the electronic device. For example, the sensor component can detect the on / off state of the electronic device, the relative positioning of components, such as the display and the keypad of the electronic device, the sensor component can also detect a change in the position of the electronic device or a component of the electronic device, the presence or absence of user contact with the electronic device, the orientation or acceleration / deceleration of the electronic device, and the temperature change of the electronic device. The sensor component can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component can also include a light sensor, such as a CMOS or a CCD image sensor, for use in imaging applications. In some embodiments, the sensor component can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0085] The communication component is configured to facilitate communication between the electronic device and other devices in a wired or wireless manner. The electronic device can access a wireless network based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0086] In an exemplary embodiment, the electronic device can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.
[0087] Embodiment 3:
[0088] The present invention also provides a computer-readable storage medium storing a computer-executable program, which, when executed by a processor, is used to implement the spectral imaging alignment and calibration processing method as described in Embodiment 1.
[0089] Specifically, a system, device, or equipment equipped with a readable storage medium can be provided, on which software program codes for implementing the functions of any one of the above embodiments are stored, and the computer or processor of the system, device, or equipment is caused to read and execute the instructions stored in the readable storage medium. In this case, the program code read from the readable medium itself can implement the functions of any one of the above embodiments, so the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of the present invention.
[0090] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk or an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-20ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tape, etc. The storage medium can be any available medium accessible by a general-purpose or special-purpose computer.
[0091] It should be understood that the above-mentioned processor may be a Central Processing Unit (CPU), or it may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed and completed by a hardware processor, or by a combination of hardware and software modules in the processor.
[0092] It should be understood that the storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may be located in an Application Specific Integrated Circuit (ASIC). Of course, the processor and the storage medium may also exist as discrete components in a terminal or a server.
[0093] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or an external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0094] Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine - related instructions, microcode, firmware instructions, state - setting data, or source code or object code written in any combination of one or more programming languages, including object - oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer - readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand - alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer (e.g., via an Internet service provider through the Internet). In some embodiments, by using the state information of the computer - readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field - programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer - readable program instructions to implement various aspects of the present disclosure.
[0095] The above are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
[0096] Although the specific embodiments of the present invention have been described above, they are not limitations on the protection scope of the present invention. Those skilled in the art should understand that, based on the technical solutions of the present invention, various modifications or deformations that can be made without creative efforts by those skilled in the art are still within the protection scope of the present invention.
Claims
1. A spectral imaging alignment and calibration processing method, characterized in that, It includes the following steps: Step 1: Read the original intensity image data of the spectral image, and determine whether alignment operation is required. If alignment operation is required, go to Step 2; the original intensity image data is three-dimensional spectral cube data of height×width×number of channels; Step 2: Perform n×n pooling operation on the images of each channel of the original intensity image data to obtain the image data with reduced size; Step 3: Based on the image data with reduced size, select the image of any one channel as the reference image. In subsequent steps, the images of all other channels should be aligned with it; Step 4: Select the perspective transformation model as the estimated motion model, set the iteration condition, and solve the parameters in the final transformation model to obtain the final perspective transformation model; Step 5: Apply the final perspective transformation model obtained in Step 4 to the images of all other channels except the reference channel to generate new aligned images; Step 6: Perform n×n inverse pooling operation for the images of all channels; first restore to the original size of the image, and then fill each value in the inverse pooling result into the corresponding position in its corresponding original data area to obtain the aligned spectral image.
2. The spectral imaging alignment and calibration processing method according to claim 1, wherein: The specific method for determining whether alignment operation is required in Step 1 is: Arbitrarily select the image data of two channels, and use the Pearson product-moment correlation coefficient to calculate the average correlation coefficient between the images of the two channels. If the coefficient is less than a preset threshold, it is determined that alignment operation is required; the Pearson correlation coefficient between two variables is defined as the quotient of the covariance and the standard deviation between the two variables: For the spectral image, X is the two-dimensional matrix of the image intensity of a certain channel, Y is the two-dimensional matrix of the image intensity of another channel, E represents the expectation, μX represents the average value of image X, μY represents the average value of image Y, and σX and σY represent the standard deviations of X and Y respectively.
3. The spectral imaging alignment and calibration processing method according to claim 1, wherein: The specific operation of performing n×n pooling operation on the images of each channel of the original intensity image data in Step 2 is to perform 2×2 pooling on each band of the original intensity image data, that is, slide in the form of a 2×2 window on the original image with a step size of 2, and the operation result takes the average value or the maximum value within the window.
4. The spectral imaging alignment and calibration processing method according to claim 1, characterized in that, The specific process of Step 4 is: First, define a termination condition, that is, set the maximum number of iterations to k; then randomly initialize the transformation model parameters. According to the selected reference channel image and the perspective transformation model, calculate the similarity measure between the images of all other channels and the reference image. The similarity measure uses the Pearson correlation coefficient. Determine the possible change range of the parameters according to the similarity measure, and perform iterative search in the search space according to the optimization criterion of the maximum similarity measure; finally, as the number of iterations increases, all similarity measures will approach the maximum value and no longer change. When the number of loop times reaches the set maximum value k, the iteration will end, so as to solve the parameters in the final transformation model.
5. The spectral imaging alignment and calibration processing method according to claim 4, characterized in that: Iterative search is performed in the search space according to the optimization criterion of the maximum similarity measure. The search method uses grid search. As a means of parameter tuning, among all candidate parameter selections, by looping through, the parameter with the maximum similarity, that is, the best-performing parameter, is the final result.
6. A spectral imaging alignment and calibration processing device, characterized in that: The device includes at least one processor and at least one memory; a computer execution program is stored in the memory; when the processor executes the execution program stored in the memory, the processor executes the spectral imaging alignment and calibration processing method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that: A computer execution program is stored in the computer-readable storage medium. When the computer execution program is executed by a processor, the processor executes the spectral imaging alignment and calibration processing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for correcting center wavelength offset in Fabry-Perot spectral imaging
CN115393229A
High-resolution hyperspectral computational imaging method and system and medium
US20220366536A1