Method, device, equipment and storage medium for drawing scale of ultrasonic panoramic image

By acquiring and processing the coordinates and outer edge information of the ultrasonic panoramic image, the precise ruler drawing of the ultrasonic panoramic image is achieved, solving the problem that the length of the lesion area cannot be clearly viewed in the prior art, and improving the user experience.

CN113781605BActive Publication Date: 2025-02-14WUHAN ZHONGQI BIOLOGICAL MEDICAL ELECTRONICS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111042756.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-07
Publication Date
2025-02-14
Estimated Expiration
2041-09-07

AI Technical Summary

Technical Problem

The prior art has failed to effectively solve the problem of accurate drawing of ultrasonic panoramic image rulers, which has caused users to be unable to clearly view the length of the lesion area.

Method used

By obtaining coordinate position information of the ultrasonic panoramic image, the outer edge information of the image is extracted, and the image is scaled based on these data. The specific steps include determining the convex hull information of the image, extracting the coordinates of the start and end points, determining whether the angle of the straight line is less than the preset threshold, and finally drawing the ruler based on the outer edge data and coordinate position information.

Benefits of technology

The precise ruler drawing of ultrasonic panoramic images is realized, allowing users to clearly view the length of the lesion area and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113781605B_ABST
    Figure CN113781605B_ABST
Patent Text Reader

Abstract

The present invention discloses a ruler drawing method, device, equipment and storage medium for an ultrasonic panoramic image, the method comprising: obtaining coordinate position information of an ultrasonic panoramic image; extracting outer edge information of the ultrasonic panoramic image, and determining outer edge data of the ultrasonic panoramic image according to the outer edge information; and drawing a ruler for the ultrasonic panoramic image according to the outer edge data and coordinate position information. Compared with the prior art which only performs image registration and splicing but does not involve ruler processing of the ultrasonic panoramic image, the present invention draws a ruler for the ultrasonic panoramic image according to the outer edge data and coordinate position information of the ultrasonic panoramic image, thereby accurately drawing the ruler of the ultrasonic panoramic image, and enabling the user to clearly view the length of the lesion area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for drawing a ruler of an ultrasonic panoramic image. Background Art

[0002] Ultrasound panoramic imaging technology is a new inspection method that has developed rapidly. It is also called ultra-wide field of view, wide-view ultrasound, etc. It uses image registration technology to stitch together a series of images collected in real-time scanning to obtain a large image with a wide field of view for observation and measurement of the overall tissue structure. It replaces the image stitching process in the doctor's brain. It can completely display the mass or organ that cannot be fully displayed on a section of conventional ultrasound on one image, making it easier for doctors to understand the scope of the lesion and its positional relationship with adjacent structures, thereby providing help for analyzing the lesion.

[0003] Ultrasound panoramic imaging technology is increasingly used in abdominal organs, limbs, blood vessels, pelvic cavity, superficial tissues, fetal growth, trauma (fractures, tendon injuries), etc. At present, although there are more and more studies on ultrasound panoramic imaging technology, the focus is on image registration and stitching, and there is no description of the scale of ultrasound panoramic images, which makes it impossible to accurately draw the scale of ultrasound panoramic images and enable users to view the length of the lesion area.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present invention is to provide a method, device, equipment and storage medium for drawing a ruler of an ultrasonic panoramic image, aiming to solve the technical problem of how to accurately draw a ruler of an ultrasonic panoramic image.

[0006] To achieve the above object, the present invention provides a method for drawing a ruler of an ultrasonic panoramic image, the method comprising:

[0007] Obtaining coordinate position information of an ultrasonic panoramic image;

[0008] Extracting outer edge information of the ultrasonic panoramic image, and determining outer edge data of the ultrasonic panoramic image according to the outer edge information;

[0009] The ultrasonic panoramic image is scaled according to the outer edge data and the coordinate position information.

[0010] Optionally, the step of acquiring coordinate position information of the ultrasonic panoramic image includes:

[0011] Determine image convex hull information according to the ultrasonic panoramic image;

[0012] Extracting starting point coordinate information and ending point coordinate information from the image convex hull information;

[0013] The coordinate position information of the ultrasonic panoramic image is determined according to the starting point coordinate information and the ending point coordinate information.

[0014] Optionally, before the step of determining the coordinate position information of the ultrasonic panoramic image according to the starting point coordinate information and the ending point coordinate information, the step further includes:

[0015] Determine the coordinate information of the previous end point according to the image convex hull information;

[0016] Determine the angle between the straight lines according to the coordinate information of the previous end point and the coordinate information of the end point;

[0017] Determine whether the angle between the straight lines is less than a preset angle threshold;

[0018] When the angle between the straight lines is less than the preset angle threshold, the step of determining the coordinate position information corresponding to the ultrasonic panoramic image according to the starting point coordinate information and the ending point coordinate information is performed.

