Fine needle tip detection method, system and equipment and storage medium

Through the dual camera system and image processing algorithm, combined with low-power and high-power measurement, the accuracy and efficiency problems of minimally invasive tungsten needle tip detection are solved, and high-precision and lossless needle tip size measurement is achieved, meeting the needs of high-quality detection.

CN120451072AInactive Publication Date: 2025-08-08JIMEI UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510517415.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems in the detection of minimally invasive tungsten needle tips with low accuracy, low efficiency and possible damage to the needle tip, which is difficult to meet the needs of high precision, high efficiency and non-destructive testing.

Method used

The dual-camera system is adopted, combined with the Hough linear detection algorithm and the least squares method, and the needle tip position and contour point are obtained through low- and high-magnitude measurement methods, and the needle cone length and needle diameter are calculated by linear fitting and least squares method, and the measurement accuracy is ensured by combining image rotation correction.

Benefits of technology

High accuracy, high efficiency and non-destructive detection of fine needle tips is achieved. The repetitive error of needle cone measurement reaches 10 microns, and the repetitiveness of needle diameter measurement is 0.2 microns, which improves the accuracy and reliability of the detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451072A_ABST
    Figure CN120451072A_ABST
Patent Text Reader

Abstract

The invention provides a fine needle tip detection method, system and device and a storage medium, and the method comprises the steps: calculating the needle cone length of a fine needle through a first needle tip position of a fine needle image and an actual inflection point position obtained through linear fitting; acquiring a needle cone image of the fine needle, extracting a needle point position II and all contour points, and fitting by applying a least square method according to the initial threshold value coordinate to obtain a fitting straight line I and a fitting straight line II; calculating the distance of the fitting straight line 1 according to a preset initial needle diameter size, and comparing the distance with the initial needle diameter size to position a target position; and determining a needle diameter measurement position based on the target position and the backward distance, and obtaining a needle diameter measurement value of the needle cone image. Double-station staged measurement is utilized, the contradiction between the measurement range and the measurement precision is successfully solved, automatic extraction of the tip size of the fine needle and automatic positioning and detection of two-stage measurement are achieved, the detection efficiency is greatly improved, meanwhile, it is guaranteed that the tip is not damaged during detection, and development of the fine needle quality detection technology is powerfully promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of machine vision quality inspection, and in particular relates to a fine needle tip inspection method, system, equipment and storage medium. Background Art

[0002] In the field of medical devices, minimally invasive tungsten needles, with their unique advantages, play a key role in various minimally invasive surgeries. Because they are crucial to the success of the surgery and the safety of the patient, they must undergo a comprehensive inspection to ensure that each minimally invasive tungsten needle meets quality standards. Minimally invasive tungsten needle tips have multiple dimensional requirements, with significant differences in scale between different sizes. Some are larger, requiring relatively low measurement repeatability errors; others are extremely small, but have stringent requirements for measurement repeatability errors. This multi-scale, differentiated measurement requirement necessitates precise measurement over a wide range in actual testing, which undoubtedly poses a significant challenge to microscopic measurement technology.

[0003] Currently, existing technology primarily uses microscope-based standard machines to inspect the tip dimensions of minimally invasive tungsten needles. However, this method has exposed numerous drawbacks in practical applications. Firstly, to meet the requirements of uniformly designed standard measurement software, the needle tip must be aligned during measurement. This process can easily damage the needle tip during measurement, impacting product quality. Secondly, this inspection method is inefficient and difficult to meet the inspection requirements of large-scale production. This, to a certain extent, limits the production efficiency and quality control level of minimally invasive tungsten needles. More advanced, efficient, and non-destructive inspection technologies are urgently needed to address these issues. Summary of the Invention

[0004] The purpose of this application is to provide a fine needle tip detection method, system, equipment and storage medium to solve the problems of low precision, low efficiency and possible damage to the needle tip in existing needle tip detection technology, and to achieve high-precision, high-efficiency and non-destructive detection of needle tip size and quality.

[0005] According to one aspect of the present application, a fine needle tip detection method is proposed, the method comprising the following steps:

[0006] S1. Capturing a fine needle image using a first camera, and calculating the needle cone length based on needle tip position 1 in the fine needle image and the actual inflection point position obtained by linear fitting, wherein the actual inflection point position is obtained by linear fitting of an inflection point reference point and a set of points on either side of the inflection point reference point, and the inflection point reference point is determined by the distance from the straight line between needle tip position 1 and the base of the fine needle to the corresponding fitted straight line;

[0007] S2. Using a second camera and the needle cone length, capture a needle cone image of the fine needle, extract the second needle tip position and all contour points of the needle cone image, classify the contour points into contour point set 1 and contour point set 2 using the initial threshold coordinates, and fit contour point set 1 and contour point set 2 respectively using the least squares method to obtain fitted straight lines 1 and 2, respectively;

[0008] S3. Calculate the distance between the fitting lines according to the preset initial needle diameter, and locate the target position by comparing the distance with the initial needle diameter;

[0009] S4. Based on the determined target position and the backward distance away from the second needle tip position on the same side as the initial threshold coordinate, determine the needle diameter measurement position, calculate the distance between the second fitting line and the needle diameter measurement position, and obtain the needle diameter measurement value of the needle cone image.

[0010] The above technical solution effectively solves the measurement problem of the complex shape and tiny size of the fine needle tip, improves the accuracy and reliability of detection, provides strong technical support for the quality detection of fine needles, and helps to ensure the high-quality application of fine needles in medical, electronic and other fields.

[0011] Furthermore, the detection method further includes preprocessing the fine needle image and / or the needle cone image, wherein the preprocessing includes binarization, denoising and rotation correction processing.

