Target contour detection method and device, computer equipment and storage medium

By generating multiple gradient templates and convolution with the image to be detected, the problem of inefficient blood vessel contour detection in existing vascular images is solved, and a fast and simple target contour detection method is realized.

CN119810030APending Publication Date: 2025-04-11WUHAN ZHONGKE IND RES INST OF MEDICAL SCI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411827920.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-06-24
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing vascular contour detection methods are inefficient in vascular images, and a method that can effectively improve the target contour detection efficiency is needed.

Method used

By acquiring the reference contour and the image to be detected, adjusting the parameters of the reference contour to generate multiple gradient templates, and convolving the image to be detected with each gradient template, obtaining multiple convolutional images, and then determining the target contour in the image to be detected based on the multiple convolutional images.

Benefits of technology

The rapid detection of the target contour in the image to be detected is achieved. Compared with the traditional method, the detection time is shorter, the detection speed is faster, and the method is simple and easy to implement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810030A_ABST
    Figure CN119810030A_ABST
Patent Text Reader

Abstract

The invention relates to a target contour detection method and device, computer equipment and a storage medium. The method comprises the steps of obtaining a reference contour and a to-be-detected image, adjusting parameters of the reference contour to generate a plurality of gradient templates, performing convolution operation on the to-be-detected image and each gradient template to obtain a plurality of convolution images, and determining a target contour in the to-be-detected image according to the plurality of convolution images. According to the method, target contour detection of the to-be-detected object in the to-be-detected image can be realized only by performing convolution operation on the to-be-detected image and the gradient template, and compared with a traditional contour detection method by using a complex recognition algorithm, the detection time is shorter, and the detection speed is higher. Moreover, the gradient template is generated according to the reference contour, and the reference contour is obtained by sketching by a doctor, so that the method for obtaining the gradient template is simpler, and the method for detecting the target contour is simpler, easy to implement and capable of being popularized, popularized and applied.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This invention patent application is a divisional application of the Chinese invention patent application with application date of June 24, 2021, application number 2021107056811, and name “Target contour detection method, device, computer equipment and storage medium”. Technical Field

[0002] The present application relates to the technical field of medical image processing, and in particular to a method, device, computer equipment and storage medium for detecting a target contour. Background Art

[0003] In the diagnosis process of vascular diseases, for vascular images of multiple time frames, it is necessary to obtain vascular contour information in advance on the vascular images of each time frame before analyzing the vascular parameters, and then accurately obtain the vascular parameters based on the vascular contour information.

[0004] At present, there are many methods for detecting blood vessel contours on blood vessel images. For example, users directly manually outline the blood vessel contours frame by frame on multi-time frame images, segment the blood vessel contours on each time frame image based on neural network methods, and detect blood vessel edges based on active contour methods.

[0005] The above-mentioned blood vessel contour detection method has the problem of low efficiency. Summary of the invention

[0006] Based on this, it is necessary to provide a target contour detection method, device, computer equipment and storage medium that can effectively improve the detection efficiency of the target contour in response to the above technical problems.

[0007] In a first aspect, a method for detecting a target contour comprises:

[0008] Obtain reference contour and image to be detected;

[0009] Adjusting the parameters of the reference profile to generate a plurality of gradient templates;

[0010] Performing a convolution operation on the image to be detected and each of the gradient templates to obtain a plurality of convolution images;

[0011] Determine the target contour in the image to be detected according to the multiple convolution images.

[0012] In one embodiment, the adjusting the parameters of the reference profile to generate a plurality of gradient templates comprises:

[0013] The reference profile is represented by a set of parameters using an elliptical Fourier descriptor;

[0014] The size and / or shape of the reference contour is adjusted by changing the value of the parameter multiple times to generate multiple gradient templates.

[0015] In one embodiment, the method of adjusting the size and / or shape of the reference contour by changing the value of the parameter multiple times to generate multiple gradient templates includes at least one of the following:

[0016] According to the parameter value of the enlarged size, the value of the parameter is changed multiple times to enlarge the size of the reference contour, and a plurality of gradient templates including the enlarged reference contour are generated;

[0017] According to the parameter value of the size reduction, the value of the parameter is changed multiple times to reduce the size of the reference contour, and a plurality of gradient templates including the reference contour after the size reduction are generated;

