Polymorphic weighted light stripe center high-precision calculation method and device

Through the polymorphic weighted high-precision calculation method for optical stripe centers, the existing optical stripe visual measurement system has solved the shortcomings in real-time, accuracy and robustness, and achieved high-precision, real-time and stable optical stripe center detection.

CN119693470APending Publication Date: 2025-03-25HUBEI UNIV OF AUTOMOTIVE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411805598.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Existing optical stripe visual measurement systems perform poorly in real-time, accuracy and robustness, making it difficult to meet the needs of fast measurement and high-precision 3D reconstruction.

Method used

A high-precision calculation method for the center of light stripes with polymorphic weighting is proposed. By constructing grayscale space, calculating horizontal and vertical projections, determining the direction of dimensionality reduction, identifying effective light stripes after dimensionality reduction, using polymorphic weighting dimensionality reduction method to obtain the center coordinates of light stripes, and constructing a light stripe center coordinate extraction model through the grayscale feature index matching method.

Benefits of technology

This method significantly improves the accuracy and stability of optical stripe center detection, reduces the computational complexity, improves the computing efficiency, enhances the real-time and robustness of the algorithm, and meets the needs of high-precision optical stripe center measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693470A_ABST
    Figure CN119693470A_ABST
Patent Text Reader

Abstract

The invention relates to the field of visual system calibration, and discloses a polymorphic weighted light stripe center high-precision calculation method and device, and the method comprises the steps: constructing a gray scale space based on the distribution characteristics of the gray scale value of a current image; calculating the horizontal projection and the vertical projection of the image in the gray scale space; determining a dimension reduction direction of the image according to the horizontal projection and the vertical projection, and performing image dimension reduction according to the selected direction; after dimension reduction, effective light stripes are identified based on a gray scale reference threshold value Thr; for the effective light stripes, a polymorphic weighted dimension reduction method is adopted to further obtain the center coordinates of the light stripes; based on the center coordinates of the light stripes, a gray feature index matching method is adopted to obtain a light stripe center coordinate extraction model; according to the method, the dominant function of high-brightness pixels is emphasized preferentially in the recognition process, meanwhile, noise interference of low gray values is effectively restrained, and therefore the precision and robustness of an algorithm are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual system calibration, and in particular to a high-precision calculation method and device for polymorphic weighted light stripe centers. Background Art

[0002] The light stripe laser scanning three-dimensional measurement method is an important active vision technology. Based on the principle of three-dimensional laser scanning, it has the advantages of a wide measurement range, efficient measurement capabilities and miniaturized equipment. It has been widely used in national key development areas such as industrial product surface quality assessment and manufacturing precision detection.

[0003] The core principle of this method is to project a single-line laser light stripe onto a heterogeneous processing surface to generate a light stripe profile of the corresponding cross section of the surface. The light stripe profile acquired by the imaging system must first extract its sub-pixel center coordinates in the image space. Subsequently, through the calibration process, the center coordinates of the light stripes in the image space are reduced to the physical space (calibration), thereby obtaining the true height data of the complete light stripe profile. Furthermore, through a one-dimensional translation operation, one-way scanning can be achieved in the direction of the projection surface of the single-line laser light stripe, thereby obtaining high-precision three-dimensional point cloud data. Therefore, extracting the sub-pixel center coordinates of the light stripe profile in the image space is a key step in the light stripe laser scanning three-dimensional measurement method, and efficient, high-precision and high-robust sub-pixel center coordinate calculation is the basis for ensuring the real-time and accuracy of the line light stripe visual measurement system.

[0004] Traditional methods for extracting the center of light streaks mainly include the Steger algorithm. The Steger algorithm uses the Hessian matrix to obtain the normal direction of the light streak profile in the image space, and then solves the center point through the normal direction to locate the sub-pixel position of the center of the light streak profile. Although this method has high robustness and accuracy, its computational complexity is large, which makes it difficult to quickly extract the center line of the light streak profile. Therefore, this method is difficult to meet actual needs in applications that require real-time performance, such as fast measurement and three-dimensional reconstruction.

