Adaptive structure light fringe center extraction method and system based on linear stretching

By adopting an adaptive structured light fringe center extraction method based on linear stretching, the problems of extraction accuracy and real-time performance under the influence of environmental factors are solved, achieving faster processing speed and higher adaptability and accuracy.

CN114092536BActive Publication Date: 2025-12-12GUANGDONG AOPUTE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111417314.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2025-12-12
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

Existing structured light fringe center extraction methods suffer from low extraction accuracy and insufficient real-time performance when faced with uneven brightness and fringe width due to environmental factors. In particular, the gray-scale centroid method suffers from reduced accuracy and insufficient adaptability and real-time performance when there is high brightness interference and insignificant gray-scale value differences.

Method used

An adaptive structured light stripe center extraction method based on linear stretching is adopted. By threshold segmentation, isolated pixel removal, linear stretching and Gaussian filter denoising, and square weighted gray-level centroid method to extract sub-pixel center coordinates, the adaptability and accuracy are improved.

Benefits of technology

It achieves faster processing speed and higher adaptability, improves the extraction accuracy of the fringe center, and can maintain high accuracy and real-time performance under environmental changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114092536B_ABST
    Figure CN114092536B_ABST
Patent Text Reader

Abstract

The application discloses a kind of self-adapting structure light stripe center extraction method and system based on linear stretching, which comprises: according to the average gray value g m And mean square deviation g s The structure light stripe image f is threshold segmented, to obtain the segmented image f1;Isolated pixel points in the segmented image f1 are eliminated, to obtain the eliminated image f2;Linear stretching is carried out to the eliminated image f2, to obtain the stretched image f h ; The stretched image f h Adopting gaussian filter carries out adaptive denoising processing, to obtain the denoised image f g ; The sub-pixel center point coordinates P g (x c ,y c ) of stripe center of the denoised image f c Are extracted using square weighted gray gravity method, and output.The application has faster processing speed and higher adaptability, can effectively increase the weight near stripe center, make weight mainly concentrate on the pixel with highest gray value, and then improve the extraction accuracy of stripe center.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine vision, and in particular to a linear stretching-based adaptive structured light stripe center extraction method and system. BACKGROUND

[0002] Structured light vision measurement systems are widely used in road defect detection, medical diagnosis, industrial object defect detection and other aspects due to their advantages of active controllability, high precision and high real-time performance. Among them, structured light stripe center extraction is one of the key technologies in structured light vision measurement systems, and the extraction precision directly affects the precision of the entire measurement system.

[0003] In industrial applications, the light band generated by the laser line structured light often shows uneven brightness distribution and uneven light stripe width distribution due to environmental factors, which increases the difficulty of stripe center extraction.

[0004] Currently, the methods widely used in structured light stripe center extraction include extreme value method, gray gravity center method, direction template method and Steger algorithm. Compared with the extreme value method, the gray gravity center method has better precision. Compared with the direction template method and Steger algorithm, it has low complexity and high extraction speed, and can meet the real-time requirements of industrial applications, so it is widely used and improved. The calculation formula is as follows:

[0005]

[0006] In the formula, L is the light stripe width, y c is the gray gravity point, and f(x, y) is the gray value of the point.

[0007] According to the above formula, the disadvantages of the gray gravity center method can be summarized as follows: first, when there are unconnected high-light interference points in the same column of pixels, the extraction precision is low; second, when the gray value near the ideal center point is not significantly different from the edge gray value, the center extraction precision is reduced.

[0008] In the improvement of the prior art, on the one hand, the original gray value is directly added to the difference with the average gray value to construct a linear relationship for gray value stretching processing, and then the Steger algorithm is used to extract the center line, which achieves a certain extraction precision, but the linear stretching processing effect is not obvious and the parameters cannot be adaptively determined, and the algorithm speed is difficult to meet the real-time performance; on the other hand, the light band width value and the light band boundary are obtained by using adaptive binarization processing, and then the gray gravity center method is used to calculate the light band center position, so as to obtain higher precision and adaptability, but the repeated threshold selection and Gaussian fitting result in insufficient real-time performance, and the light band is prone to broken line after binarization.

[0009] Therefore, it becomes one of the important topics for the person skilled in the art to research a new structure light stripe center extraction method or to improve the prior art.

