Automatic analysis method for ocular microvascular hemodynamic parameters
Technical Field
The invention relates to the field of parameter analysis of ocular microvasculature, in particular to an automatic analysis method for ocular microvasculature hemodynamic parameters.
Background
The eyeball and the brain share the blood supply of the internal carotid artery, and the function of the ocular microvasculature is a potential index for reflecting ocular surface inflammation and systemic microvascular pathological diseases, so that the method can provide important basis for researching the pathogenesis of cerebrovascular, cardiovascular and diabetes and other diseases, disease progress, judging the treatment effect and the like. With the rapid development of ophthalmic imaging technology in recent years, the emergence and development of new imaging technologies such as functional imaging OCT and ocular microvascular functional analysis provide important information for diagnosis and treatment of ophthalmic diseases, and the morphological measurement function of the imaging technology is applied to the precise analysis of eyeball tissue functions, which is called a milestone result of ophthalmic diagnostic technology. The existing eye imaging research technology has the defects that the matching analysis software is incomplete, and the processing and intelligent analysis of batch images can not meet the scientific research and clinical requirements and the like.
The existing system for collecting the ocular microvasculature is realized by integrating a high-speed camera, a video capture card and other digital image collecting devices into a standard slit lamp platform, and the slight shake of a patient can generate larger offset in an image in the collecting process, so that the image which can be used for blood flow analysis in the whole video image only accounts for less than 20% of the whole video image, the existing system adopts manual labeling of doctors, and the workload is very huge; in addition, blood vessels displayed in the eye microvascular image are discontinuous, and the situation that the blood vessels are discontinuous exists in a single image, so that the blood vessels acquired in the single image by adopting the traditional method for analysis are very limited, and the usability of the blood vessels is greatly reduced; the subsequent analysis of the vascular mechanics in the prior art is completed by a manual method, which causes different errors due to different individuals or fatigue degrees and consumes time.
Disclosure of Invention
The invention mainly aims to provide an automatic analysis method for ocular microvascular hemodynamic parameters, which realizes full-automatic hemodynamic analysis and greatly improves the speed of the hemodynamic analysis and the accuracy of core parameter calculation.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows: an analysis method of blood flow velocity of ocular microvasculature, comprising the steps of:
step 1: inputting an image set I which needs to carry out analysis on ocular microvascular hemodynamic parameters in a video file containing ocular microvascular information o ;
Step 2: for image set I o The image registration is carried out on the continuous images, the first image is taken as a fixed image, the rest images are aligned with the first image, and a registered image set I is obtained r ;
And 3, step 3: carrying out image segmentation on the registered image to obtain a segmentation mask image set S of the ocular microvasculature r ;
And 4, step 4: obtaining a segmented mask image set S r The central line of the middle eye microvasculature;
and 5: fitting the central line, extracting the edge of the eye microvessels in the segmentation mask image, and calculating the average observation diameter, the inner diameter and the outer diameter of the eye microvessels according to the fitted central line and the edge of the eye microvessels in the segmentation mask image;
step 6: extracting the first fraction in step 5Cutting each fitted central line in the mask image, taking the coordinates of the central line as the column of the space-time diagram, and taking the image set I r The number of the images in (1) is line, and a space-time image is formed;
and 7: carrying out histogram equalization processing on the obtained spatio-temporal image;
and 8: carrying out linear detection processing on the spatio-temporal image, carrying out statistics on the slope of the obtained straight line, and obtaining the slope k with the most dense distribution;
and step 9: calculating blood flow velocity of ocular microvasculature
The following formula is adopted:
preferably, in step 3, the contour in the segmentation result needs to be calculated, and the region with small contour is removed.
Preferably, in step 5, the method specifically includes the following steps:
step 51: sampling at equal intervals from the starting point of the central line of each blood vessel;
step 52: sequentially calculating the coordinate Pi and the normal vector of each sampling point on the blood vessel center line, and obtaining the observation diameter of the blood vessel at each sampling point according to the edge of the eye microvessel of the segmentation mask image along the normal vector direction;
step 53: counting the diameters of all the sampling points, and obtaining a normal distribution parameter by adopting a normal distribution approximation mode, wherein the highest probability is the inner diameter B of the ocular capillary i The diameter corresponding to the confidence coefficient of 0.94 is the outer diameter B of the ocular microvasculature o The mean of the observed diameters is the mean observed diameter B m 。
The invention also provides an analysis method of blood flow volume of ocular microvasculature, which adopts the following formula:
q is blood flow, B
m Is the average observed diameter obtained in step 53 above.
The invention also provides an analysis method of the tube wall shear rate of the eyeball blood vessel, which comprises the following steps: the following formula is adopted:
and WSR is the pipe wall shear rate.
The invention also provides an analysis method of the diameter of the ocular microvasculature, which specifically comprises the following steps:
step 1: inputting an image set I which needs to carry out analysis on ocular microvascular hemodynamic parameters in a video file containing ocular microvascular information o ;
Step 2: for image set I o Performing image registration on the continuous images, taking the first image as a fixed image, aligning the residual images with the first image to obtain a registered image set I r ;
And step 3: carrying out image segmentation on the registered image to obtain a segmentation mask image set S of the ocular microvasculature r ;
And 4, step 4: obtaining a segmented mask image set S r The centerline of the middle vessel;
and 5: fitting the central line, extracting the edge of the ocular microvasculature in the segmentation mask image, and calculating the average diameter, the inner diameter and the outer diameter of the ocular microvasculature according to the fitted central line and the edge of the ocular microvasculature in the segmentation mask image.
Preferably, in step 3, the contour in the segmentation result needs to be calculated, and the region with small contour is removed.
Preferably, in step 5, the method specifically includes the following steps:
step 51: sampling at equal intervals from the starting point of the central line of each blood vessel;
step 52: sequentially calculating the coordinates Pi and normal vector of each sampling point on the blood vessel central line, and obtaining the observation diameter of the blood vessel at each sampling point according to the edge of the ocular microvasculature of the segmentation mask image along the normal vector direction;
step 53: counting the diameters of all the sampling points, and obtaining a normal distribution parameter by adopting a normal distribution approximation mode, wherein the highest probability is the inner diameter B of the ocular capillary i The diameter corresponding to the confidence coefficient of 0.94 is the outer diameter B of the ocular microvasculature o The mean of the observed diameters is the mean observed diameter B m 。
Compared with the prior art, the invention has the following beneficial effects:
1) The processing speed is high, unnecessary human-computer interaction is reduced, and automatic analysis of the eye microvascular hemodynamics can be completed quickly; 2) The calculated ocular microvascular kinetic parameters have high precision, curve fitting is carried out on the center line of the blood vessel, and the image of blood vessel wall red blood cells is reduced by adopting a Gaussian distribution method; 3) A statistical method is introduced into the space-time image, so that the accuracy of blood flow parameters is improved.
Drawings
FIG. 1 is a flow chart in accordance with a preferred embodiment of the present invention;
FIG. 2 (a) is an original spatiotemporal image;
FIG. 2 (b) is a spatiotemporal image that has been histogram equalized;
fig. 2 (c) is a spatiotemporal image subjected to the line detection process.
Detailed Description
The following description is provided to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art.
An automatic analysis method for hemodynamics parameters of ocular microvasculature, wherein the dynamics parameters mainly comprise blood flow velocity, blood flow volume and tube wall shear rate, and the method specifically comprises the following steps:
step 1: image set I which is input into video file and needs to carry out analysis on ocular microvascular hemodynamic parameters o And input the relevant parameters.
The video file is obtained by shooting the eye microvasculature through a camera and the likeAnd (4) obtaining. For the image set I o The video file is composed of a plurality of successive pictures, a picture set I o Is the collection of these images.
Step 2: for image set I o Performing image registration on the continuous images, taking the first image as a fixed image, aligning the residual images with the first image to obtain a registered image set I r . The registration algorithm may employ a mutual information based rigid registration or other configuration methods in the prior art.
And step 3: carrying out image segmentation on the registered image by adopting a U-Net network, calculating the outline in the segmentation result, removing the area with small outline, and obtaining a segmentation mask image set S of the blood vessel r 。
And 4, step 4: obtaining a segmentation image set S by adopting a skeleton extraction method of an image r The center line of the middle vessel.
And 5: and (3) spline fitting is carried out on the central line, the edge of the blood vessel in the segmentation image is extracted, the diameter of the blood vessel is calculated, and the average observed diameter, the inner diameter and the outer diameter of the blood vessel are obtained by adopting a Gaussian fitting method.
Specifically, the central line is processed by using a fixed mask, the starting point and the end point of each blood vessel central line are detected and recorded, equal-interval sampling is performed from the starting point of each blood vessel central line, the interval size is the number of pixels, the number of pixels between two adjacent sampling points is the same, the specific number of pixels can be adjusted according to the resolution of the image, and the interval can be larger as the resolution is higher until the end point is reached. B-Spline is adopted to carry out blood vessel center line fitting, after fitting, coordinates Pi and normal vector of each sampling point on the blood vessel center line are calculated in sequence, the diameter of the blood vessel at the sampling point is obtained according to the boundary of a blood vessel mask image along the direction of the normal vector, the observation diameters of all the sampling points in the blood vessel are obtained in the same mode, the observation diameters refer to two times of the value from the sampling point to the boundary of the blood vessel along the normal vector, but when the boundary of the blood vessel image is actually obtained, the diameters of the blood vessel corresponding to the images at different positions are different due to the problem of the images, so that the blood vessel sampling points are subjected to blood vessel samplingAll diameters are subjected to statistical analysis, a normal distribution parameter is obtained by adopting a normal distribution approximation mode, and the highest probability is the inner diameter B of the blood vessel i The position with the confidence coefficient of 0.94 is the outer diameter B of the blood vessel o The mean of all observed diameters is the mean observed diameter B m Wall thickness of tube = B o -B m 。
Step 6: extracting each fitted central line in the first blood vessel mask image in the step 5, taking the coordinates of the central line as the column of the space-time image, and collecting the images I r Wherein all the image gray values on the central line are extracted to form a group, and an image set I r The number of images in (a) is a row value, that is, a spatiotemporal image is obtained according to the blood flow situation at the central line at different times as shown in fig. 2 (a). In other words, the video is composed of a set of images I r In the image composition of (1), the number of images in the videos with different time lengths is different, the time of the videos corresponding to the number of different images is different from 0 for the same video, and if the number of images in the video of 1 minute is 200, the number of images in the video of two minutes is 400, conversely, 200 images correspond to the video within 0-1 minute, and 400 images correspond to the video within 0-2 minutes, so that the number of images corresponds to the time in the video, and the number of images is taken as a line, which is actually the time in the video.
And 7: the obtained spatio-temporal image is subjected to histogram equalization processing, as shown in fig. 2 (b). Of course, other methods known in the art may be used for equalization.
And 8: and (3) performing linear detection processing on the spatio-temporal image processed in the step (7), counting the obtained linear, counting the distribution of the slope, and taking the slope k with the most dense distribution as the basis of blood flow calculation, as shown in fig. 2 (c). When the straight line is counted, it is necessary to remove the case where the slope of the straight line is 0 and the vertical abscissa.
And step 9: calculating the blood flow velocity of the blood vessel by adopting the following formula:
wherein S represents the distance between image pixels, in um, and is input after the resolution is determined by the camera,
is the cross-sectional flow velocity of the blood vessel;
wherein the content of the first and second substances,
the axial flow velocity of the blood vessel is the blood flow velocity of the blood vessel.
Step 10: calculating the flow of the blood vessel by adopting the following formula:
flow rate (Q) (pl/s):
,B
m is the average observed diameter obtained in step 5.
Step 11, calculating the vessel wall shear rate of the blood vessel by adopting the following formula:
wall Shear Rate (WSR) (s-1):
。
the foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are merely illustrative of the principles of the invention, but that various changes and modifications may be made without departing from the spirit and scope of the invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.