[0018] According to the parameter value of the shape adjustment, the value of the parameter is changed multiple times to adjust the shape of the reference contour, and multiple gradient templates containing the reference contour after the shape adjustment are generated.

[0019] In one embodiment, determining the target contour in the image to be detected according to the multiple convolution images includes:

[0020] Determine a first response value within a preset area of ​​the multiple convolution images; the first response value is a maximum response value within the preset area of ​​the multiple convolution images;

[0021] Using the gradient template corresponding to the point of the first response value as the target template;

[0022] The target contour in the image to be detected is determined according to the points of the first response value and the target template.

[0023] In one embodiment, determining the first response value within a preset area range in the plurality of convolution images includes:

[0024] Determine the preset area range according to the size of the reference contour;

[0025] Acquire a second response value within the preset area in each of the convolution images; the second response value is the maximum response value within the preset area in each of the convolution images;

[0026] The second response values ​​on the convolution images are compared, and the largest second response value is selected as the first response value.

[0027] In one embodiment, determining the target contour in the image to be detected according to the point of the first response value and the target template includes:

[0028] Taking the point of the first response value as the center point of the target contour;

[0029] According to the parameters of the target contour contained in the target template and the center point of the target contour,

[0030] The target contour is generated on the image to be detected.

[0031] In one of the embodiments, in the gradient template, the difference between the grayscale value occupied by the inner circle and the grayscale value occupied by the outer circle of the reference contour after the adjustment of the parameters is greater than a preset grayscale threshold.

[0032] In a second aspect, a device for detecting a target contour comprises:

[0033] An acquisition module, used for acquiring a reference contour and an image to be detected;

[0034] A generating module, used for adjusting the parameters of the reference profile to generate a plurality of gradient templates;

[0035] A convolution module, used for performing a convolution operation on the image to be detected and each of the gradient templates to obtain a plurality of convolution images;

[0036] A determination module is used to determine the target contour in the image to be detected according to the multiple convolution images.

[0037] In a third aspect, a computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.

[0038] In a fourth aspect, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0039] The above-mentioned method, device, computer equipment and storage medium for detecting the target contour obtain a reference contour and an image to be detected, adjust the parameters of the reference contour to generate multiple gradient templates, and then perform a convolution operation on the image to be detected with each gradient template to obtain multiple convolution images, and then determine the target contour in the image to be detected based on the multiple convolution images. The above-mentioned method only needs to perform a convolution operation on the image to be detected with the gradient template to realize the target contour detection of the object to be detected in the image to be detected. Compared with the traditional method of using complex recognition algorithms for contour detection, the detection time is shorter and the detection speed is faster. Moreover, since the gradient template is generated based on the reference contour, and the reference contour is obtained by the doctor's outline, the method for obtaining the gradient template is simpler, making the above-mentioned target contour detection method simpler, easy to implement, and can be popularized and applied. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a schematic diagram of an application environment of a method for detecting a target contour in an embodiment;

[0041] Figure 2 Schematic diagram of a process of detecting a target contour in one embodiment;

[0042] Figure 2A is a schematic diagram of a gradient template in one embodiment;

[0043] Figure 3 for Figure 2 A flowchart of an implementation method of S102 in the embodiment;

[0044] Figure 3A A schematic diagram of reference profile generation in one embodiment;

[0045] Figure 4 for Figure 2 A flowchart of an implementation method of S104 in the embodiment;

[0046] Figure 5 for Figure 4 A flowchart of an implementation method of S301 in the embodiment;

[0047] Figure 6 for Figure 4 A flowchart of an implementation method of S303 in the embodiment;

[0048] Figure 7 Schematic diagram of a process of detecting a target contour in one embodiment;

[0049] Fig. 7A is a rendering corresponding to a method for detecting a target contour in an embodiment;

[0050] Figure 8 is a structural block diagram of a device for detecting a target contour in one embodiment;

[0051] Fig. 9 is a structural block diagram of a device for detecting a target contour in one embodiment;

[0052] Fig.10 is a structural block diagram of a device for detecting a target contour in one embodiment;

[0053] Fig.11 is a structural block diagram of a device for detecting a target contour in one embodiment;

[0054] Fig.12 is a structural block diagram of a device for detecting a target contour in one embodiment;

