Insect Compound Eye Detection Method, System, Device and Storage Medium

Through dynamic area adaptive thresholding and GPU/CPU parallel computing technology, large-scale CT images are processed, solving the problems of low efficiency and poor robustness of insect compound eyes detection in the prior art, and achieving efficient and accurate insect compound eyes structure detection.

CN119850614BActive Publication Date: 2025-06-27HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510328952.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-06-27
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

Existing ODA algorithms are inefficient and poorly robust when processing large-scale CT image data, especially in the face of data noise or complex structural changes, and their performance is significantly reduced.

Method used

The dynamic region adaptive thresholding strategy and GPU multi-threaded parallel computing method are used to threshold the intensity of voxels in the CT image stack, and three-dimensional point cloud data are constructed, and coordinate conversion and CPU multi-core parallel computing are performed for geometric structure analysis.

Benefits of technology

It realizes efficient detection of large-scale insect compound eye CT images, improves detection accuracy and robustness, and maintains high detection accuracy under complex backgrounds and noise interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850614B_ABST
    Figure CN119850614B_ABST
Patent Text Reader

Abstract

The present invention discloses an insect compound eye detection method, system, device and storage medium, which relates to the fields of computer vision and biological image processing, and includes: preprocessing the CT images of insect compound eyes; using a dynamic region adaptive thresholding strategy and a GPU multi-thread parallel computing method to perform intensity thresholding processing on the voxels in the CT image stack to obtain the filtered voxel data; decomposing the CT image stack into multiple sub-regions, and adopting a GPU multi-thread parallel computing architecture to perform block processing on the filtered voxel data to construct three-dimensional point cloud data; using a GPU parallel computing method to perform coordinate transformation to generate cross-sectional data of different depths; using a CPU multi-core parallel computing method to perform compound eye geometric structure analysis on the cross-sectional data to obtain the detection result of the insect compound eye structure; the insect compound eye detection method, system, device and storage medium achieve efficient detection of large-scale insect compound eye CT images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer vision and biological image processing, and particularly to an insect compound eye detection method, system, device, and storage medium. Background Art

[0002] The compound eyes of insects are the main visual organs of many insect species. They are composed of hundreds or thousands of ommatidia, and each ommatidium has an independent light-sensing function. The structure of the insect compound eye is complex, and the arrangement pattern between each ommatidium is crucial for the insect's visual system. Therefore, studying the structure of the insect compound eye can help us deeply understand the insect visual mechanism and provide important references for biological research and the design of bionic visual systems.

[0003] Traditionally, researchers analyzed CT images of insect compound eyes through manual or semi-automated methods. This method is not only time-consuming but also vulnerable to human errors. With the progress of computer technology, automated detection algorithms have gradually become the mainstream. The most well-known automated ommatidium detection algorithm is ODA (Ommatidia Detection Algorithm). However, the existing ODA algorithm has problems of low efficiency and poor robustness when processing large-scale CT image data. Especially when facing data noise or complex structural changes, its performance significantly degrades. Summary of the Invention

[0004] Based on the technical problems existing in the background art, the present invention proposes an insect compound eye detection method, system, device, and storage medium, which realizes the efficient detection of large-scale insect compound eye CT images.

[0005] The insect compound eye detection method, system, device, and storage medium proposed by the present invention include:

[0006] Preprocess the insect compound eye CT image;

[0007] Using a dynamic region adaptive thresholding strategy and a GPU multi-thread parallel computing method, perform intensity thresholding on the voxels in the CT image stack to obtain the filtered voxel data;

[0008] Decompose the CT image stack into multiple sub-regions, and use a GPU multi-thread parallel computing architecture to perform block processing on the filtered voxel data. Each GPU thread block processes the voxel data in one sub-region to construct three-dimensional point cloud data;

[0009] Use a GPU parallel computing method for coordinate transformation to convert the voxels of the three-dimensional point cloud data from the Cartesian coordinate system to the spherical coordinate system, and use a multi-core CPU parallel computing method to perform two-dimensional projection on the voxel data in the spherical coordinate system to generate cross-sectional data of different depths;

[0010] The compound eye geometric structure analysis is performed on the cross-sectional slice data by using the CPU multi-core parallel computing method to obtain the detection result of the insect compound eye structure.

[0011] Further, before voxel intensity thresholding, the CT image is adaptively binarized by using the GPU parallel computing method, which specifically includes:

[0012] Calculate the global statistical characteristics of the CT image stack and preliminarily determine the binarization threshold range;

[0013] Use the CUDA parallel kernel function to calculate the local contrast of each pixel point of the CT image and dynamically adjust the threshold based on the local window:

[0014] Use the GPU parallel thread block to perform binarization on all pixel points in parallel, generate binarized data, and convert the binarized data into 0 or 1 by using the set threshold to distinguish the target area and the background area.

[0015] Further, in the dynamic threshold adjustment based on the local window, the threshold The formula is as follows:

[0016] ;

[0017] Wherein, is the coordinate of the voxel in the local window, and are the mean value and the standard deviation within the local window respectively, is the adaptive adjustment factor.

[0018] Further, when using the GPU multi-thread parallel computing architecture to perform block processing on the filtered voxel data, each GPU thread block processes the voxel data in a sub-region, and in constructing the three-dimensional point cloud data, specifically:

[0019] Adopt a hash index structure to store each filtered voxel into the 3D point cloud structure, remove the outliers through neighborhood statistical filtering, and obtain the spatial coordinates and intensity values of each voxel;

[0020] Store the spatial coordinates and intensity values of each voxel as three-dimensional point cloud data in the GPU global memory, and each GPU thread processes the three-dimensional point cloud data in parallel.

[0021] Further, when using the GPU parallel computing method for coordinate transformation to convert the voxel of the three-dimensional point cloud data from the Cartesian coordinate system to the spherical coordinate system, specifically includes:

[0022] Perform parallel acceleration processing on each sub-region of the original CT image stack through the GPU multi-thread and extract the spatial coordinates and intensity values of each voxel;

[0023] Using GPU multi-threaded parallel computing, convert the voxels in the sub-region from Cartesian coordinates to spherical coordinates.

[0024] Furthermore, in the method of using CPU multi-core parallel computing to analyze the compound eye geometric structure of cross-sectional data and obtain the detection results of the insect compound eye structure, specifically:

[0025] When the voxel data forms a spherical space after being represented in spherical coordinates, divide the entire spherical space into multiple spherical windows, and each spherical window corresponds to a local region on the spherical space;

[0026] Use a 2D morphological detection algorithm based on morphological detection and geometric feature analysis to identify the ommatidium centers in the cross-sectional data of each spherical window;

[0027] By calculating the Euclidean distance between the centers of each ommatidium, classify the ommatidium clusters;

[0028] Calculate the geometric features of each ommatidium cluster in the ommatidium cluster and the angular relationship between adjacent ommatidia to obtain the spatial arrangement and geometric morphology of the compound eye.

