Blood vessel position detection method and device, electronic equipment, storage medium and program product
By generating vascular structure feature templates and performing matching searches in the target frame, the problem of not being able to accurately detect the same vascular location in different image frames is solved, achieving accurate vascular location detection across frames and adapting to changes in imaging angle and vascular direction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies cannot accurately detect the same blood vessel location in different image frames, making it impossible to effectively track lesions or determine changes in blood vessel diameter.
By obtaining the reference position and reference normal direction of the reference frame in the image sequence, a feature template representing the vascular structure is generated, and a matching search is performed in the target frame to detect the target position, thus using the vascular structure for accurate cross-frame detection.
It enables accurate detection of the same blood vessel location in different image frames, improving the accuracy and robustness of blood vessel location tracking and adapting to changes in imaging angle and blood vessel direction.
Smart Images

Figure CN121904145A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of medical image processing, and in particular to a method, apparatus, electronic device, storage medium and program product for detecting blood vessel location. Background Technology
[0002] In clinical medicine, doctors need to track lesions, determine changes in blood vessel diameter, or guide blood vessel modeling by analyzing the location of the same blood vessel in different image frames of an image sequence.
[0003] However, for a blood vessel location 1 in a certain image frame, it is currently impossible to accurately detect a matching blood vessel location 2 in another image frame (the blood vessel location 1 and the blood vessel location 2 are the same location on the human blood vessel), that is, it is impossible to accurately detect the same blood vessel location in different image frames, which urgently needs to be solved. Summary of the Invention
[0004] This invention provides a method, apparatus, electronic device, storage medium, and program product for detecting blood vessel location, which solves the problem of not being able to accurately detect the same blood vessel location in different image frames.
[0005] According to one aspect of the present invention, a method for detecting the location of a blood vessel is provided, which may include:
[0006] Acquire image sequences captured from the target blood vessel;
[0007] For a reference frame in an image sequence, obtain the reference position representing the target blood vessel in the reference frame, and determine the reference normal direction of the target blood vessel at the reference position;
[0008] Based on the reference position, the reference frame is cropped according to the reference normal direction to generate a feature template representing the vascular structure of the target blood vessel.
[0009] For a target frame in an image sequence, the target position that matches the reference position is detected from the target frame based on the feature template.
[0010] According to another aspect of the present invention, a blood vessel position detection device is provided, which may include:
[0011] The image sequence acquisition module is used to acquire image sequences of the target blood vessel.
[0012] The reference normal direction determination module is used to obtain the reference position representing the target blood vessel in the reference frame of the image sequence, and determine the reference normal direction of the target blood vessel at the reference position.
[0013] The feature template generation module is used to extract from the reference frame based on the reference position and the reference normal direction to generate a feature template representing the vascular structure of the target blood vessel.
[0014] The target location detection module is used to detect the target location that matches the reference location from the target frame in the image sequence based on the feature template.
[0015] According to another aspect of the present invention, an electronic device is provided, which may include:
[0016] At least one processor; and
[0017] A memory that is communicatively connected to at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by at least one processor to implement the blood vessel location detection method provided in any embodiment of the present invention when executed by at least one processor.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided having computer instructions stored thereon for causing a processor to execute and implement the blood vessel location detection method provided in any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer program product is provided, on which a computer program is stored, which, when executed by a processor, implements the blood vessel location detection method provided in any embodiment of the present invention.
[0021] The technical solution of this invention involves acquiring an image sequence after imaging a target blood vessel; obtaining a reference position representing the target blood vessel in a reference frame of the image sequence, and determining the reference normal direction of the target blood vessel at the reference position; using the reference position as a basis, cropping the reference frame based on the reference normal direction to generate a feature template representing the vascular structure of the target blood vessel; and detecting the target position matching the reference position in the target frame based on the feature template. This technical solution, by encoding the vascular structure, especially the local vascular structure defined by the reference position and reference normal direction, into a feature template, and then searching the target frame based on the feature template to detect the target position matching the reference position, effectively solves the problem of not being able to accurately detect the same blood vessel position in different image frames, achieving accurate detection of blood vessel positions across frames.
[0022] It should be understood that the description in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a blood vessel location detection method provided according to an embodiment of the present invention;
[0025] Figure 2 This is a flowchart of another blood vessel location detection method provided according to an embodiment of the present invention;
[0026] Figure 3 This is a flowchart of another blood vessel location detection method provided according to an embodiment of the present invention;
[0027] Figure 4 This is a flowchart of another method for detecting blood vessel location according to an embodiment of the present invention;
[0028] Figure 5 This is a structural block diagram of a blood vessel position detection device according to an embodiment of the present invention;
[0029] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the blood vessel location detection method of this invention. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The same applies to "target," "original," etc., and will not be repeated here. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to maintain user personal information security and network security.
[0033] Before introducing the embodiments of the present invention, the implementation process of the currently used blood vessel location detection scheme will be described by way of example, so as to understand why it cannot accurately detect the same blood vessel location in different image frames, and thus better understand how the embodiments of the present invention solve this technical problem.
[0034] For example, taking an image sequence obtained by angiography as an example, the fluidity of the contrast agent can easily cause significant changes in the brightness value (i.e., gray value) of different image frames within the image sequence. For instance, the same blood vessel may go through the process of no contrast agent (dark) → contrast agent filling (bright) → contrast agent fading (dark) within the image sequence. This disrupts the gray-scale consistency between image frames, thereby affecting the accuracy of detecting the location of the same blood vessel in different image frames based on the gray-scale threshold.
[0035] Based on this, and considering that although the brightness value changes significantly during vascular imaging, the vascular structure remains unchanged, this invention proposes a scheme for vascular location detection based on vascular structure. This will be explained in detail below.
[0036] Figure 1This is a flowchart of a blood vessel location detection method provided by an embodiment of the present invention. This embodiment is applicable to blood vessel location detection, especially to detecting the location of the same blood vessel in different image frames (i.e., detecting the same blood vessel location in different image frames). This method can be executed by the blood vessel location detection device provided by this embodiment of the present invention. This device can be implemented by software and / or hardware, and can be integrated into an electronic device, which can be various user terminals or servers.
[0037] See Figure 1 The method of this invention specifically includes the following steps:
[0038] S110. Acquire the image sequence acquired for the target blood vessel.
[0039] The target blood vessel can be understood as the blood vessel whose position is to be tracked in different image frames of the image sequence. In the embodiments of the present invention, the blood vessel may optionally be a coronary artery segment with stenosis or a blood vessel where carotid plaques need to be monitored, which is related to the actual situation and is not specifically limited here.
[0040] An image sequence can be understood as a sequence of multiple image frames acquired after imaging a target blood vessel. In this embodiment of the invention, blood vessel imaging can optionally be performed based on angiography, intravenous ultrasound (IVUS), or optical coherence tomography (OCT), etc. The choice can be made according to actual needs and is not specifically limited here.
[0041] Obtain the image sequence. Optionally, the image sequence can be preprocessed, such as subtracting angiography sequences to enhance the contrast between blood vessels and the background, or filtering ultrasound sequences to reduce speckle noise, thereby obtaining an image sequence that can be used for analysis, and so on.
[0042] S120. For a reference frame in the image sequence, obtain the reference position representing the target blood vessel in the reference frame, and determine the reference normal direction of the target blood vessel at the reference position.
[0043] The reference frame (keyframe) can be understood as an image frame selected manually or automatically determined by an algorithm from the image sequence, serving as a benchmark for subsequent blood vessel location matching and tracking. In this embodiment of the invention, optionally, an image frame with clear blood vessels, good contrast, and no obvious artifacts can be selected as the reference frame. This helps to further improve the accuracy of blood vessel location detection based on the application of blood vessel structure.
[0044] The reference position can be understood as the position of the reference point in the reference frame. The reference point can be considered as a pixel point that is manually selected or automatically determined from the reference frame. Based on this, and in combination with the application scenarios that may be involved in the embodiments of the present invention, optionally, the pixel point can be a pixel point located on the center line of the target blood vessel.
[0045] The reference normal direction can be understood as the normal direction of the target blood vessel at the reference position, representing the orientation of the cross-section of the target blood vessel. In embodiments of the present invention, the reference normal direction can be determined in various ways. For example, it can be determined using Principal Component Analysis (PCA); alternatively, a neighborhood can be taken on the reference frame centered at the reference position, and a local short straight line or polynomial curve can be fitted based on each pixel in the neighborhood to calculate its tangent direction at the reference position. Then, the reference normal direction can be obtained by rotating the tangent direction by 90 degrees; and so on, without specific limitations.
[0046] In this step, the local geometric properties of a certain point on the target blood vessel are precisely quantified by reference position and reference normal direction. This quantitative description goes beyond the information that isolated pixels can provide. By introducing structural constraints on the direction of the blood vessel, it makes the subsequent feature extraction have clear anatomical significance.
[0047] S130. Based on the reference position, the reference frame is truncated according to the reference normal direction to generate a feature template representing the vascular structure of the target blood vessel.
[0048] The feature template can be understood as a local image patch defined by a reference position, along the reference normal direction and its perpendicular direction (i.e., the direction of the blood vessel). This local image patch encodes the local vascular structure of the target blood vessel near the reference position (such as at least one of the following: blood vessel size, vascular stenosis and vascular tortuosity). On this basis, it can also reflect the real vascular brightness features of a dark lumen with a bright edge.
[0049] Therefore, a feature template can be generated by cropping the reference frame based on the reference position and the reference normal direction. To illustrate the feature template generation process more clearly, an example is provided below. The specific implementation process is as follows:
[0050] A local Cartesian coordinate system is established with the reference location as the origin, the reference normal direction as the vertical axis (section direction), and the tangent direction perpendicular to the reference normal direction as the horizontal axis (vessel axis). Based on the estimated diameter of the target vessel and the imaging resolution, the physical dimensions of the feature template are determined (e.g., covering 2-3 times the vessel diameter to ensure inclusion of vessel wall information). This physical dimension is then converted to pixels to determine the template size (i.e., width along the vessel axis) and height (along the section direction).
[0051] On the reference frame, a rectangular image region is extracted based on the aforementioned local coordinate system and template size. This image region can then be directly used as a feature template, or its gradient histogram or local binary pattern can be further calculated for more robust features to generate the final feature template.
[0052] In this step, a feature template containing the target blood vessel structure, especially the cross-sectional structure of the blood vessel, is proposed. This feature template is not a simple pixel block, but a feature representation that is strictly aligned with the blood vessel structure. This makes it more adaptable and discriminative to local morphological changes of blood vessels (such as pulsation and deformation), thereby enabling the search for pixels with similar structural features in other image frames. This is the key to accurately detecting the same blood vessel location in different image frames.
[0053] S140. For a target frame in an image sequence, detect the target position that matches the reference position from the target frame based on the feature template.
[0054] The target frame can be understood as an image frame in the image sequence other than the reference frame, on which the blood vessel position that matches the reference position needs to be found. This blood vessel position is the target position in this step, which is the position detected from the target frame that is the same blood vessel position as the reference position in terms of anatomy.
[0055] Based on feature templates characterizing blood vessel structures, the target location is detected from the target frame. To further illustrate the target location detection process, an example is provided below. The specific implementation process is as follows:
[0056] In the target frame, the feature template generated in S130 is used as a sliding window, moving pixel-by-pixel or by a certain step size. Then, at each candidate position, a candidate image patch of the same size and orientation as the feature template is extracted, centered on that candidate position and with the estimated direction of the reference normal direction as the vertical axis. Next, the similarity between each candidate image patch and the feature template is calculated (using methods such as normalized cross-correlation, mutual information, or cosine similarity of feature vectors). This is an optimization process that searches for positions and possible directions to find the position and local orientation that maximizes the similarity. Then, the candidate position with the highest similarity score is confirmed as the target position in the target frame. Based on this, the normal direction of the target position can be updated for tracking in the next frame or as a more accurate matching result.
[0057] Of course, the above are just examples, and other methods can also be used to determine the target location, which will be detailed later.
[0058] In this step, by utilizing feature templates containing vascular structure information, the problem of matching blood vessel locations across frames is transformed into an image search problem of finding the most similar local structure in the target frame. This significantly reduces mismatches caused by changes in blood vessel morphology, image noise, or differences in contrast agent filling, and achieves accurate and robust tracking of the same blood vessel location from the reference frame to the target frame.
[0059] It should be noted that the vascular location detection scheme described above can be applied in multiple scenarios, such as multi-frame registration and dynamic tracking in angiography, time-series alignment of intravascular images, automatic centerline extraction and diameter measurement in quantitative coronary angiography, and vascular feature registration and fusion in medical image navigation systems. These are just examples and not specific limitations.
[0060] The technical solution of this invention involves acquiring an image sequence after imaging a target blood vessel; obtaining a reference position representing the target blood vessel in a reference frame of the image sequence, and determining the reference normal direction of the target blood vessel at the reference position; using the reference position as a basis, cropping the reference frame based on the reference normal direction to generate a feature template representing the vascular structure of the target blood vessel; and detecting the target position matching the reference position in the target frame based on the feature template. This technical solution, by encoding the vascular structure, especially the local vascular structure defined by the reference position and reference normal direction, into a feature template, and then searching the target frame based on the feature template to detect the target position matching the reference position, effectively solves the problem of not being able to accurately detect the same blood vessel position in different image frames, achieving accurate detection of blood vessel positions across frames.
[0061] Figure 2 This is a flowchart of another blood vessel location detection method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above-described technical solutions. In this embodiment, optionally, determining the reference normal direction of the target blood vessel at the reference position includes: obtaining a reference region containing the reference position from a reference frame; performing principal component analysis on each pixel position in the reference region, and using the obtained second principal component direction, which is orthogonal to the first principal component direction, as the reference normal direction of the target blood vessel at the reference position. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.
[0062] See Figure 2 The method in this embodiment may specifically include the following steps:
[0063] S210. Acquire the image sequence acquired for the target blood vessel.
[0064] S220. For a reference frame in an image sequence, obtain the reference position representing the target blood vessel in the reference frame, and obtain the reference region containing the reference position from the reference frame.
[0065] The reference region can be understood as a region containing a reference position obtained from a reference frame. In this embodiment of the invention, optionally, the region can be a local image region centered on the reference position and cropped from the reference frame, which is large enough to cover the blood vessel segments around the reference position and its adjacent background.
[0066] S230. Perform principal component analysis on each pixel position in the reference region, and take the obtained second principal component direction, which is orthogonal to the first principal component direction, as the reference normal direction of the target blood vessel at the reference position.
[0067] In this process, principal component analysis (PCA) is performed on each pixel location in the reference region to obtain the first principal component direction. This first principal component direction can be considered as the direction with the greatest variation in the distribution of all pixel locations. It should be noted that within the reference region, since the blood vessel structure is elongated, the pixels are most widely distributed along the blood vessel axis. Therefore, the first principal component direction is the local blood vessel axis (i.e., the tangent direction). Then, a second principal component direction orthogonal to the first principal component direction is obtained. This second principal component direction can be considered as the direction with the second greatest variation in the distribution of all pixel locations. It points to the direction where the pixel distribution is most concentrated. For the cross-section of the elongated blood vessel, this is precisely the direction of the blood vessel diameter, which is the reference normal direction described in this step.
[0068] During vascular imaging, changes in the imaging angle directly cause variations in the direction of the blood vessels. To address this, this step uses PCA to directly extract the principal direction from the pixel spatial distribution of the reference region. The principle behind this is that regardless of the angle the blood vessel rotates in the image, the first principal component direction will always automatically align with its longest extension direction (i.e., the vessel axis), while the second principal component direction will automatically align with the cross-sectional direction perpendicular to it. This allows the normal direction estimation to adapt to changes in imaging angle and blood vessel direction between different image frames, thus providing a data foundation for the subsequent generation of stable and reliable feature templates.
[0069] S240. Based on the reference position, the reference frame is truncated according to the reference normal direction to generate a feature template representing the vascular structure of the target blood vessel.
[0070] S250. For a target frame in an image sequence, detect the target position that matches the reference position from the target frame based on the feature template.
[0071] The technical solution of this invention utilizes PCA technology to automatically estimate the local normal direction of blood vessels (i.e., the reference normal direction), thereby robustly and adaptively determining the axial and normal directions of blood vessels. This effectively overcomes the interference caused by changes in blood vessel direction due to changes in imaging angle, thereby further improving the accuracy of blood vessel position detection.
[0072] An optional technical solution, the above-mentioned blood vessel location detection method may further include:
[0073] The reference frame is subjected to vascular enhancement processing to obtain a vascular enhancement map, wherein the pixel value of the pixel in the vascular enhancement map represents the confidence that the pixel is located on the target blood vessel;
[0074] Principal component analysis was performed on each pixel location in the reference region, including:
[0075] Principal component analysis was performed on each pixel location in the reference region using the confidence level represented by the enhanced blood vessel image as the weight.
[0076] Vascular enhancement processing can be considered a specialized image filtering algorithm designed to highlight tubular structures (i.e., vascular structures) in a reference frame while suppressing non-vascular structures (such as background tissue and noise). For example, vascular enhancement processing of a reference frame can involve calculating the geometric properties (such as curvature and eigenvalues) in the neighborhood of each pixel to determine whether the region possesses tubular features. This allows for the generation of a vascular enhancement map of the same size as the reference frame after calculation and normalization. The pixel values in this vascular enhancement map represent the confidence level that the pixel belongs to a vascular structure (i.e., is located on the target blood vessel).
[0077] Furthermore, the confidence level represented by the enhanced blood vessel image is used as a weight to perform weighted principal component analysis on each pixel position in the reference region. This ensures that high-confidence pixel positions contribute significantly to the orientation calculation, while the contributions of low-confidence pixel positions (i.e., background and noise pixel positions) are effectively suppressed. This means that even if there are bright noise points, uneven lighting artifacts, or adjacent non-vascular tissue in the reference region, as long as the blood vessel enhancement algorithm can correctly identify the blood vessel region as high-confidence, the final reference normal orientation will be dominated by the real blood vessel structure, thus exhibiting high robustness.
[0078] The above technical solution introduces a weighting mechanism based on vascular enhancement maps, giving vascular pixels higher analysis weights. This effectively suppresses the influence of image noise, background interference, and local artifacts on vascular orientation estimation, making the principal component analysis results more focused on the real vascular structure. As a result, it achieves highly robust extraction of the normal orientation under complex imaging conditions.
[0079] Figure 3 This is a flowchart of another blood vessel location detection method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above-described technical solutions. In this embodiment, optionally, detecting a target location matching a reference location from a target frame according to a feature template includes: determining the candidate normal direction of the target blood vessel at the candidate location for the candidate location to be detected in the target frame, and cropping the target frame based on the candidate normal direction according to the candidate location, and calculating the matching degree based on the cropped candidate region and the feature template; detecting the target location matching the reference location from the target frame according to the matching degree corresponding to each candidate location. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.
[0080] See Figure 3 The method in this embodiment may specifically include the following steps:
[0081] S310. Acquire an image sequence for the target blood vessel, wherein the image sequence includes a reference frame and a target frame.
[0082] S320. Obtain the reference position representing the target blood vessel in the reference frame, and determine the reference normal direction of the target blood vessel at the reference position.
[0083] S330. Based on the reference position, the reference frame is truncated according to the reference normal direction to generate a feature template representing the vascular structure of the target blood vessel.
[0084] S340. For the candidate positions to be detected in the target frame, determine the candidate normal direction of the target blood vessel at the candidate position, and based on the candidate position, perform truncation on the target frame based on the candidate normal direction, so as to calculate the matching degree according to the truncated candidate region and feature template.
[0085] Here, candidate positions can be understood as pixel positions in the target frame that are detected as potential matching positions. In the embodiments of the invention, optionally, some or all pixel positions in the target frame can be used as candidate positions, which can be set according to actual needs and is not specifically limited here.
[0086] The meaning and determination process of the candidate normal direction are similar to those of the reference normal direction, and will not be repeated here. Based on the candidate position and the candidate normal direction, a cropping operation is performed on the target frame to obtain candidate regions. For example, a candidate region with the same size as the feature template is cropped from the target frame, centered on the candidate position and along the candidate normal direction. Further, the matching degree between the candidate region and the feature template is calculated. This matching degree can be represented by normalized cross-correlation (NCC), mutual information, or cosine similarity, etc., which can be set according to the actual situation and is not specifically limited here.
[0087] S350. Based on the matching degree corresponding to each candidate position, detect the target position that matches the reference position from the target frame.
[0088] After calculating the matching degree for all candidate locations, the matching degrees can be compared. Typically, the candidate location with the highest matching degree is determined as the final target location.
[0089] The technical solution of this invention calculates the matching degree by independently estimating the local blood vessel direction (i.e., the candidate normal direction) at each candidate position of the target frame and truncating the candidate region with structural alignment. This achieves strict blood vessel structure matching rather than pixel matching, and can accurately lock the target position with the most similar local blood vessel structure to the reference position, further improving the accuracy of cross-frame blood vessel position tracking.
[0090] One optional technical solution involves generating a high-resolution feature template based on the reference frame, where the candidate position is located within the detection window on the target frame. The detection window is determined as follows:
[0091] The reference frame is downsampled, and a low-resolution feature template is generated based on the obtained first image frame. The target frame is also downsampled to obtain the second image frame.
[0092] Based on the low-resolution feature template, a third position matching the reference position is detected from the second image frame, and the third position is mapped onto the target frame to obtain the detection window.
[0093] In view of the problem that the computational cost is too high when performing global sliding matching directly on high-resolution image frames, this technical solution improves efficiency by introducing a coarse-to-fine multi-resolution search strategy.
[0094] Specifically, the reference frame is downsampled to reduce the number of pixels and thus lower its spatial resolution, resulting in a first image frame. Further, a low-resolution feature template is generated based on the first image frame. This generation process is similar to the feature template generation process described above and will not be repeated here. It is understood that the feature template generated above can be considered a high-resolution feature template compared to the low-resolution feature template generated in this technical solution. Furthermore, although the low-resolution image frame loses details, it retains the main contours and orientation information of the target blood vessel, thus being sufficient for preliminary, rapid, and coarse localization.
[0095] Based on the low-resolution feature template, a third position matching the reference position is detected from the second image frame. This detection process is similar to the target position detection process described above and will not be repeated here. Further, the third position is mapped onto the target frame to obtain a detection window. For example, based on the downsampling ratio, the third position is mapped back onto the original high-resolution target frame. Specifically, a low-resolution pixel corresponds to a region on the high-resolution target frame, so a detection window can be obtained based on this region. For example, this region can be used directly as the detection window, or a preset range (such as ±N pixels) can be extended outward from this region as the center to obtain the detection window, etc., without specific limitations here.
[0096] The above technical solution introduces a multi-resolution matching strategy from coarse to fine. It first completes coarse localization quickly on low-resolution image frames, and then maps the localization result (i.e., the third position) to high-resolution image frames to define a finite and precise search window (i.e., the detection window). This transforms the time-consuming global dense search into an efficient local fine search. As a result, the computational burden of the entire blood vessel location detection process can be significantly reduced without sacrificing the final matching accuracy, thereby improving real-time performance and practicality.
[0097] Figure 4This is a flowchart of another blood vessel location detection method provided by an embodiment of the present invention. This embodiment is based on and optimized from the above-described technical solutions. In this embodiment, optionally, the feature template is two-dimensional data. After generating the feature template representing the vascular structure of the target blood vessel, the above-described blood vessel location detection method further includes: rearranging the pixel values in the feature template in row-first or column-first order to generate a one-dimensional template curve; calculating the matching degree based on the extracted candidate region and the feature template, including: generating a one-dimensional candidate curve based on the candidate region obtained after truncating, and calculating the matching degree based on the candidate curve and the template curve. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.
[0098] See Figure 4 The method in this embodiment may specifically include the following steps:
[0099] S410. Acquire an image sequence for the target blood vessel, wherein the image sequence includes a reference frame and a target frame.
[0100] S420. Obtain the reference position representing the target blood vessel in the reference frame, and determine the reference normal direction of the target blood vessel at the reference position.
[0101] S430. Based on the reference position, the reference frame is truncated according to the reference normal direction to generate a feature template that represents the vascular structure of the target blood vessel and is two-dimensional data.
[0102] S440. Rearrange the pixel values in the feature template in row-major or column-major order to generate a one-dimensional template curve.
[0103] The feature template itself is two-dimensional data with height (number of rows) and width (number of columns). In this step, the feature template is not directly used for comparison. Instead, the pixel values in the feature template are rearranged in a row-first (e.g., from left to right, from top to bottom) or column-first (e.g., from top to bottom, from left to right) order to convert the two-dimensional data into one-dimensional data and generate the template curve.
[0104] S450. For the candidate positions to be detected in the target frame, determine the candidate normal direction of the target blood vessel at the candidate position, and based on the candidate position, perform cropping on the target frame based on the candidate normal direction.
[0105] S460. For the candidate regions obtained after truncation, generate a one-dimensional candidate curve based on the candidate regions, and calculate the matching degree based on the candidate curve and the template curve.
[0106] The process involves generating candidate curves based on candidate regions. This process is similar to that of generating template curves and will not be elaborated upon here. Next, the matching degree between the candidate curves and the template curves is calculated. For example, the matching degree can be calculated using the NCC method, which treats the two curves as vectors and calculates their normalized dot product. This dot product is a value between -1 and 1; the closer the value is to 1, the more similar the shapes of the two curves are, indicating a higher matching degree.
[0107] S470. Based on the matching degree corresponding to each candidate position, detect the target position that matches the reference position from the target frame.
[0108] The technical solution of this invention simplifies two-dimensional image block matching to one-dimensional curve matching by converting two-dimensional feature templates and candidate regions into one-dimensional curves. This significantly reduces computational complexity and improves computational speed without losing much information about the identification of vascular cross-sectional structures.
[0109] An optional technical solution involves detecting target positions that match reference positions from the target frame based on the matching degree corresponding to each candidate position, including:
[0110] Determine the first position corresponding to the largest matching degree from each candidate position;
[0111] For each candidate position, the second position adjacent to the first position is fitted with a surface based on the matching degree corresponding to each second position.
[0112] Based on the peak values on the obtained matching surface, the target position that matches the reference position is detected from the target frame.
[0113] Here, the first position can be understood as the candidate position with the highest matching degree obtained after sliding window search. The first position is determined from all candidate positions.
[0114] The second position can be understood as one or more pixel positions on the pixel grid of the target frame that are adjacent to the first position (e.g., a 3x3 or 5x5 neighborhood). A continuous binary function model (e.g., a quadratic parabolic model) can be used to perform surface fitting on the matching degree corresponding to each second position to minimize the error between the values of the obtained matching degree surface at all data points and the actual matching degree values.
[0115] Furthermore, the target position can be detected from the target frame based on the peak value on the matching degree surface. Understandably, the target position calculated in this way is usually not an integer, but a floating-point number with decimals, i.e., sub-pixel coordinates, which are used as the final target position for application.
[0116] The above technical solution, based on the initial matching at the integer pixel level, introduces a surface fitting mechanism based on peak neighborhood matching degree. It obtains the sub-pixel coordinates of the blood vessel location by calculating the extreme points of the continuously fitted surface. Thus, it is no longer limited by the precision bottleneck of discrete pixels in the image frame, and achieves higher precision blood vessel localization, thereby providing more accurate quantitative analysis data for clinical use.
[0117] Therefore, it can be seen that the various blood vessel location detection schemes described above can quickly and accurately identify the same blood vessel location in a local area, realize cross-frame blood vessel localization and optimization, and have the advantages of low computational load, strong robustness and adaptability to directional changes, thereby significantly improving the accuracy of automated blood vessel tracking and quantitative analysis.
[0118] Figure 5 This is a structural block diagram of a blood vessel position detection device provided in an embodiment of the present invention. This device is used to execute the blood vessel position detection method provided in any of the above embodiments. This device and the blood vessel position detection methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the blood vessel position detection device can be found in the embodiments of the above-described blood vessel position detection methods. See also... Figure 5 The device may specifically include: an image sequence acquisition module 510, a reference normal direction determination module 520, a feature template generation module 530, and a target position detection module 540.
[0119] Image sequence acquisition module 510 is used to acquire image sequences collected from the target blood vessel;
[0120] The reference normal direction determination module 520 is used to obtain the reference position representing the target blood vessel in the reference frame of the image sequence, and determine the reference normal direction of the target blood vessel at the reference position.
[0121] The feature template generation module 530 is used to extract from the reference frame based on the reference position and the reference normal direction to generate a feature template representing the vascular structure of the target blood vessel.
[0122] The target location detection module 540 is used to detect the target location that matches the reference location from the target frame in the image sequence based on the feature template.
[0123] Optionally, the reference normal direction determination module 520 may include:
[0124] The reference region acquisition submodule is used to acquire the reference region containing the reference position from the reference frame;
[0125] The reference normal direction determination submodule is used to perform principal component analysis on each pixel position in the reference region, and use the obtained second principal component direction, which is orthogonal to the first principal component direction, as the reference normal direction of the target blood vessel at the reference position.
[0126] Based on this, optionally, the above-mentioned blood vessel position detection device may further include:
[0127] The vessel enhancement map acquisition module is used to perform vessel enhancement processing on the reference frame to obtain a vessel enhancement map, wherein the pixel value of the pixel in the vessel enhancement map represents the confidence that the pixel is located on the target vessel.
[0128] The reference normal direction determination submodule may include:
[0129] The principal component analysis unit is used to perform principal component analysis on each pixel location in the reference region, using the confidence level represented by the vascular enhancement image as the weight.
[0130] Optionally, the target location detection module 540 may include:
[0131] The matching degree calculation submodule is used to determine the candidate normal direction of the target blood vessel at the candidate position to be detected in the target frame, and to perform truncation on the target frame based on the candidate position and the candidate normal direction, so as to calculate the matching degree based on the truncated candidate region and feature template.
[0132] The target location detection submodule is used to detect the target location that matches the reference location from the target frame based on the matching degree corresponding to each candidate location.
[0133] Based on this, optionally, the feature template is two-dimensional data, and the aforementioned blood vessel location detection device may further include:
[0134] The template curve generation module is used to rearrange the pixel values in the feature template in row-major or column-major order after generating the feature template representing the vascular structure of the target blood vessel, so as to generate a one-dimensional template curve.
[0135] The matching degree calculation submodule may include:
[0136] The matching degree calculation unit is used to generate a one-dimensional candidate curve based on the candidate region obtained after truncation, and calculate the matching degree based on the candidate curve and the template curve.
[0137] Based on this, the optional target location detection submodule may include:
[0138] The first position determination unit is used to determine the first position corresponding to the largest matching degree from each candidate position;
[0139] The surface fitting unit is used to perform surface fitting on the matching degree of each second position based on each second position, for each candidate position that is adjacent to the first position.
[0140] The target position detection unit can be used to detect the target position that matches the reference position from the target frame based on the peak value on the obtained matching surface.
[0141] Alternatively, the feature template generated from the reference frame is a high-resolution feature template, and the candidate position is the position within the detection window on the target frame. The detection window is determined by the following module:
[0142] The second image frame acquisition module is used to downsample the reference frame, generate a low-resolution feature template based on the obtained first image frame, and downsample the target frame to obtain the second image frame.
[0143] The detection window module is used to detect a third position that matches the reference position from the second image frame based on the low-resolution feature template, so as to map the third position onto the target frame and obtain the detection window.
[0144] Optionally, based on any of the above devices, the reference position is the position of the center point on the center line representing the target blood vessel in the reference frame.
[0145] The blood vessel location detection device provided in this embodiment of the invention acquires an image sequence after imaging a target blood vessel using an image sequence acquisition module; it also acquires a reference position representing the target blood vessel in a reference frame of the image sequence using a reference normal direction determination module, and determines the reference normal direction of the target blood vessel at the reference position using a reference frame; it generates a feature template representing the blood vessel structure based on the reference position and the reference normal direction using a feature template generation module; and it detects a target position matching the reference position in the target frame of the image sequence based on the feature template using a target position detection module. This device, by encoding the blood vessel structure, especially the local structure of the blood vessel defined by the reference position and the reference normal direction, into a feature template, and then searching in the target frame based on the feature template to detect the target position matching the reference position, solves the problem of not being able to accurately detect the same blood vessel position in different image frames, achieving accurate detection of blood vessel positions across frames.
[0146] The blood vessel location detection device provided in the embodiments of the present invention can execute the blood vessel location detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0147] It is worth noting that in the embodiments of the above-mentioned blood vessel position detection device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0148] Figure 6 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0149] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0150] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0151] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as blood vessel location detection methods.
[0152] In some embodiments, the blood vessel location detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the blood vessel location detection method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the blood vessel location detection method by any other suitable means (e.g., by means of firmware).
[0153] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips or system-on-a-chips (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0154] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0155] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0156] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0157] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0158] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0159] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0160] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and no limitation is imposed herein.
[0161] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for detecting the location of blood vessels, characterized in that, include: Acquire image sequences captured from the target blood vessel; For a reference frame in the image sequence, obtain the reference position representing the target blood vessel in the reference frame, and determine the reference normal direction of the target blood vessel at the reference position; Based on the reference position, the reference frame is truncated according to the reference normal direction to generate a feature template characterizing the vascular structure of the target blood vessel; For a target frame in the image sequence, a target position matching the reference position is detected from the target frame according to the feature template.
2. The method according to claim 1, characterized in that, Determining the reference normal direction of the target blood vessel at the reference position includes: Obtain a reference region containing the reference position from the reference frame; Principal component analysis is performed on each pixel position in the reference region, and the obtained second principal component direction, which is orthogonal to the first principal component direction, is used as the reference normal direction of the target blood vessel at the reference position.
3. The method according to claim 2, characterized in that, Also includes: The reference frame is subjected to vascular enhancement processing to obtain a vascular enhancement map, wherein the pixel value of the pixel in the vascular enhancement map represents the confidence that the pixel is located on the target blood vessel; The principal component analysis of each pixel position in the reference region includes: Principal component analysis is performed on each pixel location in the reference region using the confidence level represented by the enhanced blood vessel image as a weight.
4. The method according to claim 1, characterized in that, The step of detecting the target location matching the reference location from the target frame based on the feature template includes: For the candidate positions to be detected in the target frame, the candidate normal direction of the target blood vessel at the candidate position is determined, and based on the candidate position, the target frame is truncated according to the candidate normal direction, so as to calculate the matching degree based on the truncated candidate region and the feature template; Based on the matching degree corresponding to each of the candidate positions, the target position that matches the reference position is detected from the target frame.
5. The method according to claim 4, characterized in that, The feature template is two-dimensional data. After generating the feature template characterizing the vascular structure of the target blood vessel, the method further includes: The pixel values in the feature template are rearranged in row-major or column-major order to generate a one-dimensional template curve. The step of calculating the matching degree based on the extracted candidate region and the feature template includes: For the candidate regions obtained after truncation, a one-dimensional candidate curve is generated based on the candidate regions, and the matching degree is calculated based on the candidate curve and the template curve.
6. The method according to claim 5, characterized in that, The step of detecting the target position matching the reference position from the target frame based on the matching degree corresponding to each of the candidate positions includes: Determine the first position from among the candidate positions that corresponds to the largest matching degree; For each candidate position that is adjacent to the first position, a surface fit is performed on the matching degree corresponding to each second position based on each second position; Based on the peak value on the obtained matching surface, the target position that matches the reference position is detected from the target frame.
7. The method according to claim 4, characterized in that, The feature template generated based on the reference frame is a high-resolution feature template, and the candidate position is a position within the detection window on the target frame. The detection window is determined in the following way: The reference frame is downsampled, and a low-resolution feature template is generated based on the obtained first image frame. The target frame is then downsampled to obtain a second image frame. Based on the low-resolution feature template, a third position matching the reference position is detected from the second image frame, and the third position is mapped onto the target frame to obtain the detection window.
8. The method according to any one of claims 1-7, characterized in that, The reference position is the location of the center point on the center line representing the target blood vessel in the reference frame.
9. A blood vessel position detection device, characterized in that, include: The image sequence acquisition module is used to acquire image sequences of the target blood vessel. A reference normal direction determination module is used to obtain a reference position representing the target blood vessel in a reference frame in the image sequence, and determine the reference normal direction of the target blood vessel at the reference position. The feature template generation module is used to extract from the reference frame based on the reference position and the reference normal direction to generate a feature template characterizing the vascular structure of the target blood vessel. The target location detection module is used to detect, based on the feature template, the target location in the target frame of the image sequence that matches the reference location.
10. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to cause the at least one processor to perform the blood vessel location detection method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the blood vessel location detection method as described in any one of claims 1-8.
12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the blood vessel location detection method as described in any one of claims 1-8.