Hyperspectral image segmentation method and system based on end member spectrum classification result

Through the hyperspectral image segmentation method based on the end element spectral classification results, the instability and high cost problems caused by manual intervention in the prior art are solved, and an automated, stable and economical hyperspectral image segmentation effect is achieved.

CN119919653AActive Publication Date: 2025-05-02INST OF ROCK & SOIL MECHANICS CHINESE ACAD OF SCI
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411926782.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-02
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The existing hyperspectral image segmentation methods include manually setting thresholds, filtering specific bands, or performing complex and inefficient two-dimensional image annotations, resulting in unstable data quality and segmentation effects, and high economic and time costs.

Method used

A hyperspectral image segmentation method based on end element spectral classification results is adopted to completely avoid manual intervention by reading the original hyperspectral data, generating position labeling data, slicing processing, identifying and classifying, generating type result maps and performing image segmentation.

Benefits of technology

The hyperspectral image segmentation process is automated, removing complex textures, blurred edges and noise in the image. The image segmentation edges are clear and the effect is stable, reducing economic and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919653A_ABST
    Figure CN119919653A_ABST
Patent Text Reader

Abstract

The invention provides a hyperspectral image segmentation method and system based on an end member spectrum classification result, and the method comprises the steps: reading basic data of hyperspectral original data, generating position labeling data based on a data size, and merging the position labeling data and the hyperspectral original data into labeled hyperspectral data; slicing the labeled hyperspectral data to form an end member labeled spectral data set, inputting all the end member labeled spectral data into a spectral database for identification and classification, generating end member type result graphs corresponding to the end member labeled spectral data, performing image segmentation on all the end member type result graphs, and outputting all mask results. And obtaining a target and a corresponding target type according to all mask results. According to the method, the one-dimensional spectral information and the two-dimensional spatial position information in the hyperspectral data are fully utilized, manual intervention is not needed in the whole process, and the result uncertainty caused by the processes of threshold setting, specific wave band screening or image labeling and the like is completely avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of hyperspectral data processing, and in particular relates to a hyperspectral image segmentation method and system based on endmember spectral classification results. Background Art

[0002] Hyperspectral imaging technology can detect the two-dimensional geometric space and one-dimensional spectral information of target objects without contact. Hyperspectral imaging technology uses spectroscopy to image hundreds of narrow bands and form a position data cube. Compared with conventional color and grayscale images, hyperspectral images have the advantages of high spectral resolution, a large number of bands, and unified images. At present, the processing and analysis of hyperspectral imaging data mainly focuses on one-dimensional spectral information, which is used to identify the components and classify the types of target objects at the corresponding two-dimensional spatial positions.

[0003] With the extensive and in-depth application of hyperspectral imaging technology in scenarios such as environmental monitoring, ore sorting, and food safety, the two-dimensional shape of the target object has become one of the key factors in the three major computer vision tasks of classification, detection, and segmentation. A method and device for intelligent slicing of cigar tobacco with publication number CN113679082A obtains the size and shape of cigar tobacco leaves by applying an edge detection algorithm to hyperspectral images, and calculates its shape parameters; a method, device, equipment, and medium for single-cell feature analysis based on hyperspectral coherent Raman scattering imaging with publication number CN117517287A uses a deep learning segmentation model to segment single-cell regions and extract morphological features of cells; a method for identifying moldy peanuts using near-infrared hyperspectral images based on a deep learning algorithm with publication number CN113420614A uses a marker-controlled watershed algorithm to segment peanut images, and realizes the recognition and distribution statistics of peanut moldy features by building a deep belief network (DBN) model. Li Jing et al. detected the shape features of kiwifruit using hyperspectral imaging. The quadtree decomposition algorithm was used to segment the hyperspectral fusion image of kiwifruit, and its shape feature parameters were calculated by analyzing the mask shape [Li Jing, Wu Chenpeng, Liu Muhua, et al. Detection of kiwifruit shape features using hyperspectral imaging [J]. Spectroscopy and Spectral Analysis, 2020, 40(08): 2564-2570].