[0029] An insect compound eye detection system, including an image acquisition module, a voxel enhancement threshold module, a three-dimensional point cloud construction module, a cross-sectional data construction module, and a geometric structure analysis module;

[0030] The image acquisition module is used for preprocessing the insect compound eye CT image;

[0031] The voxel enhancement threshold module is used to perform intensity thresholding on the voxels in the CT image stack by using a dynamic region adaptive thresholding strategy and GPU multi-threaded parallel computing method to obtain the filtered voxel data;

[0032] The three-dimensional point cloud construction module is used to decompose the CT image stack into multiple sub-regions, and use a GPU multi-threaded parallel computing architecture to perform block processing on the filtered voxel data. Each GPU thread block processes the voxel data in a sub-region to construct three-dimensional point cloud data;

[0033] The cross-sectional data construction module is used to perform coordinate conversion by using GPU parallel computing method, convert the voxels of the three-dimensional point cloud data from Cartesian coordinates to spherical coordinates, and perform two-dimensional projection on the voxel data in spherical coordinates by using a multi-core CPU parallel computing method to generate cross-sectional data of different depths;

[0034] The geometric structure analysis module is used to analyze the compound eye geometric structure of the cross-sectional data by using a CPU multi-core parallel computing method to obtain the detection results of the insect compound eye structure.

[0035] Further, the three-dimensional point cloud construction module specifically includes a filtering module and a storage module;

[0036] The filtering module is used to store each filtered voxel into the 3D point cloud structure by using a hash index structure, and remove abnormal points through neighborhood statistical filtering to obtain the spatial coordinates and intensity values of each voxel;

[0037] The storage module is used to store the spatial coordinates and intensity values of each voxel as three-dimensional point cloud data in the GPU global memory, and each GPU thread processes the three-dimensional point cloud data in parallel.

[0038] A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the insect compound eye detection method described above is implemented.

[0039] A computer-readable storage medium stores a number of classification programs, and the number of classification programs are used to be called by a processor and execute the insect compound eye detection method described above.

[0040] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disk, or optical disk that can store program codes.

[0041] The advantages of the insect compound eye detection method, system, device, and storage medium provided by the present invention are as follows: In the structure of the present invention, the insect compound eye detection method, system, device, and storage medium, by first combining computer vision technology and parallel computing technology and applying them to insect compound eye detection, through means such as image preprocessing, feature extraction, and clustering analysis, fuse GPU parallel computing and multi-core CPU parallel computing to solve the computational bottleneck and accuracy problems encountered in the prior art when processing insect compound eye images. In addition, this embodiment proposes an efficient multi-stage image processing framework based on parallel computing, which can automatically detect and analyze the ommatidium structure in the insect compound eye. Especially under the interference of complex backgrounds and noises, it can still maintain a high detection accuracy; thus realizing the efficient detection of large-scale insect compound eye CT images. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a structural schematic diagram of the present invention;

[0043] Figure 2Schematic diagram of the effect of the insect ommatidia detection algorithm. (a) Schematic diagram of the projection result of the three-dimensional point cloud data of the insect compound eye in the spherical coordinate system. (b) Schematic diagram of the precise distribution of the ommatidia center points extracted after the ommatidia detection is completed. Detailed implementation mode

[0044] Next, through specific embodiments, the technical solutions of the present invention will be described in detail. Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific implementations disclosed below.

[0045] As Figures 1 to 2 shown, for the insect compound eye detection method proposed by the present invention, after preprocessing the insect compound eye CT image, an insect compound eye detection algorithm that combines GPU parallel computing and multi-core CPU parallel computing is used for processing to efficiently and accurately extract the insect compound eye structure. The detection method specifically includes steps one to five:

[0046] Step 1: Collect insect compound eye CT images and preprocess them to construct an experimental data set.

[0047] Specifically, in this embodiment, the insect compound eye is first scanned by a high-resolution CT device to obtain the original CT image data of the insect compound eye. These CT images come from multiple samples of different insect species, and the image data covers a variety of resolutions and scales, reflecting the real situations of different structural complexities and noise interferences. Subsequently, the collected CT image data is preprocessed, such as cropping and other normalization processes, to construct a complete experimental data set for the detection and analysis experiments of the insect compound eye structure. Among them, the experimental data set includes the original CT image data and the corresponding image parameter information, such as voxel size, scanning angle, and resolution, etc., providing a data basis for the subsequent insect compound eye detection algorithm.

[0048] Step 2: Use the dynamic region adaptive thresholding strategy and the GPU multi-thread parallel computing method to perform intensity thresholding on the voxels in the CT image stack to obtain the filtered voxel data.

[0049] First, the GPU multi-thread parallel computing is used to process the voxel data block by block to achieve adaptive thresholding, and the isolated noise points are removed through morphological optimization. Subsequently, the multi-core CPU parallel optimization further analyzes the global voxel distribution and adjusts the local threshold to improve the detection accuracy and connectivity. Finally, the filtered effective voxel data is stored in the GPU shared memory to provide an efficient input for the subsequent three-dimensional point cloud construction.

[0050] Step 3: Decompose the CT image stack into multiple sub-regions, and use a GPU multi-thread parallel computing architecture (GPUthread-based parallel execution model) to perform block processing on the filtered voxel data. Each GPU thread block processes the voxel data in one sub-region to construct 3D point cloud data;

[0051] Use a GPU multi-thread parallel computing architecture to accelerate data processing, and at the same time combine CPU multi-core parallel computing to further optimize data organization and analysis.

[0052] First, the GPU multi-stream parallel architecture divides the computing tasks into multiple independent data streams through Streams in the CUDA kernel function to achieve simultaneous processing of multiple sub-regions. Subsequently, in each data stream, GPU multi-thread parallel computing is performed to further accelerate the processing of voxel data. Each GPU thread block is responsible for constructing the 3D point cloud of one sub-region, and uses local neighborhood statistics to remove abnormal points to improve the stability and accuracy of the 3D point cloud data.

[0053] When using local neighborhood statistics to remove abnormal points in this embodiment, combined with the GPU multi-stream parallel architecture for accelerated computing, the advantages are as follows: cleaning the 3D point cloud data, removing isolated noise points or misdetected voxels generated during the CT scanning process. Improving the stability of the point cloud, ensuring the accurate position of the center point of the small eye finally extracted, and avoiding the influence of isolated points on structural analysis. Combining with the GPU multi-stream parallel architecture, performing local neighborhood calculations in parallel in CUDA computing, enhancing computing efficiency and reducing computing overhead.

[0054] After the GPU calculation is completed, the CPU multi-core parallel calculation is responsible for globally optimizing the 3D point cloud data, including point cloud sparsity analysis, morphological filtering, and abnormal point removal, to ensure data quality and at the same time reduce the GPU computing pressure. Finally, the optimized high-quality 3D point cloud data is used as the input for subsequent spatial coordinate transformation, providing more accurate geometric information for subsequent insect compound eye detection.

