Search

CN-121482294-B - Convex hull fitting-based light field reconstruction brain image brain region boundary extraction method

CN121482294BCN 121482294 BCN121482294 BCN 121482294BCN-121482294-B

Abstract

The invention discloses a brain region boundary extraction method of a light field reconstruction brain image based on convex hull fitting, which comprises the steps of calculating p percentile of a brain image, carrying out image cutting, contrast stretching and Gaussian filtering smoothing denoising, carrying out Canny edge detection on the filtered image to obtain a binary edge map, carrying out boundary enhancement and communication through expansion and closing operation, extracting all connected regions and selecting the maximum area outline as the outline of the brain region boundary, determining a datum point based on the outline of the brain region boundary, calculating polar angle and distance of each point except the datum point, sequencing, carrying out convex hull fitting based on the datum point and a sequenced point set through GRAHAM SCAN scanning, converting the convex hull into a closed boundary region, and obtaining a mask image of the brain image after light field reconstruction through a mask function.

Inventors

  • YANG YI
  • ZHUANG CHAOWEI
  • LI QI

Assignees

  • 浙江荷湖科技有限公司

Dates

Publication Date
20260512
Application Date
20260108

Claims (9)

  1. 1. The method for extracting the brain region boundary of the light field reconstructed brain image based on convex hull fitting is characterized by comprising the following steps of: S1, calculating a p percentile of a brain image after light field reconstruction and cutting an image gray value; S2, carrying out contrast stretching on the cut image, and carrying out Gaussian filtering smoothing denoising; s3, carrying out Canny edge detection on the filtered image to obtain a binary edge map; S4, carrying out boundary enhancement and communication on the binary edge map through expansion and closing operation; s5, extracting all connected areas from the binary edge map, and selecting the outline with the largest area as the outline representing the boundary of the brain area; s6, determining a datum point based on the outline of the brain region boundary, calculating polar angles and distances of all points except the datum point, sorting, and performing convex hull fitting through GRAHAM SCAN scanning based on the datum point and the sorted point set; s7, converting the convex hull into a closed boundary area, and obtaining a mask image of the brain image after light field reconstruction through a mask function; The specific content of the step S1 comprises the following steps: S11, calculating brain images after light field reconstruction The p percentile of (c) is: Wherein, the Representing brain images Is a two-dimensional gray scale matrix of (c), , For an image pixel set, x and y are pixel coordinates, and the image pixel value represents a gray value; S12, cutting the gray value of the image into intervals : Wherein, the In order to cut out the image, The function is defined as: Wherein, the At the level of the minimum cut-off value, Is the maximum cut-off value.
  2. 2. The method for extracting brain region boundary of light field reconstructed brain image based on convex hull fitting as set forth in claim 1, wherein in step S2, the specific contents of contrast stretching are: for the cut image Performing linear normalization, and mapping the dynamic range to a standard 8-bit gray scale range [0,255] to maximize image contrast; Wherein, the And Respectively, images Minimum and maximum gray values of (a); The Gaussian filtering method comprises the following steps: Wherein, the For the contrast-stretched image, In order to filter the image after it has been filtered, Is the size of a two-dimensional gaussian kernel, The function of the gaussian distribution is represented by, And The gaussian kernel coordinates in the x and y directions, respectively.
  3. 3. The method for extracting brain region boundary of light field reconstructed brain image based on convex hull fitting as set forth in claim 1, wherein the specific contents of step S3 include: s31, calculating a gradient component of the image in the x direction and the y direction respectively by using a Sobel operator on the image after Gaussian filtering; S32, calculating the gradient amplitude and the gradient direction of each pixel point according to the gradient components; S33, performing non-maximum suppression on the gradient amplitude image based on the gradient amplitudes of each pixel point and two adjacent pixels along the gradient direction of each pixel point to obtain candidate edge points; S34, applying double-threshold processing to the gradient amplitude diagram after non-maximum suppression, and marking strong edge points and weak edge points on the candidate edge points; S35, carrying out edge connection on the strong edge points and the weak edge points connected with any strong edge points in the 8-neighborhood to obtain a binary edge graph.
  4. 4. The method for extracting the brain region boundary of the light field reconstructed brain image based on convex hull fitting according to claim 1, wherein the method for carrying out boundary enhancement and communication on the binary edge map through expansion and closing operation in the step S4 is as follows: Wherein, the Is a binary edge map of the image to be processed, Indicating the expansion of the material and, Indicating that the corrosion is to be indicated, Is a 5 x 5 matrix of structural elements.
  5. 5. The method for extracting brain region boundaries of light field reconstructed brain images based on convex hull fitting according to claim 1, wherein in step S5, the outline of the extracted brain region boundaries is: Wherein, the For all connected regions extracted from the boundary enhanced and connected binary edge map, For each area, the largest area is selected as the contour of the brain region.
  6. 6. The method for extracting brain region boundary of reconstructed brain image based on convex hull fitting light field as set forth in claim 1, wherein in step S6, the method for determining the reference point based on the outline of brain region boundary is as follows: Selecting outline point set of brain region boundary The point with the smallest middle ordinate is taken as a datum point If there are a plurality of points having the same ordinate, the point having the smallest abscissa is selected as the reference point.
  7. 7. The method for extracting brain region boundary of light field reconstructed brain image based on convex hull fitting according to claim 1, wherein in step S6, the specific contents of calculating and sorting polar angle and distance of each point except the reference point are as follows: Contour point set for brain region boundary Reference points for excluding middle and middle Is not equal to the total number of points of the product Calculate it relative to the reference point Polar angle of (2) And Euclidean distance squared : Wherein, the As a four-quadrant arctangent function, the range of return values is ; Ordering all points according to polar angle ascending order, when polar angles are identical, according to the same order as the reference point And (3) sorting the distances in ascending order to obtain a sorted point set.
  8. 8. The method for extracting the brain region boundary of the light field reconstructed brain image based on convex hull fitting according to claim 1, wherein the specific method for carrying out convex hull fitting by GRAHAM SCAN scanning based on the reference points and the ordered point set is as follows: initializing a stack And sequentially pushing the reference points and the first two points of the ordered point set into the stack: Starting from the third point of the ordered set of points, each point is traversed in turn, in each step by calculating a two-dimensional cross product The inspection includes top of stack, next top of sub-stack, current point Steering relationships of three points; When (when) When the three points are turned left, the current point is displayed Push-to-stack When (1) When the three points form collineation or right turn, the top element top is popped up, and the new top three points are rechecked until the left turn condition is met or less than two elements in the stack are reached, and after all points are traversed, the stack is traversed The point sequence stored in the medium is the formation of convex hull And are arranged in a counter-clockwise direction.
  9. 9. The method for extracting brain region boundary of light field reconstructed brain image based on convex hull fitting as set forth in claim 1, wherein in step S7, brain image after light field reconstruction Mask image of (a) The method comprises the following steps: Wherein, the As a function of the mask, A closed border region transformed for convex hulls.

Description

Convex hull fitting-based light field reconstruction brain image brain region boundary extraction method Technical Field The invention relates to the technical field of light field microscopic imaging, in particular to a light field reconstruction brain image brain region boundary extraction method based on convex hull fitting. Background The light field microscopic imaging acquires the information of the space and the angle of the three-dimensional scene through single shooting, recovers the angles of all the positions of the three-dimensional scene through later reconstruction, is very suitable for rapid and high-resolution imaging of dynamic neural activity in the brain of a living body, and can obtain three-dimensional data with different depths in the brain through reconstructing the light field image. However, the reconstruction process is interfered by signals of motion artifacts introduced by tissues such as image sensor noise, background fluorescence and muscle activity or blood vessels, so that reconstruction errors exist in reconstructed images to submerge brain image real signals, the edges of brain tissues are often low in contrast and discontinuous due to the limitations of optical characteristics and imaging depth of the brain tissues, and in large brain science research, massive light field imaging data are required to be automatically processed to extract neuron activity signals in specific brain regions, so that manual delineating of brain region boundaries is time-consuming and subjective errors are easy to introduce. Inaccurate brain region masks can lead to contaminating downstream neural signal extraction analysis, specifically: False positive, namely, the noise outside the mask or a non-neuron structure is erroneously contained and is misjudged as an active neuron by a neuron identification algorithm, and an error signal is introduced, false negative, namely, an incomplete mask can cut out a real neuron positioned at the edge of a brain region, so that the signal is lost, and signal pollution, namely, when the overall background noise or the fluorescence change of the neuron is calculated, if the mask contains a high-intensity noise region, the calculation result is severely distorted, and the signal to noise ratio of the signal is reduced. The segmentation and boundary extraction of brain images are important preconditions for brain structure analysis, functional study and focus detection, and the conventional brain boundary extraction method mainly has the following problems: The method based on the global threshold is simple to realize, but sensitive to noise and brightness change, the boundary is easy to break or deviate, the method based on the region growth depends on seed point selection, the degree of automation is not high, the method based on the deep learning has high segmentation precision, but needs a large amount of marking data, has high calculation cost, and is difficult to popularize in a resource limited scene. Therefore, the technical skill in the art needs to solve the problems of overcoming the challenges of reconstruction errors, abnormal noise, low contrast, boundary fracture and the like in reconstructing brain images in a light field, realizing a full-automatic and high-robustness brain region boundary extraction method, so as to generate a continuous, complete and accurate binary mask, providing a high-quality interested region basis for subsequent automatic nerve cell identification and fluorescence signal extraction, and finally improving the accuracy and reliability of a neural activity analysis result. Disclosure of Invention In view of the above problems, the present invention has been made in order to provide a light field reconstructed brain image brain region boundary extraction method based on convex hull fitting, which overcomes or at least partially solves the above problems. In order to achieve the above purpose, the present invention adopts the following technical scheme: A light field reconstruction brain image brain region boundary extraction method based on convex hull fitting comprises the following steps: S1, calculating a p percentile of a brain image after light field reconstruction and cutting an image gray value; S2, carrying out contrast stretching on the cut image, and carrying out Gaussian filtering smoothing denoising; s3, carrying out Canny edge detection on the filtered image to obtain a binary edge map; S4, carrying out boundary enhancement and communication on the binary edge map through expansion and closing operation; s5, extracting all connected areas from the binary edge map, and selecting the outline with the largest area as the outline representing the boundary of the brain area; s6, determining a datum point based on the outline of the brain region boundary, calculating polar angles and distances of all points except the datum point, sorting, and performing convex hull fitting through GRAHAM SCAN scanning based on the datu