[0055] Fig.13FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] The target contour detection method provided in this application can be applied to Figure 1 In the application environment shown. The imaging device 102 is connected to the terminal 104 via a network, and the imaging device 102 is used to scan the object to be detected and transmit the scan data to the terminal 104, so that the terminal 104 performs imaging processing based on the scan data to obtain an imaging image. The imaging device 102 can be various types of imaging devices, such as a nuclear magnetic resonance imaging device. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.

[0058] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is merely a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the application environment to which the present application scheme is applied. The specific application environment may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0059] In one embodiment, Figure 2 As shown, a method for detecting the contour of a target is provided, and the method is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:

[0060] S101, obtaining a reference contour and an image to be detected.

[0061] The image to be detected contains an object to be detected, and the object to be detected can be any type of human tissue organ, such as blood vessels, heart, large intestine, etc. The object to be detected can also be a human tissue cell, such as tumor cells, blood protein cells. The reference contour is the contour of the object to be detected in the image to be detected, and the reference contour is obtained by the doctor outlining the contour of the object to be detected on the image to be detected.

[0062] In this embodiment, an imaging device can be used to scan and image the object to be detected to obtain scanned image data, and the imaging device then transmits the scanned image data to the terminal, and the terminal performs image reconstruction based on the scanned image data to obtain the image to be detected. Before the terminal detects the object to be detected in the image to be detected, the doctor can first draw the outline of the object to be detected on the image to be detected, which is the reference outline, and then based on the reference outline and the image to be detected, the detection of the object to be detected in the image to be detected is realized. It should be noted that when the terminal obtains multiple images to be detected containing the same object to be detected, the terminal first selects an image to be detected from any of the multiple images to be detected as a reference image, and the doctor draws the outline of the object to be detected on it, which is the reference outline, and then based on the reference outline and the multiple images to be detected, the detection of the object to be detected in the multiple images to be detected is realized. What is detected here is the outline of the object to be detected, as well as the shape, size and other information of the object to be detected determined by the outline.

[0063] S102, adjusting parameters of the reference contour to generate multiple gradient templates.

[0064] Wherein, the gradient template is used to assist in the detection of the object to be detected, and the gradient template is an image that only includes the outline of the object to be detected, and the outline of the object to be detected contained in the gradient template is generated based on the reference outline. Each gradient template includes a contour, and the size and shape of the contours contained in each gradient template are different. The parameters of the reference contour include the size and / or shape of the reference contour. Optionally, the gradient template may also include an initial reference contour.

[0065] In this embodiment, after the terminal obtains the reference contour, the parameters of the reference contour can be adjusted, for example, the size and / or shape of the reference contour can be adjusted to generate contours of multiple objects to be detected of different sizes and shapes, and the image containing the generated contours can be used as a gradient template. It should be noted that the gradient template can be a black and white image or a color image, which is not limited here.

[0066] Optionally, the gradient template includes a reference contour after adjusting the parameters, and in the gradient template, the difference between the grayscale value occupied by the inner circle and the grayscale value occupied by the outer circle of the reference contour after adjusting the parameters is greater than a preset grayscale threshold. The preset grayscale threshold can be determined by the terminal according to actual detection requirements, and is used to measure the matching degree between the reference contour after adjusting the parameters and the actual contour of the object to be detected.

[0067] like Figure 2A As shown, assuming that the object to be detected is a blood vessel, the reference contour is the contour of the blood vessel. Figure 2AA gradient template is generated after adjusting the parameters of the reference contour, wherein the gray circle L0 represents the reference contour after adjusting the parameters, the white circle L1 represents the inner circle of the reference contour after adjusting the parameters, and the black circle L2 represents the outer circle of the reference contour after adjusting the parameters. The gray value occupied by L1 is greater than the gray value occupied by L2, and L0 is in the middle of L1 and L0, in a transition zone, so that the gray values ​​of the inner and outer circles of L0 form a clear contrast, indicating that the contour of the blood vessel formed by L0 is closer to the actual contour of the blood vessel, so as to better identify the structure of the object to be detected in the original image whose brightness is greater than that of other surrounding tissues (such as blood vessel structure). For example, the gray value occupied by L0 is 0, the gray value occupied by L1 is greater than 0, and the gray value occupied by L2 is less than 0.

[0068] S103, performing a convolution operation on the image to be detected and each gradient template to obtain a plurality of convolution images.