[0004] Based on the current research status, the two-dimensional shape features of the target object are obtained by using hyperspectral imaging technology, which is mainly achieved by image segmentation of the target object through digital image processing or deep learning algorithms based on the selection of single-band images of specific bands or the generation of multi-band fusion images. However, the image segmentation method based on digital image processing has high quality requirements on image resolution and clarity, and generally requires manual setting of thresholds or screening of specific bands. The strong subjectivity may lead to unstable data quality and segmentation effect; while the image segmentation method based on deep learning algorithms requires a large amount of repetitive image annotation work, and requires strong GPU computing power as support, which has high economic and time costs. Summary of the invention

[0005] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a hyperspectral image segmentation method and system based on endmember spectral classification results, which fully utilizes the one-dimensional spectral information and two-dimensional spatial position information in the hyperspectral data. The whole process does not require human intervention and completely avoids the uncertainty of the results caused by processes such as setting thresholds, screening specific bands or image annotation.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0007] A hyperspectral image segmentation method based on endmember spectral classification results, comprising:

[0008] Read the data format, data size, spectral range and target category of hyperspectral raw data;

[0009] Based on the data size, position annotation data including the two-dimensional spatial position coordinates of the end members are generated, and merged with the original hyperspectral data to form annotated hyperspectral data;

[0010] Slicing the annotated hyperspectral data to form an endmember annotated spectral dataset containing all endmember annotated spectral data;

[0011] Set the endmember category corresponding to the target category, input all endmember annotated spectral data into the spectral database with the same data format and spectral range for identification and classification, and output the endmember spectral classification results corresponding to the endmember annotated spectral data;

[0012] Generate a corresponding endmember type result graph for each endmember spectrum classification result;

[0013] Perform image segmentation on all end member type result images and output all mask results, and obtain the target and the corresponding target type based on all mask results.

[0014] Furthermore, the size of the position annotation data is W*H*2, the two-dimensional spatial position coordinates of the end member include an X coordinate layer and a Y coordinate layer, the size of the X coordinate layer is W*H*1, including W*H X position coordinates, the size of the Y coordinate layer is W*H*1, including W*H Y position coordinates, wherein W represents the width size value, H represents the height size value, and N represents the number of bands.

[0015] Furthermore, the X-coordinate layer, the Y-coordinate layer and the hyperspectral raw data are combined to form annotated hyperspectral data, the size of which is W*H*(N+2).

[0016] Furthermore, the endmember annotated spectral data set includes W*H endmember annotated spectral data, the size of the endmember annotated spectral data is 1*(N+2), including endmember original spectral data and its corresponding X position coordinates and Y position coordinates, and the size of the endmember original spectral data is 1*N.

[0017] Furthermore, the output endmember spectrum classification result includes endmember categories and their corresponding endmember type values, and the endmember categories include background endmembers.

[0018] Furthermore, the method for generating the corresponding endmember type result graph for each endmember spectrum classification result is:

[0019] splicing the endmember type value and the endmember annotated spectral data to obtain spliced ​​data;

[0020] After removing the original spectral data of the end members from the spliced ​​data, the data are stacked according to the two-dimensional spatial position coordinates of the end members to obtain stacked data;

[0021] The position annotation data is removed from the stacked data to obtain the end member type result diagram.

[0022] Furthermore, the improved region growing algorithm is used to perform image segmentation on all endmember type result images and output all mask results. The specific method is as follows:

[0023] Step S601: In the endmember type result diagram, count the number of endmember categories;

[0024] Step S602: outside the mask range, counting the number of endmembers corresponding to each endmember category;

[0025] Step S603: for each endmember category whose number of endmembers is not equal to 0 in step S602, one initial search endmember is randomly assigned;

[0026] Step S604: for each initial search endmember, search for adjacent endmembers that are spatially adjacent to the initial search endmember and have the same endmember type value, add the initial search endmember and the adjacent endmember to the known endmember list, and remove duplicate results;

[0027] Step S605: taking the adjacent end member as a new initial search end member;

[0028] Step S606: repeating steps S604 to S605 until all neighboring endmembers corresponding to each initial search endmember in step S603 are found, saving the known endmember list as a mask result, and clearing the known endmember list;

[0029] Step S607: until all the end members in the mask results are counted, all the mask results are output, and the identified targets and target types are output according to all the mask results.

[0030] A hyperspectral image segmentation system based on endmember spectral classification results, comprising:

[0031] Information acquisition module, used to read the data format, data size, spectral range and target category of hyperspectral raw data;

[0032] A spatial position annotation module is used to generate position annotation data containing the two-dimensional spatial position coordinates of the end members based on the data size, and merge it with the original hyperspectral data to form annotated hyperspectral data;

[0033] A slicing processing module is used to slice the annotated hyperspectral data to form an endmember annotated spectral data set containing all endmember annotated spectral data;

[0034] The endmember spectral data recognition and classification module is used to set the endmember category corresponding to the target category, input all endmember annotated spectral data into the spectral database with the same data format and spectral range for recognition and classification, and output the endmember spectral classification results corresponding to the endmember annotated spectral data;

[0035] A data processing module, used for generating a corresponding endmember type result graph for each endmember spectrum classification result;

[0036] The target image segmentation module is used to perform image segmentation on all end-member type result images and output all mask results, and obtain the target and the corresponding target type based on all mask results.

[0037] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the hyperspectral image segmentation method based on endmember spectrum classification results is implemented.

[0038] A non-transitory computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned hyperspectral image segmentation method based on endmember spectral classification results.

[0039] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0040] The present invention is based on a deep learning method and uses one-dimensional spectral data annotation to perform supervised classification of endmember spectra, giving full play to the simplicity and efficiency of one-dimensional spectral data annotation; on this basis, an endmember spectral type result map automatically generated by a computer algorithm is used for image segmentation, which removes invalid information and interference such as complex textures, fuzzy edges and noise in the hyperspectral image data, and does not require manual setting of thresholds, screening of specific bands or complex and inefficient two-dimensional image annotation. The image segmentation edges are clear and the effect is stable; at the same time, an improved region growing algorithm is proposed for saving mask results and counting endmember categories and quantities, which can be effectively applied to multi-type, multi-target and uncertain hyperspectral image data. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0042] Figure 1 A schematic diagram of a hyperspectral image segmentation method based on endmember spectrum classification results of the present invention;

[0043] Figure 2 It is a schematic diagram of the improved region growing algorithm flow of the present invention;

[0044] Figure 3 This is a schematic diagram of the annotated hyperspectral data structure of the present invention;

[0045] Figure 4 This is a hyperspectral raw data result diagram of a specific embodiment of the present invention;

[0046] Figure 5 is an end member spectrum curve diagram of a specific embodiment of the present invention;

[0047] Figure 6 It is a result diagram of end member type of a specific embodiment of the present invention;

[0048] Figure 7 This is a label diagram of the end member type of a specific embodiment of the present invention;

[0049] Figure 8 It is a schematic diagram of a hyperspectral image segmentation system based on endmember spectral classification results of the present invention. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0051] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0052] Example 1

[0053] Embodiment 1 provides a hyperspectral image segmentation method based on endmember spectral classification results, such as Figure 1 As shown, including:

[0054] Step S1: Read the data format, data size, spectral range and target category of the hyperspectral raw data;

[0055] Step S2: generating position annotation data including the two-dimensional spatial position coordinates of the end members based on the data size, and merging the position annotation data with the original hyperspectral data to form annotated hyperspectral data;

[0056] Step S3: Slicing the annotated hyperspectral data to form an endmember annotated spectral data set containing all endmember annotated spectral data;

[0057] Step S4: setting the endmember category corresponding to the target category, inputting all endmember annotated spectral data into a spectral database with the same data format and spectral range for identification and classification, and outputting the endmember spectral classification results corresponding to the endmember annotated spectral data;

[0058] Step S5: generating a corresponding endmember type result graph for each endmember spectrum classification result;

[0059] Step S6: Perform image segmentation on all end member type result images and output all mask results, and obtain the target and the corresponding target type according to all mask results.

[0060] The hyperspectral image segmentation method based on the endmember spectral classification results provided in this embodiment does not require manual intervention in the whole process, and completely avoids the uncertainty of the results caused by processes such as setting thresholds, screening specific bands or image annotation. At the same time, since the present invention makes full use of the one-dimensional spectral information and two-dimensional spatial position information in the hyperspectral data, it still has a strong information processing capability, especially for hyperspectral images with complex textures, fuzzy edges and strong noises that are difficult to apply conventional image processing technologies.

[0061] In this embodiment, the data format is img, mat, raw, tiff and other formats, which are not limited in this embodiment.

[0062] In this embodiment, the spectral range and the target category are determined according to the target to be identified, and this embodiment does not limit this.

[0063] In step S2 of this embodiment, Figure 3 As shown, in the position annotation data containing the two-dimensional spatial position coordinates (xi, yi) of the end member generated based on the data size, the size of the position annotation data is W*H*2, and the two-dimensional spatial position coordinates of the end member include the X coordinate layer and the Y coordinate layer. The size of the X coordinate layer is W*H*1, including W*H X position coordinates xi, and the size of the Y coordinate layer is W*H*1, including W*H Y position coordinates yi. Among them, W represents the size value of the width, the unit is pixel; H represents the size value of the height, the unit is pixel; N represents the number of bands, and i is a positive integer greater than 0.

[0064] In step S2 of this embodiment, the position annotation data and the hyperspectral raw data are combined to form the annotated hyperspectral data, and the size of the annotated hyperspectral data formed by combining the X coordinate layer, the Y coordinate layer and the hyperspectral raw data is W*H*(N+2).

[0065] In this embodiment, step S2 saves the two-dimensional spatial position of the end member by marking.

[0066] In step S3 of this embodiment, the annotated hyperspectral data is sliced ​​to form an endmember annotated spectral data set containing all endmember annotated spectral data. The endmember annotated spectral data set includes W*H endmember annotated spectral data, the size of the endmember annotated spectral data is 1*(N+2), including the endmember original spectral data and its corresponding X position coordinate xi and Y position coordinate yi, and the size of the endmember original spectral data is 1*N.

[0067] Slicing (equivalent to "dimensionality reduction") is used to process the 3D "annotated hyperspectral data" into 1D "endmember annotated spectral data". In addition, the advantage of using 1D data for identification and classification is that it can significantly improve the annotation efficiency and data volume, which is conducive to improving the classification accuracy.

[0068] In step S4 of this embodiment, the spectral database is the USGS spectral database, UV-Vis database, Japanese SDBS database, Hitran database, US JPL spectral database, Shanghai Institute of Organic Chemistry database, etc., which is not limited in this embodiment.

[0069] In step S4 of this embodiment, the endmember category corresponding to the target category is set, and the output endmember spectrum classification result includes the endmember category tj and its corresponding endmember type value cj, where j is a positive integer greater than or equal to 0. The endmember category includes background endmembers, and the background endmember can be set to t0 and the corresponding endmember type value c0.

[0070] In step S5 of this embodiment, the method for generating a corresponding endmember type result graph for each endmember spectrum classification result is:

[0071] Step S501: splicing the endmember type value and the endmember annotated spectrum data to obtain spliced ​​data;

[0072] Step S502: after removing the original spectrum data of the end members from the spliced ​​data, stacking is performed according to the two-dimensional spatial position coordinates (xi, yi) of the end members to obtain stacked data;

[0073] Step S503: Remove the position annotation data from the stacked data to obtain an end member type result diagram.

[0074] Since step S2 saves the two-dimensional spatial position of the end elements through labeling, it is convenient to implement "stacking according to the two-dimensional spatial position coordinates (xi, yi) of the end elements" in step S5, maintain the original spatial order of the end elements, and thus make the end element type result map more accurate, thereby making the image segmentation more accurate.

[0075] In step S6 of this embodiment, Figure 2 As shown in the figure, the improved region growing algorithm is used to segment all end member type result images and output all mask results. The specific method is as follows:

[0076] Step S601: In the endmember type result diagram, count the number n of endmember categories;

[0077] Step S602: outside the mask range, count the number of endmembers mk corresponding to each endmember category tj, where k is a positive integer greater than 0;

[0078] Step S603: randomly assigning one initial search endmember to each endmember category whose corresponding endmember quantity is not equal to 0;

[0079] Step S604: for each initial search endmember, search for adjacent endmembers that are spatially adjacent to the initial search endmember and have the same endmember type value cj, add the initial search endmember and the adjacent endmember to the known endmember list, and remove duplicate results;

[0080] Step S605: taking the adjacent end member as a new initial search end member;

