A multi-opening pin positioning method based on sub-pixel edge
By adopting a multi-cotter pin positioning method based on sub-pixel edges, the problems of misjudgment in cotter pin positioning and difficulty in obtaining depth information are solved, achieving stable identification and high-precision positioning of cotter pins, and enabling automatic path planning for traversal positioning.
Patent Information
- Application Number
- CN202310399508.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2043-04-13
AI Technical Summary
Existing technologies for cotter pin positioning suffer from misjudgment and difficulty in obtaining depth information. This is especially true in the control system of underwater mobile robots in nuclear power plants, where template matching algorithms are prone to misjudging non-cotter pin objects, and sub-pixel edge detection has large calculation errors when the gradient direction is inconsistent.
A multi-cotter pin localization method based on subpixel edges is adopted. Through image acquisition, template image matching, grayscale histogram analysis and least squares fitting, the planar coordinates and depth of the cotter pin are calculated, and the path planning algorithm is combined to achieve accurate localization.
It achieves stable identification of cotter pins and sub-pixel level positioning accuracy, can accurately calculate the position and depth of cotter pins, and automatically plan paths for traversal positioning.
Smart Images

Figure CN116433885B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of split pin positioning, and particularly relates to a multi-split pin positioning method based on sub-pixel edges. BACKGROUND
[0002] A split pin target recognition and positioning algorithm designed in the research on the control system of underwater mobile robots in nuclear power plants adopts a template matching method to detect split pins, but due to a large number of split pins and other similar holes in the same core plate, misjudgment is easy to occur, and non-split pin objects are positioned. In addition, since the detection of split pins requires the insertion of a detection rod into the split pin, the depth information of the split pin is also required, but the algorithm can only obtain planar information and cannot calculate the depth.
[0003] The sub-pixel edge detection in Accurate subpixel edge location based on partial area effect uses a 5x3 window to detect, and when encountering a left or right gradient direction, the calculation error will increase. At the same time, the mean value selection method for calculating the edge sub-pixel position is not divided according to the gradient direction, which will cause errors in the gray average value of the region division, resulting in errors in the calculation result. SUMMARY
[0004] The present application provides a multi-split pin positioning method based on sub-pixel edges to solve the technical problem of large split pin positioning and planning errors in the prior art.
[0005] To achieve the above purpose, the technical scheme of the present application is as follows:
[0006] The present application provides a multi-split pin positioning method based on sub-pixel edges, comprising the following steps:
[0007] Step S1, acquiring a measured split pin image using an image acquisition device;
[0008] Step S2, finding a plurality of possible positions of split pins according to a specified trajectory in the measured split pin image;
[0009] Step S3, screening the plurality of possible positions of split pins to obtain a plurality of regions of interest;
[0010] Step S4, respectively constructing a gray histogram of the plurality of regions of interest, and respectively analyzing and judging the gray histogram of the plurality of regions of interest to obtain the contour of a real split pin;
[0011] Step S5, calculating the planar coordinates and depth of the contour of the real split pin;
[0012] Step S6: Perform path planning based on the planar coordinates of the actual cotter pin outline.
[0013] Furthermore, step S2 specifically includes the following steps:
[0014] Step S21: Prepare a template image containing a cotter pin. Extract the edges of the cotter pin in the template image to obtain the boundary points of the cotter pin.
[0015] Step S22: Use the Sobel operator to solve for the gradient direction and magnitude of each boundary point in the template image;
[0016] Step S23: Extract the edges of the cotter pin image to be tested, and calculate the gradient direction and magnitude of each boundary point in the cotter pin image to be tested in the manner of step S22.
[0017] Step S24: Slide the template image along a specified trajectory on the cotter pin image to be tested. Calculate the similarity after each slide based on the gradient direction and magnitude of each boundary point in the template image and the cotter pin image to be tested. The similarity is calculated using the interpolation sum of squares.
[0018]
[0019] Where T(x′y′) represents the gradient information of the template image, I(x+x′,y+y′) is the gradient information of each position in the tested cotter pin image, and R(x,y) represents the similarity of the match. The cotter pin is judged according to the following formula: (x,y) and (x′,y′) represent different pixel coordinates.
[0020]
[0021] When f = 1, it indicates that the current position may have a cotter pin, and λ3 represents the set threshold coefficient. After obtaining the matching cotter pin, the cotter pin is cropped from the image of the cotter pin being tested and used as the region of interest. When f = 0, it indicates that there is no cotter pin at the current position.
[0022] Step S25: Continue to search for possible locations of the cotter pin on the specified trajectory in the manner of step S24 until the entire specified trajectory has been searched and multiple regions of interest are obtained. The regions of interest are the possible locations of the cotter pin.
[0023] Furthermore, step S3 specifically includes the following steps:
[0024] Step S31: Perform edge extraction on multiple regions of interest to obtain the outlines of multiple suspected cotter pins;
[0025] Step S32: Filter multiple suspected cotter pin outlines using the following formula:
[0026]
[0027] In the formula, g=1 indicates that the profile is a split pin; W and L respectively indicate the width of the profile of the suspected split pin and the length of the profile of the suspected split pin, and λ g represents a threshold coefficient of adjustable screening range;
[0028] Step S33, the profile of the suspected split pin with g=0 in step S32 is removed, and the result is sent to step S4. If there is no profile of the suspected split pin with g=1 in step S32, all the pixels in the corresponding region of interest are set to 0, and the process returns to step S2.
[0029] Further, the step S4 specifically comprises the following steps:
[0030] Step S41, a gray level histogram of the region of interest is constructed;
[0031] Step S42, the gray level histogram of the region of interest is divided into H A , H B , and H C three regions, and the following method is used to determine whether it is a split pin:
[0032] Q=H L ×H R
[0033]
[0034] In the formula, Q indicates whether it is a split pin, 0 indicates a non-split pin, and 1 indicates a confirmed split pin; S indicates the total number of gray levels, H A and H C respectively indicate the number of gray levels in the corresponding region of interest, H L and H R respectively indicate whether the left and right gray value proportions meet the requirements, and λ1 and λ2 respectively indicate the set threshold coefficients;
[0035] Step S43, when it is determined that the region of interest is not a split pin, all the pixels in the region in the measured split pin image are set to 0, and the process returns to step S2 to re-match the position. If it is determined to be a split pin, the process proceeds to step S5.
[0036] Further, the step S5 specifically comprises the following steps:
[0037] Step S51, all edge points of the profile of the real split pin are obtained, and the sub-pixel coordinates of each edge point are calculated;
[0038] Step S52, using least square method to fit sub-pixel coordinates of each edge point to obtain the diameter of the real opening pin profile in the image;
[0039] Step S53, using the conversion formula of pixel coordinates and physical coordinates and the diameter in step S52 to calculate the plane coordinates of the real opening pin;
[0040] Step S54, calculating the depth of the real opening pin.
[0041] Further, the step S51 specifically comprises the following steps:
[0042] Step S511, obtaining one edge point of the real opening pin profile;
[0043] Step S512, defining a 3*3 window with the edge point (i, j) as the center, S L , S M , S R respectively as the sum of three columns of pixels in the window:
[0044]
[0045] Wherein, E L , E M , E R represent the area of the lower region inside the corresponding edge line; A and B respectively represent the gray values of the two regions divided by the edge point; n represents the starting position, that is, the starting coordinate of the summation in the window; h represents the height of the pixel;
[0046] Step S513, using integration to solve the sum of three columns of pixels in the window, assuming that the curve passing through the edge is y=ax^2+bx+c, wherein a, b, and c are all curve coefficients, which are as follows:
[0047]
[0048] Using the mean values of the three nearest points of the A region and the B region respectively to solve the gray values of the A region and the B region, obtaining:
[0049]
[0050]
[0051] Obtaining the curve of the edge point;
[0052] Step S514, repeating steps S511 to S513 to obtain the sub-pixel coordinates of each edge point of the real opening pin profile.
[0053] Further, the conversion formula in step S53 is specifically:
[0054]
[0055] wherein r represents the actual radius of the real split pin, P a represents the diameter of the real split pin profile detected in the image, P size is the actual physical size corresponding to each pixel.
[0056] Further, the step S6 specifically comprises the following steps:
[0057] Step S61, calculating the perpendicular line from the planar coordinates in step S53 to the square hole profile of the nearest fuel rod;
[0058] Step S62, calculating the deflection angle of the perpendicular line, i.e. the movement direction of the real split pin;
[0059] Step S63, constructing two different path planning modes, i.e. path planning mode one and path planning mode two;
[0060] Step S64, selecting the path planning mode from the path planning mode one and the path planning mode two according to the movement direction of the real split pin, and calculating the distance required to move to find the adjacent real split pin each time according to the selected path planning mode; and saving the relevant data.
[0061] Further, the step S64 of calculating the distance required to move to find the adjacent real split pin each time specifically comprises:
[0062] When in the same row, the distances required to move for the horizontal axis and the vertical axis are respectively:
[0063]
[0064] When line changing is required, the distances required to move for the horizontal axis and the vertical axis are:
[0065]
[0066] wherein P represents the interval of the split pins in the same row, Q represents the interval of the split pins in different rows, a represents the angle of the split pin movement direction, and β represents the angle of line changing, and a+β=90°.
[0067] The present application has the following beneficial effects:
[0068] 1. The real split pin in the image can be stably distinguished and other objects can be distinguished.
[0069] 2. The sub-pixel level positioning accuracy can be obtained, and the position and depth of the split pin can be accurately calculated.
[0070] 3. Can automatically locate the first open pin position in the current coverage range (100*100cm), and automatically locate.
[0071] 4. Can plan trajectory for open pins in the coverage range (100*100cm) and perform traversal positioning. BRIEF DESCRIPTION OF DRAWINGS
[0072] Figure 1 Path search diagram for initial point;
[0073] Figure 2 Schematic diagram of Sobel operator;
[0074] Figure 3 Schematic diagram of gray histogram division;
[0075] Figure 4 Schematic diagram of sub-pixel coordinate calculation;
[0076] Figure 5 Schematic diagram of relative position of open pin and square hole;
[0077] Figure 6 Schematic diagram of two path planning methods. DETAILED DESCRIPTION
[0078] The application will be described in further detail below with reference to the drawings and specific embodiments. In the description of the application, the relative orientation or position relationship is based on the orientation or position relationship shown in the drawings, wherein "up", "down", "left", "right", "front", "back", "top", "bottom", "vertical", "horizontal", "side" and "end" are used as examples, with the vertical paper surface upward as up, the vertical paper surface downward as down, the vertical paper surface leftward as left, the vertical paper surface rightward as right, the vertical paper surface inward as front, the vertical paper surface outward as back, the left-right direction as horizontal, and the up-down direction as vertical. It should be understood that these orientation terms are only for the convenience of describing the application and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the application. Figure 1 Figure 1 Figure 1 For example, the vertical paper surface upward is up, the vertical paper surface downward is down, the vertical paper surface leftward is left, the vertical paper surface rightward is right, the vertical paper surface inward is front, the vertical paper surface outward is back, the left-right direction is horizontal, and the up-down direction is vertical. It should be understood that these orientation terms are only for the convenience of describing the application and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the application.
[0079] With reference to Figure 1 , the embodiment of the present application provides a multi-open pin positioning method based on sub-pixel edge, which comprises the following steps:
[0080] Step S1, acquiring the image of the measured open pin by using an image acquisition device;
[0081] Step S2, finding the possible positions of multiple open pins in the measured open pin image according to a specified trajectory;
[0082] Step S3, screening the possible positions of the multiple open pins to obtain multiple regions of interest.
[0083] Step S4, constructing a plurality of gray scale histograms of the regions of interest respectively, and analyzing and judging through the plurality of gray scale histograms of the regions of interest respectively to obtain the contour of the real open end;
[0084] Step S5, calculating the planar coordinates and the depth of the contour of the real open end;
[0085] Step S6, performing path planning according to the planar coordinates of the contour of the real open end.
[0086] In the embodiment, the step S2 specifically comprises the following steps:
[0087] Step S21, preparing a template image containing an open end, performing edge extraction on the open end of the template image to obtain the boundary points of the open end of the template image;
[0088] Step S22, using a sobel operator to solve the gradient direction and size of each boundary point in the template image;
[0089] Step S23, extracting the edge of the measured open end image, and calculating the gradient direction and size of each boundary point in the measured open end image in the manner of step S22;
[0090] Step S24, sliding the template image in the measured open end image according to a specified track, and calculating the similarity after each sliding according to the gradient direction and size of each boundary point in the template image and the measured open end image, the similarity being selected to be an interpolation sum of squares:
[0091]
[0092] wherein T(x', y') represents the gradient information of the template image, I(x+x', y+y') is the gradient information of each position of the measured open end image, and R(x, y) represents the matching similarity; (x, y) and (x', y') both represent different pixel coordinates;
[0093] whether the open end is present is judged according to the following formula:
[0094]
[0095] When f=1, it indicates that the current position may have an open end, and λ3 represents a set threshold coefficient; after the matching open end is obtained, the open end is cropped from the measured open end image as a region of interest (ROI: region of interesting); when f=0, it indicates that the current position has no open end.
[0096] Step S25, continue to search for the possible position of the split pin on the specified track in the manner of step S24 until the entire specified track is searched, obtaining a plurality of regions of interest, i.e. possible positions of the split pin.
[0097] In the embodiment, the step S3 specifically comprises the following steps:
[0098] Step S31, edge extraction is respectively performed on the plurality of regions of interest, obtaining a plurality of contours of suspected split pins;
[0099] Step S32, since the imaging of the split pin is circular, the aspect ratio of the contour of the split pin must be about 1. After edge extraction is performed on the ROI, there will be a plurality of contours in the extracted image. The contours of the suspected split pins are screened according to the following formula:
[0100]
[0101] In the formula, g = 1 indicates that the contour is a split pin; W and L respectively represent the width of the contour of the suspected split pin and the length of the contour of the suspected split pin. Considering that there may be occlusion in actual situations, λ g represents a threshold coefficient for adjusting the screening range, λ g = 0.7-0.8. When the occlusion is serious, λ g can be reduced to locate the split pin; g = 0 indicates that the contour is not a split pin.
[0102] Step S33, the contour of the suspected split pin with g = 0 in step S32 is removed, and the result is sent to step S4. If there is no contour of the suspected split pin with g = 1 in step S32, the corresponding region of interest pixels are all set to 0 and then returned to step S2.
[0103] In the embodiment, the step S4 specifically comprises the following steps:
[0104] Step S41, since the split pin structure is different from other parts on the core plate, the reflection of each region is also different in imaging. The distribution of the gray level histogram can be used for differentiation. Therefore, this step first constructs a gray level histogram of the region of interest.
[0105] Step S42, the gray level histogram of the region of interest is divided into H A , H B , and H C three regions, and the following method is used to determine whether it is a split pin:
[0106] Q = H L × H R
[0107]
[0108] In the formula, Q represents whether it is a split pin, 0 represents a non-split pin, and 1 represents a split pin; S represents the total number of gray value, H A and H C respectively represent the number of gray values in the corresponding region of interest, H L and H R respectively represent whether the left and right gray value proportions meet the requirements, and λ1 and λ2 respectively represent the set threshold coefficients; wherein λ1 = 0.15-0.35; λ2 = 0.25-0.4;
[0109] Step S43, when it is judged that the region of interest is not a split pin, all the region pixels in the measured split pin image are set to zero, and the matching position is returned to step S2; if it is determined to be a split pin, only one contour will be left, and step S5 is entered.
[0110] In the embodiment, the step S5 specifically comprises the following steps:
[0111] Step S51, all edge points of the contour of the real split pin are obtained, and the sub-pixel coordinates of each edge point are calculated respectively;
[0112] Step S52, the least square method is used to perform circle fitting on the sub-pixel coordinates of each edge point, and the diameter of the contour of the real split pin in the image is obtained;
[0113] Step S53, the plane coordinates of the real split pin are calculated by using the conversion formula of pixel coordinates and physical coordinates and the diameter in step S52;
[0114] Step S54, the depth of the real split pin is calculated.
[0115] In the embodiment, the step S51 specifically comprises the following steps:
[0116] Step S511, one of the edge points of the contour of the real split pin is obtained;
[0117] Step S512, the sub-pixel coordinate calculation is as shown in the formula (2), since the edge of the split pin is circular, it is assumed that each edge point is crossed by the edge, and the curve passing through the edge point can be represented by y=ax 2 +bx+c. As shown in the formula (3), the gray value at the edge point must be between A and B, which represent the gray values of the two regions divided by the edge, that is: Figure 4 Figure 4
[0118]
[0119] wherein E(i,j) represents the area of the region below the edge line in the window; (i, j) represents the window coordinates; h represents a pixel height, which is 1 by default;
[0120] A 3x3 window is defined with the edge point (i, j) as the center, S L , S M , S R are the sums of the left, middle and right columns of pixels in the window, respectively;
[0121]
[0122] wherein E L , E M , E R represent the area of the region below the edge line in the corresponding region; A and B represent the gray values of the regions on the two sides of the edge point, respectively; n represents the starting position, i.e., the starting coordinate of the summation in the window; and h represents the height of a pixel;
[0123] In step S513, the sums of the left, middle and right columns of pixels in the window are solved using integration, and it is assumed that the curve passing through the edge is y=ax2+bx+c, wherein a, b and c are the coefficients of the curve, which are as follows, respectively:
[0124]
[0125] The gray values of the A region and the B region are solved using the mean values of the three nearest points of the A region and the B region, respectively, and the following is obtained:
[0126]
[0127]
[0128] The curve of the edge point is obtained.
[0129] In step S514, steps S511 to S513 are repeated to obtain the sub-pixel coordinates of each edge point of the contour of the real opening pin.
[0130] In the embodiment, the conversion formula in step S53 is specifically as follows:
[0131]
[0132] wherein r represents the actual radius of the real opening pin, P a represents the diameter of the contour of the real opening pin detected in the image, and P size is the actual physical size corresponding to each pixel.
[0133] In the embodiment, step S54 specifically includes the following steps.
[0134] Step S541, fitting with a polynomial to obtain the depth of the real split pin, the polynomial is as follows:
[0135] y=ax 3 +bx 2 +cx+d.
[0136] Different scenarios need to be fitted in advance with a polynomial to obtain the coefficients, and in actual use, the split pin size, i.e. x, is substituted into the expression to solve.
[0137] The fitting method is as follows:
[0138] 1. Obtain different known height split pin images;
[0139] 2. Extract the size of the split pin in these images;
[0140] 3. Use the split pin height and split pin image size to fit the polynomial through the least squares method.
[0141] In this embodiment, the step S6 specifically comprises the following steps:
[0142] If the current split pin is detected as the first split pin, path planning is performed, otherwise the next planned point is entered. Due to the manufacturing process, the relative positions between the split pins are fixed, and only the current split pin direction needs to be calculated to obtain the coordinates of other split pins. There is a square hole for placing a fuel rod on one side of the split pin, and the straight line closest to the center of the split pin is calculated as the moving direction. The hole position is shown in Figure 5 ;
[0143] Step S61, calculating the perpendicular line from the planar coordinates in step S53 to the square hole profile of the nearest fuel rod;
[0144] Step S62, calculating the deflection angle of the perpendicular line, i.e. the movement direction of the real split pin;
[0145] Step S63, constructing two different path planning methods, path planning method one and path planning method two; set the angle as θ, when -15°< θ < 45°, use planning method one, otherwise use planning method two, as shown in Figure 6 ;
[0146] Step S64, selecting the path planning method from path planning method one and path planning method two according to the movement direction of the real split pin, and calculating the distance required to move to find the adjacent real split pin each time according to the selected path planning method; and saving the relevant data.
[0147] In this embodiment, the step S64 of calculating the distance required to move to find the adjacent real split pin each time is specifically:
[0148] When in the same row, the distances that the horizontal axis and the vertical axis need to move are respectively:
[0149]
[0150] When a line change is needed, the distances that the horizontal axis and the vertical axis need to move are:
[0151]
[0152] wherein P represents the interval of the opening pins in the same row, Q represents the interval of the opening pins in different rows, a represents the angle of the opening pin moving direction, β represents the angle of the line change, and a+β=90°.
[0153] The above merely describes the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Furthermore, the technical solutions of each embodiment of the present application can be combined with each other, but it must be based on the realization of the ordinary skilled in the art, when the combination of the technical solutions appears contradictory or unachievable, it should be considered that the combination of the technical solutions does not exist, nor in the protection scope required by the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A sub-pixel edge based multi-opening pin positioning method, characterized in that, The method comprises the following steps: Step S1, acquiring an image of a measured open pin by using an image acquisition device; Step S2, searching for a plurality of possible positions of the open pin in the image of the measured open pin according to a specified track; Step S3, screening the possible positions of the open pin to obtain a plurality of regions of interest; Step S4, constructing a gray histogram of each region of interest, and analyzing and judging the gray histogram of each region of interest to obtain a contour of a real open pin; Step S5, calculating a plane coordinate and a depth of the contour of the real open pin; Step S6, performing path planning according to the plane coordinate of the contour of the real open pin; The step S5 specifically comprises the following steps: Step S51, acquiring all edge points of the contour of the real open pin, and calculating sub-pixel coordinates of each edge point; Step S52, performing circle fitting on the sub-pixel coordinates of each edge point by using a least square method to obtain a diameter of the contour of the real open pin in the image; Step S53, calculating the plane coordinate of the real open pin by using a conversion formula of pixel coordinates and physical coordinates and the diameter in step S52; Step S54, calculating the depth of the real open pin; The step S51 specifically comprises the following steps: Step S511, acquiring one edge point of the contour of the real open pin; Step S512, a 3x3 window is demarcated with the edge point (i, j) as the center, S L , S M , S R are respectively the sum of the left, middle and right three columns of pixels in the window wherein E L , E M , E R represents the area of the region below the edge line of the corresponding region; A and B represent the gray values of the regions on both sides of the edge point, respectively; n represents the starting position, i.e., the starting coordinate of the summation within the window; and h represents the height of the pixel. Step S513, using the integral to solve the sum of the left, middle and right three columns of pixels in the window, assuming that the curve passing through the edge is y=ax 2 +bx+c, where a, b, c are all the curve coefficients, which are as follows: Solving the gray values of the A region and the B region by using the mean values of the three nearest points of the A region and the B region respectively to obtain: Obtaining a curve of the edge point; Step S514, repeating steps S511 to S513 to obtain the sub-pixel coordinates of each edge point of the contour of the real open pin.
2. The multi-opening pin positioning method according to claim 1, wherein The step S2 specifically comprises the following steps: Step S21, preparing a template image, the template image comprising an open pin, performing edge extraction on the open pin of the template image to obtain boundary points of the open pin of the template image; Step S22, solving the gradient direction and size of each boundary point in the template image by using a sobel operator; Step S23, extracting an edge of the image of the measured open pin, and calculating the gradient direction and size of each boundary point in the image of the measured open pin in the manner of step S22; Step S24, sliding the template image in the image of the measured open pin according to the specified track, calculating the similarity after each sliding according to the gradient direction and size of each boundary point in the template image and the image of the measured open pin, and selecting an interpolation sum of squares to calculate the similarity: Wherein, T(x′, y′) represents the gradient information of the template image, I(x+x′, y+y′) is the gradient information of each position of the image of the measured open pin, R(x, y) represents the matching similarity, and it is judged whether the current position has the open pin according to the following formula: (x, y), (x′, y′) represent different pixel coordinates; When f=1, it is indicated that the current position may have the open pin, and λ3 represents a set threshold coefficient; after the matching open pin is acquired, the open pin is cropped from the image of the measured open pin as the region of interest; when f=0, it is indicated that the current position has no open pin. Step S25, continue to search for the possible position of the split pin on the specified track in the manner of step S24 until the entire specified track is searched, and a plurality of regions of interest, i.e. possible positions of the split pin, are obtained.
3. The multi-opening pin positioning method according to claim 2, wherein The step S3 specifically comprises the following steps: Step S31, edge extraction is respectively performed on the plurality of regions of interest to obtain a plurality of contours of suspected split pins; Step S32, screening is performed on the plurality of contours of suspected split pins according to the following formula: In the formula, g=1 indicates that the contour is a split pin; W and L respectively indicate the width of the contour of the suspected split pin and the length of the contour of the suspected split pin, λg indicates a threshold coefficient of an adjustable screening range, considering that there may be occlusion in actual situations; Step S33, the contour of the suspected split pin with g=0 in step S32 is removed, and the result is sent to step S4; if there is no contour of the suspected split pin with g=1 in step S32, all the pixels in the corresponding region of interest are set to 0 and then returned to step S2.
4. The multi-opening pin positioning method according to claim 3, wherein The step S4 specifically comprises the following steps: Step S41, a gray level histogram of the region of interest is constructed; Step S42, the gray scale histogram of the region of interest is divided into H A , H B , H C three regions, and it is judged whether it is an open end by the following way: Q = H L x H R In the formula, Q represents whether it is an open pin, 0 represents a non-open pin, and 1 represents confirmation of an open pin; S represents the total number of gray value, H A H C respectively represent the number of gray values in the corresponding region of interest, H L H R respectively represent whether the left and right gray value proportions meet the requirements, and λ1 and λ2 represent the set threshold coefficients. Step S43, when it is determined that the region of interest is not a split pin, all the pixels in the region in the measured split pin image are set to 0, and the position is re-matched by returning to step S2; if it is determined to be a split pin, step S5 is entered.
5. The multi-opening pin positioning method according to claim 4, wherein The conversion formula in the step S53 is specifically: where r represents the actual radius of the real split pin, P a represents the diameter of the real split pin profile detected in the image, P size is the actual physical dimension corresponding to each pixel.
6. The multi-opening pin positioning method according to claim 5, wherein The step S6 specifically comprises the following steps: Step S61, a perpendicular line from the planar coordinate in step S53 to the square hole contour of the nearest fuel rod is calculated; Step S62, a deflection angle of the perpendicular line, i.e. a movement direction of the real split pin, is calculated; Step S63, two different path planning modes, i.e. path planning mode one and path planning mode two, are constructed; Step S64, a path planning mode is selected from the path planning mode one and the path planning mode two according to the movement direction of the real split pin, and a distance required to move to find an adjacent real split pin each time is calculated according to the selected path planning mode; and relevant data are saved.
7. The multi-opening pin positioning method according to claim 6, wherein The calculation of the distance required to move to find an adjacent real split pin each time in the step S64 is specifically: When in the same row, the distances required to move the horizontal axis and the vertical axis are respectively: When line changing is required, the distances required to move the horizontal axis and the vertical axis are respectively: Wherein, P indicates the interval of split pins in the same row, Q indicates the interval of split pins in different rows, α indicates the angle of the movement direction of the split pin, and β indicates the angle of line changing, and α+β=90′.
Citation Information
Patent Citations
Crane risk data identification method based on artificial intelligence
CN113537159A
Color-based foreign object detection system
US20160061746A1