[0055] Step 4: Use the GPU parallel computing method for coordinate transformation to convert the voxels of the 3D point cloud data from the Cartesian coordinate system to the spherical coordinate system, and use the multi-core CPU parallel computing method to perform 2D projection on the voxel data in the spherical coordinate system to generate cross-sectional data at different depths;

[0056] First, the GPU multi-thread parallel computing is responsible for converting the 3D point cloud data from the Cartesian coordinate system to the spherical coordinate system, ensuring the efficient execution of the coordinate transformation process and adapting to the spherical structure characteristics of the insect compound eye. Subsequently, the CPU multi-core parallel computing further optimizes the transformed data, and performs data reconstruction through batch data mapping and adaptive sampling strategies to improve data uniformity and computing stability.

[0057] The batch data mapping described in this embodiment performs efficient mapping and storage optimization between different data structures, and combines GPU and CPU for acceleration processing. Specifically, it includes:

[0058] Coordinate system conversion batch mapping: The mapping process from the Cartesian coordinate system to the spherical coordinate system. The GPU executes this conversion in parallel, but the CPU needs to further optimize the data to make its structure more regular.

[0059] Point cloud data optimization: The converted spherical coordinate data may have uneven distribution. Therefore, the CPU processes these data in batches to make the data structure more conducive to subsequent calculations (such as sorting and index building).

[0060] Data storage format adjustment: Due to the different processing methods of the GPU and CPU, after the GPU calculation is completed, the data may need to be batch-converted in format for more efficient reading, indexing, or storage on the CPU.

[0061] This embodiment combines the adaptive sampling strategy with the GPU and CPU to achieve an efficient combination of GPU parallel coordinate conversion + CPU adaptive sampling optimization. Thus, it accelerates the optimization of the insect compound eye point cloud. Among them, the adaptive sampling strategy can adopt uniform resampling, K-nearest neighbor sampling, error-based adaptive sampling, octree / quadtree adaptive sampling, etc.

[0062] After the coordinate conversion is completed, cross-sectional data is generated by combining CPU parallel computing to ensure that the distribution of each slice is uniform, the resolution adapts to subsequent detection tasks, and dynamic adjustment is performed for large-scale data to optimize the number of slices and hierarchical information, ensuring that the spatial structure of the insect compound eye can be accurately captured.

[0063] Among them, for the dynamic adjustment of large-scale data, the core of the dynamic adjustment lies in:

[0064] Adaptive Layer Partitioning: According to the density distribution of the compound eye structure, dynamically adjust the interval of the slices. If the ommatidia density in a certain area is high, increase the number of slice layers in this area to improve the resolution; for areas with low ommatidia density, reduce the slices to optimize the allocation of computing resources.

[0065] Geometry-Aware Slicing: Calculate the curvature distribution of the insect compound eye, increase the number of slice layers in areas with high curvature (where the morphology changes drastically), and reduce the slices in areas with low curvature (where the morphology is flat) to ensure that the geometric features of the detection area can be completely captured.

[0066] Ommatidial Distribution-Based Slicing: After performing ommatidia center detection, the slice distribution is adaptively adjusted according to the spatial distribution pattern of ommatidia. For example, if the ommatidia are evenly arranged, fixed intervals are used for slicing; if the ommatidia are dense in certain areas (such as the visual field center of the compound eyes of some insects), the slice interval is reduced to improve local detection accuracy; if the ommatidia are sparse in certain areas, the slice interval is increased to reduce computational redundancy.

[0067] Resolution Adaptation: Combining the requirements of the target detection task, the spatial resolution of the slices is adjusted. If the detection task has high requirements for the compound eye structure, the slice resolution is increased (the pixel density is increased). If the detection task focuses on the overall trend, the resolution is reduced to improve computational efficiency.

[0068] Hierarchical Merging: After the initial slicing is completed, the similarity of the slices is analyzed using parallel computing on a multi-core CPU, and slices with high information redundancy are merged to reduce storage and computational overhead while retaining necessary geometric information.

[0069] The key to dynamically adjusting the cross-sectional slice data in this embodiment lies in: adjusting the number of slice layers based on ommatidia density to improve the detection accuracy in high-density areas. Optimizing the slice interval based on geometric curvature to adapt to the three-dimensional structural changes of the compound eye. Performing adaptive optimization based on the resolution requirements to ensure reasonable allocation of computing resources. Using CPU parallel computing to perform hierarchical merging to reduce redundant data and improve storage and computational efficiency.

[0070] Dynamically adjusting the cross-sectional slice data can ensure that the spatial structure of the insect compound eye can be accurately captured and improve the accuracy of subsequent ommatidia detection and geometric analysis.

[0071] Step Five: Use the CPU multi-core parallel computing method to perform compound eye geometric structure analysis on the cross-sectional slice data to obtain the detection results of the insect compound eye structure;

[0072] Reconstruct the insect compound eye structure using the cross-sectional slice data, extract features through GPU parallel computing, and use CPU multi-core parallel computing to complete the final structure analysis and ommatidia detection.

[0073] First, GPU parallel computing is responsible for performing morphological filtering and preliminary edge detection on the cross-sectional slice data to enhance the features of the ommatidia area and remove background noise. Then, CPU multi-core parallel computing performs morphological analysis and geometric clustering to accurately detect the ommatidia centers and determine the ommatidia cluster structure based on neighborhood search.

[0074] On this basis, through CPU parallel computing, the geometric features of ommatidia are further calculated, including lens diameter, lens area, and axial vector information, and the Euclidean distance and spherical angle between ommatidia are calculated using an optimized KD-Tree neighborhood search algorithm, and finally a complete three-dimensional space model of the insect compound eye is constructed.

[0075] Multi-core CPU parallel computing is used to calculate the geometric relationship of ommatidia units in the insect compound eye, combined with GPU computing for optimized spatial arrangement analysis. First, GPU parallel computing is used to preliminarily screen and search the neighborhood of the ommatidia center points, and the topological structure of the ommatidia clusters is determined through accelerated nearest neighbor calculation. Subsequently, multi-core CPU parallel computing is performed to calculate the geometric features of ommatidia, including lens diameter, area, and axial vector, and the Euclidean distance between the centers of each ommatidium is calculated using an optimized KD-Tree structure.

[0076] On this basis, using CPU parallel computing, the spherical angle between the centers of ommatidia is further calculated, the spatial arrangement relationship of ommatidia units in the insect compound eye is obtained, and combined with global geometric analysis to identify special structural features, and finally the precise detection and analysis of the overall structure of the insect compound eye are completed.