[0012] Furthermore, the rotation correction process uses the Hough line detection algorithm to extract edge lines on both sides of the needle tip position, calculates the diagonal of the edge line, and uses the tilt angle correction of the diagonal line to make the fine needle and / or needle cone appear vertical.

[0013] In this technical solution, the Hough line detection algorithm demonstrates strong robustness and accuracy, accurately identifying the straight line along the needle tip edge. By calculating the diagonal tilt angle for correction, it can precisely adjust the angle of the needle or needle cone in the image to make it perpendicular to the image coordinate system. This not only facilitates subsequent accurate measurement of the needle tip's position and size, but also unifies the image's orientation standards, facilitating comparison and analysis across different images, thereby improving detection accuracy and consistency.

[0014] Furthermore, the steps for determining the actual inflection point location include:

[0015] S11, traverse the pre-processed fine needle image, obtain the highest white pixel point, and obtain the needle tip position 1;

[0016] S12, connecting the needle tip point 1 corresponding to the needle tip position 1 with the side point of the base of the needle in the needle image to form an auxiliary triangle, calculating the distance from the straight line between the needle tip point 1 and the side point of the base of the needle to the corresponding edge, and extracting the corresponding edge point with the farthest distance as the inflection point reference point;

[0017] S13, selecting a number of point sets in the neighborhoods on the left and right sides of the inflection point reference point, and performing linear fitting on each set to obtain two straight lines;

[0018] S14. Calculate the intersection of the two straight lines, that is, obtain the actual inflection point position.

[0019] In the above technical solution, the inflection point reference point is determined by constructing an auxiliary triangle and distance calculation, and then the actual inflection point is obtained by linear fitting and intersection calculation, which effectively improves the accuracy and stability of the inflection point position determination, provides a reliable basis for accurately calculating the needle cone length, and thus improves the accuracy of the entire needle cone length measurement.

[0020] Furthermore, step S2 includes:

[0021] S21, traverse the pre-processed needle cone image and extract the highest white pixel point, that is, obtain the needle tip position 2;

[0022] S22, extracting all contour points on the edge of needle tip point 2 corresponding to needle tip position 2, and classifying the contour points into contour point set 1 and contour point set 2 according to the preset initial threshold coordinates;

[0023] S23. Use the least square method to perform straight line fitting on the contour point set 1 and the contour point set 2, respectively, to obtain two corresponding fitting straight lines 1 and 2.

[0024] In the above technical solution, the application of the least squares method can find the best fitting straight line in a large amount of contour point data, accurately reflect the shape characteristics of the needle cone edge, and provide an accurate data basis for subsequent target position positioning and needle diameter measurement based on the fitting straight line, which helps to improve the accuracy and reliability of needle diameter measurement.

[0025] Furthermore, the system traverses the edge points of the second needlepoint along the edge contour downward, applying a sliding window method to perform line fitting segment by segment. The change in slope, |Δk|, between adjacent segments of the fitted line is calculated in real time. In response to |Δk| exceeding a preset threshold, θk, the ordinate of the point where the change occurred is determined as the initial threshold coordinate. The preset threshold, θk, ranges from 0.05 to 0.15. Determining the initial threshold coordinate based on the slope change allows for adaptive threshold setting based on the actual shape characteristics of the needlepoint edge, improving the accuracy of contour point classification, thereby enhancing the quality of the fitted line and the precision of subsequent measurements.

[0026] Furthermore, the fine needle is one of a minimally invasive tungsten needle, a stainless steel microneedle, a nickel-titanium alloy microneedle and a carbon fiber microneedle.

[0027] In a second aspect, the present application proposes a fine needle tip detection system, the system comprising:

[0028] a needle cone length calculation module configured to capture a fine needle image using a first camera and calculate the needle cone length of the fine needle based on needle tip position 1 in the fine needle image and an actual inflection point position obtained by linear fitting, wherein the actual inflection point position is obtained by linear fitting with an inflection point reference point and a set of points on both sides of the inflection point reference point, and the inflection point reference point is determined by the distance from a straight line between needle tip position 1 and the base of the fine needle to a corresponding fitted straight line;

[0029] a needle cone fitting line acquisition module configured to capture a needle cone image of the fine needle using the second camera and the needle cone length, extract a second needle tip position in the needle cone image and all contour points of the needle cone image, classify the contour points into a first contour point set and a second contour point set using initial threshold coordinates, and fit the first contour point set and the second contour point set respectively using a least squares method to obtain a first fitting line and a second fitting line respectively;

[0030] a target position determination module configured to calculate the distance between the fitting lines according to a preset initial needle diameter, and locate the target position by comparing the distance with the initial needle diameter;

[0031] The needle diameter measurement value calculation module is configured to determine the needle diameter measurement position based on the determined target position and the backward distance away from the needle tip position 2 on the same side as the initial threshold coordinate, and calculate the distance between the fitting straight line 2 and the needle diameter measurement position to obtain the needle diameter measurement value of the needle cone image.

[0032] Furthermore, the system also includes an image acquisition device, which includes a first camera, a second camera, a pendulum needle jig, a vertical transmission mechanism and a two-dimensional mobile platform. The vertical transmission mechanism drives the first camera and the second camera to move up and down in the Z-axis direction, and the two-dimensional mobile platform drives the pendulum needle jig to move in the X-axis and / or Y-axis direction.

[0033] In the above technical solution, the setting of the vertical transmission mechanism and the two-dimensional mobile platform enables the camera and the pendulum needle fixture to flexibly adjust their positions, thereby improving the accuracy and reliability of detection. At the same time, it also increases the applicability of the system and can meet the detection needs of fine needles of different specifications.

[0034] Furthermore, a mounting plate with a base plate on its surface is fixed on the two-dimensional mobile platform, and clamping parts that cooperate with the pendulum needle fixture are provided on both sides of the mounting plate. The pendulum needle fixture includes a pendulum needle base and several pin slots provided on the pendulum needle base.