[0081] Step S606: repeating steps S604 to S605 until all neighboring endmembers corresponding to each initial search endmember in step S603 are found, saving the known endmember list as a mask result, and clearing the known endmember list;

[0082] Step S607: until all the end members in the mask results are counted, all the mask results are output, and the identified targets and target types are output according to all the mask results.

[0083] The mask result is a set of spatial position coordinates of all end members within the spatial range where the target is located.

[0084] The targets in the hyperspectral raw data image of this embodiment have multiple types, and each type includes multiple target objects. The improvement relative to the existing region growing algorithm is: use the method of step S603 (i.e., specifying the seed point) to select the initial end member. Use the method of step S604 (i.e., the growth criterion) to find adjacent end members so that the target object contains only one end member type and has clear edges. When repeating steps S604-S605, the mask result containing the end member category and the number of end members needs to be output, and the "known end member list" and its "add" and "clear" methods are introduced, as well as the mask result is updated in real time to avoid repeated searches.

[0085] The hyperspectral image segmentation method based on the endmember spectral classification result provided by the present invention is described in detail below through a specific embodiment. The embodiment uses a Zhongdari VIX-N220 line scanning hyperspectral camera and a 12mm fixed-focus FA lens to perform hyperspectral imaging of three types of rock particles, quartz, dolomite and limestone, with a background of black aluminum oxide alloy, such as Figure 4 The figure shows the result of the hyperspectral raw data of a specific embodiment of the present invention. The hyperspectral raw data in the range of 400-1000nm is obtained, and the data has been subjected to image cropping and reflectance calibration.

[0086] Read the basic information of hyperspectral raw data: the data format is img data that conforms to the ENVI standard, the data size is 752*455*601, and the spectral range is 400-1000nm.

[0087] Generate position annotation data containing the two-dimensional spatial position coordinates (xi, yi) of the end members and merge them with the original hyperspectral data to form annotated hyperspectral data.

[0088] Among them, the size of the position annotation data is 752*455*2, including the X coordinate layer and the Y coordinate layer. The size of the X coordinate layer is 752*455*1, including W*H X position coordinates xi, and the size of the Y coordinate layer is 752*455*1, including W*H Y position coordinates yi. The size of the annotated hyperspectral data is 752*455*603.

[0089] The annotated hyperspectral data are sliced ​​to form an endmember annotated spectral data set, which includes 752*455 endmember annotated spectral data. The size of the endmember annotated spectral data is 1*603, including the endmember original spectral data and its corresponding X position coordinate xi and Y position coordinate yi. The size of the endmember original spectral data is 1*601.

[0090] The end member categories are t0, t1, t2, and t3, corresponding to the background end member, quartz end member, dolomite end member, and limestone end member, respectively. Figure 5 FIG. 1 is a graph showing the end member spectrum of a specific embodiment of the present invention. It can be seen that the reflectivity-wavelength curves of different types of end members are different.

[0091] The size of the end member type result graph is 752*455*1, including 752*455 end member type values ​​cj, such as Figure 6 The figure shows the end member type result diagram of a specific embodiment of the present invention.

[0092] Table 1 shows the statistical results of the endmember categories and the number of endmembers in a specific embodiment of the present invention, indicating that the method of the present invention can accurately count the endmember categories and the corresponding number of endmembers.

[0093] Table 1 Statistical results of end member types and end member numbers in specific embodiments of the present invention

[0094]

[0095] The improved region growing algorithm is used to perform image segmentation on the endmember type result map, wherein the number of endmembers in the endmember type result map is 752*455; in the endmember type result map, the number of endmember categories tj is counted n=4; outside the mask range, the number of endmembers corresponding to each endmember category tj is counted mk (k=0, 1, 2, 3); for each endmember category tj corresponding to the number of endmembers mk≠0, an initial search endmember is randomly assigned; for each initial search endmember, the adjacent endmembers that are spatially adjacent to the initial search endmember and have the same endmember type value ci are searched, the initial search endmember and the adjacent endmember are added to the known endmember list, and duplicate results are eliminated; all adjacent endmembers corresponding to each initial search endmember are repeatedly searched, the known endmember list is saved as the mask result, and the known endmember list is cleared until the number of endmembers in the mask result is 752*455, and all mask results are output. The mask result is a collection of spatial position coordinates of all endmembers within the spatial range where the target is located.