[0069] In this embodiment, when the terminal obtains the image to be detected and multiple gradient templates, the image to be detected can be convolved with each gradient template to obtain multiple convolved images, the number of convolution images is consistent with the number of gradient templates, and the convolution images and gradient templates are in a one-to-one correspondence. It should be noted that when there are multiple images to be detected, multiple images to be detected can be convolved with the same group of gradient templates at the same time to obtain groups of convolution images corresponding to each image to be detected.

[0070] S104, determining the target contour in the image to be detected according to the multiple convolution images.

[0071] When the terminal obtains multiple convolution images corresponding to the image to be detected, it can further compare the object to be detected in the multiple convolution images, filter out the convolution image with high definition of the object to be detected as the target convolution image, and then find the gradient template corresponding to the target convolution image, and finally use the contour on the found gradient template as the target contour. Optionally, after filtering out the target convolution image, the terminal can also perform contour recognition of the object to be detected based on the target convolution image to obtain the target contour.

[0072] The above-mentioned method for detecting the target contour obtains a reference contour and an image to be detected, adjusts the parameters of the reference contour to generate multiple gradient templates, and then performs a convolution operation on the image to be detected and each gradient template to obtain multiple convolution images, and then determines the target contour in the image to be detected based on the multiple convolution images. The above-mentioned method only needs to perform a convolution operation on the image to be detected and the gradient template to realize the target contour detection of the object to be detected in the image to be detected. Compared with the traditional method of using complex recognition algorithms for contour detection, the detection time is shorter and the detection speed is faster. Moreover, since the gradient template is generated based on the reference contour, and the reference contour is obtained by the doctor's outline, the method for obtaining the gradient template is simpler, making the above-mentioned method for detecting the target contour simpler, easy to implement, and can be popularized and applied.

[0073] Optionally, an implementation of the above S102 is provided, such as Figure 3 As shown, the above S102 "adjusting the parameters of the reference profile to generate multiple gradient templates" includes:

[0074] S201, using an elliptical Fourier descriptor to represent the reference contour with a set of parameters.

[0075] Among them, the elliptical Fourier descriptor can use the superposition of elliptical shapes to simulate the shape of a curve. The more elliptical shapes are superimposed, the closer the simulation result is to the real curve shape. Therefore, the fewer the number of ellipses, the smoother the edge of the simulated curve. The superposition process is the superposition of several elliptical equations. Therefore, while smoothing the curve, the elliptical Fourier descriptor can convert the contour into a set of parameters that superimpose multiple elliptical equations, and when the parameters are adjusted according to a certain rule, the simulated contour can be controlled to be enlarged or reduced according to a certain proportion.

[0076] In this embodiment, after the doctor outlines the reference contour of the object to be detected on an image to be detected, the reference contour can be smoothed using an elliptical Fourier descriptor, and the reference contour can be represented by a set of parameters through the elliptical Fourier descriptor, wherein the set of parameters includes parameters describing the size of the reference contour and parameters describing the shape of the reference contour.

[0077] S202, adjusting the size and / or shape of the reference contour by changing the values ​​of the parameters multiple times to generate multiple gradient templates.

[0078] Since the reference contour is represented by a set of parameters, and the set of parameters includes parameters describing the size of the reference contour and parameters describing the shape of the reference contour, the size and / or shape of the reference contour can be adjusted by changing the value of the parameter. Then, each time the value of the parameter is changed, the value of one parameter can be changed at a time to achieve the effect of only adjusting the size of the reference contour or adjusting the shape of the reference contour, or the values ​​of multiple parameters can be changed at the same time to achieve the effect of adjusting the size and shape of the reference contour at the same time. After adjusting the size and / or shape of the reference contour, a gradient template can be generated according to the reference contour after the size and / or shape is adjusted.

[0079] Furthermore, the present application provides a plurality of methods for generating gradient templates, thereby obtaining a plurality of gradient templates, each of which includes a reference contour after adjusting parameters. Three methods for generating gradient templates are specifically described below:

[0080] The first method is: according to the parameter value of the enlarged size, the parameter value is changed multiple times to enlarge the size of the reference contour, and multiple gradient templates containing the enlarged reference contour are generated.

[0081] The second method is: according to the parameter value of the size reduction, the parameter value is changed multiple times to reduce the size of the reference contour, and multiple gradient templates containing the reference contour after the size reduction are generated.

[0082] The third method is: according to the parameter value of the shape adjustment, the parameter value is changed multiple times to adjust the shape of the reference contour, and multiple gradient templates containing the reference contour after the shape adjustment are generated.

[0083] The effect achieved by the above method is illustrated by way of example. Figure 3A As shown, assuming that the object to be detected is a blood vessel, the contour L0 of the blood vessel in the image to be detected on the left is a reference contour, the contour is described by a set of parameters using an elliptical Fourier descriptor, and the values ​​of the parameters in the set of parameters are adjusted to enlarge and reduce the reference contour L0 to obtain the reduced contour L1 and the enlarged contour L2.

[0084] In this embodiment, when the terminal changes the value of a parameter in a set of parameters corresponding to the reference contour, it can first determine how to adjust the reference contour, that is, to enlarge, reduce or change the shape, and then find the corresponding parameter in a set of parameters that can be enlarged, reduced or changed in shape, and then change the value of the corresponding parameter according to the above corresponding method to complete the adjustment of the size and / or shape of the reference contour, and then generate a gradient template based on the reference contour after the size and / or shape is changed, and each gradient template contains a reference contour after the size and / or shape is changed. The above method only needs to adjust the corresponding parameter values ​​in a set of parameters to achieve the effect of changing the size and / or shape of the reference contour, and then generate a gradient template that matches the contour of the object to be detected. The method for generating the gradient template is simple and easy to implement.

[0085] In one embodiment, an implementation of the above S104 is also provided, such as Figure 4 As shown, the above S104 “determining the target contour in the image to be detected according to multiple convolution images” includes:

[0086] S301, determining a first response value within a preset area range in a plurality of convolution images.

[0087] The preset area range can be determined by the terminal in advance according to the detection accuracy, or according to the estimated size of the contour of the object to be detected, or according to the size of the reference contour, or according to the type of the object to be detected. For example, the preset area range in this embodiment can be specifically selected as a 7*7 or 9*9 area range near the center area of ​​the object to be detected. The first response value is the maximum response value within the preset area range in multiple convolution images. The maximum response value is also the maximum grayscale value within the preset area range.

[0088] In this embodiment, when the terminal obtains multiple convolution images corresponding to the image to be detected, it can search for the maximum response value within a preset area range on each convolution image, and then compare the maximum response values ​​on each convolution image, and filter out the maximum response value with the largest value, which is the first response value.

[0089] S302: Use the gradient template corresponding to the point of the first response value as the target template.

[0090] After the terminal determines the first response value, the convolution image corresponding to the first response value can be determined. Since the convolution image and the gradient template are in a one-to-one correspondence, the gradient template corresponding to the convolution image can be further determined, and the gradient template can be determined as the target template.

[0091] Optional, such as Figure 5 As shown, the above step S301 specifically includes:

[0092] S401, determining a preset area range according to the size of a reference contour.

[0093] This embodiment relates to a specific method for determining the preset area range. The terminal can extract the size of the reference contour, and then directly use the area range formed according to the size of the reference contour as the preset area range. Optionally, when the terminal obtains the reference contour, it can also extract the size of the area surrounded by the reference contour, and then determine the preset area range according to the size of the area.

[0094] S402, obtaining a second response value within a preset area in each convolution image; the second response value is a maximum response value within the preset area in each convolution image.

[0095] In this embodiment, when the terminal obtains multiple convolution images corresponding to the image to be detected, it can determine a preset area range according to the size of the reference contour, and then determine a maximum response value, that is, the maximum grayscale value, within the preset area range on each convolution image. Then, the maximum response value within the preset area range in each convolution image is the second response value.

[0096] S403, comparing the second response values ​​on the convolution images, and selecting the largest second response value as the first response value.

[0097] After the terminal determines the second response value on each convolution image, it can compare the second response values ​​on each convolution image and select the second response value with the largest value as the first response value. When there are multiple largest second response values, one second response value is arbitrarily selected from the multiple second response values ​​as the first response value, or the convolution images corresponding to the multiple second response values ​​are selected and compared, and finally the convolution image with the highest clarity is selected, and the second response value corresponding to the selected convolution image is used as the first response value.

[0098] S303: Determine the target contour in the image to be detected according to the point of the first response value and the target template.

[0099] Optional, such as Figure 6 As shown, the above step S303 includes:

[0100] S501, taking the point of the first response value as the center point of the target contour.

[0101] Since the first response value is the maximum response value in the convolution image, and the convolution image is obtained by convolving the image to be detected and the target template, when the terminal determines the first response value, the point of the first response value can be used as the center point of the target contour, and then the position of the center point of the target contour can be determined according to the position of the first response value.

[0102] S502: Generate a target contour on the image to be detected according to the contour parameters contained in the target template and the center point of the target contour.

[0103] The parameters of the contour contained in the target template include the size, shape, deflection orientation, etc. of the contour.

[0104] When the terminal determines the center point of the target contour, that is, the position of the center point of the target contour, and the parameters of the contour contained in the target template, such as the size, shape, and deflection orientation of the contour, the terminal can determine the position, size, shape, deflection orientation and other parameters of the target contour on the image to be detected, and then automatically generate the target contour on the image to be detected based on these parameters.

[0105] Based on all the above embodiments, a method for detecting blood vessel contour is provided by applying the above target contour detection method. Figure 7 As shown, the method includes:

[0106] S601, obtaining a reference contour of a blood vessel structure and an image to be detected; the image to be detected contains a blood vessel structure.

[0107] S602: Use an elliptical Fourier descriptor to represent the reference contour with a set of parameters.

[0108] S603, adjusting the size and / or shape of the reference contour by changing the parameter values ​​multiple times to generate multiple gradient templates.

[0109] S604: Perform a convolution operation on the image to be detected and each gradient template to obtain a plurality of convolution images.

[0110] S605: Determine a preset area range according to the size of the reference contour.

[0111] S606, obtaining a second response value within the preset area in each convolution image; the second response value is the maximum response value within the preset area in each convolution image.

[0112] S607, comparing the second response values ​​on the convolution images, and selecting the largest second response value as the first response value.

[0113] S608: Use the gradient template corresponding to the point of the first response value as the target template.

[0114] S609: Taking the point of the first response value as the center point of the target contour.

[0115] S610, generating a target contour on the image to be detected according to the parameters of the blood vessel contour included in the target template and the center point of the target contour.

[0116] The above steps have been described in detail above. Please refer to the above content for details and will not be repeated here.

[0117] When using the above-mentioned blood vessel contour detection method, the corresponding effect diagrams of each step are as follows: Fig. 7A As shown, wherein Figure (a) is an image to be detected, and the image to be detected includes a reference contour. Figure (b) is the image to be detected of Figure (a), and the image includes the contour of the blood vessel after adjusting the size of the reference contour and the reference contour, including the contour after the reference contour is enlarged and the contour after the reference contour is reduced. Figure (c) is three gradient templates generated according to the reference contour and the reference contour after the parameters are adjusted in Figure (b), and one gradient template includes the enlarged reference contour, one gradient template includes the reduced reference contour, and one gradient template includes the reference contour. Figure (d) is a new image to be detected; Figure (e) is three convolution images obtained by convolving the image to be detected shown in Figure (d) with the three gradient templates shown in Figure (c), respectively, and the frame on the image is a preset area range, and then the terminal searches for the maximum response value within the preset area range, and then compares the maximum response values ​​on the three convolution images, and determines the largest maximum response value as the first response value, and then determines the target contour of the blood vessel on the image to be detected shown in Figure (d) according to the first response value and the three gradient templates shown in Figure (c).

[0118] The above-mentioned blood vessel contour detection method only needs to perform a convolution operation between the image to be detected and the gradient template to realize the contour detection of the blood vessels in the image to be detected. Compared with the traditional method of using complex recognition algorithms to detect blood vessel contours, the detection time is shorter and the detection speed is faster. Moreover, since the gradient template is generated based on the reference contour, and the reference contour is obtained by the doctor's outline, the method of obtaining the gradient template is simpler, making the above-mentioned blood vessel contour detection method simpler and easier to implement, and can be popularized and applied in blood vessel detection.

[0119] It should be understood that although Figure 2-7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-7 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0120] In one embodiment, Figure 8 As shown, a device for detecting a target contour is provided, comprising:

[0121] The acquisition module 11 is used to acquire the reference contour and the image to be detected.

[0122] The generating module 12 is used to adjust the parameters of the reference contour to generate multiple gradient templates.

[0123] The convolution module 13 is used to perform a convolution operation on the image to be detected and each of the gradient templates to obtain a plurality of convolution images.

[0124] The determination module 14 is used to determine the target contour in the image to be detected according to the multiple convolution images.

[0125] In one embodiment, Fig. 9 As shown, the above-mentioned generating module 12 includes:

[0126] A first generating unit 121 is used to represent the reference contour with a set of parameters using an elliptical Fourier descriptor;

[0127] The second generating unit 122 is configured to adjust the size and / or shape of the reference contour by changing the value of the parameter multiple times to generate multiple gradient templates.

[0128] In one embodiment, the second generating unit 122 is configured to perform at least one of the following methods:

[0129] According to the parameter value of the enlarged size, the value of the parameter is changed multiple times to enlarge the size of the reference contour, and a plurality of gradient templates including the enlarged reference contour are generated;

[0130] According to the parameter value of the size reduction, the value of the parameter is changed multiple times to reduce the size of the reference contour, and a plurality of gradient templates including the reference contour after the size reduction are generated;

[0131] According to the parameter value of the shape adjustment, the value of the parameter is changed multiple times to adjust the shape of the reference contour, and multiple gradient templates containing the reference contour after the shape adjustment are generated.

[0132] In one embodiment, Fig.10 As shown, the above-mentioned determination module 14 includes:

[0133] A first determining unit 141 is used to determine a first response value within a preset area of ​​the multiple convolution images; the first response value is a maximum response value within the preset area of ​​the multiple convolution images;

[0134] A second determining unit 142, configured to use the gradient template corresponding to the point of the first response value as a target template;

[0135] The third determining unit 143 is configured to determine a target contour in the image to be detected according to the points of the first response value and the target template.

[0136] In one embodiment, Fig.11 As shown, the first determining unit 141 includes:

[0137] A determination subunit 1411 is used to determine the preset area range according to the size of the reference contour;

[0138] The acquisition subunit 1412 is used to acquire a second response value within the preset area of ​​each of the convolution images; the second response value is a maximum response value within the preset area of ​​each of the convolution images;

[0139] The screening subunit 1413 is used to compare the second response values ​​on the convolution images and screen out the largest second response value as the first response value.

[0140] In one embodiment, Fig.12 As shown, the third determining unit 143 includes:

[0141] A determination subunit 1431 is used to take the point of the first response value as the center point of the target contour;

[0142] A generating subunit 1432 is used to generate a target contour according to the parameters of the contour included in the target template and the center point of the target contour.

[0143] The target contour is generated on the image to be detected.

[0144] In one embodiment, in the gradient template, the difference between the grayscale value occupied by the inner circle and the grayscale value occupied by the outer circle of the reference contour after the parameter adjustment is greater than a preset grayscale threshold.

[0145] The specific definition of the target contour detection device can refer to the definition of the blood vessel contour detection method mentioned above, which will not be repeated here. Each module in the above target contour detection device can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0146] The target contour detection method provided in this application can be applied to Fig.13 In the computer device shown in the figure, the computer device may be a server, or the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.13As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting a target contour is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0147] Those skilled in the art will understand that Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0148] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0149] Obtain reference contour and image to be detected;

[0150] Adjusting the parameters of the reference profile to generate a plurality of gradient templates;

[0151] Performing a convolution operation on the image to be detected and each of the gradient templates to obtain a plurality of convolution images;

[0152] Determine the target contour in the image to be detected according to the multiple convolution images.

[0153] The computer device provided in the above embodiment has an implementation principle and technical effects similar to those of the above method embodiment, which will not be described in detail here.

[0154] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0155] Obtain reference contour and image to be detected;

[0156] Adjusting the parameters of the reference profile to generate a plurality of gradient templates;

[0157] Performing a convolution operation on the image to be detected and each of the gradient templates to obtain a plurality of convolution images;

[0158] Determine the target contour in the image to be detected according to the multiple convolution images.