[0035] In the above technical solution, the background plate provides a uniform background for fine needle image acquisition, helping to improve image contrast and facilitate subsequent image processing and analysis. The coordinated design of the clamping part and the pendulum needle fixture ensures the stability of the pendulum needle fixture during movement, preventing it from falling off or shifting, and ensuring the positional accuracy of the fine needle during the inspection process. The pin slot design facilitates the fixing of fine needles of different specifications, improving the system's compatibility with different fine needles and further enhancing the system's practicality and ease of use.

[0036] In a third aspect, the present application proposes a terminal device comprising a processor, a memory, and a computer program stored in the memory, wherein the computer program is executed by the processor to implement any one of the above-mentioned methods for detecting a fine needle tip.

[0037] In a fourth aspect, the present application proposes a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned fine needle tip detection methods is implemented.

[0038] Compared with the prior art, the present invention has the following advantages:

[0039] (1) The present invention adopts a high- and low-magnification relay dimension measurement method. The needle tip position information obtained during low-magnification measurement can provide an accurate alignment basis for high-magnification measurement. Compared with the traditional single-magnification measurement method, this innovative method not only takes advantage of the large field of view and rapid positioning of low-magnification measurement, but also combines the high precision of high-magnification measurement to achieve efficient and accurate measurement of the size of fine needle tips. Not only does it greatly improve the measurement efficiency, but it also significantly improves the measurement accuracy, ensuring that detailed data on the tiny size of the needle tip can be accurately obtained, effectively meeting the demand for high-precision measurement of the size of fine needle tips.

[0040] (2) The present invention uses the Hough line algorithm to accurately extract the straight lines on both sides of the needle tip, calculate their diagonal angles, and then perform geometric rotation correction on the image, so that the fine needle is in a standard vertical or horizontal state in the image. This operation effectively eliminates measurement errors caused by image tilt, provides a standardized and accurate image foundation for subsequent dimensional measurements, and greatly improves the reliability and consistency of measurement results.

[0041] (3) The present invention innovatively divides the needle tip edge line into two segments and fits them separately using the least squares method to obtain a linear equation that better fits the actual situation. Calculating the needle diameter based on these linear equations can fully account for subtle changes in the needle tip edge, greatly improving the accuracy of needle diameter measurement, providing a more reliable basis for fine needle quality testing, and helping to screen fine needle products that meet high-precision requirements. The repeatability error of needle cone measurement can reach 10 microns, and the repeatability of needle diameter measurement is 0.2 microns. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and, together with the description, serve to explain the principles of the present invention. Many of the expected advantages of the embodiments of the present invention and other embodiments will be readily appreciated as they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale with respect to each other. Like reference numerals designate corresponding similar parts.

[0043] Figure 1 is a flow chart of a fine needle tip detection method according to the present application;

[0044] Figure 2 is a schematic diagram of an inflection point reference point of a fine needle tip detection method according to the present application;

[0045] Figure 3 a-3b is a schematic diagram of the actual inflection point of the fine needle tip detection method according to the present application;

[0046] Figure 4 Schematic diagram of extracting the first and second fitting lines according to the fine needle tip detection method of the present application;

[0047] Figure 5 a-5c is a schematic diagram of needle diameter calculation according to the fine needle tip detection method of the present application;

[0048] Figure 6 This is a simplified diagram of image acquisition operations of a fine needle tip detection method according to an embodiment of the present application;

[0049] Figure 7 a-7h is a schematic diagram of the needle cone calculation process of the fine needle tip detection method according to an embodiment of the present application;

[0050] Figure 8 a-8f is a schematic diagram of a needle diameter calculation process of a fine needle tip detection method according to an embodiment of the present application;

[0051] Figure 9 is a structural diagram of a fine needle tip detection system according to an embodiment of the present application;

[0052] Figure 10 is a stereoscopic diagram of an image acquisition device of a fine needle tip detection system according to an embodiment of the present application;

[0053] Figure 11 This is a schematic diagram of the internal structure of an image acquisition device of a fine needle tip detection system according to an embodiment of the present application;

[0054] Figure 12This is a schematic structural diagram of a pendulum needle fixture and a two-dimensional mobile platform of an image acquisition device according to an embodiment of the present application;

[0055] Figure 13 It is a structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present application.

[0056] The meaning of the numbers in the figure: 100-first camera, 200-second camera, 300-oscillating needle fixture, 400-vertical transmission mechanism, 500-two-dimensional moving platform, 600-base, 700-fine needle, 800-housing, 101-low-power telecentric lens, 102-first light source, 201-high-power telecentric lens, 202-second light source, 401-motor, 402-slide rail, 403-fixed frame, 404-support frame, 301-oscillating needle base, 302-pin slot, 501-mounting base, 502-base color plate, 503-moving platform, 504-clamping part, 505-stepping motor, 601-groove. DETAILED DESCRIPTION

[0057] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only some, not all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.

[0058] refer to Figure 1 , Figure 1 The flowchart of the fine needle tip detection method of the present application is shown. As shown in the figure, the method includes the following steps:

[0059] S101. Use the first camera to capture an image of the fine needle, and calculate the needle cone length of the fine needle based on the needle tip position 1 of the fine needle image and the actual inflection point position obtained by linear fitting, wherein the actual inflection point position is obtained by linear fitting with the inflection point reference point and the point set on both sides of the inflection point reference point, and the inflection point reference point is determined by the distance from the needle tip position 1 and the straight line where the bottom of the fine needle is located to the corresponding fitting straight line.

[0060] In some specific embodiments, the step of determining the actual inflection point position includes:

[0061] S1011, traverse the pre-processed fine needle image and extract the highest white pixel point, that is, obtain the needle tip position 1;

[0062] Specifically, the preprocessed fine needle image is scanned row by row from top to bottom. During the scanning process, the color value of each pixel is determined in real time. When a white pixel is detected, its position is recorded. The scanning continues until the entire fine needle image is traversed. The white pixel with the largest vertical coordinate value (i.e., the highest position) is selected, and the coordinate information of this point is used as the precise location of the needle tip.

[0063] S1012, connecting the needle tip point 1 corresponding to the needle tip position 1 with the side point of the base of the needle in the needle image to form an auxiliary triangle, calculating the distance from the straight line between the needle tip point 1 and the side point of the base of the needle to the corresponding edge, and extracting the corresponding edge point with the farthest distance as the inflection point reference point;

[0064] Specifically, refer to Figure 2 , Figure 2 A schematic diagram of the inflection point reference points of the fine needle tip detection method according to the present application is shown. As shown, after determining needle tip position 1, the two side points at the bottom of the fine needle image are automatically identified. Needle tip point 1, corresponding to needle tip position 1, is connected to these two side points at the bottom, generating two straight lines. These two straight lines form two triangles in the fine needle image space. For each triangle, a distance calculation algorithm is used to accurately calculate the perpendicular distances from all pixels within the triangle to their corresponding sides. The distance values of all points within each triangle are sorted, and the point with the largest distance value is selected, with its coordinate information determined as the key inflection point reference point position for that triangle.

[0065] S1013, selecting a number of point sets in the neighborhoods on the left and right sides of the inflection point reference point, and performing linear fitting on each set to obtain two straight lines;

[0066] Specifically, Figure 3 a-3b shows a schematic diagram of the actual inflection point of the fine needle tip detection method according to the present application. Figure 3 As shown in a, based on the obtained reference positions of the left and right inflection points, several pixels are selected from their respective neighborhoods according to the preset rules to form a point set. For each point set, a linear fitting algorithm is used to process it, and the equation of the line that best fits the distribution of the point set is calculated by minimizing the sum of squared errors, thereby obtaining two fitting lines (such as Figure 3 b).

[0067] Furthermore, the selection of point sets is based on an adaptive interval range. The determination of this interval range is a process that comprehensively considers the fine needle size and computational efficiency, and is pre-set before the measurement begins. The selection of the neighborhood point sets on the left and right sides of the inflection point reference point uses the inflection point reference point as the reference point. In the data sequence, in the forward direction, starting from the inflection point reference point, a point set ranging from 100 to 400 is selected as the left fitting sample set; in the backward direction, also starting from the inflection point reference point, a point set ranging from 100 to 400 is selected as the right fitting sample set. In this way, while ensuring that the fine needle size measurement accuracy requirements are met, computational efficiency is taken into account, making the subsequent linear fitting and related calculations based on these sample sets more scientific and efficient.

[0068] S1014. Calculate the intersection of the two straight lines, that is, obtain the actual inflection point position.

[0069] refer to Figure 3 b. Solve the equations of the two fitted lines simultaneously to calculate the coordinates of their intersection, which is then used as the actual inflection point. To further improve the accuracy and stability of the measurement results, connect the actual inflection points on the left and right sides and calculate the midpoint of this line. This midpoint is used as the final inflection point for subsequent calculations.

[0070] S1015. According to the coordinates of the first cusp point and the actual inflection point, the distance between the two points is calculated using the Euclidean distance formula to obtain the needle cone length.

[0071] Specifically, after obtaining the coordinate information of the needle tip point 1 and the inflection point used for calculation in step S1014, the Euclidean distance measurement formula is used to accurately calculate the spatial distance between the two points, and the calculated distance value is used as the measurement value of the needle cone length.

[0072] S102. Use the second camera and the needle cone length to capture the needle cone image of the fine needle, extract the needle tip position 2 of the needle cone image and all the contour points of the needle cone image, classify the contour points into contour point set 1 and contour point set 2 using the initial threshold coordinates, and use the least squares method to fit the contour point set 1 and contour point set 2 respectively, and obtain the corresponding fitting line 1 and fitting line 2.

[0073] In some specific embodiments, the detection method further includes preprocessing the fine needle image and / or needle cone image, the preprocessing including binarization, denoising and rotation correction processing, wherein the rotation correction processing uses the Hough line detection algorithm to extract the edge straight lines on both sides of the needle tip position, calculates the diagonal of the edge straight line, and uses the inclination angle of the diagonal line to correct it so that the fine needle and / or needle cone position appears vertical.

[0074] Specifically, the input fine needle image and / or needle cone image is binarized, and pixels are divided into two categories based on a preset initial threshold to separate the target from the background. Morphological processing methods are then applied to suppress image noise and remove irrelevant connected domains, eliminating non-target information. Subsequently, geometric rotation correction is performed on the image, and the Hough line detection algorithm is used to extract the edge lines on both sides of the needle tip. The diagonal of these edge lines is calculated, and the tilt angle of this diagonal line is obtained. This tilt angle is then used to correct the position of the fine needle and / or needle cone to a vertical position.

[0075] In some specific embodiments, step S102 includes:

[0076] S1021, traverse the pre-processed needle cone image and extract the highest white pixel point, that is, obtain the needle tip position 2;

[0077] Specifically, the preprocessed needle cone image is scanned line by line from top to bottom. During the scanning process, the color information of each pixel is compared in real time. When a white pixel is encountered, its position is recorded. After the entire needle cone image is traversed, the white pixel with the largest vertical coordinate value is selected to determine the location of needle tip point 2.

[0078] S1022, extracting all contour points on the edge of needle tip point 2 corresponding to needle tip position 2, and classifying the contour points into contour point set 1 and contour point set 2 according to the preset initial threshold coordinates;

[0079] S1023. Use the least squares method to perform straight line fitting on the contour point set 1 and the contour point set 2, respectively, to obtain two corresponding fitting straight lines 1 and 2.

