Disclosure of Invention
In order to solve the technical problems of large workload and low repair accuracy of doctors in the process of repairing retinal vessel images in the prior art, the embodiment of the invention provides a retinal vessel editing method and a retinal vessel editing device.
In order to achieve the above object, an embodiment of the present invention provides an editing method for a retinal blood vessel, including: acquiring image information of a retinal blood vessel, and judging whether a first breakpoint exists on a central line of the retinal blood vessel; under the condition that a first breakpoint exists on the central line of the retinal blood vessel, judging whether an associated abnormal blood vessel associated with the retinal blood vessel exists in a preset range around the first breakpoint; sending a first prompt message to a user under the condition that the associated abnormal blood vessel exists in a preset range around the first breakpoint; and acquiring first feedback information of the user based on the first prompt information, and editing the retinal blood vessel based on the first feedback information to generate an edited retinal blood vessel.
Preferably, the determining whether there is an associated abnormal blood vessel associated with the retinal blood vessel within a preset range around the first breakpoint includes: acquiring an extension line of the central line of the retinal blood vessel with the first breakpoint as an end point, wherein the extension line is a ray extending according to the extension trend of the central line; judging whether intersection points exist between the extension lines and the edge lines or the center lines of other retinal blood vessels in a preset range, and determining the retinal blood vessels with the intersection points as intersected retinal blood vessels; and judging whether a breakpoint exists on the central line of the intersected retinal blood vessels, and determining the intersected retinal blood vessels with the breakpoints as associated abnormal blood vessels associated with the retinal blood vessels.
Preferably, the sending a first prompt message to a user when there is an associated abnormal blood vessel in a preset range around the first breakpoint includes: acquiring the position information of the associated abnormal blood vessel under the condition that the associated abnormal blood vessel exists in a preset range around the first breakpoint; and highlighting the blood vessel image of the associated abnormal blood vessel based on the position information, and sending first prompt information to a user.
Preferably, the editing the retinal blood vessel based on the first feedback information to generate an edited retinal blood vessel includes: deleting the related information of the retinal blood vessel and the related abnormal blood vessel under the condition that the first feedback information is an ignoring instruction; in the case that the first feedback information is a modification instruction: determining a breakpoint closest to the first breakpoint on the central line of the associated abnormal blood vessel as a second breakpoint; respectively taking the first breakpoint and the second breakpoint as a first endpoint and a second endpoint, and generating a corresponding relation between the first endpoint and the second endpoint; adjusting the corresponding relation to generate an edited blood vessel central line; generating the edited retinal vessel based on the edited vessel centerline.
Preferably, the adjusting the corresponding relation to generate an edited blood vessel centerline, and the generating the edited retinal blood vessel based on the edited blood vessel centerline includes: acquiring a first control point input by a user, and adjusting the corresponding relation based on the first control point to generate an edited blood vessel central line; generating the edited retinal vessel based on the edited vessel centerline.
Preferably, the editing method further comprises: acquiring a second control point input by a user, and optimizing the edited blood vessel central line based on the second control point to generate an optimized blood vessel central line; generating the edited retinal vessel based on the optimized vessel centerline.
Correspondingly, an embodiment of the present invention further provides an editing apparatus for retinal blood vessels, where the editing apparatus includes: the first judgment module is used for acquiring image information of retinal blood vessels and judging whether a first breakpoint exists on a central line of the retinal blood vessels; the second judgment module is used for judging whether an associated abnormal blood vessel associated with the retinal blood vessel exists in a preset range around a first breakpoint under the condition that the first breakpoint exists on the central line of the retinal blood vessel; the prompting module is used for sending first prompting information to a user under the condition that the associated abnormal blood vessel exists in a preset range around the first breakpoint; and the editing module is used for acquiring first feedback information of a user based on the first prompt information and editing the retinal blood vessel based on the first feedback information so as to generate an edited retinal blood vessel.
Preferably, the second determination module includes: the acquisition submodule is used for acquiring an extension line of the central line of the retinal blood vessel with the first breakpoint as an end point, wherein the extension line is a ray extending according to the extension trend of the central line; the determining submodule is used for judging whether intersection points exist between the extension line and edge lines or center lines of other retinal blood vessels in a preset range or not and determining the retinal blood vessels with the intersection points as intersected retinal blood vessels; and the association submodule is used for judging whether a breakpoint exists on the central line of the intersected retinal blood vessels or not and determining the intersected retinal blood vessels with the breakpoints as associated abnormal blood vessels associated with the retinal blood vessels.
Preferably, the prompting module includes: the position acquisition submodule is used for acquiring the position information of the associated abnormal blood vessel under the condition that the associated abnormal blood vessel exists in a preset range around the first breakpoint; and the prompting submodule is used for highlighting the blood vessel image of the associated abnormal blood vessel based on the position information and sending first prompting information to a user.
Preferably, the editing module comprises: the deleting submodule is used for deleting the associated information of the retinal blood vessel and the associated abnormal blood vessel under the condition that the first feedback information is an ignoring instruction; a modification submodule, configured to, if the first feedback information is a modification instruction: determining a breakpoint closest to the first breakpoint on the central line of the associated abnormal blood vessel as a second breakpoint; respectively taking the first breakpoint and the second breakpoint as a first endpoint and a second endpoint, and generating a corresponding relation between the first endpoint and the second endpoint; adjusting the corresponding relation to generate an edited blood vessel central line; generating the edited retinal vessel based on the edited vessel centerline.
Preferably, the modification submodule includes: the adjusting submodule is used for acquiring a first control point input by a user and adjusting the corresponding relation based on the first control point so as to generate an edited blood vessel central line; a first generation sub-module for generating the edited retinal vessel based on the edited vessel centerline.
Preferably, the editing apparatus further comprises: the optimization submodule is used for acquiring a second control point input by a user and optimizing the edited blood vessel central line based on the second control point to generate an optimized blood vessel central line; a second generation submodule for generating the edited retinal vessel based on the optimized vessel centerline.
In another aspect, the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method provided by the present invention.
Through the technical scheme provided by the invention, the invention at least has the following technical effects:
through analyzing the image of the retinal vessel, the associated abnormal vessel associated with the wrong retinal vessel is obtained, the doctor can repair the wrong retinal vessel only by performing simple operation according to the prompt information at the moment, and does not need to perform manual searching, screening and repairing operations in the whole retinal vessel, so that the workload of the doctor is greatly reduced, the working efficiency of the doctor is improved, meanwhile, the drawing of the retinal vessel is realized by a computer according to a preset program, the subjective influence caused by manual drawing is avoided, and the drawing accuracy is improved.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Detailed Description
In order to solve the technical problems of large workload and low repair accuracy of doctors in the process of repairing retinal vessel images in the prior art, embodiments of the present invention provide a retinal vessel editing method and an editing apparatus, where a user can edit retinal vessels by analyzing the erroneous retinal vessels to obtain associated abnormal vessels related to the erroneous retinal vessels, and the user only needs simple operations, so as to greatly reduce the workload of doctors, improve the work efficiency of doctors, and improve the repair accuracy.
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating embodiments of the invention, are given by way of illustration and explanation only, not limitation.
The terms "system" and "network" in embodiments of the present invention may be used interchangeably. The "plurality" means two or more, and in view of this, the "plurality" may also be understood as "at least two" in the embodiments of the present invention. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" generally indicates that the preceding and following related objects are in an "or" relationship, unless otherwise specified. In addition, it should be understood that the terms first, second, etc. in the description of the embodiments of the invention are used for distinguishing between the descriptions and are not intended to indicate or imply relative importance or order to be construed.
Referring to fig. 1, an embodiment of the present invention provides a method for editing a retinal blood vessel, where the method includes:
s10) acquiring image information of retinal blood vessels, and judging whether a first breakpoint exists on the central line of the retinal blood vessels;
s20) determining whether an associated abnormal blood vessel associated with the retinal blood vessel exists within a preset range around a first breakpoint when the first breakpoint exists on the center line of the retinal blood vessel;
s30) sending a first prompt message to a user when the associated abnormal blood vessel exists in the preset range around the first breakpoint;
s40) obtaining first feedback information of the user based on the first prompt information, and editing the retinal blood vessel based on the first feedback information to generate an edited retinal blood vessel.
In an embodiment of the present invention, the determining whether there is an associated abnormal blood vessel associated with the retinal blood vessel within a preset range around the first breakpoint includes: acquiring an extension line of the central line of the retinal blood vessel with the first breakpoint as an end point, wherein the extension line is a ray extending according to the extension trend of the central line; judging whether intersection points exist between the extension lines and the edge lines or the center lines of other retinal blood vessels in a preset range, and determining the retinal blood vessels with the intersection points as intersected retinal blood vessels; and judging whether a breakpoint exists on the central line of the intersected retinal blood vessels, and determining the intersected retinal blood vessels with the breakpoints as associated abnormal blood vessels associated with the retinal blood vessels.
Referring to fig. 2, in a possible embodiment, after detecting that the retinal blood vessel a has the first breakpoint D1, an extending trend of the centerline of the retinal blood vessel a is obtained, in an embodiment of the present invention, the centerline of the retinal blood vessel a is composed of a set of points, by obtaining the first breakpoint D1 and a point D2 closest to the first breakpoint, connecting the first breakpoint D1 and the point D2 to obtain an extending trend line (not shown) of the centerline of the retinal blood vessel a at the breakpoint, and generating a ray with the first breakpoint D1 as an end point according to the extending trend line, so as to obtain the extending line of the centerline of the retinal blood vessel a. At this time, according to the preset range, in the embodiment of the present invention, the preset range may be a length of 2 to 5 vessel diameters, further specifically, the preset range may be 0.1 to 0.5mm, for example, the preset range is 0.5mm, a ray segment with a length of 0.5mm is obtained, an intersection point D3 between the ray segment and the center line of the retinal vessel B is obtained, the retinal vessel B is determined as an intersecting retinal vessel, and further, a breakpoint still exists on the intersecting retinal vessel, the intersecting retinal vessel is determined as an associated abnormal vessel associated with the retinal vessel a.
In the automatic drawing process of the retinal vessel image, most drawing deviations belong to the situation that the same retinal vessel is disconnected due to the identification deviation of a computer, so in the embodiment of the invention, the center line of the disconnected retinal vessel is properly prolonged according to the extension trend of the center line, and whether the prolonged center line and the edge lines or the center lines of other disconnected retinal vessels have intersection points is judged, so that the relevance between the currently disconnected retinal vessel and other disconnected retinal vessels is quickly determined, and a user does not need to manually check and examine each disconnected position of each retinal vessel, thereby greatly reducing the workload of doctors and improving the working efficiency of the user.
In this embodiment of the present invention, when there is an associated abnormal blood vessel in the preset range around the first breakpoint, sending a first prompt message to a user, where the sending the first prompt message includes: acquiring the position information of the associated abnormal blood vessel under the condition that the associated abnormal blood vessel exists in a preset range around the first breakpoint; and highlighting the blood vessel image of the associated abnormal blood vessel based on the position information, and sending first prompt information to a user.
Referring to fig. 3, in a possible embodiment, the computer detects that a first breakpoint exists on the retinal vessel 29, and simultaneously finds that an associated abnormal vessel 32 exists within a preset range of the first breakpoint through automatic detection, so that the position information of the associated abnormal vessel 32 is automatically obtained, and the retinal vessel image of the associated abnormal vessel 32 is highlighted in a current window of the computer according to the position information, for example, the area where the retinal vessel image of the associated abnormal vessel 32 is located is displayed in the middle of the current window in a small window form, so as to be convenient for the user to view.
In the embodiment of the present invention, the technical effects of the present invention can also be achieved by displaying the associated abnormal blood vessel 32 in the current window in a full screen manner, directly enlarging the entire retinal blood vessel image, simultaneously staining and highlighting the associated abnormal blood vessel 32, and performing the disassembling and combining of the above technical means, which all belong to the protection scope of the present invention and are not described herein in any more detail.
In the embodiment of the invention, the position information of the associated abnormal blood vessel is automatically acquired, and the associated abnormal blood vessel is highlighted in the current window of the computer, so that the observation and the judgment of a user are more convenient, and the operations of amplifying, reducing, searching, screening and the like of the whole retinal blood vessel image by the user manually are not needed, thereby greatly reducing the workload of the user and improving the working efficiency of the user.
Further, after the relevant abnormal blood vessel is highlighted in the current window of the computer, first prompt information is sent to the user, for example, inquiry information is sent to the user whether automatic repair is needed or not.
In the embodiment of the invention, the prompt information is sent to the user after the associated abnormal blood vessel is highlighted, so that the user can check the associated abnormal blood vessel again to avoid error detection caused by the identification error of the computer, and the user can freely select whether to process the currently detected associated abnormal blood vessel, thereby avoiding the error detection caused by the identification error of the computer, improving the accuracy of automatic detection, improving the operation freedom of the user and improving the user experience.
In an embodiment of the present invention, the editing the retinal blood vessel based on the first feedback information to generate an edited retinal blood vessel includes: deleting the related information of the retinal blood vessel and the related abnormal blood vessel under the condition that the first feedback information is an ignoring instruction; in the case that the first feedback information is a modification instruction: determining a breakpoint closest to the first breakpoint on the central line of the associated abnormal blood vessel as a second breakpoint; respectively taking the first breakpoint and the second breakpoint as a first endpoint and a second endpoint, and generating a corresponding relation between the first endpoint and the second endpoint; adjusting the corresponding relation to generate an edited blood vessel central line; generating the edited retinal vessel based on the edited vessel centerline.
In a possible implementation mode, after observing the highlighted associated abnormal blood vessel, the user finds that the associated abnormal blood vessel belongs to the other of the two crossed retinal blood vessels, because the end point of the other retinal blood vessel is closer to the breakpoint of the currently disconnected retinal blood vessel, the associated abnormal blood vessel is falsely detected by the computer as the associated abnormal blood vessel associated with the current retinal blood vessel, so that the user chooses to ignore the associated information, and the computer automatically deletes the associated information so as to avoid prompting the user again, causing troubles to the user and reducing the user experience.
In another possible embodiment, the user feeds back an instruction to modify the retinal vessel to the computer by observing the highlighted associated abnormal vessel, for example, clicking a "repair" option in a dialog box popped up in the current view, at which time the computer determines the breakpoint closest to the first breakpoint D1 on the centerline of the associated abnormal vessel where the breakpoint exists as the second breakpoint D4, and takes the first breakpoint D1 and the second breakpoint D4 as the first endpoint P1 and the second endpoint P2, respectively, and generates a correspondence between the first endpoint P1 and the second endpoint P2, for example, a set of points connecting the first endpoint P1 and the second endpoint P2, as shown in fig. 4.
In an embodiment of the present invention, the adjusting the correspondence relationship to generate an edited blood vessel centerline, and generating the edited retinal blood vessel based on the edited blood vessel centerline includes: acquiring a first control point input by a user, and adjusting the corresponding relation based on the first control point to generate an edited blood vessel central line; generating the edited retinal vessel based on the edited vessel centerline.
Referring to fig. 5, in a possible embodiment, after generating the corresponding relationship between the end points P1 and P2, the computer obtains the first control point input by the user, for example, the user clicks in the current retinal vessel region by a mouse to input the first control point K1, and drags the first control point K1 to form a dragging track, the computer adjusts the corresponding relationship, for example, a connecting straight line, according to the dragging track to generate a connecting curve, so as to generate an edited vessel centerline, and then the computer automatically generates the edited retinal vessel according to the edited vessel centerline.
In the embodiment of the invention, the user can re-edit the error retinal vessel by simple operation, the workload of the user is further reduced, and the working efficiency of the user is improved.
In an embodiment of the present invention, the editing method further includes: acquiring a second control point input by a user, and optimizing the edited blood vessel central line based on the second control point to generate an optimized blood vessel central line; generating the edited retinal vessel based on the optimized vessel centerline.
Referring to fig. 6, in another possible embodiment, the edited blood vessel centerline obtained after the adjustment of the correspondence relationship by inputting a control point still does not conform to the shape of the current blood vessel, so that the second control point K2 input by the user is obtained, the edited blood vessel centerline is optimized according to the control point K2, and thus the optimized blood vessel centerline is obtained, and then the computer automatically generates the edited retinal blood vessel according to the optimized blood vessel centerline.
In the embodiment of the present invention, based on the same principle, a user may add any number of control points in the current retinal area according to actual needs, so as to adjust the correspondence for multiple times, so that the generated blood vessel centerline is more consistent with the form of the current retinal blood vessel, which all shall belong to the protection scope of the present invention, and no redundant description is given here.
In the embodiment of the invention, the vessel center line is adjusted through simple operation, so that the generated vessel center line has better consistency with the form of the current vessel, the drawing accuracy of the vessel center line is ensured, the degree of freedom of user operation is improved, and meanwhile, the accuracy of the vessel edge line generated in the subsequent work is further improved.
An editing apparatus for retinal blood vessels according to an embodiment of the present invention will be described below with reference to the drawings.
Referring to fig. 7, based on the same inventive concept, an embodiment of the present invention provides an editing apparatus for retinal blood vessels, including: the first judgment module is used for acquiring image information of retinal blood vessels and judging whether a first breakpoint exists on a central line of the retinal blood vessels; the second judgment module is used for judging whether an associated abnormal blood vessel associated with the retinal blood vessel exists in a preset range around a first breakpoint under the condition that the first breakpoint exists on the central line of the retinal blood vessel; the prompting module is used for sending first prompting information to a user under the condition that the associated abnormal blood vessel exists in a preset range around the first breakpoint; and the editing module is used for acquiring first feedback information of a user based on the first prompt information and editing the retinal blood vessel based on the first feedback information so as to generate an edited retinal blood vessel.
In an embodiment of the present invention, the second determining module includes: the acquisition submodule is used for acquiring an extension line of the central line of the retinal blood vessel with the first breakpoint as an end point, wherein the extension line is a ray extending according to the extension trend of the central line; the determining submodule is used for judging whether intersection points exist between the extension line and edge lines or center lines of other retinal blood vessels in a preset range or not and determining the retinal blood vessels with the intersection points as intersected retinal blood vessels; and the association submodule is used for judging whether a breakpoint exists on the central line of the intersected retinal blood vessels or not and determining the intersected retinal blood vessels with the breakpoints as associated abnormal blood vessels associated with the retinal blood vessels.
In an embodiment of the present invention, the prompt module includes: the position acquisition submodule is used for acquiring the position information of the associated abnormal blood vessel under the condition that the associated abnormal blood vessel exists in a preset range around the first breakpoint; and the prompting submodule is used for highlighting the blood vessel image of the associated abnormal blood vessel based on the position information and sending first prompting information to a user.
In an embodiment of the present invention, the editing module includes: the deleting submodule is used for deleting the associated information of the retinal blood vessel and the associated abnormal blood vessel under the condition that the first feedback information is an ignoring instruction; a modification submodule, configured to, if the first feedback information is a modification instruction: determining a breakpoint closest to the first breakpoint on the central line of the associated abnormal blood vessel as a second breakpoint; respectively taking the first breakpoint and the second breakpoint as a first endpoint and a second endpoint, and generating a corresponding relation between the first endpoint and the second endpoint; adjusting the corresponding relation to generate an edited blood vessel central line; generating the edited retinal vessel based on the edited vessel centerline.
In an embodiment of the present invention, the modification sub-module includes: the adjusting submodule is used for acquiring a first control point input by a user and adjusting the corresponding relation based on the first control point so as to generate an edited blood vessel central line; a first generation sub-module for generating the edited retinal vessel based on the edited vessel centerline.
In an embodiment of the present invention, the editing apparatus further includes: the optimization submodule is used for acquiring a second control point input by a user and optimizing the edited blood vessel central line based on the second control point to generate an optimized blood vessel central line; a second generation submodule for generating the edited retinal vessel based on the optimized vessel centerline.
Further, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method of the present invention.
Although the embodiments of the present invention have been described in detail with reference to the accompanying drawings, the embodiments of the present invention are not limited to the details of the above embodiments, and various simple modifications can be made to the technical solutions of the embodiments of the present invention within the technical idea of the embodiments of the present invention, and the simple modifications all belong to the protection scope of the embodiments of the present invention.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, the embodiments of the present invention do not describe every possible combination.
Those skilled in the art will understand that all or part of the steps in the method according to the above embodiments may be implemented by a program, which is stored in a storage medium and includes several instructions to enable a single chip, a chip, or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In addition, any combination of various different implementation manners of the embodiments of the present invention is also possible, and the embodiments of the present invention should be considered as disclosed in the embodiments of the present invention as long as the combination does not depart from the spirit of the embodiments of the present invention.