[0077] According to Steps 1 to 5, existing research has explored the application of parallel computing in image processing, but it has not been able to effectively apply it to the automated processing of large-scale insect compound eye CT images. Therefore, in this embodiment, by first combining computer vision technology and parallel computing technology and applying them to insect compound eye detection, through means such as image preprocessing, feature extraction, and clustering analysis, the GPU parallel computing and multi-core CPU parallel computing are integrated to solve the computational bottleneck and accuracy problems encountered in the prior art when processing insect compound eye images. In addition, this embodiment proposes an efficient multi-stage image processing framework based on parallel computing, which can automatically detect and analyze the ommatidia structure in the insect compound eye. Especially under the interference of complex backgrounds and noises, it can still maintain a high detection accuracy; significantly improves the processing speed and robustness of traditional insect compound eye detection methods, and can efficiently process large-scale insect compound eye CT image data.

[0078] (A) In one of the embodiments, between Step 1 and Step 2, a CT image binarization process based on GPU acceleration is set, specifically: calculating the global statistical characteristics of the CT image stack to preliminarily determine the binarization threshold range; using CUDA parallel kernel functions to calculate the local contrast of each pixel point in the CT image, and dynamically adjusting the threshold based on a local window: using GPU parallel thread blocks to perform binarization on all pixel points in parallel to generate binarized data, and converting the binarized data into 0 or 1 using the set threshold to distinguish the target area and the background area.

[0079] To improve the accuracy of compound eye detection, this embodiment adopts a binarization strategy with different threshold values and dynamically adjusts the threshold according to different image characteristics. The adaptive threshold (Dynamic Region-based Adaptive Thresholding) based on dynamic region statistical analysis used in this embodiment calculates the statistical information of different regions (such as local mean and standard deviation ) and dynamically adjusts the threshold The formula is as follows:

[0080] ;

[0081] Where is the coordinate of the voxel in the local window, and are the mean and standard deviation within the local window respectively, calculated based on the statistical characteristics of local voxels, is the adaptive adjustment factor.

[0082] The binarization process of each CT image is processed in parallel on the GPU, and the processing speed is significantly improved through the parallel computing ability of the GPU. The goal of binarization processing is to extract the effective information in the CT image, remove background noise, and highlight the ommatidium area of the compound eye to ensure that subsequent steps are not interfered by irrelevant regions. Then, operations such as voxel intensity thresholding of the CT image stack, three-dimensional point cloud data construction, and cross-sectional data construction are performed using the binarized CT image.

[0083] (B) In one embodiment, in step two, a dynamic region adaptive thresholding strategy and a GPU multi-thread parallel computing method are used to perform intensity thresholding processing on the voxels in the CT image stack to obtain the filtered voxel data. Specifically:

[0084] This embodiment proposes a super-high-speed parallel voxel intensity thresholding method, which combines the dynamic adaptive threshold method and GPU parallel computing acceleration, greatly improving the processing efficiency of complex high-resolution 3D image data. Compared with traditional methods, the method in this embodiment can achieve millisecond-level computing performance on millions of voxel data, while ensuring the accurate screening of small regions of interest (ROI).

[0085] In this embodiment, the dynamic region adaptive thresholding (DRA-T) method adaptively adjusts the intensity threshold of voxels according to different tissue densities, materials, and noise distributions. The key points of this method include:

[0086] (b1) Multilevel threshold dynamic adjustment: Calculate the local mean based on local statistical analysis (Local Statistical Analysis, LSA) Sum of variances dynamically set the threshold :

[0087] ;

[0088] wherein is the spatial coordinate of the voxel in the Cartesian coordinate system, is an adaptive adjustment factor to ensure accurate extraction of the target area under different imaging conditions.

[0089] It should be noted that the dynamically adjusted threshold set during binarization in (A) and the dynamically adjusted threshold set during the dynamic adjustment of multi-level thresholds here are essentially both threshold processing of voxel data because they both calculate an adaptive threshold based on local statistics and then perform binary classification. However, during binarization, the threshold is adjusted for the voxels in the local window, while during the dynamic adjustment of multi-level thresholds, the threshold is adjusted for the voxels in the Cartesian coordinate system. Therefore, the formula for the dynamically adjusted threshold at both places in this embodiment uses the same parameter representation.

[0090] It can be understood that the binarization process and the dynamic adjustment of multi-level thresholds are similar in the adjustment method, but different in purpose and implementation details and cannot be completely equivalent. Binarization is a pre-step for the dynamic adjustment of multi-level thresholds (i.e., voxel thresholding) to initially screen the target area, while voxel thresholding is a finer-grained screening in three-dimensional space to remove low-confidence voxels and optimize the reconstruction of the compound eye structure. In addition, although the calculation formulas for binarization and the dynamic adjustment of multi-level thresholds are similar, binarization focuses on pixel-level 2D preprocessing, while the dynamic adjustment of multi-level thresholds focuses on 3D voxel-level screening, and the two are in a progressive relationship.

[0091] (b2) GPU multi-threaded parallel acceleration: Use CUDA kernels to process the calculations of each voxel in parallel, so that the threshold calculations for a large number of voxels can be completed in a very short time.

[0092] (b3) Local morphological enhancement (LME): After voxel thresholding, perform morphological optimization on the edge area to remove isolated noise points while retaining small target structures and improve the accuracy of subsequent ommatidia detection.

[0093] (C) In one embodiment, in step three, decompose the CT image stack into multiple sub-regions, and use a GPU multi-threaded parallel computing architecture to perform block processing on the screened voxel data. Each GPU thread block processes the voxel data in a sub-region to construct three-dimensional point cloud data, specifically:

[0094] After completing voxel screening, this embodiment constructs high-precision three-dimensional point cloud data through the following steps:

[0095] (c1) Voxel coordinate mapping: Using an efficient hashing index (Spatial Hashing) structure, each filtered voxel is stored in a 3D point cloud structure to avoid redundant calculations. Stored in the 3D point cloud structure to avoid redundant calculations.

[0096] (c2) Boundary refinement and denoising: Through neighbor statistical filtering (Neighbor Statistical Filtering), abnormal points are removed to obtain the spatial coordinates and intensity values of each voxel:

[0097] ;

[0098] Among them, is the neighboring point, ensuring uniform density and clear contour of the point cloud, is the coordinate of a point in the filtered point cloud, that is, the required 3D point cloud data, is the coordinate of the current point (i.e., the center point). It is the reference point for the filtering process and is used to calculate the relative positions of other points within its neighborhood, is the index variable used to traverse all neighboring points within the neighborhood of the current point, representing the th neighboring point within the neighborhood, is the number of neighboring points within the neighborhood of the current point.

[0099] (c3) To accelerate the entire process, the present invention adopts a GPU multi-thread parallel computing architecture (GPU thread-based parallel execution model) for acceleration;

[0100] Block parallel computing: Decompose the CT image data into multiple sub-regions, and each GPU thread block independently processes a sub-region to improve the parallel computing efficiency.

[0101] Shared memory optimization: Use GPU shared memory (Shared Memory) to store temporary calculation results, reduce memory access latency, and achieve low-overhead parallel processing.

[0102] According to (c1) to (c3), a 3D point cloud data is constructed using a GPU multi-thread parallel computing architecture, improving the computing efficiency and achieving efficient detection of large-scale insect compound eye CT images.

[0103] (D) In one of the embodiments, in step four, a GPU parallel computing method is used for coordinate transformation to convert the voxels of the 3D point cloud data from the Cartesian coordinate system to the spherical coordinate system, and a multi-core CPU parallel computing method is used to perform a two-dimensional projection on the voxel data in the spherical coordinate system to generate cross-sectional data of different depths, specifically:

[0104] At this stage of data processing, in this embodiment, the three-dimensional voxel data in the original image is converted into cross-sectional data convenient for subsequent analysis through parallel computing. The specific steps are as follows:

[0105] (d1) Data loading and voxel extraction: First, load the original CT image stack and extract the spatial coordinates of each voxel and its intensity value. This process performs block processing on the image stack through parallel computing, and each GPU is responsible for processing the data in a sub-region, thereby achieving fast data reading and storage.

[0106] Through GPU parallel computing, the CT image stack is processed in blocks, improving the data loading speed and reducing the I / O bottleneck; adopting the block method, each GPU processes a sub-region, making data storage more efficient and reducing storage overhead; only storing valid voxels, avoiding loading the entire CT image data, and optimizing the utilization of computing resources.

[0107] (d2) Coordinate conversion to spherical coordinate system: For each voxel coordinate , convert it from the Cartesian coordinate system to the spherical coordinate system. Use the spherical coordinate system to describe the position of the ommatidia of the compound eye, making subsequent spatial analysis more convenient and accurate. Especially when analyzing the compound eye structure, the spherical coordinate system can provide more intuitive geometric relationships. The specific conversion formulas are as follows:

[0108] , , ;

[0109] where, represents the radius of the voxel from the origin, is the azimuth angle, is the polar angle. Through this conversion, the position of each point has a more explicit geometric meaning in the spherical coordinate system, which is more suitable for spatial analysis of the ommatidia of the compound eye.

[0110] The spherical coordinate system is more in line with the geometric characteristics of the insect compound eye, making the spatial relationship of the ommatidia clusters more intuitive and reducing the complexity of subsequent analysis. Using GPU multi-threaded computing, each thread independently completes the voxel coordinate transformation to achieve efficient coordinate conversion.

[0111] In addition, the spherical coordinate system enables the analysis of compound eye structures of different sizes and morphologies in a unified coordinate system, and is applicable to compound eye structures of different scales.

[0112] (d3) Parallel Processing and Acceleration: During the coordinate transformation process, each thread on the GPU independently processes different point sets. In this process, each GPU thread calculates the coordinate transformation of voxels within a sub-region. This parallel processing method ensures the efficiency of data transformation and greatly shortens the calculation time.

[0113] GPU Parallel Computing Optimization: Each GPU thread independently processes different point sets, significantly enhancing the throughput of data transformation. It can achieve dozens of times of acceleration compared with CPU serial computing. At the same time, the combination of block processing and streaming computing methods minimizes the synchronization overhead and improves the overall efficiency. It is applicable to large-scale CT image datasets, can efficiently process millions of voxel data, and ensures the scalability of the algorithm.

[0114] (d4) Data Storage and Structuring: The transformed spherical coordinate data is stored as a new data structure, where the spherical coordinates of each voxel are saved in a corresponding array, facilitating subsequent ommatidium detection and geometric analysis of the compound eye.

[0115] Store the spherical coordinate data in an efficient index structure for subsequent fast querying and processing, improving the calculation efficiency. Avoid storing invalid information, only store key data, reduce redundant data, optimize storage occupancy, and reduce computational resource consumption; Structured data storage enables subsequent analysis to quickly access the required data, improving data access efficiency and the real-time performance of calculations.

[0116] (d5) Generating Cross-Section Data: Based on the transformed spherical coordinate system data, cross-section data at different depths is generated to more clearly analyze the position and distribution of each ommatidium cluster. These slices will be dynamically adjusted according to the ommatidium distribution to ensure the most accurate compound eye structure information can be obtained.

[0117] According to steps (d1) to (d5), by dynamically generating cross-section data at different depths, the spatial arrangement relationship of the ommatidium clusters becomes clearer, enhancing the ability to analyze the ommatidium distribution; Cross-section data at different depths provides more fine-grained information, making the compound eye detection more accurate and reducing the possibility of missed detection and false detection; The slice generation is dynamically adjusted according to the ommatidium distribution to ensure the highest accuracy of analysis for each region and adapt to different morphological compound eye structures.

[0118] (E) In one embodiment, in step five, the compound eye geometric structure of the cross-section data is analyzed using the CPU multi-core parallel computing method to obtain the detection result of the insect compound eye structure, specifically including:

[0119] (e1) After the voxel data is represented in the spherical coordinate system to form a spherical space, the entire spherical space is divided into multiple spherical windows, and each spherical window corresponds to a local region on the spherical space;

[0120] In the insect compound eye detection algorithm, first, through threshold processing and voxel screening, the CT image is converted into three-dimensional point cloud data. Next, this three-dimensional point cloud data is transformed into the spherical coordinate system . The purpose of this step is to approximate the insect compound eye as a spherical structure for analysis, where: represents the distance from each voxel to the center of the sphere; and represent the spatial orientation of the voxel on the sphere surface.

[0121] After the voxel data is represented in the spherical coordinate system, to facilitate detection and analysis, the entire spherical space is divided into many smaller local regions or "windows". Each window corresponds to a local region on the spherical space, and this locally divided region is called a "spherical window".

[0122] In each spherical window, two-dimensional morphological detection is independently performed to detect the ommatidium centers within the window region. The advantages of this partitioning method are as follows: The voxel data within each spherical window is easier to process, reducing the data volume and computational complexity; effective parallelization is achieved, and each spherical window can be independently and parallelly processed by different computing units (such as GPU thread blocks or CPU cores); it ensures independent detection and analysis of the structural differences in different regions, improving the accuracy and robustness of detection.

[0123] (e2) Use a 2D morphological detection algorithm based on morphological detection and geometric feature analysis to identify the ommatidium centers of the cross-sectional data in each spherical window;

[0124] Identification of ommatidium centers and local morphological operations: For each spherical window, in this embodiment, morphological operations such as dilation and erosion are first performed. These operations help to highlight the boundaries of the ommatidia and calibrate their core regions. Each GPU independently processes different regions of the image, and this parallel processing not only improves the processing speed but also ensures that local features can be accurately identified.