[0019] Optionally, the step of extracting outer edge information of the ultrasonic panoramic image includes:

[0020] Binarizing the ultrasonic panoramic image to obtain a binary image;

[0021] The outer edge information of the ultrasonic panoramic image is determined according to the binarized image.

[0022] Optionally, the step of drawing a ruler on the ultrasonic panoramic image according to the outer edge data and the coordinate position information includes:

[0023] Determine a scale point set according to the outer edge data and the coordinate position information;

[0024] Determining the scale of the ultrasonic panoramic image;

[0025] Determining the number of pixels corresponding to the ultrasonic panoramic image according to the ruler scale;

[0026] Determine the total length of the ruler according to the ruler point set, the ruler scale and the number of pixel points;

[0027] The ultrasonic panoramic image is scaled according to the total length of the scale.

[0028] Optionally, the step of determining the total length of the ruler according to the ruler point set, the ruler scale and the number of pixel points includes:

[0029] Determine the number of scale scales, the number of scale points and target scale index information according to the scale point set and the scale scale;

[0030] Determine the total length of the ruler according to the number of ruler scales, the number of ruler points, the number of pixel points and the target scale index information using a first preset ruler length formula;

[0031] The first preset scale length formula is:

[0032] L=(k-1)+(len(R)-nldx) / Pixels

[0033] Where L is the total length of the ruler, k is the number of ruler scales, len(R) is the number of ruler points, nldx is the target scale index information, and Pixels is the number of pixels.

[0034] Optionally, the step of determining the total length of the ruler according to the ruler point set, the ruler scale and the number of pixel points further includes:

[0035] Determine the number of scale marks and the target scale distance according to the scale point set and the scale marks;

[0036] Determine the total length of the ruler according to the number of ruler scales, the target scale distance and the number of pixel points using a second preset ruler length formula;

[0037] The second preset scale length formula is:

[0038] L=(k-1)+D k / Pixels

[0039] Where L is the total length of the ruler, k is the number of ruler scales, Dk is the target scale distance, and Pixels is the number of pixels.

[0040] In addition, to achieve the above-mentioned purpose, the present invention further proposes a ruler drawing device for an ultrasonic panoramic image, the ruler drawing device for an ultrasonic panoramic image comprising:

[0041] An acquisition module, used to acquire coordinate position information of an ultrasonic panoramic image;

[0042] an extraction module, used to extract outer edge information of the ultrasonic panoramic image, and determine outer edge data of the ultrasonic panoramic image according to the outer edge information;

[0043] A drawing module is used to draw the ultrasonic panoramic image with a ruler according to the outer edge data and the coordinate position information.

[0044] In addition, to achieve the above-mentioned purpose, the present invention also proposes a ruler drawing device for an ultrasonic panoramic image, the device comprising: a memory, a processor, and a ruler drawing program for an ultrasonic panoramic image stored in the memory and executable on the processor, the ruler drawing program for an ultrasonic panoramic image being configured to implement the steps of the ruler drawing method for an ultrasonic panoramic image as described above.

[0045] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a ruler drawing program for an ultrasonic panoramic image is stored. When the ruler drawing program for an ultrasonic panoramic image is executed by a processor, the steps of the ruler drawing method for an ultrasonic panoramic image as described above are implemented.

[0046] The present invention first obtains the coordinate position information of the ultrasonic panoramic image, then extracts the outer edge information of the ultrasonic panoramic image, determines the outer edge data of the ultrasonic panoramic image according to the outer edge information, and finally draws the ruler of the ultrasonic panoramic image according to the outer edge data and the coordinate position information. Compared with the prior art, which only aligns and splices the images but does not involve ruler processing of the ultrasonic panoramic image, the present invention draws the ruler of the ultrasonic panoramic image according to the outer edge data and coordinate position information of the ultrasonic panoramic image, thereby accurately drawing the ruler of the ultrasonic panoramic image, so that the user can clearly view the length of the lesion area, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a structural schematic diagram of a ruler drawing device for ultrasonic panoramic images in a hardware operating environment involved in an embodiment of the present invention;

[0048] Figure 2 It is a schematic flow chart of a first embodiment of a method for drawing a ruler of an ultrasonic panoramic image according to the present invention;

[0049] Figure 3 It is a schematic diagram of ultrasound panoramic forward stitching of the first embodiment of the scale drawing method of ultrasound panoramic image of the present invention;

[0050] Figure 4 It is a schematic diagram of reverse stitching of an ultrasonic panoramic image according to a first embodiment of a method for drawing a ruler of an ultrasonic panoramic image of the present invention;

[0051] Figure 5 It is a schematic flow chart of a second embodiment of a method for drawing a ruler of an ultrasonic panoramic image according to the present invention;

[0052] Figure 6 This is a structural block diagram of the first embodiment of the device for drawing a scale for ultrasonic panoramic images according to the present invention.

[0053] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0055] Reference Figure 1 , Figure 1 The present invention is a schematic diagram of the structure of a ruler drawing device for ultrasonic panoramic images in the hardware operating environment involved in the embodiment of the present invention.

[0056] like Figure 1 As shown, the ruler drawing device for the ultrasound panoramic image may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RandomAccess Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0057] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the scale drawing device for ultrasound panoramic images, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.

[0058] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a ruler drawing program for ultrasound panoramic images.

[0059] exist Figure 1In the ruler drawing device for ultrasonic panoramic images shown in the figure, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the ruler drawing device for ultrasonic panoramic images of the present invention can be set in the ruler drawing device for ultrasonic panoramic images, and the ruler drawing device for ultrasonic panoramic images calls the ruler drawing program for ultrasonic panoramic images stored in the memory 1005 through the processor 1001, and executes the ruler drawing method for ultrasonic panoramic images provided in the embodiment of the present invention.

[0060] The embodiment of the present invention provides a method for drawing a ruler of an ultrasonic panoramic image, referring to Figure 2 , Figure 2 FIG. 1 is a flow chart of a first embodiment of a method for drawing a ruler for an ultrasonic panoramic image according to the present invention.

[0061] In this embodiment, the scale drawing method of the ultrasonic panoramic image includes the following steps:

[0062] Step S10: Acquire the coordinate position information of the ultrasonic panoramic image.

[0063] It is easy to understand that the executor of this embodiment can be a communication device with functions such as image processing, data processing, network communication and program running. The device can also extract the outer edge information of the ultrasonic panoramic image and draw a ruler on the ultrasonic panoramic image, etc. It can also be other computer devices with similar functions, etc., and this embodiment is not limited.

[0064] It should be noted that the ultrasonic panoramic image is an ultrasonic image scanned by a probe, and the coordinate position information can be understood as the upper left corner coordinate information and the upper right corner coordinate information corresponding to multiple frames of ultrasonic images in the ultrasonic panoramic image.

[0065] In a specific implementation, the image convex hull information can be determined based on the ultrasound panoramic image, and then the starting point coordinate information and the ending point coordinate information can be extracted from the image convex hull information, the previous ending point coordinate information can be determined based on the image convex hull information, the straight line angle can be determined based on the previous ending point coordinate information and the ending point coordinate information, and it can be determined whether the straight line angle is less than a preset angle threshold. When the straight line angle is less than the preset angle threshold, the coordinate position information corresponding to the ultrasound panoramic image can be determined based on the starting point coordinate information and the ending point coordinate information. The preset angle threshold can be set by the user, and can be 90 degrees, etc.

[0066] In order to facilitate understanding of the method of obtaining coordinate position information, the present embodiment can be illustrated by an example of the processing method for obtaining coordinate position information. First, the image convex hull Convex is determined according to the ultrasonic panoramic image. The calculation methods of the convex hull include: exhaustive method, divide-and-conquer method, Jarvis step method, Graham scanning method, Melkman algorithm, Kirkpatrick–Seidel algorithm, chan algorithm, etc. Secondly, the starting point P that meets the conditions is found in the convex hull Convex. start That is, the coordinate information of the starting point and the ending point P end That is, the coordinate information of the end point. Assume that the upper left corner of an ultrasound image is the origin, the X direction is rightward and the Y direction is downward. At the same time, the points in the convex hull Convex are stored in a clockwise direction. Then in the convex hull Convex, the point with the smallest X coordinate and Y coordinate corresponds to the starting point P. start In the convex hull Convex, find the point with the largest X coordinate (for points with the same X coordinate, take the point with the smaller Y coordinate) m , and then determine whether the point meets the conditions: P m With P m-1 The angle of the straight line is less than 90°. m-1 P m The previous point in the convex hull Convex. If it satisfies, then this point is the end point. Otherwise, find another point with the largest X coordinate among the remaining points. And so on, until the end point P is found end .

[0067] It should be noted that the method of obtaining coordinate information is applicable to both real-time ultrasonic panoramic images and non-real-time ultrasonic panoramic images (such as recalled images).

[0068] In a specific implementation, the processing method for obtaining the coordinate position information can also record the spliced ​​first frame image F respectively when updating the ultrasonic panoramic image in real time. first The upper left corner P1, the upper right corner P2 and the last frame image F last The positions of the upper left corner P3 and the upper right corner P4, the upper left corner and the upper right corner of the first frame image correspond to the starting point position, the upper left corner and the upper right corner of the last frame image correspond to the ending point position, the starting point position and the ending point position are the coordinate position information corresponding to the multi-frame ultrasound image, etc. first And the last frame image F last The position will be updated in real time during the stitching process, and the coordinate position information can only be determined when the stitching is completed.

[0069] It should be understood that the ultrasound panoramic image includes a forward ultrasound panoramic image and a reverse ultrasound panoramic image, etc.

[0070] When updating the ultrasound panoramic image in real time, refer to Figure 3 , Figure 3 FIG. 1 is a schematic diagram of ultrasound panoramic forward stitching of the first embodiment of the method for drawing a ruler of ultrasound panoramic images of the present invention. For forward stitching, the upper left corner P1 of the first frame is taken as the position P of the real starting point. start , take the upper right corner P4 of the last frame as the actual end point position P end Finally, a forward ultrasound panoramic image can be generated based on the start point and end point positions. Figure 4 , Figure 4 FIG. 1 is a schematic diagram of reverse stitching of an ultrasonic panoramic image according to a first embodiment of a ruler drawing method for an ultrasonic panoramic image of the present invention. For reverse stitching, the upper right corner P2 of the first frame is taken as the position P of the real starting point. start , take the upper left corner P3 of the last frame as the actual end point position P end Finally, a reverse ultrasound panoramic image is generated according to the starting point position and the ending point position.

[0071] It should be noted that splicing from left to right is called forward splicing, and the probe moves forward. Conversely, splicing from right to left is called reverse splicing, and the probe moves reversely.

[0072] The first frame image F first The position in the ultrasound panoramic image is selected according to the actual situation. Generally speaking, the first frame image F first Placed on the far left of the ultrasound panoramic image, the first frame image F during reverse stitching first Place it on the far right of the ultrasound panoramic image. You can also place the first frame image F first Place it in the middle of the image, and then adjust the position in real time according to whether the probe moves forward or backward. The last frame image F last The position calculation adopts the general algorithm for calculating translation and rotation, etc.

[0073] Step S20: extracting outer edge information of the ultrasonic panoramic image, and determining outer edge data of the ultrasonic panoramic image according to the outer edge information.

[0074] The ultrasonic panoramic image is binarized to obtain a binarized image, and then the binarized data is determined based on the binarized image, and the outer edge information of the ultrasonic panoramic image is determined based on the binarized data. Finally, the outer edge data of the ultrasonic panoramic image is determined based on the outer edge information. The outer edge information can be understood as the contour information of the ultrasonic panoramic image, etc.

[0075] In this embodiment, the ultrasound panoramic image can be binarized. The binarization method includes but is not limited to the Otsu method, the maximum entropy threshold method, the iteration method, etc. Alternatively, the data of each splicing is recorded in real time during splicing, and the position of the spliced ​​data is recorded as 1, and the other positions are recorded as 0. When the splicing is completed, the final binary data Bin is obtained.w*h The outer edge of the ultrasound panoramic image is determined according to the binarized data. w*h For each column of , find the first non-zero value (that is, 1, a binary image has only two values, 0 and 1) from top to bottom, and you can get the outer edge data Edge 1*h wait.

[0076] Step S30: scaling the ultrasonic panoramic image according to the outer edge data and the coordinate position information.

[0077] The ruler point set is determined according to the outer edge data and coordinate position information, and the ruler scale of the ultrasonic panoramic image is determined. Then, the number of pixel points corresponding to the ultrasonic panoramic image is determined according to the ruler scale. The total length of the ruler is determined according to the ruler point set, the ruler scale and the number of pixel points. Finally, the ultrasonic panoramic image is scaled according to the total length of the ruler.

[0078] In this embodiment, the scale point set can be obtained on the outer edge data according to the splicing direction. If it is forward splicing, then X p1 To X p4 The data between is taken as the scale point set R. If it is reverse splicing, take X p2 To X p3 The data between is taken as the scale point set R. p1 Represents the first frame image F first The X coordinate of the upper left corner point P1, X p2 Represents the first frame image F first The X coordinate of the upper right corner point P2, X p3 Represents the last frame image F last The X coordinate of the upper left corner point P3, X p4 Represents the last frame image F last The X coordinate of the upper right corner point P4.

[0079] The scale of the ruler can be customized by the user, for example, in units of 1 cm or 2 cm.

[0080] Assuming that the scale of the ultrasonic panoramic image is 1 cm, the number of pixel data pixels represented by 1 cm on the ultrasonic panoramic image is calculated using a preset pixel formula.

[0081] The default pixel formula is:

[0082]

[0083] Where fDepth is the current probe scanning depth in mm, nHeight is the height of the ultrasonic panoramic image display area, fZoom is the ultrasonic panoramic zoom ratio, and Pixels is the number of pixel points represented by 1 cm on the ultrasonic panoramic image, i.e., the number of pixel points.

[0084] It should be understood that the value of fZoom is also displayed in the ultrasonic image parameter area for convenience of subsequent manual measurement, etc. Draw a scale every Pixels pixels starting from the first point of the scale point set R. Among them, the first scale, the sixth scale, the eleventh scale, etc., are drawn with long solid lines in this way, and so on. Other scales are drawn with short solid lines.