[0080] Specifically, refer to Figure 4 , Figure 4 FIG1 shows a schematic diagram of extracting the first and second fitting lines of the fine needle tip detection method according to the present application. Figure 4As shown, blue represents fitting line one and red represents fitting line two. Considering that the front and back ends of the needle tip edge line have different slopes, in order to ensure the fitting accuracy, it is necessary to set the initial threshold coordinates to distinguish the front and back ends. Starting from the needle tip point two corresponding to the needle tip position two, the edge points of the needle tip point two are traversed downward along its edge contour, and the sliding window method is used to perform straight line fitting segment by segment, where the sliding window size is set to 10-30 points, preferably 20 points. During the fitting process, the slope change |Δk| of the adjacent segments of the fitting line is calculated in real time. When |Δk| exceeds the preset threshold θk, the vertical coordinate of the point where the change occurs is determined as the initial threshold coordinate position. The preset threshold θk ranges from 0.05 to 0.15, and the preferred value is θk = 0.1. This setting can effectively identify obvious changes in the slope, thereby accurately determining the initial threshold coordinate position. All contour points on the edge of the needle tip point two are extracted, and based on the initial threshold coordinate position, these contour points are divided into contour point set one before the threshold coordinate and contour point set two after the threshold coordinate. For these two different sets of contour points, the least squares method is used to fit lines. The least squares method determines the equation of the line that best fits the distribution of the contour point set by minimizing the sum of squared errors between the points and the line. This in turn yields the slope equations of the two corresponding fitted lines, one and two.

[0081] S103 , calculating the distance between the first fitting lines according to the preset initial needle diameter, and locating the target position by comparing the distance with the initial needle diameter.

[0082] In some specific embodiments, based on a preset initial needle diameter, the slope equation of the first fitting line before the threshold coordinate obtained in step S102 is used to calculate the distance between the two fitting lines. By comparing this distance with the initial needle diameter, the target position can be accurately located.

[0083] S104. Determine the needle diameter measurement position based on the determined target position and the backward distance away from the second needle tip position on the same side as the initial threshold coordinate, and calculate the distance between the second fitting line and the needle diameter measurement position to obtain the needle diameter measurement value of the needle cone image.

[0084] In some specific embodiments, the position used to calculate the needle diameter is determined based on the target position determined in step S103 and the preset backward distance from the needle tip point 2. The slope equation of the thresholded fitted line 2 is then used to calculate the distance between the two fitted lines 2 at that position, thereby achieving accurate measurement of the needle diameter.

[0085] Specifically, refer to Figure 5 a-5c, Figure 5 a-5c shows a schematic diagram of needle diameter calculation according to the fine needle tip detection method of the present application. Figure 5As shown in a, "10 microns" is the target position determined by S103. "Distance A", "Distance B" and "Distance C" are all distances on the same side as the second needle tip position and away from the "10 microns" position, and behind the target position. A, B, and C are all needle diameter measurement sites. At these sites, the width-1, width-2, and width-3 of the second fitting line correspond to the needle diameter measurement values of each measurement site, which are 25.95, 42.79, and 59.64, respectively. When the values of width-1, width-2, and width-3 (such as Figure 5 c) is in the setting value range of needle diameter 1, needle diameter 2, and needle diameter 3 (24-27), (40-45), (58-62) (as shown in FIG. Figure 5 b), the needle is judged to meet the standard, and the corresponding Figure 5 The needle diameter measurement values of the needle diameter measurement sites A, B, and C shown in a are within the set value range and therefore meet the standard.

[0086] In some specific embodiments, the fine needle is one of a minimally invasive tungsten needle, a stainless steel microneedle, a nickel-titanium alloy microneedle, and a carbon fiber microneedle.

[0087] Example 1

[0088] refer to Figure 6-Figure 8 f, Figure 6 A simplified diagram showing the image acquisition operation of the fine needle tip detection method according to the present application is shown. Figure 7 a-7h show the needle cone calculation process of the fine needle tip detection method of the present application in sequence, Figure 8 Figures a-8f are schematic diagrams showing the needle diameter calculation process of the fine needle tip detection method according to the present application. The needle cone and needle diameter calculation includes the following steps:

[0089] Step 1: Preprocessing of tungsten needle image. Figure 6 and Figure 7 a. Use the first camera of station 1 to capture the image of the tungsten needle on the tungsten needle fixture, and compare the captured tungsten needle image ( Figure 7 a) Perform binary processing to separate the target and background, use morphological processing to suppress image noise, remove irrelevant connected domains, and eliminate non-target information (refer to Figure 7 b).

[0090] Step 2: Geometric rotation correction of the tungsten needle image. In the initially acquired tungsten needle image, the tungsten needle may be tilted and not vertical. To facilitate subsequent algorithm measurement and reduce errors, the Hough line detection algorithm is used to extract the edge straight lines on both sides of the needle tip, calculate their diagonals and tilt angles, and then correct the tungsten needle position to make it vertical (refer to Figure 7 c).

[0091] Step 3: Extract the needle tip position. Figure 7As shown in (d), the geometrically rotated tungsten needle image is traversed from top to bottom, and the needle tip position is determined by the highest white pixel.

[0092] Step 4: Extract the inflection point reference position. Figure 7 e. Connect the needle tip point 1 with the two side points of the bottom to form two straight lines, and then form two triangles. By calculating the distance from each point in each triangle to the corresponding side, identify and extract the point with the farthest distance, and thus determine the position of the key inflection point reference point in the two triangles.

[0093] Step 5: Extract the actual inflection point. Based on the obtained inflection point reference point, select points in the neighborhood on both sides and perform linear fitting to obtain two straight lines. The intersection of the two straight lines is the actual inflection point position (see Figure 7 f). Connect the left and right actual inflection points and take the midpoint as the inflection point for calculation (see Figure 7 g).

[0094] Step 6: Calculate the length of the needle cone. Figure 7 g and Figure 7 h, using the Euclidean distance measurement method, calculate the spatial distance between the needle tip and the calculated inflection point as the measurement result of the needle cone length.

[0095] Step 7: Preprocessing of the needle cone image. Figure 6 Station 1 is where the first camera and lens are located during low-magnification measurement, and station 2 is where the second camera and lens are located during high-magnification measurement. Since the distance between the lenses for low-magnification and high-magnification measurement is fixed, it can be moved directly from the initial position of station 1 to station 2 for measurement. Based on the preset initial position of station 1, the tungsten needle fixture is moved to station 2 for high-magnification measurement and automatic focusing with the help of a high-precision two-dimensional mobile platform and a Z-axis mobile platform. Figure 8 a. Binarize the needle cone image to separate the target and background, and use morphological processing to suppress noise, remove irrelevant connected domains, and eliminate non-target information.

[0096] Step 8: Geometric rotation correction of the needle cone image. Use the Hough line detection algorithm to extract the edge lines on both sides of the needle cone image, calculate the diagonal lines of the edge lines on both sides, and obtain the tilt angle of the diagonal line. By obtaining the tilt angle of the diagonal line, the position of the needle cone is corrected to make it appear vertical (refer to Figure 8 b).

[0097] Step 10: Extract the needle tip position. Figure 8 As shown in c, the geometrically rotated needle cone image is traversed from top to bottom, and the second position of the needle tip is determined by the highest white pixel.

[0098] Step 11: Extract the two edge lines of the needle tip in two stages. Figure 8d. Extract all the contour points on the second edge of the needle tip and divide them into the contour point set 1 before the threshold and the contour point set 2 after the threshold according to the preset initial threshold. Use the least squares method to perform straight line fitting on each set and output the slope equation of the fitting line.

[0099] Step 12: Find the position based on the given needle diameter. According to the preset initial needle diameter, calculate the fitting line before the initial threshold coordinate ( Figure 8 e green line) to achieve precise positioning of the target position.

[0100] Step 13: Calculate the needle diameter based on the given position. Figure 8 f) and the preset backward distance ( Figure 8 f), the orange, yellow, and purple horizontal lines, and the fitting straight line ( Figure 8 f) to accurately measure the needle diameter.

[0101] Further references Figure 9 As an implementation of the above method, the second aspect of the present application provides an embodiment of a fine needle tip detection system 900. Figure 1 Corresponding to the method embodiment shown, the system can be specifically applied to various electronic devices. The system 900 includes a needle cone length calculation module 901, a needle cone fitting straight line acquisition module 902, a target position determination module 903, and a needle diameter measurement value calculation module 904, which are interconnected and communicate with each other, wherein:

[0102] The needle cone length calculation module 901 is configured to capture a fine needle image using a first camera and calculate the needle cone length of the fine needle based on the needle tip position 1 in the fine needle image and the actual inflection point position obtained by linear fitting, wherein the actual inflection point position is obtained by linear fitting with the inflection point reference point and the set of points on both sides of the inflection point reference point, and the inflection point reference point is determined by the distance from the straight line between the needle tip position 1 and the base of the fine needle to the corresponding fitted straight line;

[0103] The needle cone fitting line acquisition module 902 is configured to capture a needle cone image of the fine needle using the second camera and the needle cone length, extract the needle tip position 2 and all contour points of the needle cone image, classify the contour points into contour point set 1 and contour point set 2 using the initial threshold coordinates, and fit the contour point set 1 and contour point set 2 respectively using the least squares method to obtain the corresponding fitting line 1 and fitting line 2;

[0104] The target position determination module 903 is configured to calculate the distance between the fitting lines according to the preset initial needle diameter, and locate the target position by comparing the distance with the initial needle diameter;

[0105] The needle diameter measurement value calculation module 904 is configured to determine the needle diameter measurement position based on the determined target position and the backward distance away from the needle tip position 2 on the same side as the initial threshold coordinate, and calculate the distance between the fitting straight line 2 and the needle diameter measurement position to obtain the needle diameter measurement value of the needle cone image.

[0106] In some specific embodiments, the fine needle tip detection system further includes an image acquisition device equipped with a first camera and a second camera, Figure 10 and Figure 11 , Figure 10 and Figure 11 The following figures respectively show a stereoscopic view and a schematic diagram of the internal structure of the image acquisition device of the fine needle tip detection system according to the present application. As shown in the figure, the image acquisition device mainly consists of a housing 800, a first camera 100, a second camera 200, a pendulum fixture 300, a vertical transmission mechanism 400, a two-dimensional mobile platform 500, and a base 600. The housing 800 creates an enclosed space for the entire image acquisition device, effectively blocking external dust, impurities, etc., preventing them from interfering with the internal precision components. The first camera 100 and the second camera 200 are located within it. Among them, the vertical transmission mechanism 400 and the two-dimensional moving platform 500 are installed on the base 600, the pendulum needle jig 300 is arranged on the two-dimensional moving platform 500, the first camera 100 and the second camera 200 are fixed on the movable fixed frame 404 of the vertical transmission mechanism 400, and the pendulum needle jig 300 is detachably arranged on the two-dimensional moving platform 500, so that the vertical transmission mechanism 400 drives the first camera 100 and the second camera 200 to move up and down in the Z-axis direction, and the two-dimensional moving platform 500 drives the pendulum needle jig 300 to move in the X-axis and / or Y-axis direction.

[0107] Specifically, the first camera 100 is equipped with a low-magnification telecentric lens 101 and a first light source 102 coaxial with the low-magnification telecentric lens 101, which is used to capture low-magnification images of the fine needle 700. The low-magnification telecentric lens 101 has a large field of view, enabling rapid acquisition of the overall outline of the fine needle 700 during the initial detection phase, providing basic positioning for subsequent precise measurement. The first light source 102 provides sufficient and uniform illumination for low-magnification image acquisition. Appropriate lighting conditions enhance the contrast between the fine needle 700 and the background, making the captured image clearer and facilitating subsequent image processing and analysis. The second camera 200 is similarly equipped with a high-magnification telecentric lens 201 and a second light source 202 coaxial with the high-magnification telecentric lens 201. The high-magnification telecentric lens 201 has high resolution and a large magnification, and is used to capture high-magnification images of the fine needle 700 tip to meet the requirements for high-precision measurement of the fine needle diameter. The second light source 202 provides illumination for high-magnification image acquisition, ensuring that the fine needle tip details are clearly presented at high magnification. Preferably, the first and second cameras 100 and 200 are high-resolution CCD industrial cameras with 20-megapixel high-resolution imaging capabilities, enabling the capture of high-precision image data. The 3x magnification of a low-magnification telecentric lens is suitable for acquiring images with a wide field of view, meeting the requirements for needle cone length measurement; the 10x magnification of a high-magnification telecentric lens enables high-precision local magnification, suitable for needle diameter measurement.

[0108] Specifically, the vertical transmission mechanism 400 includes a motor 401, a slide rail 402, a fixed frame 403, and a support frame 404. The first camera 100 and the second camera 200 are mounted on the fixed frame 403, which is slidably mounted on the slide rail 402. The slide rail 402 is fixed to the base 600 via the support frame 404. The motor 401 is connected to the fixed frame 403 on the slide rail 402 via a drive shaft. When the motor 401 is running, the fixed frame 403 drives the first camera 100 and the second camera 200 to move up and down along the slide rail 402 in the Z-axis direction.

[0109] Specific, combined Figure 11 and Figure 12 , Figure 12A schematic diagram of the structure of the oscillating needle fixture and the two-dimensional mobile platform of the image acquisition device according to the present application is shown. As shown in the figure, the two-dimensional mobile platform 500 includes a mobile platform 503, a mounting base 501 and a base plate 502 provided on the mobile platform 503. The mounting base 501 is fixed to the mobile platform 503, and the base plate 502 is provided on its surface. The mobile platform 503 is driven by a stepper motor 505, so that the two-dimensional mobile platform 500 moves along the X-axis or Y-axis in a two-dimensional plane. A ball screw is provided in the two-dimensional mobile platform 500 to cooperate with the drive of the stepper motor 505. Clips 504 are provided on both sides of the mounting base 501 to tightly connect the oscillating needle fixture 300 to the mobile platform 503, ensuring that the oscillating needle fixture 300 does not fall off or shift during movement, while ensuring that the needle tip of the fine needle 700 is always located above the base plate 502.

[0110] Furthermore, the oscillating needle fixture 300 includes an oscillating needle base 301 and a plurality of parallel pin slots 302 disposed on the oscillating needle base 301. The pin slots 302 are used to secure the fine needle 700, ensuring that the fine needle 700 does not shift or wobble during the inspection process. Preferably, the appropriate pin slot 302 can be selected based on the size of the needle.

[0111] Specifically, a groove 601 is provided at the bottom of the base 600 to facilitate the carrying operation of the image acquisition device.

[0112] This invention employs a dual-station, phased measurement method, employing a low-magnification lens for large dimensions and a high-magnification lens for small dimensions, resolving the conflict between measurement range and accuracy. It also enables automated extraction of the minimally invasive tungsten needle tip dimensions. The automated system design enables automatic positioning and detection during the two-stage measurement, significantly improving detection efficiency. Furthermore, the coordinated use of algorithms and mechanical control ensures that the tip is not damaged during the detection process.

[0113] In a third aspect, the present application proposes a terminal device comprising a processor, a memory, and a computer program stored in the memory, wherein the computer program is executed by the processor to implement any one of the above-mentioned methods for detecting a fine needle tip.

[0114] In a fourth aspect, the present application proposes a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned fine needle tip detection methods is implemented.

[0115] Reference below Figure 13 , which shows a structural diagram of a computer system 1300 suitable for implementing a terminal device or server of an embodiment of the present application. Figure 13 The terminal device or server shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0116] like Figure 13 As shown, the computer system 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage unit 1308 into a random access memory (RAM) 1303. Various programs and data required for the operation of the computer system 1300 are also stored in the RAM 1303. The CPU 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0117] The following components are connected to the I / O interface 1305: an input section 1306 including a keyboard, a mouse, and the like; an output section 1307 including a liquid crystal display (LCD), a speaker, and the like; a storage section 1308 including a hard disk and the like; and a communication section 1309 including a network interface card such as a LAN card or a modem. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as needed. Removable media 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1310 as needed, so that computer programs read therefrom can be installed into the storage section 1308 as needed.

[0118] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1309, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the method of the present application are executed. It should be noted that the computer-readable medium of the present application can be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical cable, RF, or any suitable combination thereof.

[0119] Computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0120] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0121] Although the principles of the present invention have been described in detail above in conjunction with the preferred embodiments of the present invention, those skilled in the art should understand that the above embodiments are merely illustrative of the present invention and are not intended to limit the scope of the present invention. The details in the embodiments do not constitute a limitation on the scope of the present invention. Without departing from the spirit and scope of the present invention, any obvious changes such as equivalent transformations and simple substitutions based on the technical solution of the present invention fall within the scope of protection of the present invention.

Claims

1. A fine needle tip detection method, characterized in that: The method comprises: S1. Capturing a fine needle image using a first camera, and calculating the needle cone length of the fine needle based on needle tip position 1 in the fine needle image and an actual inflection point position obtained by linear fitting, wherein the actual inflection point position is obtained by linear fitting an inflection point reference point and a set of points on both sides of the inflection point reference point, and the inflection point reference point is determined by the distance from the straight line between needle tip position 1 and the base of the fine needle to the corresponding fitted straight line; S2. Using a second camera and the needle cone length, capture a needle cone image of the fine needle, extract a second needle tip position of the needle cone image and all contour points of the needle cone image, classify the contour points into a first contour point set and a second contour point set using initial threshold coordinates, and fit the first contour point set and the second contour point set, respectively, using the least squares method to obtain a first fitting line and a second fitting line, respectively; S3. Calculating the distance between the first fitting lines according to a preset initial needle diameter, and locating the target position by comparing the distance with the initial needle diameter; S4. Determine the needle diameter measurement position based on the determined target position and the backward distance away from the second needle tip position on the same side as the initial threshold coordinate, and calculate the distance between the second fitting straight line and the needle diameter measurement position to obtain the needle diameter measurement value of the needle cone image.

2. The fine needle tip detection method according to claim 1, characterized in that: The detection method further includes preprocessing the fine needle image and / or the needle cone image, wherein the preprocessing includes binarization, denoising and rotation correction processing.

3. The fine needle tip detection method according to claim 2, characterized in that: The rotation correction process uses the Hough line detection algorithm to extract edge lines on both sides of the needle tip position, calculates the diagonal lines of the edge lines, and uses the tilt angle of the diagonal lines for correction, so that the fine needle and / or needle cone appears vertical.

4. The fine needle tip detection method according to claim 2, characterized in that: The step of determining the actual inflection point position comprises: S11, traversing the pre-processed fine needle image, extracting the highest white pixel point, that is, obtaining the needle tip position one; S12, connecting the needle tip point 1 corresponding to the needle tip position 1 with the side point of the base of the fine needle in the fine needle image to form an auxiliary triangle, calculating the distance from the straight line between the needle tip point 1 and the side point of the base of the fine needle to the corresponding edge, and extracting the corresponding edge point with the farthest distance as the inflection point reference point; S13, selecting a number of point sets in the neighborhoods on the left and right sides of the inflection point reference point, and performing linear fitting on each set to obtain two straight lines; S14. Calculate the intersection of the two straight lines, that is, obtain the actual inflection point position.

5. The fine needle tip detection method according to claim 2, characterized in that: The S2 step includes: S21, traversing the pre-processed needle cone image, extracting the highest white pixel point, that is, obtaining the second needle tip position; S22, extracting all contour points on the edge of the second needlepoint point corresponding to the second needlepoint position, and classifying the contour points into the first contour point set and the second contour point set according to the preset initial threshold coordinates, wherein the edge points of the second needlepoint point are traversed downward along the edge contour of the second needlepoint point, and a sliding window method is used to perform straight line fitting segment by segment, and the slope change |Δk| of the adjacent segment fitting straight line is calculated in real time. In response to |Δk| exceeding a preset threshold θk, the ordinate of the change point is determined as the initial threshold coordinate, and the preset threshold θk has a value range of 0.05-0.15; S23 , using the least squares method to perform straight line fitting on the first contour point set and the second contour point set, respectively, to obtain two corresponding fitting straight lines, the first fitting straight line and the second fitting straight line.

6. The fine needle tip detection method according to claim 1, characterized in that: The fine needle is one of a minimally invasive tungsten needle, a stainless steel microneedle, a nickel-titanium alloy microneedle and a carbon fiber microneedle.

7. A fine needle tip detection system, characterized in that: The system comprises: a needle cone length calculation module configured to capture a fine needle image using a first camera and calculate the needle cone length of the fine needle based on needle tip position 1 in the fine needle image and an actual inflection point position obtained by linear fitting, wherein the actual inflection point position is obtained by linear fitting an inflection point reference point and a set of points on both sides of the inflection point reference point, and the inflection point reference point is determined by the distance from a straight line between needle tip position 1 and the base of the fine needle to a corresponding fitting straight line; a needle cone fitting line acquisition module configured to capture a needle cone image of the fine needle using a second camera and the needle cone length, extract a second needle tip position of the needle cone image and all contour points of the needle cone image, classify the contour points into a first contour point set and a second contour point set using initial threshold coordinates, and fit the first contour point set and the second contour point set respectively using a least squares method to obtain a first fitting line and a second fitting line respectively; a target position determination module configured to calculate the distance between the first fitting straight lines according to a preset initial needle diameter, and locate the target position by comparing the distance with the initial needle diameter; The needle diameter measurement value calculation module is configured to determine the needle diameter measurement position based on the determined target position and the backward distance away from the second needle tip position on the same side as the initial threshold coordinate, and calculate the distance between the second fitting straight line and the needle diameter measurement position to obtain the needle diameter measurement value of the needle cone image.

8. The fine needle tip detection system according to claim 7, characterized in that: The system also includes an image acquisition device, which includes the first camera, the second camera, a pendulum jig, a vertical transmission mechanism and a two-dimensional mobile platform. The vertical transmission mechanism drives the first camera and the second camera to move up and down in the Z-axis direction, and the two-dimensional mobile platform drives the pendulum jig to move in the X-axis and / or Y-axis direction.

9. The fine needle tip detection system according to claim 8, characterized in that: A mounting plate with a base plate on its surface is fixed on the two-dimensional moving platform, and clamping parts cooperating with a swing needle fixture are provided on both sides of the mounting plate. The swing needle fixture includes a swing needle base and a plurality of pin slots provided on the swing needle base.

10. A computer-readable storage medium, wherein a computer program is stored in the medium, and when the computer program is executed by a processor, the fine needle tip detection method according to any one of claims 1 to 6 is implemented.