[0010] The above information is presented as background information only to assist with an understanding of the present disclosure. No determination or admission is made as to any portion of the above information as having predictive value in relation to the prior art. SUMMARY

[0011] The present application provides a linear stretching-based adaptive structure light stripe center extraction method and system to solve the problems of the prior art.

[0012] To achieve the above object, the present application provides the following technical solutions.

[0013] In a first aspect, the present application provides a linear stretching-based adaptive structure light stripe center extraction method, which comprises the following steps.

[0014] According to the average gray value g m and the mean square deviation g s of the structure light stripe image f, performing threshold segmentation on the structure light stripe image f to obtain a segmented image f1.

[0015] Removing isolated pixel points in the segmented image f1 to obtain a removed image f2.

[0016] Performing linear stretching on the removed image f2 to obtain a stretched image f h .

[0017] Using a Gaussian filter to perform adaptive denoising processing on the stretched image f h to obtain a denoised image f g .

[0018] Using a square weighted gray gravity center method to extract the sub-pixel center point coordinates P c (x c ,y c ) of the stripe center of the denoised image f g and output.

[0019] Further, in the linear stretching-based adaptive structure light stripe center extraction method, the step of performing threshold segmentation on the structure light stripe image f according to the average gray value g m and the mean square deviation g s of the structure light stripe image f to obtain a segmented image f1 comprises:

[0020] Calculating the average gray value g m and the mean square deviation g s of the structure light stripe image f.And define the image segmentation threshold T f For T f = g m + g s And the gray value g of each point of the light fringe image f f For g f = f(i,j);

[0021] According to the image segmentation threshold T f Adaptive threshold segmentation is performed on the structured light fringe image f to obtain the segmented image f1, and the calculation formula is as follows:

[0022]

[0023] Further, in the adaptive structured light fringe center extraction method based on linear stretching, the step of removing isolated pixel points in the segmented image f1 to obtain the removed image f2 includes:

[0024] Remove isolated pixel points in the segmented image f1;

[0025] If f1(i-1,j) = 255 and f1(i+1,j) = 255, then f1(i,j) = 255, if f1(i-1,j) = 0 and f1(i+1,j) = 0, then f1(i,j) = 0, and the removed image f2 is obtained.

[0026] Further, in the adaptive structured light fringe center extraction method based on linear stretching, the step of performing linear stretching on the removed image f2 to obtain the stretched image f h includes:

[0027] The gray values in the removed image f2 are counted by column to obtain P i,j , and the gray values in each column of the removed image f2 are summed and averaged to obtain the average gray value P a of each column.

[0028] The removed image f2 is subjected to power operation to adjust the gray value to obtain the adjusted image f3, and the calculation formula is as follows:

[0029] f3(i,j) = f2(i,j) - (f2(i,j)) m , 0 < m < 1.

[0030] In the formula, m is obtained according to the average gray value P a of each column by establishing a piecewise function, and the calculation formula is as follows:

[0031]

[0032] Summing up the gray value of each column in the adjusted image f3 to obtain the average gray value P of each column b ;

[0033] Construct a linear stretching model to obtain the stretched image f h , and the calculation formula is as follows:

[0034]

[0035] Further, in the adaptive structured light fringe center extraction method based on linear stretching, the step of performing adaptive denoising processing on the stretched image f h using a Gaussian filter to obtain a denoised image f g includes:

[0036] Let the fringe line width be L i , and the corresponding Gaussian filter standard deviation be g i , and the calculation formula is as follows:

[0037]

[0038] To improve the calculation speed, the final output Gaussian filter standard deviation calculation formula is as follows:

[0039]

[0040] In the formula, the value of j is n / 4, 2*n / 4 and 3*n / 4 respectively;

[0041] According to the characteristics of the Gaussian function, the filter kernel calculation formula is as follows:

[0042] k s =(20*g-7) / 3;

[0043] The stretched image f h is subjected to adaptive denoising processing using a Gaussian filter to obtain a denoised image f g .

[0044] Further, in the adaptive structured light fringe center extraction method based on linear stretching, the step of extracting the sub-pixel center point coordinates P g (x c ,y c ) of the fringe center of the denoised image f c using the square weighted gray gravity method and outputting includes:

[0045] Construct a square weighted gray gravity model;

