Adhesion segmentation method and device based on neighborhood feature iteration, equipment and medium

By using a neighborhood feature-based adhesion segmentation method, the problems of adhesion and complex background in wheat pollen images were solved, and the phenotypic parameters of wheat pollen were accurately extracted.

CN120876528APending Publication Date: 2025-10-31CHENGDU UNIV OF INFORMATION TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510963829.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In wheat pollen images, the adhesion and complex background make feature region extraction difficult, affecting the accurate extraction of phenotypic parameters.

Method used

A neighborhood feature-based adhesion segmentation method is adopted, which includes local adaptive threshold iteration, connected component labeling, area threshold extraction, and eight-neighbor feature pattern detection. Segmentation is performed using candidate feature segmentation points.

Benefits of technology

Background and adhesion segmentation of wheat pollen images were achieved, phenotypic parameters were accurately extracted, and the statistical accuracy of pollen quantity and morphology was improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876528A_ABST
    Figure CN120876528A_ABST
Patent Text Reader

Abstract

The invention provides an adhesion segmentation method and device based on neighborhood feature iteration, equipment and a medium, and belongs to the technical field of adhesion image segmentation. Performing background segmentation on the original image through local adaptive threshold iteration, and performing connected domain marking processing on the first image after background segmentation to obtain a second image; extracting an adhesion target sample in the second image through an area threshold value to obtain an adhesion target sample image; extracting an adhesion target contour in the adhesion target sample graph and carrying out eight-neighborhood feature pattern detection to extract candidate feature segmentation points; and segmenting the original image based on the candidate feature segmentation points. Therefore, according to the adhesion segmentation processing method based on neighborhood feature iteration, the extraction of the wheat pollen in the culture dish and the adhesion segmentation processing can be realized in a complex environment; the method comprises the following steps: extracting a wheat pollen image feature region, and segmenting wheat pollen from a background and mutual adhesion;
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image adhesion segmentation technology, specifically relating to an adhesion segmentation method, apparatus, device, and medium based on neighborhood feature iteration. Background Technology

[0002] Extracting phenotypic parameters from wheat pollen provides reliable data support for genetic breeding and stress response studies. In petri dish images of wheat pollen, pollen grains may adhere due to close proximity. Recovering the individual morphological distribution of wheat pollen grains through adhesion segmentation techniques is crucial for extracting phenotypic parameters. Accurately counting the number and morphology of wheat pollen helps assess the pollen viability and fertility of breeding materials.

[0003] When using image processing to extract phenotypic parameters, the low contrast of small targets like wheat pollen, coupled with the reflections and shadows caused by uneven lighting in the petri dish, can severely affect the extraction of feature regions of wheat pollen. In addition, some wheat pollen grains have many boundaries that are adhered together and have insufficient spacing. These problems constitute the complex background features of wheat pollen in the petri dish, making it difficult to segment and identify wheat pollen from the background and the mutual adhesion, as well as to accurately extract phenotypic parameters.

[0004] To achieve accurate extraction of wheat pollen phenotypic parameters, effective preprocessing and adhesion segmentation algorithms are needed to perform background and adhesion segmentation on the target wheat pollen. Summary of the Invention

[0005] In view of the above problems, the present invention proposes a method, device, equipment and medium for adhesion segmentation based on neighborhood feature iteration, which can overcome the adhesion of wheat pollen image boundaries, extract the feature regions of wheat pollen images, and segment wheat pollen from the background and mutual adhesion, thereby accurately extracting wheat pollen phenotypic parameters.

[0006] This application provides, in one aspect, a method for adhering segmentation based on neighborhood feature iteration, including:

[0007] A low-noise first image is obtained by performing background segmentation on the original wheat pollen image through local adaptive threshold iteration; the first image is then binarized to obtain a binary image, and the binary image is further processed by connected component labeling to obtain a second image; adhesion target samples are extracted from the second image using area thresholding to obtain an adhesion target sample image; the adhesion target contours are extracted from the adhesion target sample image, and candidate feature segmentation points are extracted by eight-neighbor feature pattern detection; the original wheat pollen image is then segmented based on the candidate feature segmentation points.

[0008] Furthermore, the step of obtaining a low-noise first image by performing background segmentation on the original wheat pollen image through local adaptive threshold iteration includes:

[0009] A sliding window is defined for the original wheat pollen image, and the overall threshold of the sliding window area is dynamically adjusted based on the average pixel value within the sliding window area.

[0010] Each time the sliding window moves, the pixel value of the window region is calculated. The mean value of the pixel value of the window region is calculated based on the sliding window and the calculation is continuously iterated until convergence is achieved. Finally, the overall threshold of the local pixels in the sliding window region is determined.

[0011] The first image is obtained by dynamically adjusting the local and global thresholds to perform background segmentation on the original wheat pollen image.

[0012] Furthermore, the step of binarizing the first image to obtain a binary image, and then performing connected component labeling on the binary image to obtain a second image, includes:

[0013] The first image is filtered by pixel value, wherein pixel values ​​less than the overall threshold are determined as zero and used as background pixels, and pixel values ​​greater than the overall threshold are determined as target sample pixels; a binary image is determined based on the background pixels and the target sample pixels.

[0014] A second image is obtained by forming an image region from the foreground pixels in the binary image that have the same pixel value and are adjacent in position.

[0015] Furthermore, the step of extracting the adhesion target samples from the second image using an area threshold to obtain an adhesion target sample map includes:

[0016] Set a threshold for the area of ​​the adhesion target sample in the wheat pollen image, and extract the adhesion target sample from the second image according to the area threshold;

[0017] Specifically, the connected regions of the second image region are obtained according to the area threshold, and the adhesion target samples are extracted from the connected regions to obtain the adhesion target sample image.

[0018] Furthermore, the step of extracting the adhesion target contour from the adhesion target sample image and performing eight-neighbor feature pattern detection to extract candidate feature segmentation points includes:

[0019] Based on the adhesion target sample, contour extraction is performed and polygon contour smoothing is carried out using the DP algorithm to extract the smooth contour.

[0020] Furthermore, the step of extracting the adhesion target contour from the adhesion target sample image and performing eight-neighbor feature pattern detection to extract candidate feature segmentation points also includes:

[0021] Traverse the contour points of the smooth contour, take the center point of the eight neighborhoods as the base point, and determine the contour trend features by the two neighboring points adjacent to the base point.

[0022] When the target contours stick together into blocks, the adhesion points are determined based on the concave trend in the contour trend features.

[0023] The adhesion points of the target contours are determined sequentially, and candidate feature segmentation points are determined based on the adhesion points.

[0024] Furthermore, the segmentation of the original wheat pollen image based on the candidate feature segmentation points includes:

[0025] Based on the candidate feature segmentation points, perform bidirectional iterative detection using a hybrid slope-curvature approach to determine the precise feature segmentation points;

[0026] The precise feature segmentation points are matched and connected to obtain the final feature segmentation line;

[0027] The original image of the adhered targets is segmented based on the final feature segmentation lines.

[0028] Furthermore, the step of performing bidirectional iterative detection based on the candidate feature segmentation points and mixed slope-curvature to determine the precise feature segmentation points includes:

[0029] Based on candidate feature segmentation points, each candidate feature segmentation point is traversed forward and backward. In each traversal, the slope between neighboring contour point segmentation points is calculated until the sign of the slope between the neighboring contour point segmentation points changes.

[0030] Based on the nearby contour point segmentation points, curvature is determined again, and nearby redundant points are merged. The point with the largest curvature is determined as the accurate feature segmentation point.

[0031] Furthermore, the method also includes: calculating the Euclidean distance between each feature segmentation point sample and the nearest point at the wheat pollen adhesion segmentation point to obtain the minimum Euclidean distance.

[0032] Matching points are determined based on the minimum Euclidean distance and connected to complete the adhesion separation.

[0033] Based on the same inventive concept, another aspect of the embodiments of this application provides an adhesion segmentation device based on neighborhood feature iteration, comprising:

[0034] The background segmentation unit is used to perform background segmentation on the original wheat pollen image through local adaptive threshold iteration to obtain a low-noise first image.

[0035] A connected component filtering unit is used to perform binarization processing on the first image to obtain a binary image, and to perform connected component labeling processing on the binary image to obtain a second image;

[0036] The target extraction unit is used to extract the sticky target samples in the second image by using an area threshold to obtain a sticky target sample image;

[0037] The contour extraction unit is used to extract the contour of the adhesive target in the adhesive target sample image and perform eight-neighbor feature pattern detection to extract candidate feature segmentation points.

[0038] An image segmentation unit is used to segment the original wheat pollen image based on the candidate feature segmentation points.

[0039] Based on the same inventive concept, another aspect of the embodiments of this application also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor;

[0040] When the processor executes a computer program, it implements a sticky segmentation method based on neighborhood feature iteration.

[0041] Based on the same inventive concept, another aspect of the embodiments of this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements an adhesion segmentation method based on neighborhood feature iteration.

[0042] The beneficial effects of this application are:

[0043] This application performs background segmentation on the original wheat pollen image through local adaptive threshold iteration. The first image after background segmentation is then processed by connected component labeling to obtain a second image. Adhesive target samples are extracted from the second image using area thresholding to obtain an adhesive target sample image. The contours of the adhesive targets in the adhesive target sample image are extracted, and candidate feature segmentation points are extracted using eight-neighbor feature pattern detection. The original wheat pollen image is then segmented based on these candidate feature segmentation points. Therefore, the adhesion segmentation method based on neighborhood feature iteration can extract wheat pollen from petri dishes under complex environments and perform adhesion segmentation; it can extract feature regions from wheat pollen images and segment wheat pollen from the background and mutual adhesion, thereby accurately extracting wheat pollen phenotypic parameters.

[0044] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description and the drawings. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 A schematic diagram of a adhesion segmentation method based on neighborhood feature iteration is shown.

[0047] Figure 2 The original image of wheat pollen is shown;

[0048] Figure 3 The first image of wheat pollen is shown;

[0049] Figure 4 A second image of wheat pollen is shown;

[0050] Figure 5 The image shows a sample of wheat pollen adhering to its target area.

[0051] Figure 6 A contrast-enhanced graph of wheat pollen is shown;

[0052] Figure 7 This shows a segmented image of adherent wheat pollen;

[0053] Figure 8 A schematic diagram of an adhesion segmentation device based on neighborhood feature iteration is shown.

[0054] Figure 9 A schematic diagram of an electronic device is shown. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. In this application, the terms "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," "longitudinal," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings.

[0057] In petri dish images of wheat pollen, pollen grains often adhere together due to their close proximity, making it difficult to extract phenotypic parameters from individual wheat pollen grains. Therefore, there is an urgent need to develop an adhering target segmentation algorithm to correctly segment adhering targets and avoid the impact of target adhesion on the accurate extraction of phenotypic parameters.

[0058] This application provides a method for adhesion segmentation based on neighborhood feature iteration, see [link to relevant documentation]. Figure 1 ,include:

[0059] Step S101: Perform background segmentation on the original image of wheat pollen in the petri dish through local adaptive threshold iteration to obtain a low-noise first image;

[0060] It is understood that the executing entity of this application can be an image segmentation system, a terminal, or a server; no specific limitation is made here. This application's embodiments use a server as an example for illustration.

[0061] Specifically, in step S101, a low-noise first image is obtained by performing background segmentation on the original wheat pollen image through local adaptive threshold iteration, including:

[0062] A sliding window is defined for the original wheat pollen image, and the overall threshold of the sliding window area is dynamically adjusted based on the average pixel value within the sliding window area.

[0063] Each time the sliding window moves, the pixel value of the window region is calculated. The mean value of the pixel value of the window region is calculated based on the sliding window and the calculation is continuously iterated until convergence is achieved. Finally, the overall threshold of the local pixels in the sliding window region is determined.

[0064] The first image is obtained by dynamically adjusting the local and global thresholds to perform background segmentation on the original wheat pollen image.

[0065] Specifically, see Figure 2 and Figure 3 , Figure 2The image shows the original wheat pollen image. The result after applying a local adaptive iterative thresholding process to the original wheat pollen image is as follows: Figure 3 In this application, the local adaptive thresholding iterative processing uses two nested loops to traverse each pixel of the image. For each pixel, it considers its local neighborhood and calculates the mean and standard deviation of pixel intensity within that neighborhood. Then, it calculates an adaptive threshold based on the mean and standard deviation of the neighborhood intensity. The threshold is refined using an iterative process until it converges. Finally, the determined threshold is used to perform thresholding on the current pixel, removing pixels with values ​​less than the threshold and retaining pixels with values ​​greater than the threshold. The mean pixel value is calculated within a local window.

[0066]

[0067] Where μ is the average value of pixels within the window, I(x,y) is the pixel value at position (x,y), neighborhood is the set neighborhood, the size of which can be set between 5 and 10, and N is the total number of valid pixels within the neighborhood window.

[0068]

[0069] Inter-threshold updates:

[0070]

[0071] Where μ1 and μ2 are the mean values ​​of foreground pixels and background pixels, respectively.

[0072] Iteration stopping condition |T k+1 -T k |≤σ

[0073] For each pixel in the image, a local window is constructed with it as the center. The mean μ of the window, the foreground pixel value μ1, the background pixel value μ2, and the standard deviation σ are calculated. The mean μ is used as the initial threshold T0. The threshold T is updated using the inter-class means μ1 and μ2 until the convergence condition is met. The pixels in the window are binarized according to the final threshold T.

[0074] Step S102: Perform binarization processing on the first image to obtain a binary image, and perform connected component labeling processing on the binary image to obtain a second image;

[0075] It should be noted that the first image in this application is a low-noise image obtained by performing background segmentation on the original wheat pollen image using local adaptive threshold iteration. The second image is obtained by binarizing the first image to obtain a binary image, and then performing connected component labeling on the binary image. Morphological processing through binarization and connected component labeling can further remove image noise.

[0076] Specifically, see Figure 4 However, the strong reflections and edges of the petri dish still exist. Since the pixels of the strong reflections and the edges of the petri dish are not much different from the pixels of the wheat pollen to be identified, connected component labeling was used for the strong reflections and the edges of the petri dish. A connected component is an image region composed of foreground pixels with the same pixel threshold and adjacent positions. It can be a four-neighbor or an eight-neighbor.

[0077] In this application, an eight-neighborhood method is used as an example to process wheat pollen images. The basic process is to label the connected components of the input binary image, assign a unique label to each connected component, and store the results. Then, the area information of each connected component is calculated, the mean area of ​​the connected components that meet the conditions is calculated, and finally, pixels whose area meets the mean of the connected components are retained, while those that do not meet the conditions are deleted.

[0078] Specifically, in step S102, the first image is binarized to obtain a binary image, and the binary image is then subjected to connected component labeling to obtain a second image, including:

[0079] The first image is filtered by pixel value, wherein pixel values ​​less than the overall threshold are determined as zero and used as background pixels, and pixel values ​​greater than the overall threshold are determined as target sample pixels; a binary image is determined based on the background pixels and the target sample pixels.

[0080] A second image is obtained by forming an image region from the foreground pixels in the binary image that have the same pixel value and are adjacent in position.

[0081] While connected component labeling has removed large areas of reflection and the edges of the petri dish, it has not removed minor noise in the image.

[0082] Specifically, see Figure 5 To reduce excessive loss of target objects during the denoising process, an alpha correction filter was used for particle denoising. This is a nonlinear filter whose main algorithm process is to calculate the half-width, half-height and total number of pixels in the neighborhood, then fill the image boundary with reflection to handle the boundary conditions of the filter, then traverse the image pixels to store and sort the pixels in the neighborhood, remove the minimum and maximum values ​​after sorting, and then calculate the mean and output it to the corresponding position in the image.

[0083] The alpha correction filter can effectively reduce outliers and noise in images with minimal loss to the target object, effectively preserving the detailed features of wheat pollen. The formula for the alpha correction filter is:

[0084]

[0085] I filtered (x, y) represents the filtered pixel value at position (x, y), K is the total number of pixels in the MXN neighborhood, M and N are the row and column sizes of the neighborhood, respectively, and d represents the number of pixels with the largest and smallest values ​​removed, used to remove extreme noise. (k) This refers to the value of the kth pixel after the pixels are sorted in ascending order.

[0086] After applying an alpha filter, the overall contrast of the image will decrease. Therefore, it is necessary to boost the image contrast to improve its overall sharpness and make the target objects in the image clearer. See also Figure 6 To enhance image contrast, nested loops are first used to iterate through the pixels, followed by a linear transformation of each pixel value to obtain the final contrast ratio.

[0087] The effects of scaling and brightness adjustment. The formula for increasing contrast is:

[0088] I out (x,y)=clip(α*I in (x,y)+β)

[0089] I out (x,y)=clip(α*I in,c (x,y)+β),c∈{R,G,B}

[0090] I in (x,y) is the pixel value at position (x,y) in the input image. out (x,y) represents the pixel value at position (x,y) in the output image, α is the contrast scaling factor, β is the brightness offset, clip is the truncation function that limits the result to a certain range, and c refers to the image channel. Improving image contrast is achieved by linearly increasing the grayscale range of the original image.

[0091] Step S103: Extract the adhesion target samples in the second image by using an area threshold to obtain an adhesion target sample image;

[0092] Specifically, a threshold for the area of ​​the adhesion target sample in the wheat pollen image is set, and the adhesion target sample is extracted from the second image based on the area threshold.

[0093] Specifically, the connected regions of the second image region are obtained according to the area threshold, and the adhesion target samples are extracted from the connected regions to obtain the adhesion target sample image.

[0094] For example, the area threshold of the adhesion target sample in the wheat pollen image is 20, and the area of ​​the non-adhesion target connected region in the second image is less than 20. The adhesion target sample with a connected region area of ​​more than 20 in the second image is extracted as the adhesion target sample to obtain the adhesion target sample image. The adhesion target sample area threshold can also be set to a higher pixel threshold. This application does not make specific limitations.

[0095] Step S104: Extract the outline of the adhesive target in the sample image of the adhesive target and perform eight-neighbor feature pattern detection to extract candidate feature segmentation points.

[0096] Specifically, this includes: extracting contours based on the adhered target samples and using the DP algorithm to smooth the polygonal contours, thereby extracting the smoothed contours.

[0097] Specifically, in step S104, extracting the adhesion target contour from the adhesion target sample image and performing eight-neighbor feature pattern detection to extract candidate feature segmentation points further includes:

[0098] Traverse the contour points of the smooth contour, take the center point of the eight neighborhoods as the base point, and determine the contour trend features by the two neighboring points adjacent to the base point.

[0099] When the target contours stick together into blocks, the adhesion points are determined based on the concave trend in the contour trend features.

[0100] The adhesion points of the target contours are determined sequentially, and candidate feature segmentation points are determined based on the adhesion points.

[0101] Specifically, the adhered targets are extracted based on the area threshold. After contour extraction and smoothing of the adhered targets, basic feature points are detected by eight-neighbor detection. First, the contour points of the smoothed contour are traversed. Taking the center point of the eight-neighbor as the basic condition, the other two neighborhood points form the basic contour trend features. The trend features formed are horizontal trend, diagonal trend, vertical trend, concave trend and convex trend. When the targets are adhered into blocks, the adhesion points show a concave trend. The concave trend features of the contour points are judged in turn, and the concave trend feature points are used as candidate feature segmentation points.

[0102] S105: Segment the original wheat pollen image based on the candidate feature segmentation points.

[0103] Specifically, segmenting the original wheat pollen image based on the candidate feature segmentation points includes:

[0104] Based on the candidate feature segmentation points, perform bidirectional iterative detection using a hybrid slope-curvature approach to determine the precise feature segmentation points;

[0105] The precise feature segmentation points are matched and connected to obtain the final feature segmentation line;

[0106] The original image of the adhered targets is segmented based on the final feature segmentation lines.

[0107] Specifically, step S105, which involves performing bidirectional iterative detection based on the candidate feature segmentation points and mixed slope-curvature to determine the precise feature segmentation points, further includes:

[0108] Based on candidate feature segmentation points, each candidate feature segmentation point is traversed forward and backward. In each traversal, the slope between neighboring contour point segmentation points is calculated until the sign of the slope between the neighboring contour point segmentation points changes.

[0109] Based on the nearby contour point segmentation points, curvature is determined again, and nearby redundant points are merged. The point with the largest curvature is determined as the accurate feature segmentation point.

[0110] Based on the precise feature segmentation points and the nearest points at the wheat pollen adhesion segmentation points, the Euclidean distance between each feature segmentation point sample and the segmentation point samples other than the feature segmentation point sample is calculated to obtain the minimum Euclidean distance.

[0111] Matching points are determined based on the minimum Euclidean distance and connected to complete the adhesion separation.

[0112] Specifically, see Figure 7 , Figure 7 This image compares the processed images of wheat pollen at different stages in a petri dish. From left to right, the images show the original wheat pollen image, contour extraction, contour smoothing map, candidate feature segmentation point map, precise feature segmentation point map, feature segmentation line connection map, and adhesion segmentation map.

[0113] This application performs background segmentation on the original wheat pollen image through local adaptive threshold iteration, and performs connected component labeling on the first image after background segmentation to obtain a second image; extracts the adhesion target samples in the second image through area thresholding to obtain an adhesion target sample image; extracts the adhesion target contours in the adhesion target sample image and performs eight-neighbor feature pattern detection to extract candidate feature segmentation points; and segments the original wheat pollen image based on the candidate feature segmentation points.

[0114] Therefore, the adhesion segmentation method based on neighborhood feature iteration can extract wheat pollen from petri dishes under complex environments and perform adhesion segmentation; it can extract the feature regions of wheat pollen images and segment wheat pollen from the background and mutual adhesion, thereby accurately extracting wheat pollen phenotypic parameters.

[0115] Based on the same inventive concept, another aspect of the embodiments of this application provides an adhesion segmentation device based on neighborhood feature iteration, see [link to relevant documentation]. Figure 8 ,include:

[0116] Background segmentation unit 201 is used to perform background segmentation on the original wheat pollen image through local adaptive threshold iteration to obtain a low-noise first image.

[0117] The connected component filtering unit 202 is used to perform binarization processing on the first image to obtain a binary image, and to perform connected component labeling processing on the binary image to obtain a second image.

[0118] The target extraction unit 203 is used to extract the sticky target samples in the second image by using an area threshold to obtain a sticky target sample image;

[0119] The contour extraction unit 204 is used to extract the contour of the adhesive target in the adhesive target sample image and perform eight-neighbor feature pattern detection to extract candidate feature segmentation points.

[0120] Image segmentation unit 205 is used to segment the original wheat pollen image based on the candidate feature segmentation points.

[0121] Based on the same inventive concept, this disclosure also provides an electronic device 161, see [link to previous document]. Figure 9 It includes a processor 164, a communication interface 165, a memory 162, and a communication bus, wherein the processor 164, the communication interface 165, and the memory 162 communicate with each other through the communication bus;

[0122] Memory 162 stores computer program 163;

[0123] When processor 164 executes the program stored in memory 162, it implements a sticky segmentation method based on neighborhood feature iteration.

[0124] The aforementioned communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.

[0125] The communication interface 165 is used for communication between the aforementioned electronic device 161 and other devices.

[0126] The memory 162 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 162 may also be at least one storage device located remotely from the aforementioned processor 164.

[0127] The processor 164 mentioned above can be a general-purpose processor 164, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0128] Based on the same inventive concept, another aspect of the present disclosure provides a computer-readable storage medium storing a computer program 163, which, when executed by a processor 164, implements a sticky segmentation method based on neighborhood feature iteration.

[0129] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement a neighborhood feature-based iterative adhesion segmentation method according to embodiments of this disclosure.

[0130] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for adhering segmentation based on neighborhood feature iteration, characterized in that, include: A low-noise first image is obtained by performing background segmentation on the original wheat pollen image through local adaptive threshold iteration; The first image is binarized to obtain a binary image, and the binary image is then labeled with connected components to obtain a second image. An image of the adhered target samples is obtained by extracting the adhered target samples in the second image using an area threshold. Extract the outline of the adhesion target from the adhesion target sample image and perform eight-neighbor feature pattern detection to extract candidate feature segmentation points; The original wheat pollen image is segmented based on the candidate feature segmentation points.

2. The method according to claim 1, characterized in that, The process of obtaining a low-noise first image by performing background segmentation on the original wheat pollen image through local adaptive threshold iteration includes: A sliding window is defined for the original wheat pollen image, and the overall threshold of the sliding window area is dynamically adjusted based on the average pixel value within the sliding window area. Each time the sliding window moves, the pixel value of the window region is calculated. The mean value of the pixel value of the window region is calculated based on the sliding window and the calculation is continuously iterated until convergence is achieved. Finally, the overall threshold of the local pixels in the sliding window region is determined. The first image is obtained by dynamically adjusting the local and global thresholds to perform background segmentation on the original wheat pollen image.

3. The method according to claim 1 or 2, characterized in that, The step of binarizing the first image to obtain a binary image, and then performing connected component labeling on the binary image to obtain a second image includes: The first image is filtered by pixel value, wherein pixel values ​​less than the overall threshold are determined as zero and used as background pixels, and pixel values ​​greater than the overall threshold are determined as target sample pixels; a binary image is determined based on the background pixels and the target sample pixels. A second image is obtained by forming an image region from the foreground pixels in the binary image that have the same pixel value and are adjacent in position.

4. The method according to claim 1, characterized in that, The step of extracting the adhesion target sample image from the second image by using an area threshold includes: Set a threshold for the area of ​​the adhesion target sample in the wheat pollen image, and extract the adhesion target sample from the second image according to the area threshold; Specifically, the connected regions of the second image region are obtained according to the area threshold, and the adhesion target samples are extracted from the connected regions to obtain the adhesion target sample image.

5. The method according to claim 4, characterized in that, The step of extracting the contours of the adhered targets in the sample image and performing eight-neighbor feature pattern detection to extract candidate feature segmentation points includes: Based on the adhesion target sample, contour extraction is performed and polygon contour smoothing is carried out using the DP algorithm to extract the smooth contour.

6. The method according to claim 5, characterized in that, The step of extracting the contours of the adhered targets in the sample image and performing eight-neighbor feature pattern detection to extract candidate feature segmentation points also includes: Traverse the contour points of the smooth contour, take the center point of the eight neighborhoods as the base point, and determine the contour trend features by the two neighboring points adjacent to the base point. When the target contours stick together into blocks, the adhesion points are determined based on the concave trend in the contour trend features. The adhesion points of the target contours are determined sequentially, and candidate feature segmentation points are determined based on the adhesion points.

7. The method according to claim 1, characterized in that, The segmentation of the original wheat pollen image based on the candidate feature segmentation points includes: Based on the candidate feature segmentation points, perform bidirectional iterative detection using a hybrid slope-curvature approach to determine the precise feature segmentation points. Based on the candidate feature segmentation points, each candidate feature segmentation point is traversed forward and backward. In each traversal, the slope between neighboring contour point segmentation points is calculated until the sign of the slope between the neighboring contour point segmentation points changes. Based on the nearby contour point segmentation points, the curvature is judged again, and the nearby redundant points are merged. The nearest contour point segmentation point with the largest curvature is determined as the accurate feature segmentation point. The precise feature segmentation points are matched and connected to obtain the final feature segmentation line; The original image of the adhered target is segmented based on the final feature segmentation line; Among them, the precise feature segmentation point and the nearest point at the adhesion segmentation point are used; The minimum Euclidean distance is obtained by calculating the Euclidean distance between each feature segmentation point sample and each segmentation point sample other than the feature segmentation point sample. Matching points are determined based on the minimum Euclidean distance and connected to complete the adhesion separation.

8. A adhesion segmentation device based on neighborhood feature iteration, characterized in that: The background segmentation unit is used to perform background segmentation on the original wheat pollen image through local adaptive threshold iteration to obtain a low-noise first image. A connected component filtering unit is used to perform binarization processing on the first image to obtain a binary image, and to perform connected component labeling processing on the binary image to obtain a second image; The target extraction unit is used to extract the sticky target samples in the second image by using an area threshold to obtain a sticky target sample image; The contour extraction unit is used to extract the contour of the adhesive target in the adhesive target sample image and perform eight-neighbor feature pattern detection to extract candidate feature segmentation points. An image segmentation unit is used to segment the original wheat pollen image based on the candidate feature segmentation points.

9. An electronic device, characterized in that, include: Memory, processor, and computer programs stored in memory and capable of running on the processor; When the processor executes the computer program, it implements the steps of the adhesion segmentation method based on neighborhood feature iteration as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements the steps of the adhesion segmentation method based on neighborhood feature iteration as described in any one of claims 1 to 7.