[0005] Jun Wang et al. proposed a fast line light stripe stripe center extraction method based on an improved centroid algorithm. The method first preprocesses the light stripe image and uses the skeleton extraction technology to obtain the approximate position of the stripe center. Subsequently, the normal direction of each pixel on the skeleton is calculated by the grayscale gradient method. Next, the weighted grayscale centroid method is used to determine the coordinates of the stripe center along the normal direction. Finally, the least squares method is used to fit a smooth center line. Based on Jun Wang's method, the measurement speed and sub-pixel accuracy are significantly improved, and the repeated measurement accuracy is maintained within 0.01mm. However, this method shows a certain sensitivity to image noise and irregular stripes during the skeleton extraction process, which may affect the extraction accuracy of the stripe center. In addition, although the least squares fitting can generate a smooth center line, it may introduce errors when there is large data noise, which will have a negative impact on the final measurement accuracy.

[0006] The patent "A method for extracting the center of line light stripes on the surface of reflective nuclear fuel rods" (patent number: ZL202010131132.3) proposes a method for extracting the center of line light stripes on the surface of reflective nuclear fuel rods. Based on the approximate Gaussian characteristics of the stripe energy distribution, the image is Gaussian filtered. Subsequently, a two-dimensional grayscale value search is performed to determine the area to be processed, the grayscale characteristics of the area are analyzed, the high-reflective part is removed, and the normal irradiation area is retained. On this basis, the adaptive line threshold method is used to separate the light stripes from the background. Finally, the gradient centroid method is used to extract the center of the light stripes, and the least squares method is used to perform pixel fitting on the removed high-reflective area. This method can effectively reduce the impact of uneven intensity distribution of light stripes on the surface of nuclear fuel rods on the accuracy of extracting the center of line light stripes. However, the use of Gaussian filtering in this method may lead to the loss of detail information, especially when processing complex images. In addition, the effect of the adaptive line threshold method may be unstable under different lighting conditions, which affects the effective separation of light stripes from the background and leads to increased errors.

[0007] Hui-Feng WANG et al. proposed a method for detecting the center of laser stripes under the condition of non-uniform scattering metal surface. The method first uses the differential image method to process the bright field and dark field to remove the non-uniform background. Then, the region growing statistics method is used to eliminate the random laser speckle noise, and the coarse center of the laser stripe is determined by the grayscale centroid method. Next, the Sobel operator is used to calculate the gradient vector of the stripe pixel point to obtain the normal field of the light stripe. Based on the normal direction field vector, the 5×5 neighborhood of the coarse stripe center is determined, and the grayscale centroid method is further used to determine the center position of the laser stripe in the normal direction. Finally, the sub-pixel pixel coordinates are obtained by the bilinear interpolation method. The method shows strong robustness, and its stripe detection error is less than 0.1 pixel, which ensures the measurement accuracy of the system. However, when the method uses the differential image method to process the non-uniform background, it may cause loss of fine structures, thereby affecting the accuracy of subsequent processing. In addition, although the bilinear interpolation method can obtain sub-pixel coordinates, its accuracy depends on the quality of the neighborhood pixels. In a high-noise environment, the interpolation result may be unstable, thus affecting the final measurement accuracy.

[0008] In summary, traditional centerline extraction methods can be divided into two categories. The first category is the geometric center method represented by the threshold method. This type of method has strong real-time and anti-interference capabilities and high accuracy, but the calculation takes a long time. Although some scholars have preprocessed the image through image stereo correction and Gaussian filtering to reduce errors, it is still difficult to achieve rapid detection of complex objects. The second method is the energy center method represented by the grayscale centroid method, which is suitable for multi-line laser measurement scenarios and finds the center through light stripe profile information. This type of method has high real-time performance when matching the center of multi-line lasers, but is greatly affected by noise and has low accuracy.

[0009] The traditional grayscale centroid method usually processes two-dimensional scenes. In addition, although some scholars have proposed a secondary optimization algorithm for the grayscale centroid method, the accuracy is improved compared with the conventional method, but it still does not meet the needs of high-precision light stripe center measurement. Therefore, the current line light stripe vision measurement system performs poorly in terms of real-time, accuracy and robustness. A light stripe center calculation method with high accuracy, high real-time, high stability and high robustness for single-line laser scenes is needed to solve the above problems. Summary of the invention

[0010] The purpose of the present invention is to propose a high-precision calculation method and device for the center of a polymorphic weighted light stripe, so as to solve the technical problem that the existing light stripe vision measurement system has poor performance in real-time, accuracy and robustness.

[0011] The present invention provides a high-precision calculation method for the center of a polymorphic weighted light stripe, comprising the following steps:

[0012] S1: construct grayscale space based on the distribution characteristics of the grayscale value of the current image;