[0085] It should be noted that the calculation of the scale cannot be directly calculated using R(1+(n - 1)*Pixels), where n is the number of scales. Because the scale in ultrasonic panoramic imaging is not a straight line but a curve, the scale obtained by directly using the average method will have a large error, resulting in inaccurate final calculation results.

[0086] In this embodiment, the first point R1 in the scale point set R needs to be used as the first scale, and then the first scale G1 is drawn. Set the starting search position, which can start from G s Start, calculate G s+1 . That is, start searching for the second scale G2 from the first scale G1, start searching for the third scale G3 from the second scale G2, and so on.

[0087] Calculate the current point R i and the next point R i+1 and the distance D s from G i 、D i+1 . If the conditions D i <Pixels and D i+1 >Pixels are met, then there is a next scale G i between the current point R i+1 and the next point R s+1 . If no point satisfying the condition is found after reaching the last two points of the scale point set R, then end, and at this time the scale has been drawn.

[0088] The scale G i between the current point R i+1 and the next point R s+1 is calculated by drawing a circle and then finding the intersection with a straight line. For example, draw a circle with the current scale G s as the center and Pixels as the radius, and then calculate the intersection of the circle and the straight line passing through the current point R i and the next point R i+1 , there will be two intersections, and we take the line segment Ri and R i+1 The intersection point between them is the next scale G s+1 . Until all scales are found and drawn.

[0089] It should be noted that the total length of the ruler can also be displayed on the ultrasonic panoramic image. The processing method for determining the total length of the ruler according to the ruler point set, the ruler scale and the number of pixel points can be to determine the number of ruler scales, the number of ruler points and the target scale index information according to the ruler point set and the ruler scale, and determine the total length of the ruler according to the number of ruler scales, the number of ruler points, the number of pixels and the target scale index information through a first preset ruler length formula;

[0090] The first preset ruler length formula is:

[0091] L=(k-1)+(len(R)-nIdx) / Pixels

[0092] Where L is the total length of the ruler, k is the number of ruler scales, len(R) is the number of ruler points, and nldx is the target scale index information (the last scale G k The index number on the ruler point set R), Pixels is the number of pixels.

[0093] The processing method for determining the total length of the ruler according to the ruler point set, the ruler scale and the number of pixels can also be to determine the number of ruler scales and the target scale distance according to the ruler point set and the ruler scale, and determine the total length of the ruler according to the number of ruler scales, the target scale distance and the number of pixels by a second preset ruler length formula, and the second preset ruler length formula is:

[0094] L=(k-1)+D k / Pixels

[0095] Where L is the total length of the ruler, k is the number of scale marks, and D k The target scale distance (the last scale G k The distance from the last point on the ruler point set R), Pixels is the number of pixels.

[0096] In this embodiment, the coordinate position information of the ultrasonic panoramic image is first obtained, and then the outer edge information of the ultrasonic panoramic image is extracted, and the outer edge data of the ultrasonic panoramic image is determined according to the outer edge information, and then the ultrasonic panoramic image is scaled according to the outer edge data and the coordinate position information. Compared with the prior art, which only aligns and splices the images without scaling the ultrasonic panoramic image, in this embodiment, the ultrasonic panoramic image is scaled according to the outer edge data and the coordinate position information of the ultrasonic panoramic image, so that the scale of the ultrasonic panoramic image is accurately drawn, so that the user can clearly view the length of the lesion area, thereby improving the user experience.

[0097] refer to Figure 5 , Figure 5 FIG. 4 is a flow chart of a second embodiment of a method for drawing a ruler for an ultrasonic panoramic image according to the present invention.

[0098] Based on the above first embodiment, in this embodiment, step S40 includes:

[0099] Step S301: determining a scale point set according to the outer edge data and the coordinate position information.

[0100] In this embodiment, the scale point set can be obtained on the outer edge data according to the splicing direction. If it is forward splicing, then X p1 To X p4 The data between is taken as the scale point set R. If it is reverse splicing, take X p2 To X p3 The data between is taken as the scale point set R. p1 Represents the first frame image F first The X coordinate of the upper left corner point P1, X p2 Represents the first frame image F first The X coordinate of the upper right corner point P2, X p3 Represents the last frame image F last The X coordinate of the upper left corner point P3, X p4 Represents the last frame image F last The X coordinate of the upper right corner point P4.

[0101] Step S302: Determine the scale of the ultrasonic panoramic image.

[0102] The scale of the ruler can be customized by the user, for example, in units of 1 cm or 2 cm.

[0103] Step S303: determining the number of pixel points corresponding to the ultrasonic panoramic image according to the ruler scale.

[0104] Assume that the scale of the ultrasonic panoramic image is 1 cm, then the number of pixels represented by 1 cm on the ultrasonic panoramic image is calculated by a preset pixel formula as Pixels.

[0105] The preset pixel formula is:

[0106]

[0107] In the formula, fDepth is the scanning depth of the current probe, with the unit of mm, nHeight is the height of the display area of the ultrasonic panoramic image, and fZoom is the ultrasonic panoramic zoom ratio.

[0108] It should be understood that the value of fZoom will also be displayed in the ultrasonic image parameter area for convenience in subsequent manual measurements, etc. Draw a scale every Pixels pixels starting from the first point of the scale point set R. Among them, the first scale, the sixth scale, the eleventh scale, etc., are drawn with long solid lines in this way, and so on. Other scales are drawn with short solid lines.

[0109] It should be noted that the calculation of the scale cannot be directly in the way of using R(1+(n - 1)*Pixels), where n is the number of scales. Because the scale in ultrasonic panoramic imaging is not a straight line but a curve, the scale obtained by directly using the average method will have a large error, resulting in inaccurate final calculation results.

[0110] In this embodiment, the first point R1 in the scale point set R needs to be used as the first scale, and then the first scale G1 is drawn. Set the starting search position, which can start from G s Start, calculate G s+1 . That is, start searching for the second scale G2 from the first scale G1, start searching for the third scale G3 from the second scale G2, and so on.

[0111] Calculate the distances D i and D i+1 between the current point R s and the next point R i 、D i+1 . If the conditions D i <Pixels and D i+1 >Pixels are met, then there is a next scale G i between the current point R i+1 and the next point R s+1 . If no point that meets the conditions is found for the last two points of the scale point set R, then end, and at this time the scale has been drawn.

[0112] The scale G i between the current point R i+1 and the next point R s+1The calculation is done by drawing a circle and then intersecting it with the straight line. For example, at the current scale G s Draw a circle with Pixels as the center and the radius, and then calculate the distance between the circle and the current point R i and the next point R i+1 There will be two intersection points. We take line segment R i and R i+1 The intersection point between them is the next scale G s+1 . Until all scales are found and drawn.

[0113] Step S304: determining the total length of the ruler according to the ruler point set, the ruler scale and the number of pixels.

[0114] It should be noted that the total length of the ruler can also be displayed on the ultrasonic panoramic image. The processing method for determining the total length of the ruler according to the ruler point set, the ruler scale and the number of pixel points can be to determine the number of ruler scales, the number of ruler points and the target scale index information according to the ruler point set and the ruler scale, and determine the total length of the ruler according to the number of ruler scales, the number of ruler points, the number of pixels and the target scale index information through a first preset ruler length formula;

[0115] The first preset ruler length formula is:

[0116] L=(k-1)+(len(R)-nIdx) / Pixels

[0117] Where L is the total length of the ruler, k is the number of ruler scales, len(R) is the number of ruler points, and nldx is the target scale index information (the last scale G k The index number on the ruler point set R), Pixels is the number of pixels.

[0118] The processing method for determining the total length of the ruler according to the ruler point set, the ruler scale and the number of pixels can also be to determine the number of ruler scales and the target scale distance according to the ruler point set and the ruler scale, and determine the total length of the ruler according to the number of ruler scales, the target scale distance and the number of pixels by a second preset ruler length formula, and the second preset ruler length formula is:

[0119] L=(k-1)+D k / Pixels

[0120] In the formula, L is the total length of the ruler, k is the number of scale marks, and D k is the target scale distance (the last scale G k The distance from the last point on the ruler point set R), Pixels is the number of pixels.

[0121] Step S305: Scale the ultrasonic panoramic image according to the total length of the scale.

[0122] It should be understood that the ultrasonic panoramic image may display scale graduations, scale line segments, and the total length of the scale, etc. The ultrasonic panoramic image may be scaled according to the scale graduations, scale line segments, and the total length of the scale.

[0123] In this embodiment, the ruler point set is first determined according to the outer edge data and the coordinate position information, and the ruler scale of the ultrasonic panoramic image is determined. Then, the number of pixel points corresponding to the ultrasonic panoramic image is determined according to the ruler scale. The total length of the ruler is determined according to the ruler point set, the ruler scale and the number of pixel points. Finally, the ultrasonic panoramic image is scaled according to the total length of the ruler. Compared with the prior art, in which the ultrasonic panoramic image is not scaled, the ultrasonic panoramic image is scaled according to the ruler point set, the ruler scale, the number of pixel points and the total length of the ruler in this embodiment, thereby achieving accurate drawing of the scale of the ultrasonic panoramic image.

[0124] In addition, an embodiment of the present invention further proposes a storage medium, on which a ruler drawing program for an ultrasonic panoramic image is stored. When the ruler drawing program for an ultrasonic panoramic image is executed by a processor, the steps of the ruler drawing method for an ultrasonic panoramic image as described above are implemented.

[0125] Reference Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the device for drawing a scale for ultrasonic panoramic images according to the present invention.

[0126] like Figure 6 As shown, the scale drawing device for ultrasonic panoramic images proposed in an embodiment of the present invention includes:

[0127] An acquisition module 6001 is used to acquire coordinate position information of an ultrasonic panoramic image;

[0128] An extraction module 6002 is used to extract outer edge information of the ultrasonic panoramic image, and determine outer edge data of the ultrasonic panoramic image according to the outer edge information;

[0129] The drawing module 6003 is used to draw the ultrasonic panoramic image with a ruler according to the outer edge data and the coordinate position information.

[0130] In this embodiment, the coordinate position information of the ultrasonic panoramic image is first obtained, and then the outer edge information of the ultrasonic panoramic image is extracted, and the outer edge data of the ultrasonic panoramic image is determined according to the outer edge information, and then the ultrasonic panoramic image is scaled according to the outer edge data and the coordinate position information. Compared with the prior art, which only aligns and splices the images without scaling the ultrasonic panoramic image, in this embodiment, the ultrasonic panoramic image is scaled according to the outer edge data and the coordinate position information of the ultrasonic panoramic image, so that the scale of the ultrasonic panoramic image is accurately drawn, so that the user can clearly view the length of the lesion area, thereby improving the user experience.

[0131] Furthermore, the acquisition module 6001 is also used to determine image convex hull information according to the ultrasonic panoramic image;

[0132] The acquisition module 6001 is further used to extract the starting point coordinate information and the ending point coordinate information from the image convex hull information;

[0133] The acquisition module 6001 is further configured to determine the coordinate position information of the ultrasonic panoramic image according to the starting point coordinate information and the ending point coordinate information.

[0134] Furthermore, the acquisition module 6001 is further used to determine the coordinate information of the previous end point according to the image convex hull information;

[0135] The acquisition module 6001 is further used to determine the angle between the straight lines according to the previous end point coordinate information and the end point coordinate information;

[0136] The acquisition module 6001 is further used to determine whether the angle between the straight lines is less than a preset angle threshold;

[0137] The acquisition module 6001 is further configured to execute the step of determining the coordinate position information corresponding to the ultrasonic panoramic image according to the starting point coordinate information and the ending point coordinate information when the angle between the straight lines is less than the preset angle threshold.

[0138] Furthermore, the extraction module 6002 is further used to binarize the ultrasonic panoramic image to obtain a binary image;

[0139] The extraction module 6002 is further configured to determine outer edge information of the ultrasonic panoramic image according to the binarized image.

[0140] Furthermore, the drawing module 6003 is further used to determine a scale point set according to the outer edge data and the coordinate position information;

[0141] The drawing module 6003 is further used to determine the scale of the ultrasonic panoramic image;

[0142] The drawing module 6003 is further used to determine the number of pixel points corresponding to the ultrasonic panoramic image according to the scale;

[0143] The drawing module 6003 is further used to determine the total length of the ruler according to the ruler point set, the ruler scale and the number of pixels;

[0144] The drawing module 6003 is further used to draw the ultrasonic panoramic image with a ruler according to the total length of the ruler.

[0145] Furthermore, the drawing module 6003 is further used to determine the number of scale marks, the number of scale points and target scale index information according to the scale point set and the scale marks;

[0146] The drawing module 6003 is further used to determine the total length of the ruler according to the number of scale marks, the number of scale points, the number of pixels and the target scale index information by using a first preset ruler length formula;

[0147] The first preset scale length formula is:

[0148] L=(k-1)+(len(R)-nldx) / Pixels

[0149] Where L is the total length of the ruler, k is the number of ruler scales, len(R) is the number of ruler points, nldx is the target scale index information, and Pixels is the number of pixels.

[0150] Furthermore, the drawing module 6003 is further used to determine the number of scale marks and the target scale distance according to the scale point set and the scale marks;

[0151] The drawing module 6003 is further used to determine the total length of the ruler according to the number of scale marks on the ruler, the target scale distance and the number of pixels by using a second preset ruler length formula;

[0152] The second preset scale length formula is:

[0153] L=(k-1)+D k / Pixels

[0154] Where L is the total length of the ruler, k is the number of scale marks, and D k is the target scale distance, and Pixels is the number of pixels.

[0155] Other embodiments or specific implementations of the device for drawing a ruler for an ultrasonic panoramic image of the present invention may refer to the above-mentioned method embodiments and will not be described in detail here.

[0156] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0157] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0158] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0159] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for drawing a ruler of an ultrasonic panoramic image, characterized in that: The scale drawing method of the ultrasonic panoramic image comprises the following steps: Obtaining coordinate position information of an ultrasonic panoramic image; Extracting outer edge information of the ultrasonic panoramic image, and determining outer edge data of the ultrasonic panoramic image according to the outer edge information; Scale drawing of the ultrasonic panoramic image according to the outer edge data and the coordinate position information; The step of obtaining coordinate position information of the ultrasonic panoramic image includes: Determine image convex hull information according to the ultrasonic panoramic image; Extracting starting point coordinate information and ending point coordinate information from the image convex hull information; Determine the coordinate position information of the ultrasonic panoramic image according to the starting point coordinate information and the ending point coordinate information; Before the step of determining the coordinate position information of the ultrasonic panoramic image according to the starting point coordinate information and the ending point coordinate information, the method further includes: Determine the coordinate information of the previous end point according to the image convex hull information; Determine the angle between the straight lines according to the coordinate information of the previous end point and the coordinate information of the end point; Determine whether the angle between the straight lines is less than a preset angle threshold; When the angle between the straight lines is less than the preset angle threshold, performing the step of determining the coordinate position information corresponding to the ultrasonic panoramic image according to the starting point coordinate information and the ending point coordinate information; The step of drawing a ruler on the ultrasonic panoramic image according to the outer edge data and the coordinate position information comprises: Determine a scale point set according to the outer edge data and the coordinate position information; Determining the scale of the ultrasonic panoramic image; Determining the number of pixels corresponding to the ultrasonic panoramic image according to the ruler scale; Determine the total length of the ruler according to the ruler point set, the ruler scale and the number of pixel points; The ultrasonic panoramic image is scaled according to the total length of the scale.

2. The method according to claim 1, characterized in that The step of extracting outer edge information of the ultrasonic panoramic image comprises: Binarizing the ultrasonic panoramic image to obtain a binary image; The outer edge information of the ultrasonic panoramic image is determined according to the binarized image.

3. The method according to claim 1, characterized in that The step of determining the total length of the ruler according to the ruler point set, the ruler scale and the number of pixel points comprises: Determine the number of scale scales, the number of scale points and target scale index information according to the scale point set and the scale scale; Determine the total length of the ruler according to the number of ruler scales, the number of ruler points, the number of pixel points and the target scale index information using a first preset ruler length formula; The first preset scale length formula is: L=(k-1)+(len(R)-nldx) / Pixels Where L is the total length of the ruler, k is the number of ruler scales, len(R) is the number of ruler points, nldx is the target scale index information, and Pixels is the number of pixels.

4. The method according to claim 1, characterized in that The step of determining the total length of the ruler according to the ruler point set, the ruler scale and the number of pixel points also includes: Determine the number of scale marks and the target scale distance according to the scale point set and the scale marks; Determine the total length of the ruler according to the number of ruler scales, the target scale distance and the number of pixel points using a second preset ruler length formula; The second preset scale length formula is: L=(k-1)+D k / Pixels Where L is the total length of the ruler, k is the number of scale marks, and D k is the target scale distance, and Pixels is the number of pixels.

5. A scale drawing device for ultrasonic panoramic images, characterized in that: The scale drawing device for the ultrasonic panoramic image comprises: An acquisition module, used to acquire coordinate position information of an ultrasonic panoramic image; an extraction module, used to extract outer edge information of the ultrasonic panoramic image, and determine outer edge data of the ultrasonic panoramic image according to the outer edge information; A drawing module, used for drawing the ultrasonic panoramic image with a ruler according to the outer edge data and the coordinate position information; The acquisition module is further used to determine image convex hull information according to the ultrasonic panoramic image; extract starting point coordinate information and ending point coordinate information from the image convex hull information; and determine coordinate position information of the ultrasonic panoramic image according to the starting point coordinate information and the ending point coordinate information; The acquisition module is further used to determine the coordinate information of the previous end point according to the image convex hull information; determine the angle between the straight lines according to the previous end point coordinate information and the end point coordinate information; determine whether the angle between the straight lines is less than a preset angle threshold; when the angle between the straight lines is less than the preset angle threshold, perform the step of determining the coordinate position information corresponding to the ultrasonic panoramic image according to the starting point coordinate information and the end point coordinate information; The drawing module is further used to determine a ruler point set according to the outer edge data and the coordinate position information; determine the ruler scale of the ultrasonic panoramic image; determine the number of pixel points corresponding to the ultrasonic panoramic image according to the ruler scale; determine the total length of the ruler according to the ruler point set, the ruler scale and the number of pixel points; and draw the ruler of the ultrasonic panoramic image according to the total length of the ruler.

6. A ruler drawing device for ultrasonic panoramic images, characterized in that: The device includes: a memory, a processor, and a ruler drawing program for an ultrasonic panoramic image stored in the memory and executable on the processor, wherein the ruler drawing program for an ultrasonic panoramic image is configured to implement the steps of the ruler drawing method for an ultrasonic panoramic image according to any one of claims 1 to 4.

7. A storage medium, characterized in that: The storage medium stores a ruler drawing program for an ultrasonic panoramic image, and when the ruler drawing program for an ultrasonic panoramic image is executed by a processor, the steps of the ruler drawing method for an ultrasonic panoramic image according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Scale precision measurement method and device, computer equipment and storage medium

    CN111899237A