[0046] The square weighted gray gravity model is used to process the denoised image f gThe sub-pixel center point coordinates P of the stripe center c (x c ,y c Extraction is performed using the following formula:

[0047]

[0048] Secondly, embodiments of the present invention provide an adaptive structured light stripe center extraction system based on linear stretching, the system comprising:

[0049] The threshold segmentation module is used to segment the image based on the average gray value g of the structured light stripe image f. m and mean square deviation g s The structured light stripe image f is subjected to threshold segmentation to obtain the segmented image f1;

[0050] An isolated pixel removal module is used to remove isolated pixels in the segmented image f1 to obtain the removed image f2.

[0051] The linear stretching module is used to linearly stretch the culled image f2 to obtain the stretched image f. h ;

[0052] The noise reduction module is used to process the stretched image f. h Adaptive denoising is performed using a Gaussian filter to obtain the denoised image f. g ;

[0053] The coordinate extraction module is used to extract the coordinates of the denoised image f using the square-weighted gray-level centroid method. g The sub-pixel center point coordinates P of the stripe center c (x c ,y c Extract and output the data.

[0054] Furthermore, in the adaptive structured light fringe center extraction system based on linear stretching, the threshold segmentation module is specifically used for:

[0055] Calculate the average gray value g of the structured light fringe image f. m and mean square deviation g s And define the image segmentation threshold T f For T f =g m +g s and the grayscale value g of each point in the light stripe image f f For g f = f(i,j);

[0056] According to the image segmentation threshold T fAdaptive threshold segmentation is performed on the structured light fringe image f to obtain a segmented image f1, and a calculation formula is as follows:

[0057]

[0058] Further, in the adaptive structured light fringe center extraction system based on linear stretching, the isolated point elimination module is specifically configured to:

[0059] Eliminate isolated pixels in the segmented image f1;

[0060] If f1(i-1,j) = 255 and f1(i+1,j) = 255, then f1(i,j) = 255, and if f1(i-1,j) = 0 and f1(i+1,j) = 0, then f1(i,j) = 0, to obtain an eliminated image f2.

[0061] Further, in the adaptive structured light fringe center extraction system based on linear stretching, the linear stretching module is specifically configured to:

[0062] Statistically obtain P from the gray values in the eliminated image f2 by column i,j , and average the gray values of each column in the eliminated image f2 to obtain the average gray value P of each column a .

[0063] Perform power operation on the eliminated image f2 to obtain an adjusted image f3, and a calculation formula is as follows:

[0064] f3(i,j) = f2(i,j) - (f2(i,j)) m , 0 < m < 1;

[0065] In the formula, m is obtained according to the average gray value P of each column a , and a calculation formula is as follows:

[0066]

[0067] Average the gray values of each column in the adjusted image f3 to obtain the average gray value P of each column b .

[0068] Construct a linear stretching model to obtain a stretched image f h , and a calculation formula is as follows:

[0069]

[0070] Further, in the adaptive structured light fringe center extraction system based on linear stretching, the denoising processing module is specifically configured to:

[0071] Let the stripe width be L i The corresponding standard deviation of the Gaussian filter is g. i The calculation formula is as follows:

[0072]

[0073] To improve computation speed, the formula for calculating the standard deviation of the final Gaussian filter is as follows:

[0074]

[0075] In the formula, the values ​​of j are n / 4, 2*n / 4 and 3*n / 4 respectively;

[0076] Based on the characteristics of the Gaussian function, the formula for calculating the filter kernel is as follows:

[0077] k s = (20*g-7) / 3;

[0078] For the stretched image f h Adaptive denoising is performed using a Gaussian filter to obtain the denoised image f. g .

[0079] Furthermore, in the aforementioned adaptive structured light fringe center extraction system based on linear stretching, the coordinate extraction module is specifically used for:

[0080] Construct a square-weighted gray-scale centroid model;

[0081] The square-weighted gray-level centroid model is used to denoise the image f. g The sub-pixel center point coordinates P of the stripe center c (x c ,y c Extraction is performed using the following formula:

[0082]

[0083] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0084] The present invention provides an adaptive structured light stripe center extraction method and system based on linear stretching, which has faster processing speed and higher adaptability. It can effectively increase the weight near the stripe center, so that the weight is mainly concentrated on the pixel with the highest gray value, thereby improving the extraction accuracy of the stripe center. Attached Figure Description

[0085] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only show some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without any creative effort.

[0086] Figure 1 is a flowchart of a linear stretching-based adaptive structured light stripe center extraction method provided by Embodiment One of the present application;

[0087] Figures 2-5 is a partial image of each processing stage in Embodiment One of the present application;

[0088] Figure 6 is a linear stretching-based gray value change curve diagram in Embodiment One of the present application;

[0089] Figure 7 is a result diagram of stripe center extraction in Embodiment One of the present application;

[0090] Figure 8 is a functional module diagram of a linear stretching-based adaptive structured light stripe center extraction system provided by Embodiment Two of the present application. DETAILED DESCRIPTION

[0091] In order to make the objectives, features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the following described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort are within the scope of protection of the present application.

[0092] In the description of the present application, it should be understood that when one component is considered to be "connected" to another component, it can be directly connected to the other component or there can be a component arranged in the middle. When one component is considered to be "arranged on" another component, it can be directly arranged on the other component or there can be a component arranged in the middle.

[0093] In addition, the terms "long", "short", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only used to facilitate the description of the present application, and do not indicate or imply that the device or element referred to must have this particular orientation, be constructed to operate in this particular orientation, and cannot be understood as a limitation of the present application.

[0094] The technical solutions of the present application will be further illustrated below with reference to the accompanying drawings and specific embodiments.

[0095] Embodiment one

[0096] In view of the defects of the existing light stripe center extraction technology, the present inventors, based on their rich practical experience and professional knowledge in the industry for many years, and combined with the use of theory, actively researched and innovated to create a practical light stripe center extraction technology, making it more practical. After continuous research, design, repeated trial and improvement, the present application with practical value is finally created.

[0097] Please refer to Figure 1 , Figure 1 is a flowchart of an adaptive structured light stripe center extraction method based on linear stretching disclosed by the embodiment of the present application. The method is suitable for the scene of extracting the light stripe center of structured light. The method is executed by an adaptive structured light stripe center extraction system based on linear stretching, which can be realized by software and / or hardware. As shown in Figure 1 , the adaptive structured light stripe center extraction method based on linear stretching can include the following steps:

[0098] S101, according to the average gray value g m and the mean square deviation g s of the structured light stripe image f, performing threshold segmentation on the structured light stripe image f to obtain a segmented image f1.

[0099] It should be noted that for a structured light stripe image f, as shown in Figure 2 , first, according to the average gray value g m and the mean square deviation g s of the image itself, the image segmentation threshold T f is determined, and then the image is segmented using the threshold.

[0100] Preferably, in the present embodiment, the step S101 can be further refined as follows:

[0101] The average gray value g m and the mean square deviation g s of the structured light stripe image f are calculated, and the image segmentation threshold T f is defined as T f = g m + g s , and the gray value g f of each point of the light stripe image f is g f = f(i,j);

[0102] According to the image segmentation threshold T fAdaptive threshold segmentation is performed on the structured light fringe image f to obtain a segmented image f1 (as shown in Figure 3 The calculation formula is as follows:

[0103]

[0104] In S102, isolated pixel points in the segmented image f1 are removed to obtain a removed image f2.

[0105] It should be noted that removing the isolated pixel points in the segmented image f1 in this embodiment can reduce the sudden change of the gray value near the fringe center and the fringe edge. In addition, in order to improve the adaptability, only the case where the gray values before and after the abnormal position are both 255 or both 0 is processed.

[0106] Preferably, in this embodiment, the step S102 can be further refined as follows:

[0107] The isolated pixel points in the segmented image f1 are removed.

[0108] If f1(i-1, j) = 255 and f1(i+1, j) = 255, then f1(i, j) = 255, and if f1(i-1, j) = 0 and f1(i+1, j) = 0, then f1(i, j) = 0, to obtain the removed image f2, as shown in Figure 4 .

[0109] In S103, linear stretching is performed on the removed image f2 to obtain a stretched image f h .

[0110] It should be noted that linear gray value stretching is performed on the image after removing the isolated points in this embodiment, so as to improve the gray value near the fringe center, make it have a higher weight, and make the high gray value part have better noise resistance, while reducing the gray value of the edge points. The linear stretching gray value change curve is as shown in Figure 6 .

[0111] Preferably, in this embodiment, the step S103 can be further refined as follows:

[0112] The gray values in the removed image f2 are counted by column to obtain P i,j , and the gray values of each column in the removed image f2 are summed and averaged to obtain the average gray value P a of each column.

[0113] Power operation is performed on the removed image f2 to obtain an adjusted image f3, and the calculation formula is as follows:

[0114] f3(i,j) = f2(i,j) - (f2(i,j)) m , 0 < m < 1;

[0115] In the formula, m is established according to the average gray value P of each column a The calculation formula is as follows:

[0116]

[0117] The average gray value P of each column is obtained by adding and averaging the gray value of each column in the adjusted image f3 b ;

[0118] A linear stretching model is constructed to obtain the stretched image f h (as shown in Figure 5 The calculation formula is as follows:

[0119]

[0120] S104, the stretched image f h is adaptively denoised by a Gaussian filter to obtain a denoised image f g .

[0121] It should be noted that the linear stretched image is adaptively denoised by a Gaussian filter in this embodiment. In order to improve the overall operation speed, the line width of one fourth, two fourths and three fourths of the laser stripe is selected as a parameter to calculate the Gaussian filter standard deviation, and then the convolution kernel size is back calculated according to the standard deviation to improve the adaptability.

[0122] Preferably, in this embodiment, the step S104 can be further refined as follows:

[0123] Let the stripe line width be L i , and the corresponding Gaussian filter standard deviation be g i The calculation formula is as follows:

[0124]

[0125] In order to improve the calculation speed, the final output Gaussian filter standard deviation calculation formula is as follows:

[0126]

[0127] In the formula, the value of j is n / 4, 2*n / 4 and 3*n / 4 respectively;

[0128] According to the characteristics of the Gaussian function, the filter kernel calculation formula is as follows:

[0129] k s= (20*g-7) / 3;

[0130] to the stretched image f h , an adaptive denoising processing is performed by using a Gaussian filter to obtain a denoised image f g .

[0131] S105, the sub-pixel center point coordinates P g (x c ,y c ) of the stripe center of the denoised image f c are extracted, and output.

[0132] It should be noted that the extraction result of the stripe center is as shown in Figure 7 .

[0133] Preferably, in the embodiment, the step S105 can be further refined as follows:

[0134] A square weighted gray center model is constructed;

[0135] The sub-pixel center point coordinates P c (x c ,y c ) of the stripe center of the denoised image f g are extracted by using the square weighted gray center model, and the calculation formula is as follows:

[0136]

[0137] Compared with the gray linear stretching model in the prior art, the adaptive structured light stripe center extraction method based on linear stretching provided by the embodiment of the present application has a faster processing speed, and can filter out better parameters without iteration for multiple times. Meanwhile, the existing linear stretching model has the same parameter selection, which leads to low adaptability and unobvious gray value stretching effect. However, the present application selects parameters according to the gray mean value of each column, and processes different gray values by using different parameters, which can achieve better effect and improve adaptability. In addition, the present application uses the Gaussian filter for denoising, which can determine different parameters according to different stripe line widths. Compared with the mean filter and the median filter in the prior art, the present application has better adaptability, and the ideal laser stripe of each column conforms to the Gaussian distribution. Meanwhile, the square weighted weight set in the present application can effectively increase the weight near the stripe center, so that the weight is mainly concentrated on the pixel with the highest gray value, thereby improving the extraction precision of the stripe center.

[0138] Embodiment Two

[0139] Please refer to the accompanying Figure 8 , Figure 8A functional module schematic diagram of a self-adaptive structured light fringe center extraction system based on linear stretching provided for the second embodiment of the present application is suitable for executing the self-adaptive structured light fringe center extraction method based on linear stretching provided by the embodiment of the present application. The system specifically comprises the following modules:

[0140] A threshold segmentation module 201 is configured to segment the structured light fringe image f according to the average gray value g m and the mean square deviation g s of the structured light fringe image f, to obtain a segmented image f1.

[0141] An isolated elimination module 202 is configured to eliminate isolated pixel points in the segmented image f1, to obtain an eliminated image f2.

[0142] A linear stretching module 203 is configured to perform linear stretching on the eliminated image f2, to obtain a stretched image f h .

[0143] A denoising processing module 204 is configured to perform adaptive denoising processing on the stretched image f h using a Gaussian filter, to obtain a denoised image f g .

[0144] A coordinate extraction module 205 is configured to extract sub-pixel center point coordinates P g (x c ,y c ) of fringe centers of the denoised image f c using a square weighted gray gravity center method, and output.

[0145] Preferably, the threshold segmentation module 201 is specifically configured to:

[0146] calculate the average gray value g m and the mean square deviation g s of the structured light fringe image f, and define an image segmentation threshold T f as T f =g m +g s and the gray value g f of each point of the light fringe image f as g f =f(i,j).

[0147] The structured light fringe image f is adaptively segmented according to the image segmentation threshold T f , and the calculation formula of the segmented image f1 is as follows:

[0148]

[0149] Preferably, the isolated elimination module 202 is specifically used for:

[0150] eliminating isolated pixels in the segmented image f1;

[0151] If f1(i-1,j)=255 and f1(i+1,j)=255, then f1(i,j)=255, if f1(i-1,j)=0 and f1(i+1,j)=0, then f1(i,j)=0, and the eliminated image f2 is obtained.

[0152] Preferably, the linear stretching module 203 is specifically used for:

[0153] counting the gray values in the eliminated image f2 by column to obtain P i,j , and summing and averaging the gray values of each column in the eliminated image f2 to obtain the average gray value P a of each column.

[0154] performing power operation on the eliminated image f2 to obtain the adjusted image f3, and the calculation formula is as follows:

[0155] f3(i,j)=f2(i,j)-(f2(i,j)) m , 0

[0156] In the formula, m is obtained according to the average gray value P a of each column by establishing a piecewise function, and the calculation formula is as follows:

[0157]

[0158] summing and averaging the gray values of each column in the adjusted image f3 to obtain the average gray value P b of each column.

[0159] constructing a linear stretching model to obtain the stretched image f h , and the calculation formula is as follows:

[0160]

[0161] Preferably, the denoising processing module 204 is specifically used for:

[0162] Let the stripe line width be L i , and the corresponding Gaussian filter standard deviation be g i , and the calculation formula is as follows:

[0163]

[0164] To improve the calculation speed, the final output Gaussian filter standard deviation calculation formula is as follows:

[0165]

[0166] In the formula, the value of j is n / 4, 2*n / 4 and 3*n / 4 respectively;

[0167] According to the characteristics of the Gaussian function, the filter kernel calculation formula is as follows:

[0168] k s =(20*g-7) / 3;

[0169] The stretched image f h is subjected to adaptive denoising processing by using a Gaussian filter to obtain a denoised image f g .

[0170] Preferably, the coordinate extraction module 205 is specifically used for:

[0171] Constructing a square weighted gray gravity center model;

[0172] The sub-pixel center point coordinates P c (x c ,y c ) of the stripe center of the denoised image f g are extracted by using the square weighted gray gravity center model, and the calculation formula is as follows:

[0173]

[0174] The linear stretching based adaptive structured light stripe center extraction system provided by the embodiment has faster processing speed and higher adaptability, can effectively increase the weight near the stripe center, make the weight mainly concentrate on the pixel with the highest gray value, and further improve the extraction precision of the stripe center.

[0175] The above-described embodiments are provided for the purpose of illustration and description. It is not intended to limit or restrict the disclosure to the exact embodiments disclosed, and changes and modifications can be made without departing from the scope and nature of the disclosure. Individual elements or features of a particular embodiment are generally not limited to that particular embodiment, but, where applicable, are interchangeable and can be used with other selected embodiments. In many aspects, the same element or feature can also be changed. Such changes are not considered to be a departure from the disclosure, and all such modifications are intended to be included within the scope of the disclosure.

[0176] Example embodiments are provided so as to fully disclose the present disclosure and to thereby enable those in the art to best utilize the same. The example embodiments are provided in order to enable those in the art to fully and completely understand the present disclosure and to convey the full scope of the example embodiments. Numerous specific details are set forth in order to provide a thorough understanding of the example embodiments. It will be apparent, however, to those skilled in the art, that the example embodiments can be practiced without using these specific details. In other instances, well known methods have not been described in detail in order to avoid unnecessarily obscuring the present disclosure. Unless otherwise specified, a structural or functional equivalent of a particular feature can be substituted.

[0177] The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order in which they are described. It is also to be understood that additional or alternative steps can be employed.

[0178] When an element or layer is referred to as being "on," "engaged to," "connected to" or "coupled to" another element or layer, it can be directly on, engaged, connected or coupled to the other element or layer, or intervening elements or layers can be present. In contrast, when an element or layer is referred to as being "directly on," "directly engaged to," "directly connected to" or "directly coupled to" another element or layer, there are no intervening elements or layers present. Other words used to describe the relationship between elements should be interpreted in a like fashion (e.g., "between" versus "directly between," "adjacent" versus "directly adjacent," etc.). The term "and / or" as used herein refers to and encompasses any and all combinations of one or more of the associated listed items. Although the terms first, second, third, etc. can be used herein to describe various elements, components, regions, layers and / or sections, these elements, components, regions, layers and / or sections should not be limited by these terms. These terms can be only used to distinguish one element, component, region, layer or section from another element, component, region, layer or section. Terms such as "first," "second," and other numerical terms when used herein do not permit a sequence or order to be implied unless explicitly stated by the context. Thus, a first element, component, region, layer or section discussed below could be later than a second element, component, region, layer or section in discussion, without departing from the teachings of the example embodiments.

[0179] Spatially relative terms, such as "inner," "outer," "beneath," "below," "lower," "above," "upper," and the like, can be used herein for ease of description to describe one element or feature's relationship to another element(s) or feature(s) as illustrated in the figures. Spatially relative terms can be intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, elements described as "below" or "beneath" other elements or features would then be oriented "above" the other elements or features. Thus, the example term "below" can encompass both an orientation of above and below. The device can be otherwise oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted accordingly.

Claims

1. A method for extracting the center of structured light stripes based on linear stretching, characterized in that, The method includes: Based on the average gray value g of the structured light fringe image f m and mean square deviation g s The structured light stripe image f is subjected to threshold segmentation to obtain the segmented image f1; Isolated pixels in the segmented image f1 are removed to obtain the removed image f2; The removed image f2 is linearly stretched to obtain the stretched image f. h ; For the stretched image f h Adaptive denoising is performed using a Gaussian filter to obtain the denoised image f. g ; The denoised image f is processed using the square-weighted gray-level centroid method. g The sub-pixel center point coordinates P of the stripe center c (x c ,y c Extract and output the data.

2. The adaptive structured light fringe center extraction method based on linear stretching according to claim 1, characterized in that, The average gray value g of the structured light stripe image f is used as the basis. m and mean square deviation g s The steps of thresholding the structured light stripe image f to obtain the segmented image f1 include: Calculate the average gray value g of the structured light fringe image f. m and mean square deviation g s And define the image segmentation threshold T f For T f =g m +g s and the grayscale value g of each point in the light stripe image f f For g f = f(i,j); According to the image segmentation threshold T f The structured light stripe image f is subjected to adaptive thresholding segmentation, and the calculation formula for the segmented image f1 is as follows:

3. The adaptive structured light fringe center extraction method based on linear stretching according to claim 2, characterized in that, The step of removing isolated pixels from the segmented image f1 to obtain the removed image f2 includes: Isolated pixels in the segmented image f1 are removed; If f1(i-1,j) = 255 and f1(i+1,j) = 255, then f1(i,j) = 255. If f1(i-1,j) = 0 and f1(i+1,j) = 0, then f1(i,j) = 0, resulting in the removed image f2.

4. The adaptive structured light fringe center extraction method based on linear stretching according to claim 3, characterized in that, The removed image f2 is linearly stretched to obtain the stretched image f. h The steps include: P is obtained by statistically analyzing the gray values ​​in the removed image f2 column by column. i,j The average gray value P of each column in the removed image f2 is obtained by summing and averaging the gray values ​​of each column. a ; The removed image f2 is subjected to an exponentiation operation, and the grayscale is adjusted to obtain the adjusted image f3. The calculation formula is as follows: f3(i,j)=f2(i,j)-(f2(i,j)) m ,0<m<1; In the formula, m is based on the average gray value P of each column. a To obtain the piecewise function, the calculation formula is as follows: The average grayscale value P of each column in the adjusted image f3 is obtained by summing and averaging the grayscale values ​​of each column. b ; Construct a linear stretching model to obtain the stretched image f h The calculation formula is as follows:

5. The adaptive structured light fringe center extraction method based on linear stretching according to claim 4, characterized in that, The stretched image f h Adaptive denoising is performed using a Gaussian filter to obtain the denoised image f. g The steps include: Let the stripe width be L i The corresponding standard deviation of the Gaussian filter is g. i The calculation formula is as follows: To improve computational speed, the formula for calculating the standard deviation of the final Gaussian filter is as follows: In the formula, the values ​​of j are n / 4, 2*n / 4 and 3*n / 4 respectively; Based on the characteristics of the Gaussian function, the formula for calculating the filter kernel is as follows: k s =(20*g-7) / 3; For the stretched image f h Adaptive denoising is performed using a Gaussian filter to obtain the denoised image f. g .

6. The adaptive structured light fringe center extraction method based on linear stretching according to claim 5, characterized in that, The square-weighted gray-level centroid method is used to denoise the image f. g The sub-pixel center point coordinates P of the stripe center c (x c ,y c The steps for extracting and outputting include: Construct a square-weighted gray-scale centroid model; The square-weighted gray-level centroid model is used to denoise the image f. g The sub-pixel center point coordinates P of the stripe center c (x c ,y c Extraction is performed using the following formula:

7. An adaptive structured light fringe center extraction system based on linear stretching, characterized in that, The system includes: The threshold segmentation module is used to segment the image based on the average gray value g of the structured light stripe image f. m and mean square deviation g s The structured light stripe image f is subjected to threshold segmentation to obtain the segmented image f1; An isolated pixel removal module is used to remove isolated pixels in the segmented image f1 to obtain the removed image f2. The linear stretching module is used to linearly stretch the culled image f2 to obtain the stretched image f. h ; The noise reduction module is used to process the stretched image f. h Adaptive denoising is performed using a Gaussian filter to obtain the denoised image f. g ; The coordinate extraction module is used to extract the coordinates of the denoised image f using the square-weighted gray-level centroid method. g The sub-pixel center point coordinates P of the stripe center c (x c ,y c Extract and output the data.

8. The adaptive structured light fringe center extraction system based on linear stretching according to claim 7, characterized in that, The threshold segmentation module is specifically used for: Calculate the average gray value g of the structured light fringe image f. m and mean square deviation g s And define the image segmentation threshold T f For T f =g m +g s and the grayscale value g of each point in the light stripe image f f For g f = f(i,j); According to the image segmentation threshold T f The structured light stripe image f is subjected to adaptive thresholding segmentation, and the calculation formula for the segmented image f1 is as follows:

9. The adaptive structured light fringe center extraction system based on linear stretching according to claim 8, characterized in that, The isolated rejection module is specifically used for: Isolated pixels in the segmented image f1 are removed; If f1(i-1,j) = 255 and f1(i+1,j) = 255, then f1(i,j) = 255. If f1(i-1,j) = 0 and f1(i+1,j) = 0, then f1(i,j) = 0, resulting in the removed image f2.

10. The adaptive structured light fringe center extraction system based on linear stretching according to claim 9, characterized in that, The linear stretching module is specifically used for: P is obtained by statistically analyzing the gray values ​​in the removed image f2 column by column. i,j The average gray value P of each column in the removed image f2 is obtained by summing and averaging the gray values ​​of each column. a ; The removed image f2 is subjected to an exponentiation operation, and the grayscale is adjusted to obtain the adjusted image f3. The calculation formula is as follows: f3(i,j)=f2(i,j)-(f2(i,j)) m ,0<m<1; In the formula, m is based on the average gray value P of each column. a To obtain the piecewise function, the calculation formula is as follows: The average grayscale value P of each column in the adjusted image f3 is obtained by summing and averaging the grayscale values ​​of each column. b ; Construct a linear stretching model to obtain the stretched image f h The calculation formula is as follows:

11. The adaptive structured light fringe center extraction system based on linear stretching according to claim 10, characterized in that, The noise reduction module is specifically used for: Let the stripe width be L i The corresponding standard deviation of the Gaussian filter is g. i The calculation formula is as follows: To improve computation speed, the formula for calculating the standard deviation of the final Gaussian filter is as follows: In the formula, the values ​​of j are n / 4, 2*n / 4 and 3*n / 4 respectively; Based on the characteristics of the Gaussian function, the formula for calculating the filter kernel is as follows: k s =(20*g-7) / 3; For the stretched image f h Adaptive denoising is performed using a Gaussian filter to obtain the denoised image f. g .

12. The adaptive structured light fringe center extraction system based on linear stretching according to claim 11, characterized in that, The coordinate extraction module is specifically used for: Construct a square-weighted gray-scale centroid model; The square-weighted gray-level centroid model is used to denoise the image f. g The sub-pixel center point coordinates P of the stripe center c (x c ,y c Extraction is performed using the following formula: