Ultrasonic thyroid nodule direction automatic detection method, system, equipment and medium
Automatically detecting the direction of thyroid nodules through image segmentation and polygonal convex hull technology, solving the subjectivity and time-consuming problems of thyroid nodules direction detection in the prior art, improving the accuracy and consistency of detection, and promoting thyroid disease Early diagnosis and treatment.
Patent Information
- Application Number
- CN202411217259.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-31
- Publication Date
- 2024-11-29
AI Technical Summary
In the prior art, the direction detection of thyroid nodules depends on the doctor's subjective judgment, which has errors and time-consuming, and irregular shapes increase the difficulty of calculation, reducing the accuracy and consistency of the detection.
Image segmentation technology is used to separate the nodules in the thyroid ultrasound image from the surrounding tissues, and the growth direction of the nodules is calculated by the minimum polygon convex envelope and vector calculation on the outline, so as to realize the automatic detection of the direction of the thyroid nodules.
It reduces the influence of doctors' subjective factors, improves the accuracy and consistency of thyroid nodule direction determination, shortens diagnosis time, improves work efficiency, and provides more accurate support for the early diagnosis and treatment of thyroid diseases.
Smart Images

Figure CN119048577A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of medical computers, and in particular to an ultrasonic thyroid nodule direction automatic detection method, system, equipment and medium. Background Art
[0002] With the rapid development of medical imaging technologies, such as computed tomography (CT), magnetic resonance imaging (MRI), and ultrasound, doctors are able to obtain clearer and more accurate images, which play a vital role in diagnosing diseases and formulating treatment plans. Among them, the detection of thyroid nodules is a key step in the diagnosis of thyroid diseases. Thyroid nodules refer to abnormal masses formed in thyroid tissue and are one of the common thyroid diseases. For the diagnosis and treatment of thyroid nodules, it is crucial to accurately understand the direction information of the nodules. Thyroid ultrasound imaging plays an important role in nodule diagnosis and disease monitoring. It is a non-invasive, radiation-free examination method with high resolution for thyroid nodules, cysts and other lesions. In ultrasound images, doctors usually judge the direction of thyroid nodules by manually observing the images and annotating and measuring them. However, this method requires doctors to have rich experience and expertise, and there is subjectivity and certain errors; at the same time, doctors often need to spend a lot of time and energy when processing a large number of ultrasound images, and the limitations of subjective judgment will lead to differences in interpretation; in addition, the morphology of thyroid nodules is diverse, and the irregular shape will increase the calculation difficulty of traditional geometric analysis and reduce accuracy. Therefore, it is an urgent need to develop an automated and objective method for automatically detecting the direction of thyroid nodules. Based on the existing medical image processing and machine learning algorithms, the development of an automatic detection system, equipment and medium that can automatically detect and identify the angle direction of thyroid nodules can reduce the influence of subjective factors, improve the accuracy and consistency of judgment, thereby greatly improving work efficiency, reducing the burden on doctors, and shortening diagnosis time. Through the automated diagnosis of the direction of thyroid nodules, it not only helps to improve the early diagnosis and treatment of thyroid diseases, improve the work efficiency of doctors, provide patients with more personalized and accurate medical services, but also provide important references for surgical treatment. For example, for nodules located in a specific direction, a more appropriate surgical approach and operation method can be selected to reduce surgical risks and improve treatment effects. Research and development in this field has important clinical significance and scientific research value for promoting the innovation of medical technology and the transformation of medical models, and can bring substantial progress to medical diagnosis and treatment. Summary of the invention
[0003] The purpose of the present application is to provide an ultrasonic automatic detection method, system, equipment and medium for the direction of thyroid nodules, which effectively realizes the automatic detection of the direction of thyroid nodules.
[0004] The present application provides an ultrasonic method, system, device and medium for automatic detection of the direction of thyroid nodules, including separating nodules from surrounding tissues in thyroid ultrasound images based on image segmentation technology, and further obtaining contour information of the nodules; based on each pixel point on the contour, finding the minimum polygon convex hull covering all points, the vertices of the convex hull contain the longest diameter point pairs of the nodules; based on the directional relationship of the directed edges of the convex polygon, selecting the point farthest from the vertex, traversing all vertices on the convex hull for comparison and finding the farthest point pair; using the coordinate difference of the farthest point pair, calculating the direction of the point pair, which is the growth direction of the thyroid nodule. The direction of the thyroid nodule is obtained using the above-mentioned automatic detection algorithm for the direction of the thyroid nodule, and is presented at a precise angle. The overall structure diagram of the algorithm is shown in the figure. Figure 2 shown.
[0005] In one implementation of the first aspect, after obtaining the ultrasound video data, we use the ultrasound video data of the thyroid gland to separate the nodule from the surrounding tissue using image segmentation technology for the target detection frame, and further extract the position information of the contour based on the extracted nodule area.
[0006] In an implementation of the second aspect, the pixel points on the contour are stacked one by one, and after the starting point is stacked, the contour points and the starting point are stacked in turn according to the polar angles to construct a convex hull, and the cross product is used to determine the turning direction formed by the new point and the two top points of the stack, and the top element of the stack is popped out clockwise until a new point is pushed in counterclockwise. The data structure of the stack is used to maintain the order of the currently constructed convex hull, and the point set in the stack is the convex hull vertex, which narrows the range of searching for the endpoint of the major path.
[0007] In an implementation of the third aspect, two points are selected in sequence according to the stacking order of the convex hull vertices to construct a directed line segment as a reference, and among all directed edges on the convex hull, edges that are less than 180 degrees and greater than 180 degrees with the direction of the reference line are found, or one of the edges is exactly 180 degrees, and the intersection is selected to measure the distance with the initial two points. Among all the distance measurement point pairs, the point pair with the largest distance is found, and the distance and position information are recorded.
[0008] In one implementation of the fourth aspect, we quantify the position information of the long axis of the nodule based on the farthest point measured, use the coordinate difference of the endpoints of the long axis, use vector operations, where the point with a smaller vertical coordinate is the end of the vector, calculate the direction of the vector, and obtain an angle value within 0 to 180 degrees as the growth angle of the nodule.
[0009] In a fourth aspect, the present application provides an electronic device, the electronic device comprising: a video IO module, which is used to capture video signals from a camera, a video camera or other video source, and convert digital video data into a visual image; a memory, which stores multiple instructions; a processor, which loads instructions from the memory to execute the steps of any of the above-mentioned methods for automatically detecting the direction of thyroid nodules by ultrasound, the specific steps being as follows: Figure 1 shown.
[0010] In a fifth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by an electronic device, implements the steps in any of the above-mentioned methods for automatic detection of thyroid nodule directions using ultrasound.
[0011] The present application provides an ultrasonic automatic detection method, system, device and medium for the direction of thyroid nodules, which can realize the automatic detection of the direction of thyroid nodules, reduce the influence of doctors' subjective factors, and improve the accuracy and consistency of the determination of the angle and direction of thyroid nodules. This will help improve the early diagnosis and treatment of thyroid diseases, improve the work efficiency of doctors, and provide patients with more personalized and accurate medical services. Research and development in this field have a positive impact on promoting the innovation of medical technology and the transformation of medical models. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 Shown is a schematic diagram of the structure of a nodule direction analysis system according to an embodiment of the present application.
[0013] Figure 2 Shown is a flowchart of a nodule angle detection algorithm according to an embodiment of the present application.
[0014] Figure 3 Shown is an example diagram of the construction of the convex hull of contour points described in an embodiment of the present application.
[0015] Figure 4 Shown are schematic diagrams of five examples of selected points described in the embodiments of the present application.
[0016] Figure 5 Shown is a schematic diagram of selecting long-distance point pairs for convex hull vertices according to an embodiment of the present application.
[0017] Figure 6 Shown is a diagram showing the effect of the method described in the embodiment of the present application on sample data.
[0018] Figure 7 Shown is a flow chart of the data information processing described in an embodiment of the present application.
[0019] Figure 8 Shown is a schematic diagram of the structure of the analysis device and medium described in the embodiments of the present application.
[0020] Fig. 9 Shown is a schematic diagram of an application scenario of the method described in an embodiment of the present application.
[0021] Component number description
[0022] 10 Nodule direction detection system
[0023] 110 Video IO module
[0024] 120 Memory
[0025] 130 processors
[0026] 140 Display
[0027] Steps S11-S14
[0028] Steps S21-S24
[0029] 420 Memory
[0030] 430 Power Supply
[0031] 440 Video IO Module
[0032] 450 processor
[0033] 460 Communication Module DETAILED DESCRIPTION
[0034] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0035] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0036] The following embodiments of the present application provide an ultrasonic thyroid nodule direction automatic detection method, system, device and medium, wherein an ultrasonic thyroid nodule direction automatic detection method is performed by accessing the video output of a B-ultrasound machine, which can be specifically integrated in an electronic device, and the electronic device can be a terminal, a server and other devices. Among them, the terminal can be a mobile phone, a laptop, or a personal computer (PC) and other devices; the server can be a single server or a server cluster composed of multiple servers.
[0037] In some embodiments, an ultrasonic automatic detection device for the direction of thyroid nodules by accessing the video output of a B-ultrasound machine can also be integrated into multiple electronic devices. For example, a thyroid nodule direction detection system that is accessed to the video output of a B-ultrasound machine and analyzes the direction of thyroid nodules can be integrated into multiple servers, and multiple servers can implement an ultrasonic automatic detection method for the direction of thyroid nodules of the present application.
[0038] In some embodiments, the server may also be implemented in the form of a terminal.
[0039] like Figure 1 As shown, an embodiment of the present application provides a system 10, and the feature analysis system 10 includes: a video IO interface 110, a memory 120, a processor 130 and a display 140. The video IO module 110 is used to extract data from the ultrasound video and convert it into a visual image, the memory 120 is used to store the ultrasound video data, and the processor 130 is used to provide computing power for the image segmentation and contour extraction, contour convex hull construction, long diameter acquisition and angle direction detection processes of the ultrasound data. The display 140 is used to display the relevant GUI (Graphical User Interface) interactive interface, displaying the long diameter information of the nodule such as size according to user needs, and the nodule simulation ellipse on the interface will realize directional rotation according to the processed nodule angle direction, that is, a visual display of the nodule growth direction, such as Figure 6 shown.
[0040] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.
[0041] like Figure 2 As shown, this application realizes the basic process of automatic detection of thyroid nodule direction, which is as follows:
[0042] 1) Separate the nodules from the surrounding tissues in the thyroid ultrasound image based on image segmentation technology to obtain the contour pixel points of the nodules;
[0043] 2) Based on the contour pixels, find the minimum polygon convex envelope covering all points;
[0044] 3) Based on the directional relationship of the directed edges of the convex polygon, select the point with the farthest distance from the vertex, traverse all the vertices on the convex hull to compare and find the point pair with the farthest distance;
[0045] 4) Calculate the direction of the farthest point pair, which is the growth direction of the thyroid nodule;
[0046] like Figure 7 As shown, the present application realizes the whole process of automatic detection of thyroid nodule direction. The innovation of the present invention is the convex hull construction module based on contour points and the convex hull selection of long-distance vertex pairs, as follows:
[0047] 1) Input data preparation: Thyroid-based ultrasound video data is collected. For each video frame, preprocessing operations such as image enhancement and noise removal are first performed to improve image quality and reduce interference.
[0048] 2) Extract target detection frame data: Select target detection frames from the ultrasound video data in the order of frames. We need to detect each frame of ultrasound data. The target detection frames we expect are usually frames containing thyroid nodules or tumors, which can be determined by labeling or other preprocessing methods.
[0049] 3) Contour information extraction: The target detection frame data is preliminarily segmented using image segmentation technology to separate the thyroid nodule area and surrounding tissue. Based on the position information of the contour pixel points, the center point pixel position of the nodule contour is further calculated.
[0050] 4) Contour convex hull construction: For the pixel points on the contour, select them one by one in the form of a stack as the convex hull vertex set. The contour points and the starting point are initially sorted and stacked in sequence, and then the cross product calculation is performed to ensure that the stacked contour points envelop the entire contour in a counterclockwise direction. The vertices in the stack are the set of convex hull vertices.
[0051] 4) Selection of long-distance vertex pairs: Due to the characteristics of the convex hull, the point pair farthest from the center point must be the vertex of the convex hull. First, use the two points at the bottom of the stack to construct a directed line segment as the 0-degree baseline, find the adjacent edges of the convex hull directed edges that point to the 180-degree sides or one of the edges that points exactly to the 180-degree direction, and select the intersection of the two edges and the two points on the baseline to measure the distance, such as Figure 5 Similarly, traverse all convex hull vertices, select two points in turn according to the order in which the vertices are pushed into the stack to build the baseline and find the long-distance distance measurement point, compare and obtain the point pair with the maximum distance among all the distance measurement point pairs, and record the distance and the position information of the point pair.
[0052] 5) Angle analysis: Based on the calculated information of the farthest point pair, that is, the position information of the endpoints of the long axis, vector operations are used to obtain the vector direction between the two points, where the point with the smaller vertical coordinate is the end of the vector, and the angle is within 0 to 180 degrees. This angle is determined as the growth direction of the nodule.
[0053] like Figure 8 As shown, in an implementation of an embodiment of the present application, the server may include components such as one or more processing core processors 410, one or more computer-readable storage media memories 420, a power supply 430, a video IO module 440, and a communication module 450. Those skilled in the art will understand that Figure 8 The server structure shown in the figure does not constitute a limitation on the server, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0054] like Fig. 9 As shown, the application scenario diagram of an embodiment of the present application may include a B-ultrasound device S21, a visualization terminal S22, a server S23, etc. and a storage medium S24. The B-ultrasound device S21 can be used to collect human thyroid data, and the storage medium S24 can be used to store the collected data. The server S23 realizes thyroid echo area prediction, etc., and the visualization terminal S22 realizes the viewing of the prediction results. The B-ultrasound device S21, the visualization terminal S22, the server S13, etc. and the storage medium S24 are interconnected and communicated with each other, which will not be repeated here. Among them, the server S23 may include a processor and a memory, etc.
[0055] As can be seen from the above, the present application can realize the determination and analysis of the cause of an ultrasonic thyroid nodule direction automatic detection method. The specific steps include using ultrasonic video data based on the thyroid part, using the target detection frame of the video data as the analysis object, separating the nodule area and the surrounding tissue by using image segmentation technology, and extracting the edge contour based on the position information of the nodule; based on each pixel point on the contour, find the minimum polygon convex hull covering all points, and the vertex of the convex hull contains the contour pixel point farthest from the center point; select two convex hull vertices in a counterclockwise order to construct a directed line segment, select the point position measurement farthest from the two vertices based on the directional relationship of the convex polygon directed edge, traverse all vertices on the convex hull to compare and find the farthest point pair; obtain the position information of the long diameter of the nodule based on the farthest point pair, and use the coordinate difference of the point pair to use vector operation to obtain the angle of the long diameter relative to the horizontal direction, so as to obtain the growth direction information of the nodule, so as to preliminarily judge the structure and type of the lesion. The ultrasonic thyroid nodule direction automatic detection method described in the present application can improve the determination effect of the nodule growth direction and improve the accuracy of diagnosis. The present invention can effectively realize automatic analysis of the human thyroid lesion area, thereby realizing early detection of thyroid lesion types.
[0056] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules or units, which can be electrical, mechanical or other forms.
[0057] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0058] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0059] The embodiment of the present application also provides an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc. The server can be a single server or a server cluster composed of multiple servers, etc.
[0060] In some embodiments, the calibration method provided in the present application may also be integrated into multiple electronic devices. For example, the calculation device of the calibration matrix may be integrated into multiple servers, and the calibration method of the present application may be implemented by multiple servers.
[0061] In this embodiment, the electronic device of this embodiment is a server as an example for detailed description, for example, Figure 8 As shown, it shows a schematic diagram of the structure of the server involved in the embodiment of the present application, specifically:
[0062] The server may include one or more processing core processors 410, one or more computer-readable storage media memories 420, a power supply 430, a video IO module 440, and a communication module 450. Those skilled in the art will appreciate that Figure 8 The server structure shown in the figure does not constitute a limitation on the server, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0063] The processor 410 is the control center of the server. It uses various interfaces and lines to connect various parts of the entire server. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in the memory 420, and calling data stored in the memory 420, so as to monitor the server as a whole. In some embodiments, the processor 410 may include one or more processing cores; in some embodiments, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 410.
[0064] The memory 420 can be used to store software programs and modules. The processor 410 executes various functional applications and data processing by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 420 may also include a memory controller to provide the processor 410 with access to the memory 420.
[0065] The server also includes a power supply 430 for supplying power to various components. In some embodiments, the power supply 430 can be logically connected to the processor 410 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 430 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0066] At the input end, the server includes a video IO module 440, which can be used to capture video signals from a camera, camcorder or other video source, and convert digital video data into visual images or animations. At the same time, the video I / O module 440 can also be used for remote monitoring and communication applications, transmitting real-time video to a remote location or receiving video signals from a remote location.
[0067] The server may further include a communication module 450. In some embodiments, the communication module 450 may include a wireless module. The server may perform short-range wireless transmission through the wireless module of the communication module 450, thereby providing wireless broadband Internet access to the user. For example, the communication module 450 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0068] Although not shown, the server may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 410 in the server will load the executable files corresponding to the processes of one or more application programs into the memory 420 according to the following instructions, and the processor 410 will run the application programs stored in the memory 420, thereby realizing various functions of the calibration matrix calculation device.
[0069] In some embodiments, the present application also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by a program to instruct the processor, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0070] The present application embodiment may also provide a computer program product, the computer program product including one or more computer instructions. When the computer instructions are loaded and executed on the computing device, the process or function according to the embodiment of the present application is generated in whole or in part. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer or data center.
[0071] When the computer program product is executed by a computer, the computer executes the method of the aforementioned method embodiment. The computer program product may be a software installation package, and when the aforementioned method is needed, the computer program product may be downloaded and executed on the computer.
[0072] The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0073] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. An ultrasonic thyroid nodule direction automatic detection method, system, device and medium, characterized in that: The method comprises: Based on image segmentation technology, the nodules in the thyroid ultrasound image are separated from the surrounding tissues to obtain the contour pixel points of the nodules; Based on the contour pixels, find the minimum polygon convex envelope covering all points; Based on the directional relationship of the directed edges of the convex polygon, select the point with the farthest distance from the vertex, traverse all the vertices on the convex hull to compare and find the point pair with the farthest distance; The direction of the farthest point pair is calculated, which is the growth direction of the thyroid nodule. The ultrasonic automatic detection method of thyroid nodules can accurately identify the direction angle of thyroid nodules, assist doctors to quickly judge the nature of nodules, and strengthen the initial assessment of patients. The present invention can effectively realize the initial judgment of the growth direction of thyroid nodules in human body, so as to perform non-invasive detection of early thyroid nodules and other lesion characteristics.
2. The method according to claim 1, characterized in that Using ultrasound video data based on the thyroid gland part obtained to extract features from a target detection frame, the method comprises: Using ultrasound video data based on the thyroid gland, the target detection frame image features are extracted, and the image segmentation technology is used to segment the nodule area and background tissue on the thyroid ultrasound grayscale image based on target extraction to obtain the contour point coordinate information of the nodule.
3. The method according to claim 1, characterized in that Constructing a minimum convex envelope covering all contour points based on stack sorting and cross product judgment, the method includes: Take the point with the smallest horizontal coordinate as the starting point, sort the remaining contour points according to the polar angle with the starting point, and push them into the stack one by one. Before pushing them into the stack, use the cross product to determine the turning direction formed by the current point and the two top points of the stack. If the turning direction is clockwise, pop the top element of the stack until a counterclockwise corner is formed, then push the current point into the stack; The final element in the stack is the vertex set of the smallest convex polygon covering all contour points.
4. The method according to claim 1, characterized in that: The farthest point of a vertex is found by using the directional relationship of the directed edges of the contour convex polygon envelope, the method comprising: Based on the stacking order of the convex hull vertices, a directed line segment l0 is formed from the starting point (P0) to the next point (P1), and the direction of the line segment is set as the reference direction, that is, 0 degrees. n } points, and similarly we get the directed edges {l1,l2,…,l n }, for any point P i , calculate the two directed edges l connected by it i-1 and l i Whether the direction of one side is less than 180 degrees and the direction of the other side is greater than 180 degrees, or the direction of one side is exactly 180 degrees. As shown in Figure 4, if the reference line segment is in the horizontal direction, then the three cases of BCD meet the conditions; If the conditions are met, record the point Pi needs to calculate, calculate P0 and P i Distance D1 and P1 and P i Distance D2, compare and record the point pair with the maximum distance and its distance size D max , as shown in Figure 5.
5. The method according to claim 1, characterized in that According to the method described in claim 4, all vertices on the convex hull are traversed, point pairs satisfying the above conditions are continuously calculated, point pairs with maximum distance and distance are continuously updated, and point pairs with maximum distance are obtained, and the direction of the calculated point pairs is the growth direction of the nodule. If these two points are in order, P(Xp, Yp) and Q(Xq, Yq), the calculation formula for the growth direction angle is:
6. An ultrasonic thyroid nodule direction automatic detection method, system, device and medium, characterized in that: When the program is executed by an electronic device, the steps in the method described in any one of claims 1 to 5 are implemented.