[0159] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0160] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0161] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0162] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for detecting a target contour, characterized in that: The method comprises: Obtain reference contour and image to be detected; Adjusting the parameters of the reference contour to generate a plurality of gradient templates; the gradient template includes the reference contour after the parameters are adjusted, and the difference between the grayscale value occupied by the inner circle and the grayscale value occupied by the outer circle of the reference contour after the parameters are adjusted is greater than a preset grayscale threshold; Performing a convolution operation on the image to be detected and each of the gradient templates to obtain a plurality of convolution images; Determine a first response value within a preset area of ​​the multiple convolution images; the first response value is a maximum response value within the preset area of ​​the multiple convolution images; the maximum response value is a maximum grayscale value within the preset area; Using the gradient template corresponding to the point of the first response value as the target template; Taking the point of the first response value as the center point of the target contour; The target contour is generated on the image to be detected according to the contour parameters contained in the target template and the center point of the target contour.

2. The method according to claim 1, characterized in that The step of adjusting the parameters of the reference profile to generate a plurality of gradient templates comprises: The reference profile is represented by a set of parameters using an elliptical Fourier descriptor; The size and / or shape of the reference contour is adjusted by changing the value of the parameter multiple times to generate multiple gradient templates.

3. The method according to claim 2, characterized in that The method of adjusting the size and / or shape of the reference contour by changing the value of the parameter multiple times to generate multiple gradient templates includes at least one of the following: According to the parameter value of the enlarged size, the value of the parameter is changed multiple times to enlarge the size of the reference contour, and a plurality of gradient templates including the enlarged reference contour are generated; According to the parameter value of the size reduction, the value of the parameter is changed multiple times to reduce the size of the reference contour, and a plurality of gradient templates including the reference contour after the size reduction are generated; According to the parameter value of the shape adjustment, the value of the parameter is changed multiple times to adjust the shape of the reference contour, and multiple gradient templates containing the reference contour after the shape adjustment are generated.

4. The method according to claim 1, characterized in that: The determining of the first response value within a preset area range in the plurality of convolution images comprises: Determine the preset area range according to the size of the reference contour; Acquire a second response value within the preset area in each of the convolution images; the second response value is the maximum response value within the preset area in each of the convolution images; The second response values ​​on the convolution images are compared, and the largest second response value is selected as the first response value.

5. A device for detecting a target contour, characterized in that: The device comprises: An acquisition module, used for acquiring a reference contour and an image to be detected; A generating module, used for adjusting the parameters of the reference contour to generate a plurality of gradient templates; the gradient template includes the reference contour after the parameters are adjusted, and the difference between the grayscale value occupied by the inner circle and the grayscale value occupied by the outer circle of the reference contour after the parameters are adjusted is greater than a preset grayscale threshold; A convolution module, used for performing a convolution operation on the image to be detected and each of the gradient templates to obtain a plurality of convolution images; Identify modules, including: A first determination unit is used to determine a first response value within a preset area of ​​the multiple convolution images; the first response value is a maximum response value within the preset area of ​​the multiple convolution images; the maximum response value is a maximum grayscale value within the preset area; a second determining unit, configured to use the gradient template corresponding to the point of the first response value as a target template; The third determining unit includes: A determination subunit, configured to use the point of the first response value as the center point of the target contour; The generating subunit is used to generate the target contour on the image to be detected according to the parameters of the contour contained in the target template and the center point of the target contour.

6. The device according to claim 5, characterized in that The generating module comprises: A first generating unit, configured to represent the reference contour with a set of parameters using an elliptical Fourier descriptor; The second generating unit is used to adjust the size and / or shape of the reference contour by changing the value of the parameter multiple times to generate multiple gradient templates.

7. The device according to claim 6, characterized in that The second generating unit is used to perform at least one of the following methods: According to the parameter value of the enlarged size, the value of the parameter is changed multiple times to enlarge the size of the reference contour, and a plurality of gradient templates including the enlarged reference contour are generated; According to the parameter value of the size reduction, the value of the parameter is changed multiple times to reduce the size of the reference contour, and a plurality of gradient templates including the reference contour after the size reduction are generated; According to the parameter value of the shape adjustment, the value of the parameter is changed multiple times to adjust the shape of the reference contour, and multiple gradient templates containing the reference contour after the shape adjustment are generated.

8. The device according to claim 5, characterized in that The first determining unit includes: A determination subunit, configured to determine the preset area range according to the size of the reference contour; An acquisition subunit is used to acquire a second response value within the preset area of ​​each of the convolution images; the second response value is a maximum response value within the preset area of ​​each of the convolution images; The screening subunit is used to compare the second response values ​​on each of the convolution images and screen out the largest second response value as the first response value.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.