Detection image processing method and device, electronic equipment and computer readable medium

By preprocessing the detection image and constructing connected components, the problem of unstable laser line center point extraction under high reflection noise was solved, achieving efficient and accurate laser line center point extraction and improving the stability and accuracy of 3D measurement.

CN122048968APending Publication Date: 2026-05-15YISHI TECH (NINGBO) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YISHI TECH (NINGBO) CO LTD
Filing Date
2025-12-21
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing laser triangulation techniques are difficult to stably extract the center point of the laser line under high reflection noise and speckle noise interference, resulting in distortion and deformation of 3D measurement results.

Method used

By preprocessing the detected image, obtaining the gradient value of each column, selecting candidate points and constructing connected components, removing noise interference, and outputting sub-pixel coordinates, stable extraction of the laser line center point is achieved.

Benefits of technology

Stable extraction of the laser line center point was achieved under high reflection noise, improving the accuracy and stability of 3D measurement and expanding the application scenarios of the laser line extraction algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048968A_ABST
    Figure CN122048968A_ABST
Patent Text Reader

Abstract

The invention discloses a detection image processing method and device, electronic equipment and a computer readable medium. The processing method comprises the following steps: preprocessing a detection image to obtain a gradient value of each column in the detection image; obtaining a plurality of candidate points and corresponding laser line widths according to the gradient value of each column; selecting a preset number of candidate points as sorting points according to the laser line widths and the peak gray levels of the candidate points; forming connected domains with multiple lengths according to the sorting points meeting the connected domains in each column, and removing the connected domains with the lengths smaller than the noise reduction length; and outputting the final sub-pixel coordinates of the connected domain. The processing method and device for the detection image, the electronic equipment and the computer readable medium have the beneficial effects that the processing method and device for the detection image, which can stably work under high reflection noise, are provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and more specifically, to a method, apparatus, electronic device, and computer-readable medium for processing images. Background Technology

[0002] The laser triangulation method achieves high-precision non-contact 3D measurement of objects based on the reflection signal of a laser line on the object's surface and a well-calibrated camera-laser line plane.

[0003] Laser triangulation is characterized by its superior real-time performance, non-contact nature, and high precision. It possesses the following basic characteristics: High precision: Accurately obtaining the position coordinates of the laser line at various points on the imaging surface of the CMOS camera is crucial.

[0004] High performance: High-speed motion and target acquisition require highly efficient hardware computing solutions.

[0005] Stability: Different materials and surfaces with varying roughness have significantly different reflection and absorption effects on laser lines, which can easily lead to speckle noise or high-reflectivity stray light in the image, causing conventional laser line extraction algorithms to fail.

[0006] In summary, how to quickly and accurately obtain the pixel coordinates of each point of the laser line based on a single frame image, and efficiently and stably generate the laser line point sequence with limited computing resources, is crucial for subsequent measurement accuracy and product quality.

[0007] Existing laser line extraction algorithms can be categorized into: grayscale extremum methods, edge detection, and curve fitting methods. Current technical solutions primarily target scenarios with simple foreground and background and controllable image quality, employing various laser line center point extraction accuracy and sub-pixel calculation methods.

[0008] Reference Figure 1 As shown, existing technical solutions are mainly based on the fact that the profile curve of laser line imaging presents a Gaussian distribution. The original position of the peak point is obtained by using fitting methods or gray-scale extreme value methods, and then high-precision laser line center coordinates are obtained based on sub-pixel calculation methods.

[0009] Reference Figure 2 and Figure 3 As shown, in actual measurements, due to the complex material and roughness of the object's surface, as well as laser speckle noise, the imaging quality is affected by noise interference, and the laser line target exhibits complexity and non-uniformity. Using traditional laser line extraction methods, it is easy to extract incorrect targets, resulting in serious distortion and deformation of the 3D measurement results.

[0010] In summary, the limitations of existing technical solutions are as follows: 1. Laser line center stability extraction was not considered under conditions of high-reflectivity stray light and speckle noise interference; 2. High requirements for image quality, but insufficient consideration of the impact of noise. Summary of the Invention

[0011] The summary section of this application is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0012] Some embodiments of this application propose methods, apparatuses, electronic devices, and computer-readable media to address the technical problems mentioned in the background section above.

[0013] As a first aspect of this application, some embodiments of this application provide a method for processing a detection image, the method comprising: Preprocess the detection image to obtain the gradient value of each column in the detection image; Multiple candidate points and their corresponding laser line widths are obtained based on the gradient values ​​of each column; A preset number of candidate points are selected as picking points based on the laser line width and peak gray level of the candidate points; Based on the selected points in each column that satisfy the connectivity requirement, multiple connectivity components of different lengths are constructed, and connectivity components with a length less than the noise reduction length are removed. Output the subpixel coordinates of the final connected components.

[0014] Optionally, in some embodiments of this application, the step of preprocessing the detection image to obtain the gradient value of each column in the detection image includes: performing smoothing filtering on the input original laser line image to obtain a smoothed laser line image.

[0015] Optionally, in some embodiments of this application, the step of preprocessing the detection image to obtain the gradient value of each column in the detection image further includes: The smoothed laser line image is subjected to Sobel gradient filtering to obtain a filtered laser line image.

[0016] Optionally, in some embodiments of this application, the step of preprocessing the detection image to obtain the gradient value of each column in the detection image further includes: Edge detection is performed column by column on the filtered laser line image to obtain the gradient value of each column.

[0017] Optionally, in some embodiments of this application, obtaining multiple candidate points and corresponding laser line widths based on the gradient values ​​of each column of images includes: Search for the maximum and minimum extreme points of the gradient in each column of gradient data; Each pair of adjacent maximum and minimum extrema points in the column direction defines the edge of the laser line profile image; The maximum and minimum extreme points located at the edges of the laser line profile image are defined as waist peaks. The column-direction distance between two adjacent wasp waist points in the same column is taken as the laser line width.

[0018] Optionally, in some embodiments of this application, the step of selecting a preset number of candidate points as picking points based on the laser linewidth and peak grayscale of the candidate points includes: The score for each candidate point is calculated based on the laser line width and peak gray level of the column in which the candidate point is located; Based on the scores, sort the multiple candidate points in each column, and select the M candidate points with the largest scores, where M is an integer greater than or equal to 3; Alternatively, the step of selecting a preset number of candidate points as picking points based on the laser linewidth and peak grayscale of the candidate points includes: The candidate points in each column are sorted according to their positions, and the M candidate points with the highest scores are selected, where M is an integer greater than or equal to 3.

[0019] Optionally, in some embodiments of this application, wherein multiple connected components of varying lengths are formed based on the selection points that satisfy the connectivity requirement in each column, and connected components with lengths less than the noise reduction length are removed, including: Determine whether the picking points in each column meet the condition of forming a connected component. If they do, retain the picking point; otherwise, remove the picking point. The multiple remaining picking points are connected sequentially according to adjacent columns to merge them into a connected component; The conditions for forming a connected component include: the chessboard distance between the pixels corresponding to the picking points of adjacent columns is less than or equal to a preset chessboard distance threshold. Determine whether the length of the connected component is less than or equal to a preset length threshold. If it is, remove the connected component; otherwise, retain the connected component. The sub-pixel coordinates of the final connected component output include: Output the x-coordinates of all connected components; Calculate the sub-pixel coordinate fy in the Y direction; Obtain the coordinate set Pi(x,fy) of the processed point sequence.

[0020] As a second aspect of this application, some embodiments of this application provide a processing apparatus for detecting images, the processing apparatus comprising: The gradient module is used to preprocess the detection image to obtain the gradient value of each column in the detection image; The width module is used to obtain multiple candidate points and their corresponding laser line widths based on the gradient values ​​of each column; The picking module is used to select a preset number of candidate points as picking points based on the laser line width and peak gray level of the candidate points; The connectivity module is used to construct multiple connectivity components of different lengths based on the picking points in each column that satisfy the connectivity requirement. The removal module is used to remove connected components whose length is less than the noise reduction length. The output module is used to output the subpixel coordinates of the final connected components.

[0021] As a third aspect of this application, some embodiments of this application provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0022] As a fourth aspect of this application, some embodiments of this application provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any implementation of the first aspect above.

[0023] The beneficial effects of this application are: it provides a method, apparatus, electronic device, and computer-readable medium for processing detection images that can operate stably under high reflection noise.

[0024] More specifically, some embodiments of this application may produce the following specific beneficial effects: Capable of extracting the center point of multiple candidate laser lines; It is capable of performing candidate point quality assessment; It can determine the optimal output based on the quality or geometric distribution of scene candidate points; It can effectively reduce noise in laser line noise reduction.

[0025] The above technical solution, while taking into account accuracy, efficient calculation and stability, greatly expands the application scenarios of laser line extraction, enabling the laser line extraction algorithm to work stably under high reflection noise. Attached Figure Description

[0026] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application and to make other features, objects, and advantages of the application more apparent. The illustrative embodiments and descriptions of this application are used to explain the application and do not constitute an undue limitation of the application.

[0027] Furthermore, throughout the accompanying drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the elements are not necessarily drawn to scale.

[0028] In the attached diagram: Figure 1 This is a schematic diagram illustrating the processing of laser line detection images using existing technologies. Figure 2 This is a schematic diagram illustrating an example of reflection generated in the detection image of a laser line; Figure 3 This is a schematic diagram of another example of reflection generated in the detection image of a laser line; Figure 4 This is a schematic diagram of the main steps of a processing method according to an embodiment of this application; Figure 5 This is a schematic diagram of the main modules of a processing apparatus according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application; Figure 7 This is a schematic diagram of a detected image processed according to a processing method of one embodiment of this application; Figure 8 This is a schematic diagram of peak waist points in a detected image processed by a processing method according to an embodiment of this application (the yellow dots in the diagram are candidate points, and the red dots are the peak vertices of the laser lines). Figure 9 This is a schematic diagram of a connected region formed by a processing method according to an embodiment of this application. Detailed Implementation

[0029] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0030] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0031] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0032] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0033] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0034] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0035] Reference Figure 4 As shown, as a first aspect of this application, some embodiments of this application provide a method for processing a detection image, the method comprising the following steps: S1: Preprocess the detection image to obtain the gradient value of each column in the detection image; S2: Obtain multiple candidate points and their corresponding laser line widths based on the gradient values ​​of each column; S3: Select a preset number of candidate points as picking points based on the laser line width and peak gray level of the candidate points; S4: Based on the selected points in each column that satisfy the connectivity requirement, construct multiple connected components of different lengths, and remove connected components whose length is less than the noise reduction length. S5: Output the subpixel coordinates of the final connected components.

[0036] In some embodiments of this application, step S1 includes: performing a smoothing filter on the input original laser line pattern to obtain a smoothed laser line image.

[0037] In some embodiments of this application, step S1 further includes: performing Sobel gradient filtering on the smoothed laser line image to obtain a filtered laser line image.

[0038] In some embodiments of this application, step S1 further includes: performing column-by-column edge detection on the filtered laser line image to obtain the gradient value of each column of the image.

[0039] In some embodiments of this application, step S2 includes: searching for the maximum and minimum extreme points of the gradient in each column of gradient data; defining the edge of the laser line profile image for each pair of adjacent maximum and minimum extreme points in the column direction; defining the maximum and minimum extreme points located at the edge of the laser line profile image as waist peaks; and using the column-direction distance between two adjacent waist peaks in the same column as the laser line width.

[0040] In some embodiments of this application, step S3 includes: calculating the score of each candidate point based on the laser line width and peak gray level of the column in which the candidate point is located; sorting the multiple candidate points in each column according to the scores, and selecting the M candidate points with the largest scores, where M is an integer greater than or equal to 3.

[0041] Alternatively, in some embodiments of this application, step S3 includes: sorting multiple candidate points in each column according to their positions, such as sorting them according to their positions closest to the first row, and selecting M candidate points with the highest scores, where M is an integer greater than or equal to 3.

[0042] In some embodiments of this application, step S4 specifically includes: determining whether the picking points in each column meet the conditions for forming a connected component; if so, retaining the picking point; otherwise, removing the picking point; connecting the retained picking points sequentially according to adjacent columns to merge them into a connected component; the conditions for forming a connected component include: the chessboard distance between the pixels corresponding to the picking points in adjacent columns is less than or equal to a preset chessboard distance threshold; determining whether the length of the connected component is less than or equal to a preset length threshold; if so, removing the connected component; otherwise, retaining the connected component.

[0043] In some embodiments of this application, step S5 includes: outputting all x-coordinates of the connected component; calculating the sub-pixel coordinates fy in the Y direction; and obtaining the coordinate set Pi(x,fy) of the processed point sequence.

[0044] Reference Figure 5 As shown, as a second aspect of this application, some embodiments of this application provide a processing apparatus for detecting images, the processing apparatus including: a gradient module, a width module, a picking module, a connectivity module, a removal module, and an output module.

[0045] Specifically, the gradient module is used to preprocess the detection image to obtain the gradient value of each column in the detection image; the width module is used to obtain multiple candidate points and the corresponding laser line width based on the gradient value of each column; the picking module is used to select a preset number of candidate points as picking points based on the laser line width and peak gray level of the candidate points; the connectivity module is used to construct multiple connected regions of multiple lengths based on the picking points that satisfy the connectivity in each column; the removal module is used to remove connected regions whose length is less than the noise reduction length; and the output module is used to output the sub-pixel coordinates of the final connected regions.

[0046] Reference Figures 7 to 9 As shown, the processing method of this application is detailed below as a specific solution: Step 1: Raw laser line image processing. Perform smoothing filtering on the input raw laser line image; perform Sobel gradient filtering on the smoothed laser line image.

[0047] The input image is a single-channel grayscale image with resolution w x h. Smoothing filters can be used to reduce noise in the original image.

[0048] Using the one-dimensional Sobel edge detection operator, edge detection is performed column by column on the smoothed and filtered image data to obtain the gradient value of each column.

[0049] Step 2: Detection of the center point of the candidate laser line.

[0050] Search for gradient extreme points (maximum and minimum values) in each column of gradient data.

[0051] If the extreme point is smaller than the grayscale threshold min_gray_t, it is not considered a candidate point. In the column direction, each pair of adjacent gradient maxima and minimum points constitutes the upper and lower edge positions of the laser line, which are called the peak waist points of the laser line profile curve; multiple candidate points can be detected in each column.

[0052] It is understandable that the maxima can be unequal, and the whole is a series of corresponding maxima and minima appearing in a row, or it can be understood as "inflection points"; a pair of adjacent "inflection points" are peaks in the Gaussian shape of the laser line between the inflection points, and the inflection points are a pair of peak waists on both sides, and the gradient values ​​can be different.

[0053] Between the peak waist points, the gray-level maxima are considered as the peak apex. The laser line maxima and their positions are stored between the upper and lower peak waist points (that is, the laser line peak gray-level and the image Y coordinate). The column distance between the peak waist points is considered as the laser line width. The higher the laser line width, the lower the quality score.

[0054]

[0055] The weights are summed to 1, and each weight is a decimal; Min(x,y) means taking the smaller value of x and y.

[0056] Step 3: Scoring and Picking.

[0057] Using line width as a geometric feature measure and peak gray level as a gray level feature measure, the score of each candidate point is obtained under the influence of weighting coefficients.

[0058]

[0059]

[0060] Each column of candidate points is sorted by score, and the M targets with the highest scores are selected, where M is greater than or equal to 3. The score is a weighted average of the line width score and the grayscale score.

[0061] Among the M candidate points in each column, points closer to the first row are called "near end" and points farther from the first row are called "far end" based on their positional relationship with the first column. The near end / far end point is used as a positioning strategy to guide the selection of candidate points for the laser line.

[0062] Candidate points are filtered using a "location strategy" based on their location; and they are filtered using a "maximum score strategy" based on their score.

[0063] Step 4: Perform target noise reduction based on connected components For each column of candidate points, retain those that satisfy the connectivity condition (points in different columns are connected, but points in the same column are not connected), constructing multiple connected components of varying lengths. The connectivity condition is that the chessboard distance between the pixels of the selected targets in adjacent columns does not exceed a specified length. Adjacent columns satisfying the connectivity condition are merged into a single connected component; then, connected components with a length less than the noise reduction length are removed to achieve noise reduction. Figure 9 The dashed part represents the removed connected components.

[0064] Step 5: Output subpixel coordinates (x, fy).

[0065] Output the x-coordinate of the connected component point of the final laser line, calculate the sub-pixel coordinate fy in the Y direction, and obtain the final point sequence Pi(x,fy), which is the set of points, that is, the extracted final laser line (the set of points).

[0066] Reference Figure 7 As shown, the technical solution of this application can achieve a better noise reduction effect under noise interference; refer to Figure 8 As shown, Figure 8 The final processing result is shown.

[0067] like Figure 6 As shown, the electronic device 800 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the electronic device 800. The processing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0068] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic device 800 to communicate wirelessly or wiredly with other devices to exchange data. Although... Figure 6 An electronic device 800 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can represent a device or multiple devices as needed.

[0069] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, it performs the functions defined in the methods of some embodiments of this disclosure.

[0070] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0071] In some embodiments of this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0072] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0073] The aforementioned computer-readable medium may be included in the aforementioned electronic device or may exist independently without being assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: preprocess the detection image to obtain the gradient value of each column in the detection image; obtain multiple candidate points and their corresponding laser line widths based on the gradient values ​​of each column; select a preset number of candidate points as picking points based on the laser line width and peak grayscale of the candidate points; construct multiple connected components of varying lengths based on the picking points in each column that satisfy the connectivity requirement, and remove connected components whose length is less than the noise reduction length; and output the sub-pixel coordinates of the final connected components.

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