[0125] Combination of multi-scale feature extraction and attention mechanism: To detect ommatidia of different sizes, this embodiment combines multi-scale feature extraction and an attention mechanism. First, the image extracts features through convolutional operations at multiple scales, and these features contain different details of the ommatidia in the image. Subsequently, the key regions are weighted through the attention mechanism, enabling the system to focus more on the detection regions of the ommatidia and improving the detection ability of ommatidia under complex backgrounds. The feature maps at each scale are calculated in parallel by the GPU, which not only speeds up the calculation but also improves the efficiency of multi-scale analysis.

[0126] Parallel processing accelerates morphological operations: Each GPU independently processes a sub-region in the CT image stack and performs morphological processing on the images. This process includes closing and opening operations, which help remove background noise and further refine the edges of ommatidia. The parallel design enables each GPU to simultaneously process morphological operations on different regions, significantly accelerating the entire process, especially when dealing with large-scale data, demonstrating great advantages.

[0127] (e3) Classify ommatidium clusters by calculating the Euclidean distance between the center points of each ommatidium;

[0128] In three-dimensional space, a single ommatidium usually does not exist in isolation but instead forms a local structural unit with adjacent surrounding ommatidia. This local aggregation structure is called an "ommatidium cluster". Each ommatidium cluster contains multiple adjacent ommatidium units, and these ommatidia have a close spatial arrangement relationship and can be regarded as a sub-unit or sub-structure with specific local geometric relationships in the overall structure of the compound eye. That is, an ommatidium cluster is a collection of multiple adjacent ommatidia, reflecting the local spatial structure of the compound eye; the angular relationship between ommatidia refers to the angle between the axes of adjacent ommatidia within the cluster and between clusters, and these angles directly determine the overall spatial arrangement and visual performance of the compound eye.

[0129] Detection of ommatidium clusters and estimation of lens diameter: To identify and classify ommatidium clusters, this embodiment uses a clustering method based on the distance between center points. By calculating the Euclidean distance between the center points of each ommatidium, the ommatidia can be assigned to appropriate clusters.

[0130] In this embodiment, a clustering method based on the distance between center points is used, and the following rules (1) to (5) are set in combination with the geometric characteristics of the insect compound eye to assign ommatidia to appropriate clusters:

[0131] (1) Nearest neighbor distance threshold;

[0132] Calculate the Euclidean distance from the center point of each ommatidium to its nearest neighbor ommatidium. If this distance is less than the set threshold , then it is considered that they belong to the same cluster. Among them, the threshold is set according to the average ommatidium spacing of the insect compound eye to ensure that the division of clusters conforms to the biological characteristics of the compound eye structure.

[0133] (2) Cluster density constraint;

[0134] If the number of ommatidia in a certain cluster is less than a minimum threshold , then this cluster may be noise or an isolated point and needs further analysis or elimination. If the number of ommatidia in a cluster is too small, it may be due to misdetection or segmentation error and should be corrected.

[0135] (3) Maximum cluster expansion range;

[0136] Set the maximum radius of the cluster If the maximum distance from the geometric center of the cluster to the external ommatidia exceeds this threshold, it needs to be split into multiple sub-clusters. This constraint prevents over-merging and ensures that ommatidia in different regions are not misclassified into the same cluster.

[0137] (4) Morphological constraints;

[0138] Use morphological analysis to calculate the spatial distribution of the cluster. If the arrangement direction of the ommatidia changes suddenly (for example, the compound eyes of some insects have irregular shapes), the cluster is re-divided. By calculating the normal vector distribution of the ommatidia, ensure that the cluster has reasonable geometric consistency.

[0139] (5) Local optimization and adjustment;

[0140] Combine clustering algorithms such as K-Means or DBSCAN to optimize the initially divided clusters and adjust the attribution of boundary points. Between adjacent clusters, if it is found that the distance between ommatidia satisfies the threshold and the distribution directions are the same, the clusters can be merged.

[0141] Subsequently, use the average distance between the center points of the ommatidia to estimate the lens diameter This operation is calculated based on the following formula:

[0142] ;

[0143] where, represents the average distance, represents the th center point of the ommatidium, represents the th center point of the ommatidium.

[0144] To handle images with different complex backgrounds, this embodiment designs an adaptive threshold strategy. Based on the image features of the local region, the system dynamically adjusts the threshold to adaptively process background noise and ommatidium regions. During this process, each GPU independently optimizes the processing parameters according to the characteristics of the local image region to ensure that the system can automatically adapt to different environmental conditions when processing ommatidia with complex morphologies.

[0145] Therefore, in this embodiment, first use multi-level threshold dynamic adjustment (b1) to set the initial global threshold, and then further execute the adaptive threshold strategy inside the GPU, so that different regions can perform more fine-grained optimization for local ommatidium morphologies, thereby improving the accuracy and robustness of detection.

[0146] (e4) Calculate the geometric features of each ommatidium cluster and the angular relationship between adjacent ommatidia to obtain the spatial arrangement and geometric morphology of the compound eye.

[0147] Calculation of geometric features: For each detected ommatidium cluster, calculate geometric features such as its lens diameter, area, and vector direction. This process uses a neighborhood search method and adopts a KD-Tree structure to optimize the calculation of the distance between adjacent ommatidia. Through this method, the geometric parameters of each ommatidium cluster can be efficiently calculated, and this process can be further accelerated through parallel computing.

[0148] The geometric features of each ommatidium cluster are the basis for subsequent analysis, including information such as the size, distribution, and arrangement of ommatidia. These geometric features are of great significance for understanding the visual mechanism of insect compound eyes.

[0149] To further describe the spatial arrangement and geometric morphology of the insect compound eye, calculate the angular relationship between adjacent ommatidia. Specifically, use the angular formula in the spherical coordinate system to calculate the spherical angle between the centers of adjacent ommatidia , and the formula is as follows:

[0150] ;

[0151] where, is the center of the compound eye, expressed as the center of spherical fitting. This process can also be accelerated through parallel computing to ensure the efficiency of multiple angular calculations. Calculating the angular relationship between adjacent ommatidia can help us better understand the geometric arrangement law of the compound eye.

[0152] It should be noted that the differences between the multi-level threshold dynamic adjustment and the adaptive threshold strategy in this embodiment are as follows:

[0153] The multi-level threshold dynamic adjustment (b1) sets the threshold through statistical analysis (mean + variance), which is applicable to the threshold optimization of the global image range to ensure good segmentation effects throughout the image range.

[0154] The adaptive threshold strategy is more inclined to local adaptive optimization, that is, fine-grained dynamic optimization of processing parameters is carried out inside each GPU computing unit, allowing the processing thresholds of different regions to be dynamically adjusted to adapt to the complex-shaped ommatidium structure. Combining regional feature extraction (such as local gradient, texture, contrast, etc.) for local optimization enables different regions to independently adapt to the complex-shaped ommatidium structure. The adaptive threshold strategy of this embodiment is similar to the existing local adaptive threshold methods, but this embodiment combines the way of GPU parallel computing for dynamic adjustment, dynamically adjusts the processing parameters of different regions, and has special optimizations in the ommatidium structure analysis.