[0096] In order to verify the effectiveness of the method provided by the present invention, the endmember type value in the endmember type result map is converted into a color code through a color space, and an endmember type label map is generated based on the endmember type result map. The color space is an RGB color space, the color code is a hexadecimal RGB color code, the bit depth of the endmember type label map is 8 bits, the hexadecimal RGB color code converted from the endmember type value c0 of the background endmember is #000000, the hexadecimal RGB color codes of the quartz stone, dolomite, and limestone are #FF0000, #00FF00, and #0000FF, respectively, as shown in the following figure. Figure 7 As shown, it is an end member type label diagram of a specific embodiment of the present invention, which illustrates that the end member type result diagram of the present invention can classify and identify targets.

[0097] Example 2

[0098] Embodiment 2 provides a hyperspectral image segmentation system based on endmember spectral classification results, such as Figure 8 As shown, including:

[0099] Information acquisition module, used to read the data format, data size, spectral range and target category of hyperspectral raw data;

[0100] A spatial position annotation module is used to generate position annotation data containing the two-dimensional spatial position coordinates of the end members based on the data size, and merge it with the original hyperspectral data to form annotated hyperspectral data;

[0101] A slicing processing module is used to slice the annotated hyperspectral data to form an endmember annotated spectral data set containing all endmember annotated spectral data;

[0102] The endmember spectral data recognition and classification module is used to set the endmember category corresponding to the target category, input all endmember annotated spectral data into the spectral database with the same data format and spectral range for recognition and classification, and output the endmember spectral classification results corresponding to the endmember annotated spectral data;

[0103] A data processing module, used for generating a corresponding endmember type result graph for each endmember spectrum classification result;

[0104] The target image segmentation module is used to perform image segmentation on all end-member type result images and output all mask results, and obtain the target and the corresponding target type based on all mask results.

[0105] Example 3

[0106] Embodiment 3 provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned hyperspectral image segmentation method based on endmember spectral classification results when executing the program.

[0107] Example 4

[0108] Embodiment 4 provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the hyperspectral image segmentation method based on the endmember spectral classification result is implemented.

[0109] The memory in the embodiment of the present invention is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.

[0110] The hyperspectral image segmentation method based on the endmember spectral classification results disclosed in the embodiment of the present invention can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the hyperspectral image segmentation method based on the endmember spectral classification results can be completed by the hardware integrated logic circuit or software instructions in the processor. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. The software module can be located in a storage medium, which is located in a memory. The processor reads the information in the memory and completes the steps of the hyperspectral image segmentation method based on the endmember spectral classification results provided in the embodiment of the present invention in combination with its hardware.

[0111] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), FPGA, general purpose processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.

[0112] It can be understood that the memory can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The memory described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0113] The above embodiments are merely examples of the technical solutions of the present invention. The methods involved in the present invention are not limited to the contents described in the above embodiments, but are subject to the scope defined in the claims. Any modification, supplement or equivalent replacement made by a person skilled in the art based on the embodiment is within the scope of protection required by the claims of the present invention.

Claims

1. A hyperspectral image segmentation method based on endmember spectral classification results, characterized in that: include: Read the data format, data size, spectral range and target category of hyperspectral raw data; Based on the data size, position annotation data including the two-dimensional spatial position coordinates of the end members are generated, and merged with the original hyperspectral data to form annotated hyperspectral data; Slicing the annotated hyperspectral data to form an endmember annotated spectral dataset containing all endmember annotated spectral data; Set the endmember category corresponding to the target category, input all endmember annotated spectral data into the spectral database with the same data format and spectral range for identification and classification, and output the endmember spectral classification results corresponding to the endmember annotated spectral data; Generate a corresponding endmember type result graph for each endmember spectrum classification result; Perform image segmentation on all end member type result images and output all mask results, and obtain the target and the corresponding target type based on all mask results.

2. The hyperspectral image segmentation method based on endmember spectrum classification results according to claim 1 is characterized in that: The size of the position annotation data is W*H*2, and the two-dimensional spatial position coordinates of the end member include an X coordinate layer and a Y coordinate layer. The size of the X coordinate layer is W*H*1, including W*H X position coordinates, and the size of the Y coordinate layer is W*H*1, including W*H Y position coordinates, wherein W represents the width size value, H represents the height size value, and N represents the number of bands.