[0075] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function.

[0076] It should also be noted that in some alternative implementations, the functions marked in the box may occur in a different order than those marked in the attached figures.

[0077] For example, two consecutively represented blocks can actually be executed in substantially parallel order, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, as well as combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified functions or operations, or using a combination of dedicated hardware and computer instructions.

[0078] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0079] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A method for processing a detection image, characterized in that, The processing method includes: Preprocess the detection image to obtain the gradient value of each column in the detection image; Multiple candidate points and their corresponding laser line widths are obtained based on the gradient values ​​of each column; A preset number of candidate points are selected as picking points based on the laser line width and peak gray level of the candidate points; Based on the selected points in each column that satisfy the connectivity requirement, multiple connectivity components of different lengths are constructed, and connectivity components with a length less than the noise reduction length are removed. Output the subpixel coordinates of the final connected components.

2. The image processing method according to claim 1, characterized in that, in, The step of preprocessing the detection image to obtain the gradient value of each column in the detection image includes: The original laser line image is smoothed by applying a smoothing filter to obtain a smoothed laser line image.

3. The image processing method according to claim 2, characterized in that, in, The step of preprocessing the detection image to obtain the gradient value of each column in the detection image further includes: The smoothed laser line image is subjected to Sobel gradient filtering to obtain a filtered laser line image.

4. The image processing method according to claim 3, characterized in that, in, The step of preprocessing the detection image to obtain the gradient value of each column in the detection image further includes: Edge detection is performed column by column on the filtered laser line image to obtain the gradient value of each column.

5. The image processing method according to claim 4, Its features are, The step of obtaining multiple candidate points and corresponding laser line widths based on the gradient values ​​of each column of images includes: Search for the maximum and minimum extreme points of the gradient in each column of gradient data; Each pair of adjacent maximum and minimum extrema points in the column direction defines the edge of the laser line profile image; The maximum and minimum extreme points located at the edges of the laser line profile image are defined as waist peaks. The column-direction distance between two adjacent wasp waist points in the same column is taken as the laser line width.

6. The image processing method according to claim 5, Its features are, in, The step of selecting a preset number of candidate points as picking points based on the laser linewidth and peak grayscale of the candidate points includes: The score for each candidate point is calculated based on the laser line width and peak gray level of the column in which the candidate point is located; Based on the scores, sort the multiple candidate points in each column, and select the M candidate points with the largest scores, where M is an integer greater than or equal to 3; Alternatively, the step of selecting a preset number of candidate points as picking points based on the laser linewidth and peak grayscale of the candidate points includes: The candidate points in each column are sorted according to their positions, and the M candidate points with the highest scores are selected, where M is an integer greater than or equal to 3.

7. The image processing method according to claim 5, Its features are, in, Based on the selected points in each column that satisfy the connectivity requirement, multiple connected components of varying lengths are constructed. Connected components whose length is less than the noise reduction length are removed, including: Determine whether the picking points in each column meet the condition of forming a connected component. If they do, retain the picking point; otherwise, remove the picking point. The multiple remaining picking points are connected sequentially according to adjacent columns to merge them into a connected component; The conditions for forming a connected component include: the chessboard distance between the pixels corresponding to the picking points of adjacent columns is less than or equal to a preset chessboard distance threshold. Determine whether the length of the connected component is less than or equal to a preset length threshold. If it is, remove the connected component; otherwise, retain the connected component. The sub-pixel coordinates of the final connected component output include: Output the x-coordinates of all connected components; Calculate the sub-pixel coordinate fy in the Y direction; Obtain the coordinate set Pi(x,fy) of the processed point sequence.

8. A processing apparatus for detecting images, characterized in that, The processing device includes: The gradient module is used to preprocess the detection image to obtain the gradient value of each column in the detection image; The width module is used to obtain multiple candidate points and their corresponding laser line widths based on the gradient values ​​of each column; The picking module is used to select a preset number of candidate points as picking points based on the laser line width and peak gray level of the candidate points; The connectivity module is used to construct multiple connectivity components of different lengths based on the picking points in each column that satisfy the connectivity requirement. The removal module is used to remove connected components whose length is less than the noise reduction length. The output module is used to output the subpixel coordinates of the final connected components.

9. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the processors implement the method as described in any one of claims 1 to 7.

10. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.