Microcirculation video stabilization method, device, terminal and storage medium
By decomposing microcirculation videos into sub -videos and stable treatment of each sub -video, the problem of poor microcirculation video stability in the existing technology has been solved, and a better video stability effect is achieved.
Patent Information
- Application Number
- CN202411578978.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-07
AI Technical Summary
The existing video stabilization method is difficult to achieve expectations when performing micro-loop video stabilization.
By obtaining the microcirculation video of the collection of video collection equipment, the frame image is selected from the microcirculation video from the microcirculation of the frame, and the microcirculation video is decomposed into multiple sub -videos, and the video is stable for each sub -video. Finally, according to the frame of the original video Substitute reconstruction stable video.
This method can more effectively reduce the instability of the video picture caused by the jitter of the video capture device, and achieve better video stabilization effects, especially when facing micro-loop videos with small and multi-target images.
Smart Images

Figure CN119094775B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a microcirculation video stabilization method, device, terminal and storage medium. Background Art
[0002] Video stabilization refers to the use of related equipment or algorithms to make the original video sequence captured by the video device more stable or to stabilize the original sequence to remove the jitter. The purpose of video stabilization is, on the one hand, to improve the user's viewing comfort, and on the other hand, as a preprocessing step for other video processing tasks, such as target tracking, target detection, and video compression, it can improve the accuracy and robustness of these processing tasks. No matter from which aspect, video stabilization is of great significance.
[0003] Microcirculation refers to the blood circulation between arterioles and venules. When microcirculatory dysfunction occurs or the microcirculatory blood perfusion volume decreases, nutrients and oxygen cannot meet the needs of tissue oxidative metabolism. At the same time, waste in tissues and organs cannot be discharged in time, which can lead to tissue and organ dysfunction or failure. It is an important cause of the occurrence and development of many diseases. Therefore, the measurement of microcirculatory blood flow velocity is of great significance. There are two main methods for measuring microcirculatory blood flow velocity. One is to measure it through a Doppler analyzer, and the other is to analyze and calculate the microcirculatory video. In the process of analyzing and calculating the microcirculatory video, the microcirculatory video must first be stabilized.
[0004] However, the inventors found in the process of realizing the present invention that the existing video stabilization methods are mostly aimed at scenes with obvious targets such as people, vehicles or animals, while when stabilizing microcirculation videos, they mainly target small and numerous red blood cells in blood vessels, resulting in that the current video stabilization methods are difficult to achieve the expected effect when stabilizing microcirculation videos. Summary of the invention
[0005] The embodiments of the present invention provide a microcirculation video stabilization method, device, terminal and storage medium to solve the problem that the current video stabilization method is difficult to achieve the expected effect when performing microcirculation video stabilization.
[0006] In a first aspect, an embodiment of the present invention provides a video stabilization method, comprising:
[0007] Acquire microcirculation videos acquired by a video acquisition device;
[0008] Extracting frame images from the microcirculation video according to a frame extraction interval, and decomposing the microcirculation video into a plurality of sub-videos according to the extracted frame images, wherein the frame extraction interval is a preset value or is determined according to the degree of jitter of the microcirculation video;
[0009] Performing video stabilization processing on each of the sub-videos to obtain each stabilized sub-video;
[0010] According to the order corresponding to the frame number of each frame image in the microcirculation video, each of the stable sub-videos is reconstructed to obtain a microcirculation stable video after the microcirculation video is stabilized.
[0011] In a possible implementation, obtaining a microcirculation video captured by a video capture device includes:
[0012] Obtaining the original microcirculation video captured by a video acquisition device;
[0013] The original microcirculation video is subjected to video stabilization processing to obtain a microcirculation video.
[0014] In a possible implementation, performing video stabilization processing on the original microcirculation video to obtain the microcirculation video includes:
[0015] Acquire each frame of the original microcirculation video frame by frame, and calculate the motion feature points in each frame of the image;
[0016] Screening the motion feature points to determine target feature points whose stability meets preset requirements;
[0017] Performing motion estimation on the original microcirculation video according to the target feature points to obtain a global motion trajectory of the original microcirculation video;
[0018] The global motion trajectory is smoothed to obtain a microcirculation video.
[0019] In a possible implementation, the process of determining the frame extraction interval according to the jitter degree of the microcirculation video is as follows:
[0020] Calculating the difference between two adjacent frames of images in the microcirculation video in sequence;
[0021] The degree of jitter of the microcirculation video is determined according to each degree of difference, and the frame extraction interval is determined according to the degree of jitter.
[0022] In a possible implementation, determining the jitter degree of the microcirculation video according to each difference degree, and determining the frame extraction interval according to the jitter degree, includes:
[0023] According to the size of each difference degree, the frame images whose difference values between the difference degrees are within the set fluctuation range are divided into a group, and the jitter level corresponding to each group of frame images is determined according to the corresponding difference degrees in each group of frame images;
[0024] For each group of frame images, the frame extraction interval of the group of frame images is determined according to the jitter level corresponding to the group of frame images.
[0025] In a possible implementation, reconstructing each of the stabilized sub-videos in the order corresponding to the frame number of each frame image in the microcirculation video to obtain a microcirculation stabilized video after the microcirculation video is stabilized includes:
[0026] According to the order corresponding to the frame number of each frame image in the microcirculation video, the images in each of the stable sub-videos are reorganized and reconstructed to obtain a reconstructed video;
[0027] The reconstructed video is subjected to video stabilization processing to obtain a microcirculation stabilized video after the microcirculation video is subjected to video stabilization.
[0028] In a possible implementation manner, after reconstructing each of the stable sub-videos, the method further includes:
[0029] Determine whether the image in the reconstructed video has a black border after reconstruction;
[0030] If the image in the reconstructed video has black edges, the reconstructed video is cropped.
[0031] In a second aspect, an embodiment of the present invention provides a microcirculation video stabilization device, comprising:
[0032] A preprocessing module, used for acquiring microcirculation videos acquired by a video acquisition device;
[0033] A frame extraction and decomposition module, used for extracting frame images from the microcirculation video according to a frame extraction interval, and decomposing the microcirculation video into a plurality of sub-videos according to the extracted frame images, wherein the frame extraction interval is a preset value or is determined according to the degree of jitter of the microcirculation video;
[0034] A stabilization processing module, used for performing video stabilization processing on each of the sub-videos to obtain each stabilized sub-video;
[0035] The reconstruction module is used to reconstruct each of the stable sub-videos in the order corresponding to the frame number of each frame image in the microcirculation video to obtain a microcirculation stable video after the microcirculation video is stabilized.
[0036] In a third aspect, an embodiment of the present invention provides a terminal, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the steps of the method described in the first aspect or any possible implementation of the first aspect.
[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation method of the first aspect are implemented.
[0038] The embodiment of the present invention provides a microcirculation video stabilization method, device, terminal and storage medium. The microcirculation video captured by a video acquisition device is obtained, and frame images are extracted from the microcirculation video according to the frame extraction interval. The microcirculation video is decomposed into multiple sub-videos according to the extracted frame images. The jitter between frames in the original microcirculation video can be increased by decomposing the microcirculation video into multiple sub-videos to obtain sub-videos with more severe jitter. On this basis, each sub-video is subjected to video stabilization processing to obtain each stable sub-video. Relatively smooth jitter that cannot be removed when the video stabilization processing is directly performed can be removed. Finally, each stable sub-video is reconstructed in the order corresponding to the frame number of each frame image in the original microcirculation video to obtain a microcirculation stabilized video after the original microcirculation video is subjected to video stabilization. When the video stabilization method faces a small and multiple target image such as a microcirculation video, it can better reduce the instability of the video picture caused by the jitter of the video acquisition device and achieve a better video stabilization effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0040] Figure 1 is a flow chart of an implementation of a video stabilization method provided by an embodiment of the present invention;
[0041] Figure 2 is a schematic diagram of performing frame skipping according to a preset interval provided by an embodiment of the present invention;
[0042] Figure 3 is a flowchart for implementing the stabilization process provided by an embodiment of the present invention;
[0043] Figure 4 is a structural schematic diagram of a video stabilization device provided by an embodiment of the present invention;
[0044] Figure 5 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0046] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0047] See also Figure 1 , which shows a flow chart of the implementation of the microcirculation video stabilization method provided by an embodiment of the present invention, which is described in detail as follows:
[0048] In step 101, a microcirculation video captured by a video capture device is obtained.
[0049] For example, the microcirculation video captured by the video capture device in this embodiment may be a video of nail fold microcirculation, or a video of sublingual microcirculation, etc., which is not limited in this embodiment.
[0050] It should be noted that, in addition to this, if other videos about people, cars, animals, scenery, etc. have higher video stabilization processing requirements, or for other videos containing small and numerous target objects, the microcirculation video stabilization method provided in this embodiment can also be used, and this embodiment does not limit this.
[0051] In step 102, frame images are extracted from the microcirculation video according to the frame extraction interval, and the microcirculation video is decomposed into a plurality of sub-videos according to the extracted frame images.
[0052] The frame extraction interval is a preset value or is determined according to the degree of jitter of the microcirculation video.
[0053] In step 103, video stabilization processing is performed on each sub-video to obtain each stabilized sub-video.
[0054] For example, Figure 2As shown, if frame images are extracted from the microcirculation video according to the frame extraction interval, and the frame extraction interval is a preset value, assuming that the preset value is 4, that is, one frame image is extracted from the microcirculation video every 4 frames to form a sub-video. That is, the images with frame numbers 1, 6, 11, etc. in the microcirculation video are extracted to form a sub-video, the images with frame numbers 2, 7, 12, etc. in the microcirculation video are extracted to form a sub-video, the images with frame numbers 3, 8, 13, etc. in the microcirculation video are extracted to form a sub-video, the images with frame numbers 4, 9, 14, etc. in the microcirculation video are extracted to form a sub-video, and the images with frame numbers 5, 10, 15, etc. in the microcirculation video are extracted to form a sub-video, and a total of 5 sub-videos are obtained.
[0055] It should be noted that in the above embodiment, the preset value of 4 is only used as an example, and the specific value of the preset value is not limited. According to actual needs, the preset value can also be set to 3, 2 or even 1, which is smaller than 4, or the preset value can also be set to 5, 6, 7, etc., which is larger than 4.
[0056] In one embodiment, if frame images are extracted from the microcirculation video according to the frame extraction interval, and the frame extraction interval is determined according to the degree of jitter of the microcirculation video, the process of determining the frame extraction interval according to the degree of jitter of the microcirculation video may be:
[0057] The difference between two adjacent frames of the microcirculation video is calculated in sequence; the jitter degree of the microcirculation video is determined according to each difference degree, and the frame extraction interval is determined according to the jitter degree.
[0058] In this embodiment, in order to determine a more appropriate frame extraction interval, before extracting frame images from the microcirculation video according to the frame extraction interval, the jitter degree corresponding to the microcirculation video can be determined first, and then the frame extraction interval when decomposing the microcirculation video can be determined based on the jitter degree.
[0059] In this embodiment, considering that when setting the frame extraction interval, it is generally selected according to whether the video is sensitive to relatively smooth jitter, the jitter degree corresponding to the microcirculation video can be determined first. If the jitter degree of the microcirculation video itself is relatively severe, a smaller frame extraction interval can be set. If the jitter degree of the microcirculation video itself is relatively slow, a larger frame extraction interval can be set.
[0060] Exemplarily, a comparison table of jitter levels and frame extraction intervals may be set, so that after the jitter level corresponding to the microcirculation video is determined, the corresponding frame extraction interval is determined according to the comparison table.
[0061] In order to determine the jitter level corresponding to the microcirculation video, the difference between two adjacent frames of the microcirculation video can be calculated in sequence.
[0062] Exemplarily, the optical flow intensity of two adjacent frames of images can be calculated using a dense optical flow method, and the optical flow intensity can be used as the difference. The similarity of two adjacent frames of images can also be calculated, and the difference of the two adjacent frames of images can be obtained based on the similarity. Alternatively, the displacement of the target in each of the two adjacent frames of images can be obtained, and the difference of the two adjacent frames of images can be obtained based on the displacement of the target in each of the two adjacent frames of images. This embodiment does not limit the specific method of calculating the difference of two adjacent frames of images.
[0063] It should be noted that since the microcirculation video is generally a video obtained by performing video stabilization processing on the original microcirculation video, in order to more appropriately determine the frame extraction interval, the difference between two adjacent frames of the original microcirculation video can be directly calculated, or the difference between two adjacent frames of the microcirculation video obtained by performing video stabilization processing on the original microcirculation video can be calculated.
[0064] In one embodiment, after calculating the difference between two adjacent frames of images in the microcirculation video in sequence, the frame images whose difference between the differences is within a set fluctuation range can be divided into a group according to the size of each difference, and the jitter level corresponding to each group of frame images is determined according to the corresponding differences in each group of frame images, so that for each group of frame images, the frame extraction interval of the group of frame images is determined according to the jitter level corresponding to the group of frame images.
[0065] In this embodiment, in order to obtain a more accurate video stabilization effect, the images in the microcirculation video can be grouped according to the difference between each two adjacent frames of the microcirculation video, and the images with similar difference values can be divided into a group, that is, the frame images whose difference between the differences is within a set fluctuation range are divided into a group, so as to determine a frame extraction interval for each group of frame images, so as to perform more refined video stabilization processing on the microcirculation video.
[0066] For example, there are 200 frames of images in a microcirculation video, where the difference of the first 100 frames of images is within the set fluctuation range of the first difference, and the difference of the last 100 frames of images is within the set fluctuation range of the second difference, then the jitter level and the corresponding frame extraction interval corresponding to the first 100 frames of images can be determined according to the first difference, and the jitter level and the corresponding frame extraction interval corresponding to the last 100 frames of images can be determined according to the second difference. The first difference and the second difference can be the mean, median, weighted mean, etc. of each difference in the corresponding frame image group, which is not limited in this embodiment.
[0067] In one embodiment, in order to obtain better effect when performing video stabilization processing on the sub-video, after obtaining the original microcirculation video captured by the video capture device, video stabilization processing can be performed on the original microcirculation video first, and then the microcirculation video obtained after the video stabilization processing can be decomposed.
[0068] In this embodiment, by first performing video stabilization processing on the original microcirculation video, the more severe jitter in the original microcirculation video can be processed first to obtain the microcirculation video after removing the severe jitter, and then the microcirculation video is decomposed into sub-videos, and then the relatively smooth jitter in the original microcirculation video is processed by performing video stabilization processing on the sub-videos in a targeted manner, so as to better perform video stabilization processing on the original microcirculation video to obtain a stabilization effect that is more conducive to subsequent processing.
[0069] In one embodiment, if Figure 3 As shown, performing video stabilization processing on the original microcirculation video to obtain the microcirculation video may include: acquiring each frame of the original microcirculation video frame by frame, and calculating the motion feature points in each frame; screening the motion feature points to determine the target feature points whose stability meets the preset requirements; performing motion estimation on the original microcirculation video according to the target feature points to obtain the global motion trajectory of the original microcirculation video; and smoothing the global motion trajectory to obtain the microcirculation video.
[0070] like Figure 3 As shown, in this embodiment, the video stabilization processing mainly reads each frame of the original microcirculation video frame by frame, thereby calculating the feature points, determining the motion feature points in each frame, and then screening the motion feature points through feature point selection, selecting feature points with high stability, and then performing motion estimation on the original microcirculation video according to the target feature points with high stability to obtain the global motion trajectory of the original microcirculation video, and then smoothing the obtained global motion trajectory to remove high-frequency jitter and retain a smooth motion trend, thereby obtaining a preliminary stable video of the original microcirculation video as the microcirculation video for subsequent processing.
[0071] Exemplarily, an optical flow method, a feature point correspondence method, a block matching method, etc. may be used to complete the process from feature point calculation to trajectory calculation, which is not limited in this embodiment.
[0072] In this embodiment, after calculating the global motion trajectory of the original microcirculation video, the global motion trajectory is smoothed, for example, by curve fitting the global motion trajectory to obtain a smooth trajectory, and then a preliminary stable video of the original microcirculation video is obtained based on the smooth trajectory, so that the video is more stable.
[0073] The process of stabilizing the original microcirculation video can be referred to Figure 3 In addition, when performing video stabilization processing on each sub-video obtained after decomposing the microcirculation video, you can also refer to Figure 3 .
[0074] In step 104, each stabilized sub-video is reconstructed in the order corresponding to the frame number of each frame image in the microcirculation video to obtain a microcirculation stabilized video after the microcirculation video is stabilized.
[0075] In one embodiment, reconstructing each stabilized sub-video in the order corresponding to the frame number of each frame image in the microcirculation video to obtain a microcirculation stabilized video after the microcirculation video is stabilized may include:
[0076] First, the images in each stable sub-video are reorganized in the order corresponding to the frame number of each frame image in the microcirculation video to obtain a reconstructed video, and then the reconstructed video is subjected to video stabilization processing to obtain a microcirculation stabilized video after the microcirculation video is subjected to video stabilization.
[0077] In this embodiment, considering that when obtaining each stable sub-video, the next frame is stabilized according to the previous frame separated by multiple frames, for example, the 6th frame image is stabilized according to the 1st frame, and the 7th frame image is stabilized according to the 2nd frame image, therefore, after performing video stabilization processing on each sub-video, directly reconstructing each stable sub-video in the order corresponding to the frame number of each frame image in the microcirculation video, the stability between adjacent frames will deteriorate, and the overall video needs to be stabilized again. Therefore, after obtaining the reconstructed video, the reconstructed video is subjected to video stabilization processing again, so as to smooth the global motion trajectory, remove high-frequency jitter, retain a stable motion trend, and thus obtain a microcirculation stabilized video with better video stabilization effect.
[0078] The process of stabilizing the reconstructed video in this embodiment can also be referred to Figure 3 , I will not go into details here.
[0079] In one embodiment, after reconstructing each stable sub-video, the following steps may also be included:
[0080] It is determined whether the image in the reconstructed video has black edges after reconstruction. If the image in the reconstructed video has black edges, the reconstructed video is cropped.
[0081] In this embodiment, considering that image transformation processes such as image stabilization processing generally cause black edges to appear in the image, which in turn causes image proportion imbalance, therefore, after reconstructing each stabilized sub-video or after stabilizing the reconstructed video, it is also possible to determine whether the image in the reconstructed video or the stabilized reconstructed video has black edges. If black edges exist, cropping is performed.
[0082] The embodiment of the present invention obtains a microcirculation video captured by a video capture device, extracts frame images from the microcirculation video according to a frame extraction interval, and decomposes the microcirculation video into multiple sub-videos according to the extracted frame images. The jitter between frames in the original microcirculation video can be increased by decomposing the microcirculation video into multiple sub-videos to obtain sub-videos with more severe jitters. On this basis, each sub-video is subjected to video stabilization processing to obtain each stable sub-video, and relatively smooth jitter that cannot be removed when the video stabilization processing is directly performed can be removed. Finally, each stable sub-video is reconstructed in the order corresponding to the frame number of each frame image in the original microcirculation video to obtain a microcirculation stabilized video after the original microcirculation video is subjected to video stabilization. When the video stabilization method faces a small and multiple target image such as a microcirculation video, it can better reduce the instability of the video picture caused by the jitter of the video capture device and achieve a better video stabilization effect.
[0083] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0084] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.
[0085] Figure 4 The structure diagram of the video stabilization device provided by the embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0086] like Figure 4 As shown, the microcirculation video stabilization device includes: a preprocessing module 41, a frame extraction and decomposition module 42, a stabilization processing module 43 and a reconstruction module 44.
[0087] The preprocessing module 41 is used to obtain the microcirculation video captured by the video capture device.
[0088] The frame extraction and decomposition module 42 is used to extract frame images from the microcirculation video according to the frame extraction interval, and decompose the microcirculation video into multiple sub-videos according to the extracted frame images, wherein the frame extraction interval is a preset value or is determined according to the jitter degree of the microcirculation video.
[0089] The stabilization processing module 43 is used to perform video stabilization processing on each sub-video to obtain each stabilized sub-video.
[0090] The reconstruction module 44 is used to reconstruct each stable sub-video according to the order corresponding to the frame number of each frame image in the microcirculation video, so as to obtain a microcirculation stable video after the microcirculation video is stabilized.
[0091] The embodiment of the present invention obtains a microcirculation video captured by a video capture device, extracts frame images from the microcirculation video according to a frame extraction interval, and decomposes the microcirculation video into multiple sub-videos according to the extracted frame images. The jitter between frames in the original microcirculation video can be increased by decomposing the microcirculation video into multiple sub-videos to obtain sub-videos with more severe jitters. On this basis, each sub-video is subjected to video stabilization processing to obtain each stable sub-video, and relatively smooth jitter that cannot be removed when the video stabilization processing is directly performed can be removed. Finally, each stable sub-video is reconstructed in the order corresponding to the frame number of each frame image in the original microcirculation video to obtain a microcirculation stabilized video after the original microcirculation video is subjected to video stabilization. When the video stabilization method faces a small and multiple target image such as a microcirculation video, it can better reduce the instability of the video picture caused by the jitter of the video capture device and achieve a better video stabilization effect.
[0092] In a possible implementation, the preprocessing module 41 may be used to obtain the original microcirculation video captured by a video capture device; and perform video stabilization processing on the original microcirculation video to obtain the microcirculation video.
[0093] In a possible implementation, the preprocessing module 41 can be used to acquire each frame of the original microcirculation video frame by frame, and calculate the motion feature points in each frame; screen the motion feature points to determine the target feature points whose stability meets the preset requirements; perform motion estimation on the original microcirculation video according to the target feature points to obtain the global motion trajectory of the original microcirculation video; and smooth the global motion trajectory to obtain the microcirculation video.
[0094] In a possible implementation, the frame extraction module 42 can also be used to sequentially calculate the difference between two adjacent frames of the microcirculation video; determine the jitter degree of the microcirculation video according to each difference, and determine the frame extraction interval according to the jitter degree.
[0095] In a possible implementation, the frame extraction decomposition module 42 can be used to divide the frame images whose difference values between the difference degrees are within a set fluctuation range into a group according to the size of each difference degree, and determine the jitter level corresponding to each group of frame images according to the corresponding differences in each group of frame images; for each group of frame images, determine the frame extraction interval of the group of frame images according to the jitter level corresponding to the group of frame images.
[0096] In a possible implementation, the reconstruction module 43 can be used to reorganize the images in each stable sub-video in the order corresponding to the frame number of each frame image in the microcirculation video to obtain a reconstructed video; perform video stabilization processing on the reconstructed video to obtain a microcirculation stabilized video after the microcirculation video is stabilized.
[0097] In a possible implementation, the reconstruction module 43 may also be used to determine whether the image in the reconstructed video has a black border after reconstruction; if the image in the reconstructed video has a black border, the reconstructed video is cropped.
[0098] Figure 5 is a schematic diagram of a terminal provided by an embodiment of the present invention. Figure 5 As shown, the terminal 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the above-mentioned various microcirculation video stabilization method embodiments are implemented, for example Figure 1 Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 4 The functions of each module are shown.
[0099] Exemplarily, the computer program 52 may be divided into one or more modules / units, one or more modules / units are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the terminal 5. For example, the computer program 52 may be divided into Figure 4 The modules shown.
[0100] The terminal 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of terminal 5 and does not constitute a limitation on terminal 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0101] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0102] The memory 51 may be an internal storage unit of the terminal 5, such as a hard disk or memory of the terminal 5. The memory 51 may also be an external storage device of the terminal 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 5. Further, the memory 51 may also include both an internal storage unit of the terminal 5 and an external storage device. The memory 51 is used to store computer programs and other programs and data required by the terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0103] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0104] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0105] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0106] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0107] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0108] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0109] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned microcirculation video stabilization method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.
[0110] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A microcirculation video stabilization method, characterized in that: include: Acquire microcirculation videos acquired by a video acquisition device; Decomposing the microcirculation video into a plurality of sub-videos, wherein the number of images separated by two adjacent frames of images in each sub-video in the microcirculation video is a frame extraction interval, and the frame extraction interval is a preset value or is determined according to the degree of jitter of the microcirculation video; Performing video stabilization processing on each of the sub-videos to obtain each stabilized sub-video; The images in each of the stabilized sub-videos are reorganized in the order corresponding to the frame number of each frame of the microcirculation video to obtain a microcirculation stabilized video after the microcirculation video is stabilized.
2. The microcirculation video stabilization method according to claim 1, characterized in that: Obtain microcirculation videos collected by video acquisition equipment, including: Obtaining the original microcirculation video captured by a video acquisition device; The original microcirculation video is subjected to video stabilization processing to obtain a microcirculation video.
3. The microcirculation video stabilization method according to claim 2, characterized in that: Performing video stabilization processing on the original microcirculation video to obtain a microcirculation video includes: Acquire each frame of the original microcirculation video frame by frame, and calculate the motion feature points in each frame of the image; Screening the motion feature points to determine target feature points whose stability meets preset requirements; Performing motion estimation on the original microcirculation video according to the target feature points to obtain a global motion trajectory of the original microcirculation video; The global motion trajectory is smoothed to obtain a microcirculation video.
4. The microcirculation video stabilization method according to claim 1, characterized in that: The process of determining the frame extraction interval according to the jitter degree of the microcirculation video is as follows: Calculating the difference between two adjacent frames of images in the microcirculation video in sequence; The degree of jitter of the microcirculation video is determined according to each degree of difference, and the frame extraction interval is determined according to the degree of jitter.
5. The microcirculation video stabilization method according to claim 4, characterized in that: Determining the jitter degree of the microcirculation video according to each of the differences, and determining the frame extraction interval according to the jitter degree, including: According to the size of each difference degree, the frame images whose difference values between the difference degrees are within the set fluctuation range are divided into a group, and the jitter level corresponding to each group of frame images is determined according to the corresponding difference degrees in each group of frame images; For each group of frame images, the frame extraction interval of the group of frame images is determined according to the jitter level corresponding to the group of frame images.
6. The microcirculation video stabilization method according to claim 1, characterized in that: According to the order corresponding to the frame number of each frame image in the microcirculation video, the images in each of the stabilized sub-videos are reorganized to obtain a microcirculation stabilized video after the microcirculation video is stabilized, including: Recombining the images in each of the stable sub-videos according to the order corresponding to the frame number of each frame of the image in the microcirculation video to obtain a reconstructed video; The reconstructed video is subjected to video stabilization processing to obtain a microcirculation stabilized video after the microcirculation video is subjected to video stabilization.
7. The microcirculation video stabilization method according to claim 1, characterized in that: After reconstructing each of the stable sub-videos, the method further includes: Determine whether the image in the reconstructed video has a black border after reconstruction; If the image in the reconstructed video has black edges, the reconstructed video is cropped.
8. A microcirculation video stabilization device, characterized in that: include: A preprocessing module, used for acquiring microcirculation videos acquired by a video acquisition device; A frame extraction decomposition module is used to decompose the microcirculation video into a plurality of sub-videos, wherein the number of images between two adjacent frames of images in each sub-video in the microcirculation video is a frame extraction interval, and the frame extraction interval is a preset value or is determined according to the degree of jitter of the microcirculation video; A stabilization processing module, used for performing video stabilization processing on each of the sub-videos to obtain each stabilized sub-video; The reconstruction module is used to reorganize the images in each of the stable sub-videos in the order corresponding to the frame number of each frame image in the microcirculation video to obtain a microcirculation stable video after the microcirculation video is stabilized.
9. A terminal, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Video anti-shake method and system suitable for movable time-lapse photography and shooting terminal
CN105791705A
Video online stabilization method and system
CN111371983A