[0155] In the analysis of the ommatidium structure of insect compound eyes, the key to dynamically adjusting the processing parameters of different regions lies in: (1) Based on the characteristics of large differences in ommatidium density and morphology in different regions, local optimization of processing parameters is required; (2) Based on different thread blocks in GPU parallel computing processing different regions, adaptive adjustment of the parameters of each computing unit is required; (3) Based on the fact that the ommatidium distribution structure may be affected by background noise, contrast changes, etc., dynamic optimization of the threshold is required.

[0156] To optimize the ommatidium detection effect, this embodiment uses a dynamic threshold adjustment strategy based on local region features and combines GPU parallel computing for regional-level optimization. The specific method is as follows:

[0157] ① Adopt multi-scale region analysis and adaptively optimize the local threshold: In traditional Otsu or Sauvola threshold methods, usually a global threshold is calculated based on the entire image. However, in the insect compound eye structure, the ommatidium distribution density, contrast, and noise level in different regions are different, and local optimization of the threshold is required. Among them, Otsu or Sauvola is an existing local adaptive threshold method. The specific steps are as follows:

[0158] (1-1)Calculate local features;

[0159] On the GPU, divide the entire compound eye region into multiple sub-regions (each GPU thread block is responsible for one sub-region).

[0160] Each GPU thread block calculates: local mean , local variance , local contrast , local ommatidium density , local noise level (which can be calculated by Laplace transform), where is the pixel intensity of the local region. The pixel intensity refers to the absorption coefficient of the voxel (Hounsfield Unit, HU value), which represents the X-ray attenuation coefficient of the voxel, and usually ranges from [-1000, 1000] or larger; is a very small positive number (usually close to zero), used for numerical stability (to avoid division by zero errors when the denominator is too small) and normalization correction (in extreme cases (such as when the brightness of a certain region is almost the same), can prevent the calculation result from being too large or too small and improve the robustness of numerical calculation), is essentially a regularization parameter, usually used in computer vision and image processing algorithms to stabilize contrast calculation. and represent the maximum pixel intensity and the minimum pixel intensity in the local region, used to calculate the local contrast of the region to measure the brightness difference between the ommatidium region and the background. A larger It indicates that there are obvious edges or structures in this local area.

[0161] (1 - 2) Set an adaptive threshold;

[0162] Through local mean + adaptive adjustment factor Dynamically set the threshold, where is dynamically set, and the setting method is: for high - contrast regions (edges, small - eye dense areas), in order to place transitional filtering, it is set smaller, and for low - contrast regions (background, noise areas), in order to improve robustness, it is set larger.

[0163] ② Dynamically optimize the processing parameters of each computing unit in GPU parallel computing: Under the CUDA computing framework, adopt a local parameter adjustment strategy based on GPU thread blocks;

[0164] (2 - 1) Different GPU thread blocks independently calculate regional features: Each GPU thread block is responsible for a sub - region and calculates the features of this region, dynamically adjusts the threshold based on local mean and local variance, judges the sharpness of small - eye edges based on local contrast and gradient information, and controls the filtering parameters based on local small - eye density.

[0165] (2 - 2) Online adjust the processing parameters, and GPU thread blocks exchange information through shared memory, and adjacent regions can be smoothly adjusted;

[0166] Set an adaptive adjustment rule: If the feature differences between adjacent regions are large, perform local parameter interpolation smoothing; If the small - eye density in a certain region is too high or too low, dynamically adjust the processing weight to avoid over - enhancing or losing small targets.

[0167] (2 - 3) Small - eye structure optimization: An adaptive strategy guided by local geometric features;

[0168] Small - eye spacing - guided optimization: In the detection stage, adjust the parameters by calculating the neighborhood distribution density of the center of each small - eye; In high - density regions (where small - eyes are closely distributed), the threshold should be more strict to avoid false detection, and in low - density regions (edge regions), a more relaxed threshold is allowed to ensure detection integrity.

[0169] ③ Spatial smoothing optimization;

[0170] Perform local spatial smoothing through GPU thread - to - thread communication. For high - density regions, use a smaller computing window to reduce errors; For low - density regions, expand the computing window to enhance detection stability.

[0171] ④ Adaptive feature clustering;

[0172] Parallel computing optimization based on geometric distribution on the CPU side: Use KNN (k-Nearest Neighbor) or DBSCAN for clustering. If some ommatidia are detected in isolation, adjust the detection parameters to merge them into the correct cluster. Among them, DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a representative density-based clustering algorithm.

[0173] In summary, the present invention greatly improves the efficiency of ommatidia detection in insect compound eyes through a parallel computing framework. Especially when dealing with high-resolution CT images, through the combined acceleration of GPUs and multi-core CPUs, a faster and more efficient object detection method is achieved. Each step can be independently executed in parallel, ensuring the maximized utilization of computing resources during the processing. Finally, the present invention can effectively identify and analyze the ommatidia structure in complex datasets, providing strong technical support for large-scale biological research and computational biology.

[0174] After performing compound eye detection using the above insect compound eye detection method, Figure 2 the resulting schematic diagram, Figure 2 in which (a) shows the projection result of the three-dimensional point cloud data of the insect compound eye in the spherical coordinate system. The corresponding specific steps are as follows:

[0175] (f1) Cartesian coordinate conversion to spherical coordinate system: All voxel data are projected onto the spherical coordinate system so that the entire compound eye structure is presented in a more intuitive way.

[0176] (f2) Generation of two-dimensional projection slices;

[0177] Through GPU parallel computing, each voxel is mapped to the spherical coordinate system and cross-section data are generated. These cross-sections contain rich geometric information and can assist in subsequent ommatidia detection.

[0178] (f3) Grid structures of different colors;

[0179] The center points of each ommatidium have been preliminarily detected and are assigned different colors according to their positions. The color coding represents the ommatidia distribution in different regions, which helps in subsequent analysis of their geometric arrangement.

[0180] Visualization characteristics: The arrangement of ommatidia shows a regular honeycomb-like distribution, which conforms to the geometric characteristics of the compound eye. Due to the projected spherical structure, there may be significant deformations in the edge regions, but the point cloud distribution in the central region is relatively uniform.

[0181] Figure 2Figure (b) shows the exact distribution of the extracted center points of ommatidia after ommatidia detection. At this time, unnecessary background noise has been removed, and the geometric information of the ommatidia structure has been optimized. The corresponding specific steps are as follows:

[0182] (g1) Accurate detection of the center points of ommatidia;

[0183] For the detected ommatidia, calculate the geometric features (such as diameter, area) of each ommatidium. Through parallel computing on a multi-core CPU, calculate the axial vector of the ommatidium and correct the noise points.

