Hyperspectral image segmentation method and system based on endmember spectral classification results
By employing endmember spectral classification-based hyperspectral methods and utilizing one-dimensional spectral techniques, the problems of unstable and costly image segmentation in hyperspectral imaging technology are solved, achieving efficient and stable image segmentation results. This approach is applicable to various types and uncertain quantities of hyperspectral image data.
Patent Information
- Application Number
- CN202411926782.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing hyperspectral imaging technology suffers from unstable image segmentation results and high costs in the two-dimensional shape recognition and segmentation of target objects. This is mainly due to the high requirements for image resolution and clarity, as well as the need for manually setting thresholds or complex image annotations.
A hyperspectral image segmentation method based on endmember spectral classification results is adopted. It utilizes one-dimensional spectral information and two-dimensional spatial location information, and performs image segmentation through an improved region growing algorithm. This avoids manual intervention and complex image annotation processes, and makes full use of the information in the hyperspectral data.
It achieves efficient and stable image segmentation results, removes complex textures and noise interference, reduces the economic and time costs of image segmentation, and is suitable for various types and uncertain quantities of hyperspectral image data.
Smart Images

Figure CN119919653B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of hyperspectral data processing technology, specifically relating to a hyperspectral image segmentation method and system based on endmember spectral classification results. Background Technology
[0002] Hyperspectral imaging technology enables non-contact detection of the two-dimensional geometric space and one-dimensional spectral information of target objects. By splitting the light into hundreds of narrow bands, hyperspectral imaging forms a location data cube. Compared to conventional color and grayscale images, hyperspectral images offer advantages such as high spectral resolution, a large number of bands, and unified image and spectrum representation. Currently, the processing and analysis of hyperspectral imaging data mainly focuses on one-dimensional spectral information, used for component identification and type classification of target objects at corresponding two-dimensional spatial locations.
[0003] With the widespread and in-depth application of hyperspectral imaging technology in environmental monitoring, ore sorting, food safety, and other scenarios, the two-dimensional shape of target objects has become one of the key factors in the three major computer vision tasks of classification, detection, and segmentation. Publication number CN113679082A discloses a method and apparatus for intelligent cigar cutting, which obtains the size and shape of cigar leaves by applying an edge detection algorithm to hyperspectral images and calculates their shape parameters. Publication number CN117517287A discloses a method, apparatus, device, and medium for single-cell feature analysis based on hyperspectral coherent Raman scattering imaging, which uses a deep learning segmentation model to segment single-cell regions and extracts the morphological features of cells. Publication number CN113420614A discloses a method for identifying moldy peanuts based on near-infrared hyperspectral images using a deep learning algorithm, employing a label-controlled watershed algorithm to segment peanut images and constructing a deep belief network (DBN) model to identify and statistically analyze the distribution of moldy peanut features. Li Jing et al. used hyperspectral imaging to detect the shape features of kiwifruit. They used a quadtree decomposition algorithm to segment the hyperspectral fusion image of kiwifruit and calculated its shape feature parameters by analyzing the mask shape [Li Jing, Wu Chenpeng, Liu Muhua, et al. Hyperspectral imaging for the detection of kiwifruit shape features [J]. Spectroscopy and Spectral Analysis, 2020, 40(08):2564-2570].
[0004] Based on current research, acquiring the two-dimensional shape features of a target object using hyperspectral imaging technology mainly involves image segmentation through digital image processing or deep learning algorithms, based on single-band images of specific spectral bands or the generation of multi-band fused images. However, image segmentation methods based on digital image processing have high requirements for image resolution and sharpness, and generally require manual setting of thresholds or selection of specific spectral bands, which introduces significant subjectivity and may lead to unstable data quality and segmentation results. On the other hand, image segmentation methods based on deep learning algorithms require extensive and repetitive image annotation work and necessitate strong GPU computing power, resulting in high economic and time costs. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the present invention aims to provide a hyperspectral image segmentation method and system based on endmember spectral classification results. This method fully utilizes the one-dimensional spectral information and two-dimensional spatial location information in hyperspectral data. The entire process requires no manual intervention and completely avoids the uncertainty of results caused by setting thresholds, selecting specific bands, or image annotation.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0007] A hyperspectral image segmentation method based on endmember spectral classification results includes:
[0008] Read the data format, data size, spectral range, and target category of the raw hyperspectral data;
[0009] Based on the data size, location-labeled data containing two-dimensional spatial coordinates of endmembers is generated and merged with the original hyperspectral data to become labeled hyperspectral data.
[0010] The labeled hyperspectral data is sliced to form an endmember labeled spectral dataset containing all endmember labeled spectral data.
[0011] Define the endmember category corresponding to the target category, input all endmember-annotated spectral data into a 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 image for each endmember spectral classification result;
[0013] Perform image segmentation on all endmember type result images and output all mask results. Obtain the target and its corresponding target type based on all mask results.
[0014] Furthermore, the size of the location annotation data is W*H*2, and the two-dimensional spatial location coordinates of the endmember 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. Here, W represents the width value, H represents the height value, and N represents the number of bands.
[0015] Furthermore, the size of the annotated hyperspectral data is W*H*(N+2) when the X-coordinate layer, Y-coordinate layer, and the original hyperspectral data are merged together.
[0016] Furthermore, the endmember-annotated spectral dataset includes W*H endmember-annotated spectral data, the size of which is 1*(N+2), and includes the original endmember spectral data and its corresponding X and Y position coordinates, the size of which is 1*N.
[0017] Furthermore, the output endmember spectral classification results include endmember categories and their corresponding endmember type values, wherein the endmember categories include background endmembers.
[0018] Furthermore, the method for generating corresponding endmember type result maps for each endmember spectral classification result is as follows:
[0019] The spliced data is obtained by concatenating the endmember type value with the endmember labeled spectral data.
[0020] After removing the original spectral data of the endmembers from the spliced data, the data is stacked according to the two-dimensional spatial coordinates of the endmembers to obtain the stacked data.
[0021] Remove the position label data from the stacked data to obtain the end-member type result image.
[0022] Furthermore, an improved region growing algorithm is used to perform image segmentation on all endmember type result images and output all masking results. The specific method is as follows:
[0023] Step S601: In the end-member type result graph, count the number of end-member categories;
[0024] Step S602: Outside the mask area, count the number of endmembers corresponding to each endmember category;
[0025] Step S603: For each end-member category in step S602 where the number of end-members is not equal to 0, randomly assign one initial search end-member;
[0026] Step S604: For each initial search terminus, find neighboring termins that are spatially adjacent to the initial search terminus and have the same terminus type value, add the initial search terminus and neighboring termins to the known terminus list, and remove duplicate results;
[0027] Step S605: Use the neighboring end element as the new initial search end element;
[0028] Step S606: Repeat steps S604-S605 until all neighboring endmembers corresponding to each initial search endmember in step S603 are found, save the known endmember list as the mask result, and clear the known endmember list.
[0029] Step S607: Until all endmembers in the mask results have been counted, output all mask results, and output the identified target and target type based on all mask results.
[0030] A hyperspectral image segmentation system based on endmember spectral classification results includes:
[0031] The information acquisition module is used to read the data format, data size, spectral range, and target category of the raw hyperspectral data;
[0032] The spatial location annotation module is used to generate location annotation data containing two-dimensional spatial location coordinates of endmembers based on the data size, and merge it with the original hyperspectral data to form an annotated hyperspectral data.
[0033] The slicing module is used to slice the labeled hyperspectral data to form an endmember labeled spectral dataset containing all endmember labeled 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 labeled spectral data into a 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 labeled spectral data.
[0035] The data processing module is used to generate corresponding endmember type result images for each endmember spectral classification result;
[0036] The target image segmentation module is used to segment all endmember type result images and output all mask results, and obtain the target and its corresponding target type based on all mask results.
[0037] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described hyperspectral image segmentation method based on endmember spectral classification results.
[0038] A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described 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] This invention, based on deep learning, uses one-dimensional spectral data annotation for supervised classification of endmember spectra, fully leveraging the simplicity and efficiency of one-dimensional spectral data annotation. Building upon this, it uses an automatically generated endmember spectral type result map from a computer algorithm for image segmentation, removing invalid information and interference such as complex textures, blurred edges, and noise from hyperspectral image data. Furthermore, it eliminates the need for manually setting thresholds, selecting specific bands, or performing complex and inefficient two-dimensional image annotation, resulting in clear image segmentation edges and stable performance. Simultaneously, an improved region growing algorithm is proposed to preserve masking results and statistically analyze endmember categories and quantities, effectively applicable to hyperspectral image data of various types, targets, and uncertain quantities. Attached Figure Description
[0041] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and are intended to explain the invention, but do not constitute an undue limitation thereof. In the drawings:
[0042] Figure 1 This is a schematic diagram of a hyperspectral image segmentation method based on endmember spectral classification results according to the present invention;
[0043] Figure 2 This is a schematic diagram of the improved region growing algorithm 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 graph showing the original hyperspectral data results of a specific embodiment of the present invention;
[0046] Figure 5 This is a diagram of the endmember spectrum of a specific embodiment of the present invention;
[0047] Figure 6 This is a diagram showing the end-member type results of a specific embodiment of the present invention;
[0048] Figure 7 This is a diagram of end-member type labels in a specific embodiment of the present invention;
[0049] Figure 8 This is a schematic diagram of a hyperspectral image segmentation system based on endmember spectral classification results according to the present invention. Detailed Implementation
[0050] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0051] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0052] Example 1
[0053] Example 1 provides a hyperspectral image segmentation method based on endmember spectral classification results, such as... Figure 1 As shown, it includes:
[0054] Step S1: Read the data format, data size, spectral range, and target category of the raw hyperspectral data;
[0055] Step S2: Generate location-labeled data containing two-dimensional spatial coordinates of endmembers based on the data size, and merge it with the original hyperspectral data to form labeled hyperspectral data;
[0056] Step S3: Slice the labeled hyperspectral data to form an endmember labeled spectral dataset containing all endmember labeled spectral data;
[0057] Step S4: Set the endmember category corresponding to the target category, input all endmember labeled spectral data into a 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 labeled spectral data;
[0058] Step S5: Generate the corresponding endmember type result image for each endmember spectral classification result;
[0059] Step S6: Perform image segmentation on all endmember type result images and output all mask results. Obtain the target and its corresponding target type based on all mask results.
[0060] The hyperspectral image segmentation method based on endmember spectral classification results provided in this embodiment requires no manual intervention throughout the entire process, completely avoiding the uncertainties caused by setting thresholds, selecting specific bands, or image annotation. Furthermore, because this invention fully utilizes the one-dimensional spectral information and two-dimensional spatial location information in hyperspectral data, it still possesses strong information processing capabilities, especially for hyperspectral images with complex textures, blurred edges, and strong noise, which are difficult to process using conventional image processing techniques.
[0061] In this embodiment, the data format is img, mat, raw, and tiff, etc., and this embodiment does not limit it.
[0062] In this embodiment, the spectral range and target category are determined according to the target to be identified, and this embodiment does not limit them.
[0063] In step S2 of this embodiment, as follows Figure 3 As shown, in the location annotation data generated based on the data size, which includes two-dimensional spatial coordinates (xi, yi) of endmembers, the size of the location annotation data is W*H*2. The two-dimensional spatial coordinates of the endmembers 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-coordinates xi, and the size of the Y-coordinate layer is W*H*1, including W*H Y-coordinates yi. Here, W represents the width in pixels; H represents the height in pixels; N represents the number of bands; and i is a positive integer greater than 0.
[0064] In step S2 of this embodiment, the size of the annotated hyperspectral data is W*H*(N+2) when the location annotation data and the original hyperspectral data are merged together.
[0065] In step S2 of this embodiment, the two-dimensional spatial position of the end-member is saved by annotation.
[0066] In step S3 of this embodiment, the labeled hyperspectral data is sliced to form an endmember labeled spectral dataset containing all endmember labeled spectral data. The endmember labeled spectral dataset includes W*H endmember labeled spectral data, each with a size of 1*(N+2), and includes the original endmember spectral data and its corresponding X-coordinate xi and Y-coordinate yi. The original endmember spectral data has a size of 1*N.
[0067] Slicing (equivalent to "dimensionality reduction") transforms 3D labeled hyperspectral data into 1D endmember labeled spectral data. Furthermore, using 1D data for identification and classification significantly improves labeling efficiency and reduces data volume, thus enhancing classification accuracy.
[0068] In step S4 of this embodiment, the spectral database includes the USGS spectral database, UV-Vis database, SDBS database, Hitran database, JPL spectral library, and Shanghai Institute of Organic Chemistry database, etc. This embodiment does not limit the specific database used.
[0069] In step S4 of this embodiment, the endmember category corresponding to the target category is set, and the output endmember spectral 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 as t0 and its corresponding endmember type value c0.
[0070] In step S5 of this embodiment, the method for generating a corresponding endmember type result map for each endmember spectral classification result is as follows:
[0071] Step S501: Concatenate the endmember type value with the endmember labeled spectral data to obtain the concatenated data;
[0072] Step S502: After removing the original spectral data of the endmembers from the spliced data, stack the spliced data according to the two-dimensional spatial coordinates (xi, yi) of the endmembers to obtain the stacked data;
[0073] Step S503: Remove the position label data from the stacked data to obtain the end-member type result image.
[0074] Since step S2 saves the two-dimensional spatial position of the endmembers through annotation, it is convenient to realize "stack according to the two-dimensional spatial position coordinates (xi, yi) of the endmembers" in step S5, maintain the original spatial order of the endmembers, and thus make the endmember type result image more accurate, thereby making the image segmentation more accurate.
[0075] In step S6 of this embodiment, as follows Figure 2 As shown, an improved region growing algorithm is used to segment all endmember type result images and output all masking results. The specific method is as follows:
[0076] Step S601: In the end-member type result graph, count the number n of end-member categories;
[0077] Step S602: Outside the mask area, 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 assign one initial search term for each terminology category whose terminology count is not equal to 0;
[0079] Step S604: For each initial search terminus, find the neighboring terminus that is spatially adjacent to the initial search terminus and has the same terminus type value cj. Add the initial search terminus and the neighboring terminus to the known terminus list and remove duplicate results.
[0080] Step S605: Use the neighboring end element as the new initial search end element;
[0081] Step S606: Repeat steps S604-S605 until all neighboring endmembers corresponding to each initial search endmember in step S603 are found, save the known endmember list as the mask result, and clear the known endmember list.
[0082] Step S607: Continue counting the endmembers in the mask results, output all mask results, and output the identified target and target type based on all mask results.
[0083] The masking result is a set of spatial coordinates of all endmembers within the target's spatial range.
[0084] In this embodiment, the targets in the hyperspectral raw data image have multiple types, and each type includes multiple target objects. The improvement over existing region growing algorithms is as follows: initial endmembers are selected using the method in step S603 (i.e., specifying seed points). Neighboring endmembers are found using the method in step S604 (i.e., growth criteria), ensuring that each target object contains only one endmember type with clear edges. By repeating steps S604-S605, a "known endmember list" and its "add" and "clear" methods are introduced to output a mask result containing endmember categories and quantities, and the mask result is updated in real time to avoid redundant searches.
[0085] The following detailed description of a hyperspectral image segmentation method based on endmember spectral classification results provided by the present invention is illustrated through a specific embodiment. The embodiment uses a Zhongda Rui and VIX-N220 line-scan hyperspectral camera with a 12mm fixed-focus FA lens to perform hyperspectral imaging of three types of rock particles: quartz, dolomite, and limestone. The background is a black alumina alloy. Figure 4 The image shown is a result of the original hyperspectral data in a specific embodiment of the present invention. Original hyperspectral data in the range of 400-1000 nm were acquired, and the data has been cropped and calibrated for reflectance.
[0086] Basic information for reading raw hyperspectral data: The data format is img data conforming to the ENVI standard, the data size is 752*455*601, and the spectral range is 400-1000nm.
[0087] Generate location-labeled data containing two-dimensional spatial coordinates (xi,yi) of endmembers, and merge it with the original hyperspectral data to form labeled hyperspectral data.
[0088] The size of the location annotation data is 752*455*2, including an X coordinate layer and a Y coordinate layer. The size of the X coordinate layer is 752*455*1, including W*H X position coordinates xi. 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 labeled hyperspectral data is sliced to form an endmember labeled spectral dataset. The endmember labeled spectral dataset includes 752*455 endmember labeled spectral data, and the size of the endmember labeled spectral data is 1*603. It includes the original endmember spectral data and its corresponding X position coordinate xi and Y position coordinate yi, and the size of the original endmember 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 The figure shown is a spectrum curve of the end-member in a specific embodiment of the present invention. It can be seen that the reflectance-wavelength curves of different types of end-members are different.
[0091] The size of the endpoint type result diagram is 752*455*1, including 752*455 endpoint type values cj, such as... Figure 6 The diagram shown is a result of the end-member type in a specific embodiment of the present invention.
[0092] Table 1 shows the statistical results of the terminal category and terminal quantity of a specific embodiment of the present invention, illustrating that the method of the present invention can accurately count the terminal category and the corresponding terminal quantity.
[0093] Table 1. Statistical results of terminal type and terminal quantity in specific embodiments of the present invention.
[0094]
[0095] An improved region growing algorithm is used to segment the endmember type result map, where 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 area, the number of endmembers corresponding to each endmember category tj is counted (mk, k=0,1,2,3). For each endmember category tj with a corresponding endmember count mk≠0, one initial search endmember is randomly assigned. For each initial search endmember, neighboring endmembers with the same endmember type value ci and spatially adjacent to the initial search endmember are found. The initial search endmember and neighboring endmembers are added to the known endmember list, and duplicate results are removed. This process is repeated until all neighboring endmembers corresponding to each initial search endmember are found. The known endmember list is saved as the mask result, and the known endmember list is cleared. The mask result is then output when the number of endmembers in the mask result is 752*455. The mask result is a set of spatial coordinates of all endmembers within the target's spatial range.
[0096] To verify the effectiveness of the method provided by this invention, this embodiment converts the end-member type values in the end-member type result image into color codes using a color space, and generates an end-member type label image based on the end-member type result image. The color space is RGB, the color code is hexadecimal RGB color code, and the bit depth of the end-member type label image is 8 bits. The hexadecimal RGB color code obtained by converting the end-member type value c0 of the background end-member is #000000. The hexadecimal RGB color codes for quartz, dolomite, and limestone are #FF0000, #00FF00, and #0000FF, respectively. Figure 7 The diagram shown is an end-member type label diagram of a specific embodiment of the present invention, illustrating that the end-member type result diagram of the present invention can classify and identify targets.
[0097] Example 2
[0098] Example 2 provides a hyperspectral image segmentation system based on endmember spectral classification results, such as... Figure 8 As shown, it includes:
[0099] The information acquisition module is used to read the data format, data size, spectral range, and target category of the raw hyperspectral data;
[0100] The spatial location annotation module is used to generate location annotation data containing two-dimensional spatial location coordinates of endmembers based on the data size, and merge it with the original hyperspectral data to form an annotated hyperspectral data.
[0101] The slicing module is used to slice the labeled hyperspectral data to form an endmember labeled spectral dataset containing all endmember labeled 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 labeled spectral data into a 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 labeled spectral data.
[0103] The data processing module is used to generate corresponding endmember type result images for each endmember spectral classification result;
[0104] The target image segmentation module is used to segment all endmember type result images and output all mask results, and obtain the target and its corresponding target type based on all mask results.
[0105] Example 3
[0106] Example 3 provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the hyperspectral image segmentation method based on endmember spectral classification results described above.
[0107] Example 4
[0108] Example 4 provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described hyperspectral image segmentation method based on endmember spectral classification results.
[0109] The memory in this embodiment of the 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 endmember spectral classification results disclosed in this invention can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the hyperspectral image segmentation method based on endmember spectral classification results can be completed by integrated logic circuits in the processor's hardware or by software instructions. The processor can be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps, and logic block diagrams disclosed in this invention's embodiments. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention's embodiments can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules can be located in a storage medium, specifically a memory. The processor reads information from the memory and, in conjunction with its hardware, completes the steps of the hyperspectral image segmentation method based on endmember spectral classification results provided in this invention's embodiments.
[0111] In an exemplary embodiment, the electronic device may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), FPGAs, general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned methods.
[0112] It is understood that memory can be volatile or non-volatile, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be 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), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM). The memories described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0113] The above embodiments are merely illustrative examples of the technical solutions of the present invention. The methods involved in the present invention are not limited to those described in the above embodiments, but are defined by the scope of the claims. Any modifications, additions, or equivalent substitutions made by those skilled in the art based on these embodiments are within the scope of protection claimed 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 the raw hyperspectral data; Based on the data size, location-labeled data containing two-dimensional spatial coordinates of endmembers is generated and merged with the original hyperspectral data to become labeled hyperspectral data. The labeled hyperspectral data is sliced to form an endmember labeled spectral dataset containing all endmember labeled spectral data. Define the endmember category corresponding to the target category, input all endmember-annotated spectral data into a 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 image for each endmember spectral classification result; Perform image segmentation on all endmember type result images and output all mask results. Obtain the target and its corresponding target type based on all mask results. An improved region growing algorithm is used to segment all endmember type result images and output all masking results. The specific method is as follows: Step S601: In the end-member type result graph, count the number of end-member categories; Step S602: Outside the mask area, count the number of endmembers corresponding to each endmember category; Step S603: For each end-member category in step S602 where the number of end-members is not equal to 0, randomly assign one initial search end-member; Step S604: For each initial search terminus, find neighboring termins that are spatially adjacent to the initial search terminus and have the same terminus type value, add the initial search terminus and neighboring termins to the known terminus list, and remove duplicate results; Step S605: Use the neighboring end element as the new initial search end element; Step S606: Repeat steps S604-S605 until all neighboring endmembers corresponding to each initial search endmember in step S603 are found, save the known endmember list as the mask result, and clear the known endmember list. Step S607: Until all endmembers in the mask results have been counted, output all mask results, and output the identified target and target type based on all mask results.
2. The hyperspectral image segmentation method based on endmember spectral classification results according to claim 1, characterized in that: The size of the location annotation data is The two-dimensional spatial coordinates of the endmember include an X-coordinate layer and a Y-coordinate layer, wherein the size of the X-coordinate layer is... ,include There are X position coordinates, and the size of the Y coordinate layer is... ,include The Y-coordinates represent the width, H the height, and N the band number.
3. The hyperspectral image segmentation method based on endmember spectral classification results according to claim 2, characterized in that: The X-coordinate layer, Y-coordinate layer, and the original hyperspectral data are merged into the labeled hyperspectral data, which has a size of [missing value]. .
4. The hyperspectral image segmentation method based on endmember spectral classification results according to claim 2, characterized in that: The endmember-annotated spectral dataset includes Each endmember-labeled spectral data, the size of which is... This includes the raw endmember spectral data and its corresponding X and Y position coordinates, wherein the size of the raw endmember spectral data is [size missing]. .
5. The hyperspectral image segmentation method based on endmember spectral classification results according to claim 1, characterized in that: The output endmember spectral classification results include endmember categories and their corresponding endmember type values, where the endmember categories include background endmembers.
6. The hyperspectral image segmentation method based on endmember spectral classification results according to claim 1, characterized in that, The method for generating corresponding endmember type result images for each endmember spectral classification result is as follows: The spliced data is obtained by concatenating the endmember type value with the endmember labeled spectral data. After removing the original spectral data of the endmembers from the spliced data, the data is stacked according to the two-dimensional spatial coordinates of the endmembers to obtain the stacked data. Remove the position label data from the stacked data to obtain the end-member type result image.
7. A hyperspectral image segmentation system based on endmember spectral classification results, characterized in that, include: The information acquisition module is used to read the data format, data size, spectral range, and target category of the raw hyperspectral data; The spatial location annotation module is used to generate location annotation data containing two-dimensional spatial location coordinates of endmembers based on the data size, and merge it with the original hyperspectral data to form an annotated hyperspectral data. The slicing module is used to slice the labeled hyperspectral data to form an endmember labeled spectral dataset containing all endmember labeled 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 labeled spectral data into a 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 labeled spectral data. The data processing module is used to generate corresponding endmember type result images for each endmember spectral classification result; The target image segmentation module is used to segment all endmember type result images and output all mask results, and obtain the target and its corresponding target type based on all mask results; The target image segmentation module is specifically used to execute steps S601 to S607: Step S601: In the end-member type result graph, count the number of end-member categories; Step S602: Outside the mask area, count the number of endmembers corresponding to each endmember category; Step S603: For each end-member category in step S602 where the number of end-members is not equal to 0, randomly assign one initial search end-member; Step S604: For each initial search terminus, find neighboring termins that are spatially adjacent to the initial search terminus and have the same terminus type value, add the initial search terminus and neighboring termins to the known terminus list, and remove duplicate results; Step S605: Use the neighboring end element as the new initial search end element; Step S606: Repeat steps S604-S605 until all neighboring endmembers corresponding to each initial search endmember in step S603 are found, save the known endmember list as the mask result, and clear the known endmember list. Step S607: Until all endmembers in the mask results have been counted, output all mask results, and output the identified target and target type based on all mask results.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the hyperspectral image segmentation method based on endmember spectral classification results as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the hyperspectral image segmentation method based on endmember spectral classification results as described in any one of claims 1 to 6.
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
Lightweight mask guided space-spectrum self-attention hyperspectral image reconstruction method
CN118887311A