[0013] S2: Calculate the horizontal and vertical projections of the image in the grayscale space;

[0014] S3: Determine the dimensionality reduction direction of the image according to the horizontal projection and the vertical projection, and perform image dimensionality reduction according to the selected direction;

[0015] S4: After dimensionality reduction, effective light fringes are identified based on the grayscale reference threshold Thr;

[0016] S5: For effective light stripes, the polymorphic weighted dimensionality reduction method is used to further obtain the center coordinates of the light stripes;

[0017] S6: Based on the center coordinates of the light streaks, the grayscale feature index matching method is used to obtain the light streak center coordinate extraction model.

[0018] A storage medium stores instructions and data for realizing a high-precision calculation method for the center of a polymorphic weighted light stripe.

[0019] A high-precision calculation device for the center of a polymorphic weighted light stripe comprises: a processor and the storage medium; the processor loads and executes instructions and data in the storage medium to implement a high-precision calculation method for the center of a polymorphic weighted light stripe.

[0020] The beneficial effects provided by the present invention are:

[0021] 1. A dimensionality reduction model based on the two-dimensional grayscale matrix of "grayscale space" was constructed. By decomposing it into an ordered "grayscale feature set", the problem of extracting the two-dimensional coordinates of the center of the light stripe in the "grayscale space" was transformed into the problem of high-precision calculation of the grayscale feature center point in the "grayscale feature set" and the grayscale feature set sequence number matching;

[0022] 2. The grayscale distribution characteristics and mechanisms of each grayscale feature in the "grayscale feature set" are discussed, and a "high-precision calculation model for grayscale feature center of light stripe dimensionality reduction based on polymorphic weighted model" is proposed. This model can realize high-precision calculation of the grayscale feature center point in the "grayscale feature set";

[0023] 3. A traversal calculation model of the "grayscale feature set" was constructed; by traversing the "grayscale feature set" once, the grayscale feature sequence number and the grayscale feature center point can be quickly matched. Compared with traditional two-dimensional image processing technology (including convolution, refinement and morphological methods), this method effectively reduces the computational complexity, improves the computational efficiency, and significantly improves the real-time performance;

[0024] 4. The accuracy and stability of light streak detection are effectively improved by using a calculation method based on the intersection weight threshold T to determine the center of the light streak. This method gives priority to the leading role of high-brightness pixels in the recognition process, while effectively suppressing noise interference from low gray values, thereby significantly enhancing the accuracy and robustness of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic flow chart of the method of the present invention;

[0026] Figure 2 A schematic diagram for selecting the direction of grayscale space dimensionality reduction of the present invention;

[0027] Figure 3 It is a schematic diagram of the gray space dimension reduction in the horizontal direction of the present invention;

[0028] Figure 4 Schematic diagram of grayscale feature Y1 of the present invention;

[0029] Figure 5 is the grayscale feature Y of the present invention j Schematic diagram of grayscale features;

[0030] Figure 6 It is the grayscale-polymorphic weighted dimension reduction weight image of the present invention;

[0031] Figure 7 The present invention uses Y j The schematic diagram of the implementation of the grayscale feature index matching method in the "grayscale feature set" as an example;

[0032] Figure 8 It is a working schematic diagram of the hardware device of the present invention. DETAILED DESCRIPTION

[0033] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0034] Before formally describing the present invention, the scheme of the present invention is first generally described for easy understanding.

[0035] Please refer to Figure 1 , Figure 1 It is a schematic flow diagram of the method of the present invention.

[0036] The present invention provides a high-precision calculation method for the center of a polymorphic weighted light stripe, comprising the following steps:

[0037] S1: construct grayscale space based on the distribution characteristics of the grayscale value of the current image;

[0038] It should be noted that the distribution characteristics based on grayscale values ​​are usually manifested as the grayscale values ​​in the central area being significantly higher, while the grayscale values ​​on both sides gradually decrease. The grayscale space is essentially a grayscale image, which is composed of the grayscale values ​​of pixels.

[0039] S2: Calculate the horizontal and vertical projections of the image in the grayscale space;

[0040] It should be noted that step S2 is specifically as follows:

[0041] S21. Calculate the horizontal projection as follows:

[0042] Among them, P y (j) represents the projection value of the jth column, M is the number of rows in the image, and I(i,j) is the grayscale value of the i-th row and j-th column in the image;

[0043] S22. Calculate the vertical projection as follows:

[0044] Among them, P x (i) represents the projection value of the i-th row, and N is the number of columns of the image.

[0045] S3: Determine the dimensionality reduction direction of the image according to the horizontal projection and the vertical projection, and perform image dimensionality reduction according to the selected direction;

[0046] It should be noted that in step S3, the specific rules for determining the dimensionality reduction direction are as follows:

[0047] Calculate the horizontal projection value P of each column in the image separately y And the vertical projection value P of each row x ; if P y The peak value exceeds P x , then it is determined that the light stripes are decomposed along the vertical (row) direction; conversely, if P x The peak value exceeds P y , then the light fringes are considered to be decomposed along the horizontal (column) direction.

[0048] In actual process, if P y The peak value is significantly higher than P x , it can be considered that the light stripes are mainly decomposed along the vertical (row) direction. x The peak value is significantly higher than P y , it is considered that the light fringes are mainly decomposed along the horizontal (column) direction.

[0049] Please refer to Figure 2-3 , Figure 2 It is a schematic diagram of selecting the direction of gray space dimensionality reduction of the present invention; Figure 3 It is a schematic diagram of the gray space dimension reduction in the horizontal direction of the present invention;

[0050] In step S3, the process of image dimensionality reduction is as follows:

[0051] S31, constructing a grayscale feature set; the grayscale feature set is composed of {Y j |j=1,2...N} consists of N grayscale features;

[0052] S32, perform image dimension reduction according to the determined direction. If the direction is horizontal, the corresponding grayscale feature Y j , the corresponding two-dimensional coordinates of the center of the light stripe are: Y j (H j ,V j )=(j,G j );

[0053] In the formula, H j V is the horizontal coordinate of the center of the grayscale light stripe; j G is the vertical coordinate of the center of the grayscale light stripe; j is the grayscale feature Y in the grayscale feature set j The vertical sub-pixel center coordinates; j is the grayscale feature Y j The grayscale feature index number in the horizontal direction.

[0054] S4: After dimensionality reduction, effective light fringes are identified based on the grayscale reference threshold Thr;

[0055] It should be noted that step S4 is specifically as follows:

[0056] If there are pixels in the current grayscale feature whose grayscale value is greater than or equal to the grayscale reference threshold Thr, it is considered that the grayscale feature corresponds to a valid light fringe; otherwise, it is determined that the grayscale feature does not contain a valid light fringe.

[0057] As an embodiment, by reducing the dimension of the "grayscale space", the problem of extracting the center of the light stripe is transformed from a two-dimensional matrix operation to a problem of accurately calculating the centers of N grayscale characteristic curves.

[0058] Considering that the grayscale distribution characteristics of light stripes are characterized by a gradient characteristic in which the grayscale value in the central area is significantly higher than that on both sides, and in order to effectively suppress the interference of ambient light and ensure the real-time measurement;

[0059] The present invention adopts a column fixed threshold algorithm. The grayscale reference threshold Thr is set based on the grayscale feature set, and the calculation method of Thr is as follows: Thr = 255 × Por;

[0060] Where Por is the grayscale ratio.

[0061] As an embodiment, the example in the present invention is only an implementation scheme of dimensionality reduction. In other cases, for example, when the influence of ambient light is significant, Por can be appropriately increased; on the contrary, when the influence of ambient light is small, Por can be reduced to optimize the "grayscale feature set". In the embodiment of the present invention, the grayscale ratio It can be obtained that Thr=153.

[0062] Subsequently, the present invention proposes an adaptive light streak recognition method based on the grayscale reference threshold Thr. The method compares the current grayscale feature with Thr. If there are pixels with grayscale values ​​greater than or equal to Thr in the current grayscale feature, the grayscale feature is considered to correspond to a valid light streak; otherwise, the grayscale feature is determined to not contain a valid light streak.

[0063] As an embodiment, the present invention will be discussed in the following two cases.

[0064] 1) In the first case, there is no light stripe distribution on the grayscale feature:

[0065] by Figure 3 Take the grayscale feature Y1 in as an example, Figure 4 The grayscale feature diagram of Y1 is shown. Since there is no light stripe grayscale distribution on Y1, its overall grayscale value is lower than the grayscale reference threshold Thr. In this case, it is determined that there is no valid center point on Y1, that is, no light stripe distribution is detected in the grayscale feature Y1, so the processing of this column is skipped and the next grayscale feature is identified.

