Mouse intestine peristalsis speed detection method and device based on fluid dense optical flow algorithm
Through mouse intestinal imaging technology based on fluid-intensive optical flow algorithm, real-time diagnosis and treatment evaluation of inflammatory bowel disease is achieved, and the problems of invasiveness, radiation exposure and low specificity in the prior art are solved, providing an accurate and convenient method for monitoring intestinal peristalsis speed.
Patent Information
- Application Number
- CN202411762213.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art has problems such as invasive, radiation exposure, high cost and low specificity in the diagnosis and treatment evaluation of inflammatory bowel disease, making it difficult to achieve real-time and non-invasive intestinal peristalsis speed monitoring.
The mouse intestinal peristalsis velocity detection method based on the fluid-intensive optical flow algorithm is adopted. By staining and imaging the mouse intestine, video is taken, and calculation area frame, pretreatment and optical flow calculation are carried out to realize real-time visualization and velocity quantification of intestinal peristalsis.
Real-time visualization and speed quantification of intestinal peristalsis in mice is realized, providing a method to quickly diagnose inflammatory bowel disease and monitor the progress of the disease. The method is simple and convenient, and the calculation results are accurate and reliable.
Smart Images

Figure CN119693421A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of infrared imaging technology and medical image processing technology, in particular to a method and a device for quantitatively detecting the intestinal peristalsis speed of mice based on a fluid dense optical flow algorithm. Background Art
[0002] Inflammatory bowel disease (IBD) is a chronic intestinal disease that includes Crohn's disease and ulcerative colitis. It is characterized by high morbidity, high recurrence rate, long course of disease, and many complications. The clinical diagnosis of IBD mainly relies on endoscopy, radiological imaging, histological examination, and stool testing. Endoscopy is still the gold standard for diagnosis, but this invasive examination may cause mucosal damage. Radiological imaging examinations have certain ionizing radiation and are expensive. Stool testing has low specificity and accuracy and cannot provide real-time information. Therefore, new technologies are urgently needed to improve diagnostic capabilities and treatment evaluation throughout the course of IBD.
[0003] Optical imaging is a technology that uses light to capture images of objects. In the field of medical imaging, optical imaging provides a non-invasive method that uses non-ionizing radiation to reduce the chances of patients being exposed to harmful radiation, and can therefore monitor disease progression and treatment effects safely, in real time, and with high spatiotemporal resolution. Studies have shown that near-infrared fluorescent probes can be used for imaging of inflammatory bowel disease and can target specific biomarkers for in vivo or in vitro imaging of the mouse intestine. Therefore, the advantages of near-infrared imaging, such as high contrast and strong penetration depth, can be used to develop a non-invasive, nondestructive detection method for monitoring the progression of inflammatory bowel disease and finding more effective treatments.
[0004] Optical flow is an algorithm for extracting optical flow fields from videos or continuous images in the field of computer vision. The optical flow problem attempts to find the positions where many points in one image move in the second image. It uses the changes in pixels in the time domain in the image sequence and the correlation between adjacent frames to find the correspondence between the previous frame and the current frame, thereby calculating the motion information of objects between adjacent frames. Since the optical flow method can obtain dense velocity vector fields from image pairs, it has also become a research hotspot in fields such as experimental fluid mechanics, medicine, and meteorology. In order to overcome the limitations of traditional optical flow models for non-rigid motion estimation, Liu and Shen proposed a physics-based optical flow equation in 2018, which quantitatively established a direct connection between optical flow and fluid flow.
[0005] Since intestinal peristalsis itself is a very complex movement pattern, it is difficult to simulate it through simple physical constraints. However, this peristalsis morphology is similar to turbulence in fluid flow. Therefore, applying the fluid-based dense optical flow algorithm to the quantitative calculation of mouse intestinal peristalsis speed can provide strong data support for the diagnosis of inflammatory bowel disease and the discovery of potential drugs for the treatment of inflammatory bowel disease. Summary of the invention
[0006] The purpose of the present invention is to provide an accurate, sensitive and convenient method and device for quantitative detection of mouse intestinal peristalsis velocity based on a fluid-intensive optical flow algorithm, which can realize real-time visualization and velocity quantification of intestinal peristalsis.
[0007] The technical solution to achieve the purpose of the present invention is: a method for detecting the intestinal peristalsis speed of mice based on a fluid-intensive optical flow algorithm, comprising the following steps:
[0008] Step 1: Stain and image the mouse intestines and take videos of the mouse intestinal peristalsis;
[0009] Step 2: Frame the calculation area of the complete mouse intestinal peristalsis video obtained in step 1, use the threshold binarization method to extract the outline of the mouse intestine, and frame the rectangular image area to be calculated based on this outline;
[0010] Step 3: Preprocess the mouse intestinal peristalsis video, filter out the breathing frames frame by frame, mark the frames that shake up and down due to breathing as invalid frames, and skip them directly in the subsequent optical flow calculation;
[0011] Step 4: Calculate the optical flow: read every two frames of the video in a loop, use a fluid-based dense optical flow algorithm, and obtain a set of optical flows after eliminating the influence of breathing;
[0012] Step 5: Finally, n-1 groups of optical flows are obtained from the n frames of video. These optical flows are superimposed along the time axis to obtain the optical flow index at each pixel in the entire intestinal area, and the intestinal peristalsis speed of the mouse is determined based on the optical flow index.
[0013] A device for detecting the intestinal peristalsis speed of mice based on a fluid-intensive optical flow algorithm, the device is used to implement the intestinal peristalsis speed detection method of mice, the device comprises a camera unit, a region framing unit, a preprocessing unit, an optical flow calculation unit and a speed determination unit, wherein:
[0014] A camera unit, used to take videos of mouse intestinal peristalsis;
[0015] The region frame unit is used to calculate the region frame of the complete mouse intestinal peristalsis video obtained by shooting, extract the outline of the mouse intestine area by using the threshold binarization method, and frame the rectangular image area to be calculated based on the outline;
[0016] The preprocessing unit is used to preprocess the mouse intestinal peristalsis video, filter out the breathing frames frame by frame, mark the frames that shake up and down due to breathing as invalid frames, and directly skip them in the subsequent optical flow calculation;
[0017] An optical flow calculation unit is used to perform optical flow calculation; it reads every two frames of the video in a loop, uses a fluid-based dense optical flow algorithm, and obtains a set of optical flows after eliminating the influence of breathing;
[0018] The speed determination unit superimposes n-1 groups of optical flows obtained from n frames of video along the time axis to obtain an optical flow index at each pixel point in the entire intestinal area, and determines the intestinal peristalsis speed of the mouse according to the optical flow index.
[0019] A mobile terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for detecting the intestinal peristalsis speed of mice is implemented.
[0020] Compared with the prior art, the present invention has the following significant advantages: (1) a non-invasive method is adopted to apply the fluid-based dense optical flow algorithm to the quantitative calculation of the intestinal motility speed of mice, thereby realizing the real-time visualization and speed quantification of the intestinal motility of mice, thereby being able to quickly diagnose inflammatory bowel disease and monitor the progression of inflammatory bowel disease, and screen out potential inflammatory bowel disease therapeutic drugs; (2) the method is simple and convenient, the calculation results are accurate and reliable, and it provides strong data support for the diagnosis of inflammatory bowel disease and the discovery of potential drugs for the treatment of inflammatory bowel disease. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flow chart of the method for quantitatively detecting the intestinal peristalsis velocity of mice based on the fluid dense optical flow algorithm of the present invention.
[0022] Figure 2 It is a schematic diagram of the principle that the video mouse skips breathing frames during preprocessing, resulting in frame rate errors and optical flow disturbances in an embodiment of the present invention.
[0023] Figure 3 It is an optical flow vector arrow diagram calculated using a fluid-based dense optical flow algorithm in two frames of a normal mouse video in an embodiment of the present invention.
[0024] Figure 4 It is a three-dimensional average velocity map of the intestinal area integrated after calculation of a 100-frame mouse video using a fluid-based dense optical flow algorithm in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The present invention provides a method for detecting the intestinal peristalsis speed of mice based on a fluid-intensive optical flow algorithm, comprising the following steps:
[0026] Step 1: Stain and image the mouse intestines and take videos of the mouse intestinal peristalsis;
[0027] Step 2: Frame the calculation area of the complete mouse intestinal peristalsis video obtained in step 1, use the threshold binarization method to extract the outline of the mouse intestine, and frame the rectangular image area to be calculated based on this outline;
[0028] Step 3: Preprocess the mouse intestinal peristalsis video, filter out the breathing frames frame by frame, mark the frames that shake up and down due to breathing as invalid frames, and skip them directly in the subsequent optical flow calculation;
[0029] Step 4: Calculate the optical flow: read every two frames of the video in a loop, use a fluid-based dense optical flow algorithm, and obtain a set of optical flows after eliminating the influence of breathing;
[0030] Step 5: Finally, n-1 groups of optical flows are obtained from the n frames of video. These optical flows are superimposed along the time axis to obtain the optical flow index at each pixel in the entire intestinal area, and the intestinal peristalsis speed of the mouse is determined based on the optical flow index.
[0031] Furthermore, in step 1, the mouse intestine is stained by orally administering a fluorescent probe to the mouse.
[0032] Furthermore, in step 2, the threshold binarization method uses the imbinarize interface function in Matlab, and the binarization threshold is determined by the brightness of the fluorescent substance in the intestinal area of the mouse: if the speed of the entire intestinal area is tracked, the binarization threshold is 60-70; if only the bright area inside the intestinal area is tracked, the binarization threshold is 130-140.
[0033] Furthermore, in step 2, edge information of the contour is obtained according to the obtained intestinal contour, and the combination of the maximum and minimum coordinate positions in the horizontal and vertical directions are respectively selected as the vertices of the rectangular calculation area, and the image within the rectangle is intercepted to perform the optical flow calculation in step 4.
[0034] Furthermore, in step 3, the mouse intestinal peristalsis video is preprocessed as follows:
[0035] According to the intestinal contour edge information of the mouse obtained in step 2, determine the ordinate y_center of the contour center point, and calculate the coordinate difference Δy_center of the contour center point of each two frames i , when the coordinate difference Δy_cneter i When the specified threshold is exceeded, the frame is marked as an invalid frame affected by breathing, that is, lab=0, and the frame is directly skipped in the optical flow calculation in step 4.
[0036] Furthermore, the fluid-based dense optical flow algorithm in step 4 is as follows:
[0037] Based on the HS classical variational model, the material transport equation is introduced to establish a direct connection between optical flow and fluid flow:
[0038]
[0039] Where I is the target image, (x1, x2) is the image coordinate; Represents the partial derivative of the grayscale of the pixel in the image along the t direction; u=(u,v), are the velocity vectors of the optical flow along the x and y directions in the rectangular coordinate system, that is, the velocity on the image plane; is the gradient operator; Where D is the diffusion coefficient, c is the fluorescence coefficient, B is a boundary term, and f(x1,x2,I) depends on the flow visualization technique used and is taken as 0;
[0040] Using the first-order smoothness constraint, the minimization equation is:
[0041]
[0042] Among them, α is the Lagrange multiplier; A is the entire image domain;
[0043] According to the principle of least action, the corresponding Euler-Lagrange equation is obtained:
[0044]
[0045] The solution of the HS equation is used as the initial approximation, and an iterative scheme from coarse to fine is used to refine the optical flow. The discretization equation is as follows:
[0046]
[0047]
[0048] set up:
[0049] (δ x u) i,j =(u i+1,j -u i-1,j ) / 2
[0050] (δ y u) i,j =(u i,j+1 -u i,j-1 ) / 2
[0051]
[0052]
[0053] Among them, h is the spatial step length; ui,j and v i,j and its various variants are all discretized expressions of u and v.
[0054] Furthermore, the process of optical flow calculation in step 4 is as follows:
[0055] Read the marked video frames into the matlab file one by one, downsample each frame to half the original image size, and use the value calculated by the HS classical variational method as the initial optical flow value u HS , the initial optical flow is interpolated to the original image size and then discretized to solve the equation; when calculating the exact value of the optical flow, an iterative scheme from coarse to fine is used to obtain the refined optical flow u FF =u HS +Δu, calculate the final optical flow vector map.
[0056] Furthermore, in step 5, the calculated optical flow index file is the motion trajectory of each pixel in these n frames, in pixels. According to the frame rate of the captured video, the displacement information is converted into speed information in pixels / s. After eliminating abnormal data, the average speed, fast zone speed, and slow zone speed of the entire intestinal area are calculated respectively.
[0057] A device for detecting the intestinal peristalsis speed of mice based on a fluid-intensive optical flow algorithm, the device is used to implement the intestinal peristalsis speed detection method of mice, the device comprises a camera unit, a region framing unit, a preprocessing unit, an optical flow calculation unit and a speed determination unit, wherein:
[0058] A camera unit, used to take videos of mouse intestinal peristalsis;
[0059] The region frame unit is used to calculate the region frame of the complete mouse intestinal peristalsis video obtained by shooting, extract the outline of the mouse intestine area by using the threshold binarization method, and frame the rectangular image area to be calculated based on the outline;
[0060] The preprocessing unit is used to preprocess the mouse intestinal peristalsis video, filter out the breathing frames frame by frame, mark the frames that shake up and down due to breathing as invalid frames, and directly skip them in the subsequent optical flow calculation;
[0061] An optical flow calculation unit is used to perform optical flow calculation; it reads every two frames of the video in a loop, uses a fluid-based dense optical flow algorithm, and obtains a set of optical flows after eliminating the influence of breathing;
[0062] The speed determination unit superimposes n-1 groups of optical flows obtained from n frames of video along the time axis to obtain an optical flow index at each pixel point in the entire intestinal area, and determines the intestinal peristalsis speed of the mouse according to the optical flow index.
[0063] A mobile terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for detecting the intestinal peristalsis speed of mice is implemented.
[0064] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0065] Example 1
[0066] Combination Figure 1 This embodiment provides a method for quantitatively detecting the intestinal peristalsis speed of mice based on a fluid dense optical flow algorithm, comprising the following steps:
[0067] Step 1: Use fluorescent dyes to stain and image the intestines of normal mice and inflamed mice, and take real-time videos of the intestinal peristalsis of mice;
[0068] Step 2: using a quantitative calculation method for mouse intestinal peristalsis speed based on fluid optical flow method, quantitatively analyzing the intestinal peristalsis videos of normal mice and inflammatory mice, and obtaining the movement conditions of the intestines of normal mice and inflammatory mice;
[0069] Step 3, analyzing various speed indicators of normal mice and inflammatory mice, determining the best monitoring time and intestinal segment, and establishing the standard for distinguishing normal mice from inflammatory mice;
[0070] Step 4: Comprehensively verify the reliability of the algorithm by comparing it with traditional methods and using offset verification methods.
[0071] As a specific example, the intestinal tract of normal mice and inflamed mice is stained and imaged using fluorescent dyes as described in step 1, and real-time videos of intestinal peristalsis of mice are taken, as follows:
[0072] To screen a fluorescent dye that has good imaging capabilities for the gastrointestinal tract and blood vessels of mice, after the mice orally ingest the fluorescent probe, obvious fluorescent signals will appear in the intestinal segments. Based on the advantages of near-infrared imaging such as high contrast and strong penetration depth, real-time videos of intestinal peristalsis were taken in normal mice and inflammatory mice at different time periods after oral administration of the probe.
[0073] As a specific example, the method for quantitatively calculating the intestinal peristalsis speed of mice based on the fluid optical flow method described in step 2 is used to quantitatively analyze the intestinal peristalsis videos of normal mice and inflammatory mice to obtain the movement conditions of the intestines of normal mice and inflammatory mice, as follows:
[0074] Step 2.1, the complete mouse video obtained in step 1 is framed for calculation, the outline of the mouse intestine is extracted using the threshold binarization method, and the rectangular image area to be calculated is framed according to the outline;
[0075] Step 2.2, pre-process the real-time video of mouse intestinal peristalsis, filter out the respiratory frames frame by frame, mark the frames that are affected by breathing and have obvious up and down jitter as invalid frames, and directly skip them in the subsequent optical flow calculation;
[0076] Step 2.3, loop through every two frames of the video, and use a fluid-based dense optical flow algorithm to obtain a set of optical flows that exclude the influence of breathing;
[0077] Step 2.4: Finally, n-1 groups of optical flows are obtained from the n frames of video. These optical flows are superimposed along the time axis to obtain the optical flow index at each pixel in the entire intestinal area.
[0078] As a specific example, every two frames of the video are read cyclically in step 2.3, and a set of optical flows after eliminating the influence of breathing is obtained using a fluid-based dense optical flow algorithm, as follows:
[0079] Based on the dense optical flow algorithm of fluid, the material transport equation is introduced on the basis of the HS classical variational model to establish a direct connection between optical flow and fluid flow:
[0080]
[0081] Where I is the target image, (x1, x2) is the image coordinate; Represents the partial derivative of the grayscale of the pixel in the image along the t direction; u=(u,v), are the velocity vectors of the optical flow along the x and y directions in the rectangular coordinate system, that is, the velocity on the image plane; is the gradient operator; Where D is the diffusion coefficient, c is the fluorescence coefficient, B is a boundary term, and f(x1,x2,I) depends on the flow visualization technique used and is taken as 0;
[0082] Using a simple first-order smoothness constraint, the minimization equation is:
[0083]
[0084] Among them, α is the Lagrange multiplier; A is the entire image domain;
[0085] According to the principle of least action, the corresponding Euler-Lagrange equation is obtained:
[0086]
[0087] The solution of the HS equation is used as the initial approximation, and an iterative scheme from coarse to fine is used to refine the optical flow. The discretization equation is as follows:
[0088]
[0089]
[0090] set up:
[0091] (δ x u) i,j =(u i+1,j -u i-1,j ) / 2
[0092] (δ y u) i,j =(u i,j+1 -u i,j-1 ) / 2
[0093] (δ xy u) i,j =(u i+1,j -u i+1,j-1 -u i-1,j+1 +u i-1,j-1 ) / 4
[0094]
[0095]
[0096] Among them, h is the spatial step length; u i,j and v i,j and its various variants are all discretized expressions of u and v.
[0097] As a specific example, the analysis of various speed indicators of normal mice and inflammatory mice described in step 3, determining the best monitoring time and intestinal segment, and establishing the standard for distinguishing normal mice from inflammatory mice are as follows:
[0098] The speed indicators of normal mice and inflammatory mice include the average speed of the intestinal area, the speed of the fast area, and the speed of the slow area. In order to conduct a comprehensive comparative analysis of the peristaltic speed of different sections of the small intestine, real-time videos were taken at different time periods after mice were orally administered tracers. The average speed values of different time periods were analyzed to determine the optimal recording time. Then, the position of the intestinal segment was located according to the larger speed value, and the intestinal segment most suitable for monitoring intestinal peristalsis was selected. Finally, the speed values of a large number of normal mice and model mice were compared, and the speed ranges of multiple indicators were statistically analyzed to establish a speed distinction standard for normal mice and inflammatory mice.
[0099] As a specific example, the reliability of the algorithm is comprehensively verified by comparing with the traditional method and offset verification method described in step 4, as follows:
[0100] Step 4.1: The velocity of the intestinal peristalsis video in the best time period is calculated by using the LK sparse optical flow method and the fluid-based dense optical flow algorithm, and the two sets of optical flows are both offset verified;
[0101] Step 4.2, superimpose the optical flow calculated from every two frames on the first frame to obtain the offset frame, and make a difference between the offset frame and the second frame to obtain the error map. Analyze the error map from multiple angles such as the error average, maximum error, and error deviation to evaluate the accuracy of the algorithm;
[0102] Step 4.3: Compare the calculation results of the fluid-based dense optical flow algorithm with the established method for evaluating small intestinal motility, the charcoal powder test, to observe whether the speed indicators of the two methods show a consistent trend.
[0103] Example 2
[0104] Combination Figure 1 The method for quantitatively detecting the intestinal peristalsis speed of mice based on the fluid dense optical flow algorithm provided in this embodiment comprises the following steps:
[0105] Step 1: Use fluorescent dyes to stain and image the intestines of normal mice and inflamed mice, and take real-time videos of the intestinal peristalsis of mice, as follows:
[0106] Near-infrared fluorescent probes can be used for imaging of inflammatory bowel disease, targeting specific biomarkers, for in vivo or in vitro imaging of the mouse intestine. In this embodiment, a fluorescent dye with good imaging capabilities for the gastrointestinal tract and blood vessels of mice is selected. In order to better shoot intestinal motility videos, the mice need to be anesthetized in advance to avoid other physiological activities affecting the observation of intestinal motility morphology. The mice that were orally administered with fluorescent probes after shaving were tied flat on the experimental table, and real-time videos of 100 frames per group were taken at 15 minutes, 30 minutes and 60 minutes, respectively, and the cameras were set to the same exposure rate and number of frames.
[0107] Step 2: Use the quantitative calculation method of mouse intestinal peristalsis speed based on fluid optical flow method to quantitatively analyze the intestinal peristalsis videos of normal mice and inflammatory mice to obtain the movement of the intestines of normal mice and inflammatory mice, as follows:
[0108] Step 2.1. After mice orally ingest fluorescent probes, obvious fluorescent signals will appear in the intestinal segments. Since the fluorescent information has accurate grayscale values, the threshold binarization method can be used to accurately outline the contours of the intestinal area. The thresholding method directly uses the imbinarize interface function in MATLAB. The binarization threshold is determined by the brightness of the fluorescent substance in the intestinal area of the mouse. After experiments, we determined the threshold range: if the speed of the entire intestinal area is tracked, the threshold is approximately 60-70; if only the speed of the bright area inside the intestinal area is tracked, the threshold is approximately 130-140, and the specific situation depends on the actual degree of staining of the mouse intestine;
[0109] In order to realize the automation of the whole process calculation, there is no need to manually intercept the calculation area. The edge information of the contour is obtained according to the obtained intestinal contour, and the combination of the maximum and minimum coordinate positions in the horizontal and vertical directions [x_min, y_min], [x_max, y_min], [x_min, y_max], [x_max, y_max] are selected as the vertices of the rectangular calculation area, and the image in the rectangle is intercepted as the input of the subsequent optical flow calculation;
[0110] Step 2.2: Since the ups and downs of breathing almost only affect the longitudinal direction of the intestine, the vertical coordinate y_center of the contour center point is determined according to the contour edge information obtained in step 2.1, and the coordinate difference Δy_center of the contour center point of each two frames is calculated. i , when the difference value suddenly changes or exceeds the specified threshold, the frame is marked as an invalid frame affected by breathing, that is, lab = 0, and this frame is directly skipped in the subsequent optical flow calculation; the breathing fluctuation amplitude of different mice is different, the threshold of mice with large breathing fluctuation is set to 5-7 pixels, and the threshold of mice with small breathing fluctuation is set to 3-4 pixels; only the breathing frames are marked, and they are not removed from the original video, because removing some frames may cause frame rate errors and optical flow disturbances, such as Figure 2 As shown;
[0111] Step 2.3, loop through every two frames of the video and use a fluid-based dense optical flow algorithm to obtain a set of optical flows that exclude the effects of breathing, as follows:
[0112] Read the marked video frames into the matlab file one by one, downsample each frame to half the original image size, and use the value calculated by the HS classical variational method as the initial optical flow value u HS , the initial optical flow is interpolated and inserted into the equation to accelerate the convergence of the solution of the equation; when calculating the exact value of the optical flow, a coarse-to-fine iterative scheme is used to obtain the refined optical flow u FF =u HS +Δu, the calculated optical flow vector diagram, such as Figure 3 As shown;
[0113] Step 2.4: Finally, 99 optical flow images are obtained from the 100 frames of video. These optical flow images are superimposed along the time axis to obtain the optical flow index at each pixel in the entire intestinal area, as follows:
[0114] The calculated optical flow file is the possible motion trajectory of each pixel in these 100 frames, in pixels. According to the frame rate of the video, the camera is set to shoot 5 frames per second in this embodiment, and the displacement information is converted into speed information in pixels / s. After eliminating abnormal data, the average speed of the entire intestinal area, the speed of the fast area, the speed of the slow area, and other indicators are calculated respectively, such as Figure 4shown.
[0115] Step 3: Analyze the speed indicators of normal mice and inflammatory mice, determine the best monitoring time and intestinal segment, and establish the distinction criteria between normal mice and inflammatory mice, as follows:
[0116] In order to conduct a comprehensive comparative analysis of the peristaltic speed of different sections of the small intestine, real-time videos were taken at 15 minutes, 30 minutes and 60 minutes after the mice were orally administered with the tracer. By analyzing the average speed values at different time periods, it was found that the intestinal peristaltic rate of the mice was the highest 15 minutes after the oral administration of the tracer, and there was no significant difference in the peristaltic rate between 30 minutes and 60 minutes. The anatomy confirmed that the tracer had entered the jejunum at 30 minutes, and reached the terminal ileum after 60 minutes. This result is consistent with the known physiological pattern, that is, the proximal part of the small intestine has greater peristaltic power than the distal part. For mice with colitis, the peristaltic speed of different intestinal segments was also compared, and it was found that there was no significant difference in the peristaltic speed at different time points, but there was a trend of continuous decline.
[0117] A comprehensive comparison of the speed indicators of normal mice and inflamed mice showed that the ratio of the fast zone speed to the average speed of normal mice and inflamed mice was consistent, but the average speed of the entire intestinal area of normal mice was almost twice that of inflamed mice; for most normal mice, the average peristalsis speed of the intestinal segment was 15-20pixel / s, and the average peristalsis speed of the intestinal segment of inflamed mice was 7-10pixel / s. The specific situation depends on the intestinal motility and anesthesia degree of the mouse and the camera shooting frame rate.
[0118] Step 4: By comparing with traditional methods and offset verification methods, the reliability of the algorithm is comprehensively verified as follows:
[0119] In order to verify the accuracy of the algorithm from multiple aspects, the calculation results of the fluid-based dense optical flow algorithm and the classic LK sparse optical flow method were offset for verification. According to the error graph, many outliers with high error white spots appeared on the error graph of the LK sparse optical flow method, while the error graph of the fluid-based dense optical flow algorithm was evenly distributed, indicating that this method is more robust than other optical flow methods. And the average error of the fluid-based dense optical flow algorithm is at least 0.7-0.8 lower than that of the LK method. In addition, the calculation results of the fluid-based dense optical flow algorithm were also compared with the established method for evaluating small intestinal motility-the charcoal powder test. The two methods showed a consistent trend in reducing the intestinal motility of model mice.
[0120] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for detecting mouse intestinal peristalsis speed based on fluid dense optical flow algorithm, characterized in that: The following steps are involved: Step 1: Stain and image the mouse intestines and take videos of the mouse intestinal peristalsis; Step 2: Frame the calculation area of the complete mouse intestinal peristalsis video obtained in step 1, use the threshold binarization method to extract the outline of the mouse intestine, and frame the rectangular image area to be calculated based on this outline; Step 3: Preprocess the mouse intestinal peristalsis video, filter out the breathing frames frame by frame, mark the frames that shake up and down due to breathing as invalid frames, and skip them directly in the subsequent optical flow calculation; Step 4: Calculate the optical flow: read every two frames of the video in a loop, use a fluid-based dense optical flow algorithm, and obtain a set of optical flows after eliminating the influence of breathing; Step 5: Finally, n-1 groups of optical flows are obtained from the n frames of video. These optical flows are superimposed along the time axis to obtain the optical flow index at each pixel in the entire intestinal area, and the intestinal peristalsis speed of the mouse is determined based on the optical flow index.
2. The method for detecting mouse intestinal peristalsis speed based on fluid dense optical flow algorithm according to claim 1, characterized in that: In step 1, the mouse intestine is stained by orally administering a fluorescent probe to the mouse.
3. The method for detecting mouse intestinal peristalsis speed based on fluid dense optical flow algorithm according to claim 1, characterized in that: In step 2, the threshold binarization method uses the imbinarize interface function in Matlab. The binarization threshold is determined by the brightness of the fluorescent substance in the mouse intestine: if the speed of the entire intestine is tracked, the binarization threshold is 60-70; if only the bright area inside the intestine is tracked, the binarization threshold is 130-140.
4. The method for detecting mouse intestinal peristalsis speed based on fluid dense optical flow algorithm according to claim 1, characterized in that: In step 2, the edge information of the intestinal area is obtained according to the obtained intestinal area contour, and the combination of the maximum and minimum coordinate positions in the horizontal and vertical directions is selected as the vertices of the rectangular calculation area, and the image in the rectangle is intercepted to perform the optical flow calculation in step 4.
5. The method for detecting mouse intestinal peristalsis speed based on fluid dense optical flow algorithm according to claim 1, characterized in that: In step 3, the mouse intestinal peristalsis video is preprocessed as follows: According to the intestinal contour edge information of the mouse obtained in step 2, determine the ordinate y_center of the contour center point, and calculate the coordinate difference Δy_center of the contour center point of each two frames i , when the coordinate difference Δy_cneter i When the specified threshold is exceeded, the frame is marked as an invalid frame affected by breathing, that is, lab=0, and the frame is directly skipped in the optical flow calculation in step 4.
6. The method for detecting mouse intestinal peristalsis speed based on fluid dense optical flow algorithm according to claim 1, characterized in that: The fluid-based dense optical flow algorithm in step 4 is as follows: Based on the HS classical variational model, the material transport equation is introduced to establish a direct connection between optical flow and fluid flow: Where I is the target image, (x1, x2) is the image coordinate; Represents the partial derivative of the grayscale of the pixel in the image along the t direction; u = (u, v), are the velocity vectors of the optical flow along the x and y directions in the rectangular coordinate system, that is, the velocity on the image plane; is the gradient operator; Where D is the diffusion coefficient, c is the fluorescence coefficient, B is a boundary term, and f(x1, x2, I) depends on the flow visualization technique used and is taken as 0; Using the first-order smoothness constraint, the minimization equation is: Among them, α is the Lagrange multiplier; A is the entire image domain; According to the principle of least action, the corresponding Euler-Lagrange equation is obtained: The solution of the HS equation is used as the initial approximation, and an iterative scheme from coarse to fine is used to refine the optical flow. The discretization equation is as follows: set up: (δ x in) i,j =(in i+1,j -in i-1,j ) / 2 (δ y in) i,j =(in i,j+1 -in i,j-1 ) / 2 (δ xy in) i,j =(in i+1,j -in i+1,j-1 -in i-1,j+1 +in i-1,j-1 ) / 4 Among them, h is the spatial step length; u i,j and v i,j and its various variants are all discrete expressions of u and v.
7. The method for detecting mouse intestinal peristalsis speed based on fluid dense optical flow algorithm according to claim 6, characterized in that: The process of optical flow calculation in step 4 is as follows: Read the marked video frames into the matlab file one by one, downsample each frame to half the original image size, and use the value calculated by the HS classical variational method as the initial optical flow value u HS , the initial optical flow is interpolated to the original image size and then discretized to solve the equation; when calculating the exact value of the optical flow, an iterative scheme from coarse to fine is used to obtain the refined optical flow u FF =u HS +Δu, calculate the final optical flow vector map.
8. The method for detecting mouse intestinal peristalsis speed based on fluid dense optical flow algorithm according to claim 6, characterized in that: In step 5, the calculated optical flow index file is the motion trajectory of each pixel in these n frames, in pixels. According to the frame rate of the captured video, the displacement information is converted into speed information in pixels / s. After eliminating abnormal data, the average speed, fast zone speed, and slow zone speed of the entire intestinal area are calculated respectively.
9. A mouse intestinal peristalsis speed detection device based on fluid dense optical flow algorithm, characterized in that: The device is used to implement the mouse intestinal peristalsis speed detection method according to any one of claims 1 to 8, and the device comprises a camera unit, a region framing unit, a preprocessing unit, an optical flow calculation unit and a speed determination unit, wherein: A camera unit, used to take videos of mouse intestinal peristalsis; The region frame unit is used to calculate the region frame of the complete mouse intestinal peristalsis video obtained by shooting, extract the outline of the mouse intestine area by using the threshold binarization method, and frame the rectangular image area to be calculated based on the outline; The preprocessing unit is used to preprocess the mouse intestinal peristalsis video, filter out the breathing frames frame by frame, mark the frames that shake up and down due to breathing as invalid frames, and directly skip them in the subsequent optical flow calculation; An optical flow calculation unit is used to perform optical flow calculation; it reads every two frames of the video in a loop, uses a fluid-based dense optical flow algorithm, and obtains a set of optical flows after eliminating the influence of breathing; The speed determination unit superimposes n-1 groups of optical flows obtained from n frames of video along the time axis to obtain an optical flow index at each pixel point in the entire intestinal area, and determines the intestinal peristalsis speed of the mouse according to the optical flow index.
10. A mobile terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for detecting the intestinal motility speed of mice as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Enteroscope operation speed determination method and device, computer equipment and storage medium
CN118735964A