Spectral image segmentation method and related device having the same
By using the deviation correction of the reference channel and the correction channel and the three-dimensional spatial matrix processing in multispectral image segmentation, the problem of low segmentation accuracy in the prior art is solved, and efficient and high-precision spectral image segmentation is achieved.
Patent Information
- Application Number
- CN202211277192.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-10-19
AI Technical Summary
Existing multispectral image segmentation methods fail to adequately consider image biases and external factors, resulting in low segmentation accuracy.
By acquiring the original spectral images of a multi-channel camera array, a reference channel is selected as the source image and a correction channel is selected as the template image. Deviation correction is performed, including background, radiometric values and distance correction. A three-dimensional spatial matrix is established, and finally mean classification and segmentation are performed.
It improves the accuracy and efficiency of spectral image segmentation, and can effectively handle complex ground features and interference information.
Smart Images

Figure CN115797364B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a spectral image segmentation method and related equipment with the same. BACKGROUND
[0002] At present, with the rapid development of earth observation technology such as remote sensing sensors, the data type of multispectral images becomes more and more rich, and the image spatial resolution is also higher and higher. High-resolution images have rich and fine ground object information, and the details of the ground objects are clearer, which provides a good research foundation for the extraction of ground object information in multispectral images, but at the same time, the structure of the ground object is relatively complex, and the interference information is difficult to process.
[0003] For the segmentation method of multispectral images, if the deviation of the image and external factors are not fully considered, the accuracy of the segmented target spectral image is generally low. SUMMARY
[0004] In view of the above defects of the prior art, the present application provides a spectral image segmentation method and related equipment with the same, which solves the above technical problems.
[0005] In order to achieve the above purpose, the present application provides the following technical scheme:
[0006] The present application provides a spectral image segmentation method in the first aspect, comprising the following steps:
[0007] Obtaining an original spectral image collected by a multi-channel camera array, selecting a reference channel of the camera array as a source image and a correction channel as a template image, wherein the reference channel indicates a channel of a central region of the camera array, and the correction channel indicates a plurality of channels outside the channel of the central region of the camera array;
[0008] According to the reference channel and the plurality of correction channels, deviation correction is performed to determine the deviation coefficients of the plurality of correction channels and the reference channel, wherein the deviation correction indicates that the background, radiation value and distance of the original spectral image are respectively corrected,
[0009] The background correction I' satisfies the following formula:
[0010] I'(x,y,λ) = I(x,y,λ) - B(x,y,λ);
[0011] Wherein I is a spectral image collected by a collecting lens with a wavelength of λ, B is a radiation spectrum of different positions of the atmosphere, and x and y are pixel coordinate points in the spectral image;
[0012] The radiation value correction I'' satisfies the following formula:
[0013]
[0014] Wherein, η is the sensitivity response value of different wavelengths on different pixel positions of the imaging spectrometer, S is the radiation spectrum curve of the illumination light source, and k is a correction coefficient constant.
[0015] The distance correction I'" satisfies the following formula:
[0016]
[0017] Wherein, L is the distance from the measurement point to the radiator, and a is the atmospheric different wavelength absorption coefficient curve.
[0018] Based on the deviation coefficient, a three-dimensional space matrix composed of the source image and the template image is established.
[0019] Based on the three-dimensional space matrix, the mean value of the plurality of original spectral images is classified and segmented to obtain the target spectral image.
[0020] In an embodiment, the spectral images collected by the multi-channel camera array are obtained, and the step of selecting the reference channel of the camera array as the source image and the correction channel as the template image further comprises:
[0021] The original spectral images of the multi-channel camera array at the same time are obtained.
[0022] The source image and the plurality of template images of the camera array are selected, wherein the plurality of template images include the images in the source image.
[0023] In an embodiment, the step of determining the deviation coefficient of the plurality of correction channels and the reference channel according to the deviation correction of the reference channel and the plurality of correction channels further comprises:
[0024] The 1 / 3 size of the correction image is selected from the two directions relative to the source image, and the source image is compared at the same time.
[0025] In an embodiment, the step of determining the deviation coefficient of the plurality of correction channels and the reference channel according to the deviation correction of the reference channel and the plurality of correction channels further comprises:
[0026] The pixel brightness values in the source image and the template image are standardized, wherein the standardization I ′ satisfies the following formula:
[0027]
[0028] Wherein, x, y are the deviation coefficients in the coordinate system.
[0029] In an embodiment, the step of establishing the three-dimensional space matrix composed of the source image and the template image based on the deviation coefficient further comprises:
[0030] obtaining deviation coefficients of each template image relative to the image source;
[0031] adjusting the template image based on the deviation coefficients, so that the template image overlaps with the image source;
[0032] forming a three-dimensional space matrix based on the overlapped template image and the image source.
[0033] In an embodiment, the step of classifying and segmenting the plurality of original spectral images based on the three-dimensional space matrix to obtain the target spectral image further comprises:
[0034] obtaining pixel data of the three-dimensional space matrix, randomly selecting a plurality of initial points, and establishing clusters according to the number of initial points;
[0035] iterating the pixel data distribution, updating the clusters, and stopping the iteration when the change of the initial points of the clusters is less than a set threshold value;
[0036] iterating the pixel data distribution, updating the clusters, and stopping the iteration when the change of the initial points of the clusters is less than a set threshold value;
[0037] mapping the clusters to the three-dimensional space of the display image.
[0038] In an embodiment, the step of obtaining pixel data of the three-dimensional space matrix, randomly selecting a plurality of initial points, and establishing clusters according to the number of initial points further comprises:
[0039] selecting at least 10 initial points according to the pixel data of the three-dimensional space matrix, and establishing 10 clusters according to the number of initial points.
[0040] The second aspect of the present application provides a spectral image segmentation device applied to the spectral image segmentation method described above, which comprises:
[0041] an obtaining unit configured to obtain original spectral images collected by a multi-channel camera array, select a reference channel of the camera array as a source image, and select a correction channel as a template image, wherein the reference channel indicates a channel of a central region of the camera array, and the correction channel indicates a plurality of channels other than the channel of the central region of the camera array;
[0042] a determining unit configured to determine deviation coefficients of a plurality of correction channels relative to a reference channel by performing deviation correction on the reference channel and the plurality of correction channels, wherein the deviation correction indicates performing correction on a background, a radiation value, and a distance of the original spectral image respectively,
[0043] the background correction I' satisfies the following formula:
[0044] I'(x, y, λ) = I(x, y, λ) - B(x, y, λ);
[0045] Wherein, I is the spectral image of wavelength lambda collected by the collection lens, B is the radiation spectrum of different positions of the atmosphere, x and y are the pixel coordinate points in the spectral image;
[0046] The radiation numerical correction I" satisfies the following formula:
[0047]
[0048] Wherein, η is the sensitivity response value of different wavelengths at different pixel positions of the imaging spectrometer, S is the radiation spectrum curve of the illumination light source, and k is a correction coefficient constant;
[0049] The distance correction I'" satisfies the following formula:
[0050]
[0051] Wherein, L is the distance from the measurement point to the radiation body, and a is the different wavelength absorption coefficient curve of the atmosphere;
[0052] The establishing unit is configured to establish a three-dimensional space matrix composed of the source image and the template image based on the deviation coefficient.
[0053] The segmentation unit is configured to classify and segment the multiple original spectral images based on the three-dimensional space matrix to obtain the target spectral image.
[0054] The third aspect of the present application provides a computer readable storage medium, the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above-mentioned spectral image segmentation method.
[0055] The fourth aspect of the present application provides an electronic device, which comprises:
[0056] At least one processor; and,
[0057] The memory is in communication connection with the at least one processor; wherein,
[0058] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned spectral image segmentation method.
[0059] The beneficial effects of the present application are: the spectral image segmentation method provided by the present application distinguishes the reference channel and the correction channel from the original spectral images collected by the camera array, takes the original spectral image of the reference channel as the source image, and takes the original spectral image of the correction channel as the template image; the deviation coefficient of the reference channel and the correction channel is obtained by calculating the deviation of the reference channel and the correction channel, and then a three-dimensional space matrix composed of the source image and the template image is established based on the deviation coefficient, and finally the target spectral image is obtained by classifying and segmenting the mean values of the plurality of original spectral images in the three-dimensional space matrix. The above method considers the deviation of the positions between the images, classifies and segments the mean values of the original spectral images, and finally obtains the target spectral image, which has the advantages of high efficiency and high precision.
[0060] In order to further understand the features and technical contents of the present application, please refer to the following detailed description and drawings of the present application, however, the drawings are provided for reference and illustration only, and are not used to limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0061] The technical solutions and other beneficial effects of the present application will be apparent from the following detailed description of the specific embodiments of the present application combined with the accompanying drawings.
[0062] Figure 1 is a flowchart of the spectral image segmentation method of the present application.
[0063] Figure 2 is a defined flowchart of the original spectral image obtained by the spectral image segmentation method of the present application.
[0064] Figure 3 is a flowchart of the spectral image segmentation method of the present application for improving the correction speed.
[0065] Figure 4 is a flowchart of the pixel brightness adjustment of the spectral image segmentation method of the present application.
[0066] Figure 5 is a flowchart of the three-dimensional space matrix of the spectral image segmentation method of the present application.
[0067] Figure 6 is a flowchart of the spectral image segmentation method of the present application for obtaining the target spectral image.
[0068] Figure 7 is a flowchart of the spectral image segmentation method of the present application for obtaining the target spectral image. DETAILED DESCRIPTION
[0069] In order to further illustrate the technical means adopted by the present application and its effects, the preferred embodiments of the present application and their accompanying drawings are described in detail below.
[0070] In the description of the embodiments of the present application, those skilled in the art shall understand that the embodiments of the present application can be implemented as a method, a device, an electronic equipment and a computer readable storage medium. Therefore, the embodiments of the present application can be specifically implemented as follows: complete hardware, complete software (including firmware, resident software, microcode, etc.), a combination of hardware and software. In addition, in some embodiments, the embodiments of the present application can also be implemented as a computer program product in one or more computer readable storage media, which includes computer program code.
[0071] The computer readable storage medium described above can adopt any combination of one or more computer readable storage media. The computer readable storage medium includes: an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or component, or any combination thereof. More specific examples of the computer readable storage medium include: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory (Flash Memory), an optical fiber, an optical disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device or any combination thereof. In the embodiments of the present application, the computer readable storage medium can be any tangible medium containing or storing a program, which can be used or combined with an instruction execution system, device or component.
[0072] The computer program code contained in the computer readable storage medium described above can be transmitted by any appropriate medium, including: wireless, wire, optical cable, radio frequency (Radio Frequency, RF) or any appropriate combination thereof.
[0073] The computer program code for performing the operations of the embodiments of the present application can be written in assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine related instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as C language or similar programming languages. Computer program code can be completely executed on a user computer, partially executed on a user computer, executed as a separate software package, partially executed on a user computer and partially executed on a remote computer, and completely executed on a remote computer or server. In the case of remote computer, the remote computer can be connected to the user computer through any kind of network, including local area network (LAN) or wide area network (WAN), and can be connected to external computer.
[0074] The embodiments of the present invention describe the provided methods, apparatus, and electronic devices through flowcharts and / or block diagrams.
[0075] It should be understood that each block of a flowchart and / or block diagram, as well as combinations of blocks in a flowchart and / or block diagram, can be implemented by computer-readable program instructions. These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine that, when executed by a computer or other programmable data processing apparatus, creates means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.
[0076] These computer-readable program instructions may also be stored in a computer-readable storage medium that enables a computer or other programmable data processing device to function in a particular manner. In this way, the instructions stored in the computer-readable storage medium produce an instruction apparatus product that includes the functions / operations specified in the blocks of a flowchart and / or block diagram.
[0077] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer-implemented process, such that the instructions that execute on the computer or other programmable data processing apparatus provide a process for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.
[0078] Please see Figures 1 to 7 This invention provides a spectral image segmentation method, comprising the following steps:
[0079] like Figure 1 As shown, S101: Acquire the original spectral image acquired by the multi-channel camera array, select the reference channel of the camera array as the source image, and the correction channel as the template image. The reference channel refers to the channel in the central region of the camera array, and the correction channel refers to the multiple channels of the camera array other than the channel in the central region.
[0080] The camera array consists of multiple lens arrays arranged in a single array. Each lens is equipped with a filter, which enables each lens to acquire a raw spectral image at a specific wavelength. The raw spectral image can be understood as the unmodified spectral image captured by the camera array through the lenses.
[0081] A camera array consists of two central regions and an edge region. The central region is the center point of the camera array, and the channels in the central region are called reference channels. The channels other than the reference channels are called correction channels. For example, if the camera array has 35 channels, the remaining 34 channels besides the reference channels are correction channels.
[0082] It can be understood that the reference channel is taken as a source image, the correction channel is taken as a template image, and the template image is corrected based on the source image.
[0083] In the step of S101, the limitation of the obtained original spectral image is further included, specifically including S1011-S1012.
[0084] As shown in the following figure, S1011: obtaining the original spectral image of the same time of the multi-channel camera array. Figure 2
[0085] Wherein, if the camera array shoots a static radiation body, the original spectral image of different times can be selected, and it can be understood that if the radiation body is in a moving state, the camera array needs to obtain the original spectral image of the same time as the source image and the template image.
[0086] Preferably, the source image and the template image of the same time are selected as the portrait image required to be processed in the subsequent step.
[0087] S1012: selecting the source image and a plurality of template images of the camera array, wherein the plurality of template images include the images possessed by the source image.
[0088] Wherein, since the template image and the source image are collected by different position lenses, the template image will have images possessed and not possessed by the source image, and it can be known that the plurality of template images are distributed circumferentially around the source image, therefore, the selected image content needs to be the image possessed by the plurality of template images and the source image.
[0089] Specifically, the central region of the source image is selected so that the plurality of template images can include the image of the central region of the source image.
[0090] S102: deviation correction is performed according to the reference channel and the plurality of correction channels to determine the deviation coefficient of the plurality of correction channels and the reference channel.
[0091] Wherein, the deviation correction indicates that the background, radiation value and distance of the original spectral image are respectively corrected,
[0092] The background correction I' satisfies the following formula:
[0093] I'(x, y, λ) = I(x, y, λ) - B(x, y, λ);
[0094] Wherein, I is the spectral image collected by the collection lens with wavelength λ, B is the radiation spectrum of different positions of the atmosphere, and x and y are pixel coordinate points in the spectral image.
[0095] The radiation value correction I'' satisfies the following formula:
[0096]
[0097] Wherein, η is the sensitivity response value of different wavelengths at different pixel positions of the imaging spectrometer, S is the radiation spectrum curve of the illumination light source, and k is a correction coefficient constant.
[0098] The distance correction I" satisfies the following formula:
[0099]
[0100] Wherein, L is the distance from the measurement point to the radiator, and a is the atmospheric different wavelength absorption coefficient curve.
[0101] It can be understood that there is a deviation between each lens position in the camera array, which further causes the spectral images collected by each lens to have a deviation in the same content.
[0102] The existence of the deviation will affect the final target spectral image, therefore, based on the positional relationship between the reference channel and the correction channel, the positional deviation between the reference channel and the correction channel can be measured, and it can be understood that if the positions of the reference channel and the correction channel are placed in the coordinate system, the deviation coefficient of x and y in the coordinate system can be obtained.
[0103] By obtaining the deviation coefficient, it can be calculated how much the correction channel should be corrected to overlap with the outline of the source image.
[0104] It can also be understood that due to the positional deviation between the reference channel and the correction channel, the positions of the radiators collected when collecting the spectral image are also different, and the different positions of the radiators will have different brightness distributions, which involve different reflectivities of the same material to different wavelengths, and the shadows, ground reflections and other impurities of the positions of the radiators. Therefore, in the process of image correction, the background, radiation and distance of the spectral image also need to be corrected, and the order of correction is also according to the order of background correction, radiation correction and distance correction, and the specific reasons are as follows:
[0105] Firstly, the background of the spectral image is the most affected because in the spectral image, in addition to the radiator, the atmospheric radiation needs to be considered. Since most of the multispectral measurements are carried out during the day, the spectral image contains a large amount of background radiation. However, due to the different radiation at different positions of the atmosphere, it is not convenient to determine, therefore, a certain area close to the radiator or in the periphery, such as the area disturbed by white clouds, is selected as the background radiation spectrum.
[0106] Secondly, the response deviation of the detector needs to be considered, which refers to the response deviation of the camera array collecting the spectral image, which involves the sensitivity response value of different wavelengths.
[0107] Need to explain, the radiation value correction is mainly used to correct the lens response deviation of the camera array, if the radiation body is the active light-emitting radiation body, no light source illumination, S need not be considered.
[0108] After the radiation correction, the light source is normalized, and the different imaging positions of the array lens and the spectral response of different wavelengths are corrected, and the absolute radiation value of the observed sample is obtained.
[0109] Finally, the distance correction needs to be considered, because the distance between the camera array and the radiation body is often far away, and the distance may not be fixed, so the radiation body needs to be distance corrected k is the correction coefficient constant, which is related to the instrument calibration condition.
[0110] In this embodiment, according to the importance of spectral image correction, the background, radiation and distance are corrected in turn, and the corrected spectral image is finally obtained.
[0111] In the step of S102 deviation correction, the correction speed problem also needs to be considered, such as step S1021:
[0112] S1021: select 1 / 3 size of the correction image from the source image in two opposite directions, and compare with the source image at the same time.
[0113] It can be understood that most of the contents of the source image and the template image are the same, and the correction purpose is to obtain the deviation content, so the source image and the template image do not need to be compared completely, the image block of 1 / 3 size of the correction image is compared with the source image, and the comparison is carried out from two opposite directions, for example, from the front and back directions. This not only increases the operation speed, but also reduces the probability of false matching.
[0114] Need to explain, in order to further improve the operation speed, preferably having high contrast, having significant light and dark changes image block, as the template image selected content, of course, the image block needs to be contained by all channels at the same time, and the image block with high repetition in the selected image is avoided as much as possible.
[0115] In the step of S102 deviation correction, the pixel brightness problem also needs to be considered, such as step S1022.
[0116] S1022: standardize the pixel brightness value in the source image and the template image, wherein the standardization I ′ Satisfies the following formula:
[0117]
[0118] Where x, y are the deviation coefficients in the coordinate system.
[0119] It should be noted that the pixel brightness values of the source image and the template image are not exactly the same because the location of the radiator is different. Therefore, it is necessary to standardize the brightness values of the corrected image and the source image so that the outline of the radiator can be delineated by subsequent algorithms.
[0120] S103: Based on the deviation coefficient, establish a three-dimensional spatial matrix consisting of the source image and the template image.
[0121] The template image is corrected based on the obtained deviation coefficient so that the template images overlap to form a three-dimensional spatial matrix.
[0122] The steps in S103 to construct a three-dimensional spatial matrix specifically include S1031-S1033.
[0123] S1031: Obtain the deviation coefficient of each template image relative to the image source.
[0124] S1032: Adjust the template image based on the deviation coefficient so that the template image overlaps with the image source.
[0125] The obtained deviation coefficients are mapped to each template image, and the template images are adjusted accordingly so that they can overlap with the image source.
[0126] It can be understood that the template image overlaps with the image source and that the overlap is not in terms of size, but rather in terms of the radiating volume; it can also be understood that the target regions overlap.
[0127] S1033: Based on the overlapping template image and the image source, a three-dimensional spatial matrix is formed.
[0128] The process involves overlapping a template image with a source image by arranging the source and template images sequentially. After the arrangement, a three-dimensional spatial matrix is constructed by selecting target regions or radiators from the template and source images.
[0129] S104: Based on the three-dimensional spatial matrix, the target spectral image is obtained by classifying and segmenting the mean of multiple original spectral images.
[0130] In this process, the original spectral image mean classification involves selecting a centroid, then establishing a cluster based on that centroid, and using the cluster as the classification.
[0131] The target spectral image is obtained by segmenting the original spectral image using the mean classification.
[0132] S104 obtains the target spectral image and establishes a classification including S1041-S1044.
[0133] S1041: Obtain pixel point data of a three-dimensional space matrix, randomly select several initial points, and establish clusters according to the number of initial points.
[0134] Wherein, after obtaining the pixel point data of the three-dimensional space matrix, several initial points are randomly selected, and the initial points are taken as the centroids. The distance between the pixel point data and each centroid is calculated, and the data point is assigned to the cluster closest to the centroid, forming the classification of the pixel point data.
[0135] The value of the centroid is taken as the value of the cluster where it is located.
[0136] It should be noted that the corrected three-dimensional space matrix pixel point data is input into the data model, for example, the sklearn.cluster.Kmeans model.
[0137] S1042: According to the several initial points, traverse the pixel point data of the three-dimensional space matrix, and assign the pixel point data to the cluster closest to the initial point.
[0138] S1043: Iteratively update the cluster of pixel point data assignment until the initial point of the cluster changes less than a set threshold, and stop iteration.
[0139] Wherein, the pixel point data assignment is looped, the distance between each pixel point and each category center point in the three-dimensional space matrix is calculated according to the centroid clustering, and the category with the smallest distance is the category to which the pixel point belongs.
[0140] According to all pixel point data of each category, the mean value of each channel of these pixel point data is calculated, and the mean value is taken as the new centroid.
[0141] According to the center point of each category, the value of each pixel point is updated.
[0142] When the loop iteration is formed, the image formed by the three-dimensional space matrix can be segmented, and the iteration is stopped.
[0143] S1044: Map the cluster to the three-dimensional space of the display image.
[0144] Wherein, when the obtained cluster is k, the integer value of 0-(k-1) representing the category is mapped to the three-dimensional space of (0,0,0)-(255,255,255), and the corresponding display image software (such as Python OpenCV) is used to display the mapped image.
[0145] As shown in Figure 7 , a total of 8 k value graphic segmentation structures are shown. In each image, each color represents a spectral type of segmented dogs (colors in different images are not related).
[0146] By Figure 1 It can be seen that when the value of k increases, the calculation time increases, and secondly, when k=4, k=6 and k=8, the four main targets in the figure (the four main targets include a blue cover book, a blue notebook, a blue towel and a blue chair) are not completely correctly segmented. When k≥10, the four main targets are accurately identified and segmented. The four main targets require more than 10 categories to be preset, not less than 10 categories as described above, because there are background walls and shadows on the ground and other non-main target scattered light.
[0147] Based on the above reasons, the clustering process is repeated 100 times at different random initial points under a single k value, and the calculation success rate corresponding to each k value is calculated. As shown in Table 1, when k=10, the successful classification result begins to appear, when k=15, the algorithm can achieve a success rate of 80%, and when k=18, the algorithm can obtain correct results every time, and the operation time is of the order of 1 second.
[0148] K Within-cluster sum of squared errors Success rate Time spent 1 6.43e12 - 0.41 2 1.47e12 - 0.42 3 1.08e12 - 0.46 4 8.25e11 - 0.49 5 6.94e11 - 0.56 6 5.88e11 - 0.59 7 5.42e11 - 0.61 8 5.04e11 - 0.17 9 4.68e11 - 0.76 10 4.36e11 5% 0.77 11 4.19e11 3% 0.89 12 3.97e11 18% 0.95 13 3.85e11 36% 0.92 14 3.66e11 50% 0.98 15 3.05e11 81% 1.08 16 3.37e11 85% 1.12 17 3.30e11 93% 1.13 18 3.17e11 100% 1.23 19 3.09e11 100% 1.30
[0149] Table 1
[0150] Based on the above reasons, in step S1041, the number of initial points is selected to include S1041.
[0151] S1041: Select at least 10 initial points according to the pixel data of the three-dimensional space matrix, and establish 10 clusters according to the number of initial points.
[0152] Selecting 10 initial points can ensure that k has a certain success rate, and 10 initial points are preferred. Understandably, 10 initial points correspond to 10 clusters.
[0153] The second aspect of the present application provides a spectral image segmentation device, which is applied to the spectral image segmentation method described above, and comprises:
[0154] The acquisition unit is configured to acquire an original spectral image collected by a multi-channel camera array, select a reference channel of the camera array as a source image, and correct a channel as a template image, wherein the reference channel indicates a channel of a central region of the camera array, and the correction channel indicates a plurality of channels other than the channel of the central region of the camera array.
[0155] The determination unit is configured to correct deviations of the plurality of correction channels and the reference channel according to the reference channel and the plurality of correction channels, and determine deviation coefficients of the plurality of correction channels and the reference channel, wherein the deviation correction indicates that the background, radiation value and distance of the original spectral image are respectively corrected.
[0156] The background correction I' satisfies the following formula:
[0157] I'(x,y,λ)=I(x,y,λ)-B(x,y,λ);
[0158] Where I is the spectral image with wavelength λ captured by the acquisition lens, B is the radiation spectrum at different locations in the atmosphere, and x and y are the pixel coordinates in the spectral image.
[0159] The radiation numerical correction I satisfies the following formula:
[0160]
[0161] Where η is the sensitivity response value of different wavelengths at different pixel positions of the imaging spectrometer, S is the radiation spectrum curve of the illumination source, and k is the correction coefficient constant.
[0162] Distance correction I”' satisfies the following formula:
[0163]
[0164] Where L is the distance from the measurement point to the radiator, and a is the atmospheric absorption coefficient curve for different wavelengths;
[0165] Establish a unit to create a three-dimensional spatial matrix composed of the source image and the template image based on the deviation coefficient;
[0166] The segmentation unit is used to classify and segment multiple original spectral images based on the mean of a three-dimensional spatial matrix to obtain the target spectral image.
[0167] A third aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions for performing the aforementioned spectral image segmentation method.
[0168] A fourth aspect of the present invention provides an electronic device comprising:
[0169] At least one processor; and,
[0170] A memory that is communicatively connected to at least one processor; wherein,
[0171] The memory stores instructions that can be executed by at least one processor, which enables the at least one processor to perform the spectral image segmentation method as described above.
[0172] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method of spectral image segmentation, characterized in that, The method comprises the following steps: obtaining original spectral images collected by a multi-channel camera array, selecting a reference channel of the camera array as a source image and a correction channel as a template image, wherein the reference channel indicates a channel in a central region of the camera array, and the correction channel indicates a plurality of channels outside the central region of the camera array; performing deviation correction on the reference channel and the plurality of correction channels to determine deviation coefficients of the plurality of correction channels and the reference channel, wherein the deviation correction indicates that background, radiation value and distance of the original spectral image are respectively corrected, the background correction I' satisfies the following formula: I'(x, y, λ) = I(x, y, λ) - B(x, y, λ); wherein I is a spectral image collected by a collection lens, B is a radiation spectrum of different positions of the atmosphere, and x and y are pixel coordinate points in the spectral image; the radiation value correction I" satisfies the following formula: wherein η is a sensitivity response value of different wavelengths at different pixel positions of the imaging spectrometer, S is a radiation spectrum curve of an illumination light source, and k is a correction coefficient constant; the distance correction I'" satisfies the following formula: wherein L is a distance from a measurement point to a radiation body, and a is an atmospheric different wavelength absorption coefficient curve; based on the deviation coefficients, a three-dimensional space matrix composed of the source image and the template image is established; based on the three-dimensional space matrix, the original spectral images are classified and segmented to obtain target spectral images.
2. The spectral image segmentation method of claim 1, wherein, In the step of obtaining the spectral images collected by the multi-channel camera array, selecting the reference channel of the camera array as the source image and the correction channel as the template image, the step further comprises: obtaining original spectral images of the multi-channel camera array at the same time; selecting the source image of the camera array and a plurality of template images, wherein the plurality of template images include images in the source image.
3. The spectral image segmentation method of claim 1, wherein, In the step of performing deviation correction on the reference channel and the plurality of correction channels to determine the deviation coefficients of the plurality of correction channels and the reference channel, the step further comprises: selecting 1 / 3 size of the correction image from two directions relative to the source image to simultaneously compare with the source image.
4. The spectral image segmentation method of claim 3, wherein, In the step of performing deviation correction on the reference channel and the plurality of correction channels to determine the deviation coefficients of the plurality of correction channels and the reference channel, the step further comprises: normalizing pixel intensity values in the source image and the template image, wherein normalizing I ′ satisfies the following equation: wherein x and y are pixel point coordinates in a coordinate system.
5. The spectral image segmentation method of claim 1, wherein, In the step of establishing the three-dimensional space matrix composed of the source image and the template image based on the deviation coefficients, the step further comprises: obtaining the deviation coefficients of each template image relative to the source image; adjusting the template image based on the deviation coefficients to make the template image overlap with the source image; establishing the three-dimensional space matrix based on the overlapped template image and the source image.
6. The spectral image segmentation method of claim 1, wherein, In the step of classifying and segmenting the original spectral images based on the three-dimensional space matrix to obtain the target spectral images, the step further comprises: obtaining pixel point data of the three-dimensional space matrix, randomly selecting a plurality of initial points, and establishing clusters according to the number of the initial points; According to several initial points, the pixel point data of the three-dimensional space matrix is traversed, and the pixel point data is allocated to the cluster closest to the initial point; Iterate the pixel point data allocation, update the cluster, and stop iteration until the initial point of the cluster changes less than a set threshold value; The cluster is formed into a cluster value and mapped to a three-dimensional space of a display image.
7. The spectral image segmentation method of claim 5, wherein, In the step of obtaining the pixel point data of the three-dimensional space matrix, randomly selecting several initial points, and establishing clusters according to the number of initial points, the step further comprises: According to the pixel point data of the three-dimensional space matrix, at least 10 initial points are selected, and 10 clusters are established according to the number of initial points.
8. A spectral image segmentation apparatus, characterized by The spectral image segmentation method of any of claims 1-7 comprises: An acquisition unit is configured to acquire original spectral images collected by a multi-channel camera array, select a reference channel of the camera array as a source image, and correct a channel as a template image, wherein the reference channel indicates a channel of a central region of the camera array, and the correction channel indicates a plurality of channels other than the channel of the central region of the camera array; A determination unit is configured to perform deviation correction on the reference channel and a plurality of correction channels to determine deviation coefficients of the plurality of correction channels and the reference channel, wherein the deviation correction indicates correction of background, radiation values, and distance of the original spectral image respectively, The background correction I' satisfies the following formula: I'(x, y, λ) = I(x, y, λ) - B(x, y, λ); Wherein I is a spectral image with wavelength λ collected by a collection lens, B is a radiation spectrum of different positions of the atmosphere, x and y are pixel coordinate points in the spectral image; The radiation value correction I" satisfies the following formula: Wherein η is a sensitivity response value of different wavelengths at different pixel positions of the imaging spectrometer, S is a radiation spectrum curve of an illumination light source, and k is a correction coefficient constant; The distance correction I'" satisfies the following formula: Wherein L is the distance from the measurement point to the radiation body, and a is the atmospheric different wavelength absorption coefficient curve; An establishment unit is configured to establish a three-dimensional space matrix composed of the source image and the template image based on the deviation coefficients; A segmentation unit is configured to classify and segment the target spectral image based on the three-dimensional space matrix.
9. A computer-readable storage medium, characterized in that, The computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the spectral image segmentation method of any one of claims 1-7.
10. An electronic device, comprising: Comprise: At least one processor; And The memory is in communication connection with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the spectral image segmentation method of any one of claims 1-7.
Citation Information
Patent Citations
Multi-spectral imaging method and system based on camera array
CN115564698A