[0066] Still Figure 3 The grayscale feature Y in j For example, Figure 5 Shows Y j Grayscale distribution diagram of j There is a light stripe distribution on the surface, which can be judged to contain a valid center point. j The grayscale value greater than the grayscale reference threshold Thr is retained, and the part less than Thr is removed, which is achieved through binarization. The binarization formula is as follows.

[0067]

[0068] In this formula, f(x,y) represents the grayscale value of the pixel after binarization. The output value I(x,y) means that the grayscale value of the pixel is retained, and the output value 0 means that the grayscale value of the pixel is set to zero. I(x,y) refers to the original grayscale value of the pixel located in the xth row and yth column in the grayscale feature image.

[0069] S5: For effective light stripes, the polymorphic weighted dimensionality reduction method is used to further obtain the center coordinates of the light stripes;

[0070] It should be noted that based on the principle of grayscale dimensionality reduction, in order to enhance the focus on high-brightness areas and reduce the interference of low-brightness areas, this paper proposes a "grayscale-polymorphic weighted dimensionality reduction formula". The core idea of ​​this formula is to normalize the current pixel grayscale value and then apply a polymorphic weighting function according to its grayscale range to highlight the importance of high grayscale value pixels while weakening the influence of low grayscale values ​​on the overall recognition results.

[0071] To this end, as an embodiment, the present invention sets corresponding weights W for different grayscale values ​​I.

[0072] Grayscale-polymorphic weighted dimensionality reduction image such as Figure 6 It should be noted that the grayscale dimension reduction method described in the present invention is only an embodiment, and can be flexibly adjusted and optimized according to specific scenarios and conditions in actual applications.

[0073] Specifically, a higher grayscale value represents a higher reliability of the sub-pixel coordinate point in the column direction of the "grayscale space", so the corresponding weight W also increases; conversely, a lower grayscale value represents a lower reliability, and the corresponding weight W also decreases. The specific dimensionality reduction formula is as follows.

[0074]

[0075] In the formula, W(G fm ,G fn ) means Y f The grayscale feature image is G-th in the horizontal direction fm Column and vertical direction G fn The weight corresponding to the grayscale value at the row, where f∈(1,N).

[0076] The setting of the intersection weight threshold T is based on the intersection of two linear weight curves to effectively distinguish the weight influence of high and low grayscale areas. Through this intersection, a reasonable weight distribution of different grayscale values ​​can be achieved. In addition, by pre-generating a weight table using the "grayscale-polymorphic weighted dimensionality reduction formula", the real-time processing capability of the method of the present invention is significantly improved.

[0077] Furthermore, the grayscale feature Y can be calculated by the following formula: j The horizontal light stripe center coordinate G in the “grayscale feature image” j :

[0078] In the formula, s represents the number of columns of the grayscale feature image that still retains valid image information in the horizontal direction after binarization, and W jm Represented as the grayscale feature image Y j In the grayscale characteristic curve of the mth column, the weight associated with the grayscale value is G jmRepresents the grayscale feature Y j The mth horizontal sub-pixel coordinate in the grayscale distribution diagram, G jn Represents the grayscale feature Y j The nth vertical sub-pixel coordinate in the grayscale distribution diagram, G j That is the grayscale feature Y j The sub-pixel center coordinate in the vertical direction of the "grayscale space".

[0079] S6: Based on the center coordinates of the light streaks, the grayscale feature index matching method is used to obtain the light streak center coordinate extraction model.

[0080] It should be noted that step S6 is specifically as follows:

[0081] S61, after obtaining Y j The vertical coordinate G of the center of the grayscale space light stripe j At the same time, match the index number j of the current grayscale feature in the horizontal direction;

[0082] S62, light streak center coordinate Y j (H j ,V j ) is matched by the following formula: j (H j ,V j )=(j,G j );

[0083] S63, after traversing and calculating the N grayscale features of the grayscale feature set, a set {m} is obtained, and finally a high-real-time extraction model of the center coordinates of the grayscale space light stripes is constructed: {m} = {P k (R k ,C k )|j=1,2,K,N}.

[0084] As an embodiment, the calculation of all grayscale feature center points in the "grayscale feature set" can be realized by looping. j For example, when obtaining Y j The vertical coordinate G of the center of the "gray space" light stripe j At the same time, match the horizontal index number j of the current grayscale feature. The center coordinate Y of the light stripe j (H j ,V j ) can be matched by the following formula: j (H j ,V j )=(j,G j ).

[0085] Please refer to Figure 7 , Figure 7 Shown in Y j Schematic diagram of the implementation of the grayscale feature index matching method in the grayscale feature set taking as an example.

[0086] After traversing and calculating N grayscale features of the “grayscale feature set”, the set {m} can be obtained, and finally a high-real-time extraction model for the center coordinates of the light stripes in the “grayscale space” can be constructed.

[0087] By traversing and calculating the N grayscale features in the “grayscale feature set”, the set {m} can be obtained as follows: {m} = {P k (R k ,C k )|j=1,2,K,N}, thereby constructing a real-time “grayscale space” light stripe center coordinate extraction model.

[0088] In addition, the accuracy and stability of light streak detection are effectively improved by using a calculation method based on the intersection weight threshold T to determine the center of the light streak. This method gives priority to the leading role of high-brightness pixels in the recognition process, while effectively suppressing noise interference from low gray values, thereby significantly enhancing the accuracy and robustness of the algorithm.

[0089] See also Figure 8 , Figure 8 4 is a schematic diagram of the working of the hardware device of an embodiment of the present invention, wherein the hardware device specifically comprises: a polymorphic weighted light stripe center high-precision calculation device 401, a processor 402 and a storage medium 403.

[0090] A high-precision calculation device 401 for the center of a polymorphic weighted light stripe: The high-precision calculation device 401 for the center of a polymorphic weighted light stripe implements the high-precision calculation method for the center of a polymorphic weighted light stripe.

[0091] Processor 402: The processor 402 loads and executes the instructions and data in the storage medium 403 to implement the high-precision calculation method of the center of a polymorphic weighted light stripe.

[0092] Storage medium 403: the storage medium 403 stores instructions and data; the storage medium 403 is used to implement the high-precision calculation method of the center of a polymorphic weighted light stripe.

[0093] The beneficial effects of the present invention are:

[0094] 1. A dimensionality reduction model based on the two-dimensional grayscale matrix of "grayscale space" was constructed. By decomposing it into an ordered "grayscale feature set", the problem of extracting the two-dimensional coordinates of the center of the light stripe in the "grayscale space" was transformed into the problem of high-precision calculation of the grayscale feature center point in the "grayscale feature set" and the grayscale feature set sequence number matching;

[0095] 2. The grayscale distribution characteristics and mechanisms of each grayscale feature in the "grayscale feature set" are discussed, and a "high-precision calculation model for grayscale feature center of light stripe dimensionality reduction based on polymorphic weighted model" is proposed. This model can realize high-precision calculation of the grayscale feature center point in the "grayscale feature set";

[0096] 3. A traversal calculation model of the "grayscale feature set" was constructed; by traversing the "grayscale feature set" once, the grayscale feature sequence number and the grayscale feature center point can be quickly matched. Compared with traditional two-dimensional image processing technology (including convolution, refinement and morphological methods), this method effectively reduces the computational complexity, improves the computational efficiency, and significantly improves the real-time performance;

[0097] 4. The accuracy and stability of light streak detection are effectively improved by using a calculation method based on the intersection weight threshold T to determine the center of the light streak. This method gives priority to the leading role of high-brightness pixels in the recognition process, while effectively suppressing noise interference from low gray values, thereby significantly enhancing the accuracy and robustness of the algorithm.

[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A high-precision calculation method for the center of a polymorphic weighted light stripe, characterized in that: The method comprises the following steps: S1: construct grayscale space based on the distribution characteristics of the grayscale value of the current image; S2: Calculate the horizontal and vertical projections of the image in the grayscale space; S3: Determine the dimensionality reduction direction of the image according to the horizontal projection and the vertical projection, and perform image dimensionality reduction according to the selected direction; S4: After dimensionality reduction, effective light fringes are identified based on the grayscale reference threshold Thr; S5: For effective light stripes, the polymorphic weighted dimensionality reduction method is used to further obtain the center coordinates of the light stripes; S6: Based on the center coordinates of the light streaks, the grayscale feature index matching method is used to obtain the light streak center coordinate extraction model.

2. A high-precision calculation method for the center of a polymorphic weighted light stripe according to claim 1, characterized in that: Step S2 is specifically as follows: S21. Calculate the horizontal projection as follows: Among them, P y (j) represents the projection value of the jth column, M is the number of rows in the image, and I(i,j) is the grayscale value of the i-th row and j-th column in the image; S22. Calculate the vertical projection as follows: Among them, P x (i) represents the projection value of the i-th row, and N is the number of columns of the image.

3. A high-precision calculation method for the center of a polymorphic weighted light stripe according to claim 1, characterized in that: In step S3, the specific rules for determining the dimensionality reduction direction are as follows: Calculate the horizontal projection value P of each column in the image separately y And the vertical projection value P of each row x ; if P y The peak value exceeds P x , then the light stripes are determined to be decomposed in the vertical direction; on the contrary, if P x The peak value exceeds P y , then the light fringes are considered to be decomposed along the horizontal direction.

4. A high-precision calculation method for the center of a polymorphic weighted light stripe as claimed in claim 1, characterized in that: In step S3, the process of image dimensionality reduction is as follows: S31, constructing a grayscale feature set; the grayscale feature set is composed of {Y j |j=1,2...N} consists of N grayscale features; S32, perform image dimension reduction according to the determined direction. If the direction is horizontal, the corresponding grayscale feature Y j , and the corresponding two-dimensional coordinates of the center of the light stripe are: Y j (H j ,V j )=(j,G j ) In the formula, H j V is the horizontal coordinate of the center of the grayscale light stripe; j G is the vertical coordinate of the center of the grayscale light stripe; j is the grayscale feature Y in the grayscale feature set j The vertical sub-pixel center coordinates; j is the grayscale feature Y j The grayscale feature index number in the horizontal direction.

5. A high-precision calculation method for the center of a polymorphic weighted light stripe as claimed in claim 1, characterized in that: Step S4 is specifically as follows: If there are pixels in the current grayscale feature whose grayscale value is greater than or equal to the grayscale reference threshold Thr, it is considered that the grayscale feature corresponds to a valid light streak; otherwise, it is determined that the grayscale feature does not contain a valid light streak.

6. A high-precision calculation method for the center of a polymorphic weighted light stripe as claimed in claim 5, characterized in that: The grayscale reference threshold is calculated as follows: Thr=255×Por, where Por is the grayscale ratio.

7. A high-precision calculation method for the center of a polymorphic weighted light stripe according to claim 1, characterized in that: The polymorphic weighted dimensionality reduction method in step S5 is specifically as follows: The corresponding weight W is set for different gray values ​​I, as shown below: In the formula, W(G fm ,G fn ) means Y f The grayscale feature image is G-th in the horizontal direction fm Column and vertical direction G fn The weight corresponding to the gray value at the row, where f∈(1,N); The grayscale feature Y is calculated by the following formula j The horizontal light stripe center coordinate G in the grayscale feature image j : Where s represents the number of columns of the grayscale feature image that still retains valid image information in the horizontal direction after binarization, and W jm Represented as the grayscale feature image Y j In the grayscale characteristic curve of the mth column, the weight associated with the grayscale value is G jm Represents the grayscale feature Y j The mth horizontal sub-pixel coordinate in the grayscale distribution diagram, G jn Represents the grayscale feature Y j The nth vertical sub-pixel coordinate in the grayscale distribution diagram, G j That is the grayscale feature Y j The sub-pixel center coordinates in the vertical direction of the grayscale space.

8. A high-precision calculation method for the center of a polymorphic weighted light stripe as claimed in claim 4, characterized in that: Step S6 is specifically as follows: S61, after obtaining Y j The vertical coordinate G of the center of the grayscale space light stripe j At the same time, match the index number j of the current grayscale feature in the horizontal direction; S62, light streak center coordinate Y j (H j ,V j ) is matched by the following formula: j (H j ,V j )=(j,G j ); S63, after traversing and calculating the N grayscale features of the grayscale feature set, a set {m} is obtained, and finally a high-real-time extraction model of the center coordinates of the grayscale space light stripes is constructed: {m} = {P k (R k ,C k )|j=1,2,K,N}.

9. A storage medium, characterized in that: The storage medium stores instructions and data for implementing a high-precision calculation method for the center of a polymorphic weighted light stripe as described in any one of claims 1 to 8.

10. A high-precision calculation device for the center of a polymorphic weighted light stripe, characterized in that: include: Processor and storage medium; the processor loads and executes instructions and data in the storage medium to implement a high-precision calculation method for the center of a polymorphic weighted light stripe as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • A method for extracting the linear structured light center of a reflective nuclear fuel rod surface

    CN111553874B