3. The hyperspectral image segmentation method based on endmember spectrum classification results according to claim 2 is characterized in that: The X-coordinate layer, the Y-coordinate layer and the hyperspectral raw data are combined to form annotated hyperspectral data with a size of W*H*(N+2).

4. The hyperspectral image segmentation method based on endmember spectrum classification results according to claim 2 is characterized in that: The endmember annotated spectral data set includes W*H endmember annotated spectral data, the size of the endmember annotated spectral data is 1*(N+2), including endmember original spectral data and its corresponding X position coordinates and Y position coordinates, and the size of the endmember original spectral data is 1*N.

5. The hyperspectral image segmentation method based on endmember spectrum classification results according to claim 1, characterized in that: The output endmember spectrum classification result includes endmember categories and their corresponding endmember type values, and the endmember categories include background endmembers.

6. The hyperspectral image segmentation method based on endmember spectrum classification results according to claim 1 is characterized in that: The method for generating the corresponding endmember type result graph for each endmember spectrum classification result is: splicing the endmember type value and the endmember annotated spectral data to obtain spliced ​​data; After removing the original spectral data of the end members from the spliced ​​data, the data are stacked according to the two-dimensional spatial position coordinates of the end members to obtain stacked data; The position annotation data is removed from the stacked data to obtain the end member type result diagram.

7. The hyperspectral image segmentation method based on endmember spectrum classification results according to claim 1 is characterized in that: The improved region growing algorithm is used to perform image segmentation on all endmember type result images and output all mask results. The specific method is as follows: Step S601: In the endmember type result diagram, count the number of endmember categories; Step S602: outside the mask range, counting the number of endmembers corresponding to each endmember category; Step S603: for each endmember category whose number of endmembers is not equal to 0 in step S602, one initial search endmember is randomly assigned; Step S604: for each initial search endmember, search for adjacent endmembers that are spatially adjacent to the initial search endmember and have the same endmember type value, add the initial search endmember and the adjacent endmember to the known endmember list, and remove duplicate results; Step S605: taking the adjacent end member as a new initial search end member; Step S606: repeating steps S604 to S605 until all neighboring endmembers corresponding to each initial search endmember in step S603 are found, saving the known endmember list as a mask result, and clearing the known endmember list; Step S607: until all the end members in the mask results are counted, all the mask results are output, and the identified targets and target types are output according to all the mask results.

8. A hyperspectral image segmentation system based on endmember spectral classification results, characterized in that: include: Information acquisition module, used to read the data format, data size, spectral range and target category of hyperspectral raw data; A spatial position annotation module is used to generate position annotation data containing the two-dimensional spatial position coordinates of the end members based on the data size, and merge it with the original hyperspectral data to form annotated hyperspectral data; A slicing processing module is used to perform slicing processing on the annotated hyperspectral data to form an endmember annotated spectral data set containing all endmember annotated spectral data; The endmember spectral data recognition and classification module is used to set the endmember category corresponding to the target category, input all endmember annotated spectral data into the spectral database with the same data format and spectral range for recognition and classification, and output the endmember spectral classification results corresponding to the endmember annotated spectral data; A data processing module, used for generating a corresponding endmember type result graph for each endmember spectrum classification result; The target image segmentation module is used to perform image segmentation on all end-member type result images and output all mask results, and obtain the target and the corresponding target type based on all mask results.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the hyperspectral image segmentation method based on endmember spectrum classification results as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the hyperspectral image segmentation method based on endmember spectrum classification results as claimed in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for identifying mildewed peanuts through near-infrared hyperspectral image based on deep learning algorithm

    CN113420614A

  • Intelligent slitting method and device for cigars

    CN113679082A

  • Single cell characteristic analysis method, device and equipment based on hyperspectral coherent Raman scattering imaging and medium

    CN117517287A

  • Target detection method and system based on space-spectrum combination local preserving projection algorithm

    CN110263777A

  • Mildew peanut identification method combining near-infrared hyperspectral image and convolutional neural network

    CN114782783A