[0184] (g2) Spatial structure optimization;

[0185] Further remove redundant points and perform spatial calibration to make the arrangement of ommatidia conform to the geometric features of the real compound eye. Through geometric clustering analysis, classify the ommatidia in different clusters to ensure that their spatial arrangement conforms to biological characteristics.

[0186] (g3) Color coding;

[0187] The color gradient reflects the position distribution of ommatidia on the spherical surface (such as light reflection or viewing angle change). Compared with Figure 2 Figure (a), the data of this Figure 2 Figure (b) is sparser, and only the accurate center point information is retained.

[0188] Visualization feature: The center points of ommatidia are closely arranged and conform to the regular distribution on the spherical surface. Figure 2 Figure (b) is more concise than Figure 2 Figure (a), and only retains the key detection information.

[0189] As mentioned above, it is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution of the present invention and its inventive concept, makes equivalent substitutions or changes, and should be covered by the protection scope of the present invention.

Claims

1. A method for detecting insect compound eyes, characterized in that: include: Preprocess the insect compound eye CT images; Using dynamic region adaptive thresholding strategy and GPU multi-threaded parallel computing method, the voxels in the CT image stack are subjected to intensity thresholding to obtain the filtered voxel data. Decompose the CT image stack into multiple sub-regions, and use the GPU multi-threaded parallel computing architecture to process the filtered voxel data in blocks. Each GPU thread block processes the voxel data in a sub-region to construct 3D point cloud data. The GPU parallel computing method is used to perform coordinate conversion, converting the voxels of the 3D point cloud data from the Cartesian coordinate system to the spherical coordinate system, and the multi-core CPU parallel computing method is used to perform 2D projection on the voxel data in the spherical coordinate system to generate cross-slice data at different depths; When the voxel data is expressed in a spherical coordinate system, a spherical space is formed, and the entire spherical space is divided into multiple spherical windows, each of which corresponds to a local area on the spherical space; A 2D morphological detection algorithm based on morphological detection and geometric feature analysis was used to identify the ommatidium center of the cross-slice data in each spherical window; The ommatidia clusters were classified by calculating the Euclidean distance between the center points of each ommatidia. The geometric characteristics of each ommatidium cluster and the angular relationship between adjacent ommatidia are calculated to obtain the spatial arrangement and geometric morphology of the compound eyes.

2. The method for detecting insect compound eyes according to claim 1, characterized in that: Before voxel intensity thresholding, the GPU parallel computing method is used to perform adaptive binarization on the CT image, including: Calculate the global statistical characteristics of the CT image stack and preliminarily determine the binarization threshold range; Using CUDA parallel kernel functions, local contrast calculation is performed on each pixel of the CT image, and the threshold is dynamically adjusted based on the local window: GPU parallel thread blocks are used to perform binarization on all pixels in parallel to generate binary data, which are then converted into 0 or 1 using a set threshold to distinguish between the target area and the background area.

3. The method for detecting insect compound eyes according to claim 2, characterized in that: In the dynamic adjustment of threshold based on local window, the threshold The formula is as follows: ; in, are the coordinates of the voxel in the local window, and are the mean and standard deviation in the local window, is the adaptive adjustment factor.

4. The method for detecting insect compound eyes according to claim 1, characterized in that: The filtered voxel data is processed in blocks using the GPU multi-threaded parallel computing architecture. Each GPU thread block processes the voxel data in a sub-area to construct the 3D point cloud data. Specifically: Using a hash index structure, each filtered voxel is stored in a 3D point cloud structure, and outliers are removed through neighborhood statistical filtering to obtain the spatial coordinates and intensity value of each voxel; The spatial coordinates and intensity value of each voxel are stored in the GPU global memory as three-dimensional point cloud data, and each GPU thread processes the three-dimensional point cloud data in parallel.

5. The method for detecting insect compound eyes according to claim 4, characterized in that: The coordinate transformation is performed by using the GPU parallel computing method to transform the voxels of the 3D point cloud data from the Cartesian coordinate system to the spherical coordinate system, specifically including: Each sub-region of the original CT image stack is processed in parallel through GPU multithreading, and the spatial coordinates and intensity values ​​of each voxel are extracted from it; GPU multi-threaded parallel computing is used to transform the voxels in the sub-region from the Cartesian coordinate system to the spherical coordinate system.

6. Insect compound eye detection system, characterized in that: It includes image acquisition module, voxel enhancement threshold module, 3D point cloud construction module, cross-slice data construction module and geometric structure analysis module; The image acquisition module is used to preprocess the insect compound eye CT image; The voxel enhancement threshold module is used to perform intensity thresholding on the voxels in the CT image stack using a dynamic region adaptive thresholding strategy and a GPU multi-threaded parallel computing method to obtain filtered voxel data; The 3D point cloud construction module is used to decompose the CT image stack into multiple sub-regions and use the GPU multi-threaded parallel computing architecture to process the filtered voxel data in blocks. Each GPU thread block processes the voxel data in a sub-region to construct 3D point cloud data. The cross-slice data construction module is used to perform coordinate conversion using GPU parallel computing methods, converting the voxels of the three-dimensional point cloud data from the Cartesian coordinate system to the spherical coordinate system, and using multi-core CPU parallel computing methods to perform two-dimensional projection on the voxel data in the spherical coordinate system to generate cross-slice data at different depths; The geometry analysis module is used to When the voxel data is expressed in a spherical coordinate system, a spherical space is formed, and the entire spherical space is divided into multiple spherical windows, each of which corresponds to a local area on the spherical space; A 2D morphological detection algorithm based on morphological detection and geometric feature analysis was used to identify the ommatidium center of the cross-slice data in each spherical window; The ommatidia clusters were classified by calculating the Euclidean distance between the center points of each ommatidia. The geometric characteristics of each ommatidium cluster and the angular relationship between adjacent ommatidia are calculated to obtain the spatial arrangement and geometric morphology of the compound eyes.

7. The insect compound eye detection system according to claim 6, characterized in that: The three-dimensional point cloud construction module specifically includes a filtering module and a storage module; The filtering module is used to store each filtered voxel into a 3D point cloud structure using a hash index structure, remove outliers through neighborhood statistical filtering, and obtain the spatial coordinates and intensity value of each voxel; The storage module is used to store the spatial coordinates and intensity value of each voxel as three-dimensional point cloud data in the GPU global memory, and each GPU thread processes the three-dimensional point cloud data in parallel.

8. A computer 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 computer program, the insect compound eye detection method according to any one of claims 1 to 5 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of classification programs, and the plurality of classification programs are used to be called by a processor and execute the insect compound eye detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Structured scene parallel multi-plane-straight line parallel extraction method and system

    CN118840517A

  • Three-dimensional lidar point cloud semantic segmentation method and apparatus based on deep learning

    WO2024130776A1