Line structure light positioning method, device, electronic device and storage medium

By collecting and processing the three-dimensional points of the line structured light of the target calibration plate in the online structured light scanner, the current line structured light surface parameters are calculated, and the problem of the calibration of line structured light projection surfaces in the existing technology is solved, and the small Line structure cursors on the dimension calibration board reduce costs and improve portability.

CN115451813BActive Publication Date: 2025-02-25SHINING 3D TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211028407.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-25
Publication Date
2025-02-25
Estimated Expiration
2042-08-25

AI Technical Summary

Technical Problem

The existing handheld multi-wire structured light scanners require a larger calibration plate when calibration of the structured light projection surface. As the number of lines increases, the size of the calibration plate increases, resulting in high production costs and inconvenient portability.

Method used

After projecting each calibration position of the online structured light emitter, the camera is controlled to collect the line structured cursor calibration diagram of the target calibration plate, and the three-dimensional points of the target line structured light are obtained, and the three-dimensional points and the preset reference line structured light surface parameters are calculated based on the three-dimensional points and the preset reference line structured light surface parameters. The current line structure gloss parameters are obtained to reduce the dependence on the calibrated plate size.

Benefits of technology

The line structure cursor calibration is achieved on the small-size calibration plate, which greatly reduces the size of the calibration plate, reduces the cost and improves portability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115451813B_ABST
    Figure CN115451813B_ABST
Patent Text Reader

Abstract

The disclosed embodiments relate to a line structure light calibration method, device, electronic device and storage medium, wherein the method comprises: after the line structure light emitter projects at each calibration position, controlling the camera to collect the target calibration plate to obtain the line structure light calibration map of each calibration position; the number of line structure light rays on the target calibration plate is less than the number of multi-line structure light rays projected by the line structure light emitter; processing is performed based on the line structure light calibration map of each calibration position to obtain the target line structure light three-dimensional point; processing is performed based on the target line structure light three-dimensional point and the preset baseline line structure light surface parameters to obtain the target rotation and translation matrix, and the current line structure light surface parameters are calculated based on the target rotation and translation matrix and the baseline line structure light surface parameters. Thus, the dependence of the line structure light calibration method on the size of the calibration plate is reduced, and the line structure light calibration can be completed on a small-sized calibration plate, thereby reducing costs while improving portability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of scanning processing technology, and in particular to a line structure light positioning method, device, electronic device and storage medium. Background Art

[0002] At present, existing handheld multi-line structured light scanners basically need to be calibrated on the projection surface of the structured light, and the structured light calibration is performed on a flat plate. In general, the size of the calibration plate needs to cover the working area of ​​the multi-line structured light emission. If the number of lines is greater and the angle between the structured light rays is greater, the working area will be larger, which brings challenges to the size of the calibration plate.

[0003] Therefore, under the existing method, the size of the calibration plate basically increases with the increase of the number of lines and the angle between the line structured light rays. That is, the calibration plate format must meet the projection format under the line structured light working distance. That is, as people pursue scanning efficiency, they require more and more line structured light rays in a single format. The more lines there are, the larger the projection format is, and the larger the calibration plate size required for line structured light calibration is, which brings about the problems of high production cost of the calibration plate and inconvenience in carrying. Summary of the invention

[0004] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a line structure light positioning method, device, electronic device and storage medium.

[0005] The present disclosure provides a line structure light positioning method, the method comprising:

[0006] After the line structured light emitter projects at each of the calibration positions, the camera is controlled to collect the target calibration plate to obtain a line structured light calibration map of each of the calibration positions; wherein the number of line structured light rays on the target calibration plate is less than the number of multi-line structured light rays projected by the line structured light emitter;

[0007] Processing is performed based on the line structure light calibration map of each calibration position to obtain a target line structure light three-dimensional point;

[0008] The target line structured light three-dimensional points and the preset reference line structured light surface parameters are processed to obtain a target rotation and translation matrix, and the current line structured light surface parameters are calculated based on the target rotation and translation matrix and the reference line structured light surface parameters.

[0009] The present disclosure also provides a linear structure cursor positioning device, the device comprising:

[0010] A collection module, used for controlling the camera to collect the target calibration plate after the line structured light emitter projects at each calibration position, so as to obtain a line structured light calibration map of each calibration position; wherein the number of line structured light rays on the target calibration plate is less than the number of multi-line structured light rays projected by the line structured light emitter;

[0011] A first processing module, configured to process the line structured light calibration map of each calibration position to obtain a target line structured light three-dimensional point;

[0012] A second processing module, configured to perform processing based on the target line structured light three-dimensional points and preset reference line structured light surface parameters to obtain a target rotation and translation matrix;

[0013] The calculation module is used to calculate based on the target rotation and translation matrix and the reference line structured light surface parameters to obtain current line structured light surface parameters.

[0014] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the line structure light positioning method provided in the embodiment of the present disclosure.

[0015] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the line structure cursor positioning method provided by the embodiment of the present disclosure.

[0016] Compared with the prior art, the technical solution provided by the embodiment of the present disclosure has the following advantages: the line structure light calibration solution provided by the embodiment of the present disclosure, after the line structure light emitter projects at each calibration position, controls the camera to collect the target calibration plate to obtain the line structure light calibration map of each calibration position; wherein, the number of line structure light rays on the target calibration plate is less than the number of multi-line structure light projected by the line structure light emitter; based on the line structure light calibration map of each calibration position, processing is performed to obtain the target line structure light three-dimensional point; based on the target line structure light three-dimensional point and the preset baseline line structure light surface parameters, processing is performed to obtain the target rotation and translation matrix, and calculation is performed based on the target rotation and translation matrix and the baseline line structure light surface parameters to obtain the current line structure light surface parameters. The above technical solution is adopted to reduce the dependence of the line structure light calibration method on the size of the calibration plate, and the line structure light calibration can be completed on a small-sized calibration plate, thereby greatly reducing the size of the calibration plate, reducing the cost and improving portability. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0018] Figure 1 A schematic diagram of a flow chart of a line structure cursor positioning method provided by an embodiment of the present disclosure;

[0019] Figure 2 A schematic flow chart of another line structure light positioning method provided by an embodiment of the present disclosure;

[0020] Figure 3 A schematic diagram of the structure of a linear structured cursor positioning device provided by an embodiment of the present disclosure;

[0021] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0023] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0024] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

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

[0026] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0028] In practical applications, as people pursue scanning efficiency, more and more line structured light rays are required in a single format, which requires a large full-format calibration plate for line structured light calibration. Such a large calibration plate increases the manufacturing cost and the packaging volume, resulting in increased costs and inconvenience in carrying.

[0029] In response to the above problems, the embodiments of the present disclosure propose a line structured light calibration method, which obtains the rotation and translation matrix and baseline line structured light surface parameters between the line structured light emitter and the camera during use and calculates the current line structured light surface parameters, so that line structured light calibration can be performed based on a non-global calibration plate, which greatly reduces the size of the calibration plate, reduces the cost and improves portability, that is, reduces the dependence of the line structured light calibration algorithm on the size of the calibration plate, and realizes line structured light calibration on a non-global calibration plate, that is, a small-size calibration plate.

[0030] Figure 1 The present invention provides a schematic flow chart of a line structure light positioning method provided by an embodiment of the present invention. The method can be performed by a line structure light positioning device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:

[0031] Step 101, after the line structured light emitter projects at each of the calibration positions, the camera is controlled to collect data from the target calibration plate to obtain a line structured light calibration map of each calibration position; wherein the number of line structured lights on the target calibration plate is less than the number of multi-line structured lights projected by the line structured light emitter.

[0032] Among them, the target calibration plate is any calibration plate that meets the size requirements. In the embodiment of the present disclosure, the target calibration plate cannot cover the number of all projected multi-line structured lights. Therefore, the number of line structured lights on the target calibration plate is less than the number of multi-line structured lights. In the embodiment of the present disclosure, the target calibration plate is an unfolded calibration plate with a length of 200 mm to 250 mm and a width of 280 mm to 320 mm.

[0033] The line structured light can be a line structured light projected by a line structured light emitter, a multi-line light projected by various light sources such as LED through a mask sheet (grating sheet), or a multi-line light projected by a projector. For example, the line structured light can be a laser projected by a laser emitter.

[0034] The calibration position can be selected and set according to the application scenario. In the embodiment of the present disclosure, multiple relative positions of the line structured light emitter and the target calibration plate in the multi-line structured light scanning device can be set to determine multiple calibration positions. Among them, the line structured light calibration image of each calibration position refers to the image taken by the camera of the target calibration plate after the line structured light emitter projects multi-line structured light on the target calibration plate at the calibration position.

[0035] In the disclosed embodiment, the multi-line structured light scanning device includes a frame, on which at least one line structured light emitter and at least one camera are mounted. The line structured light emitter projects at each of the calibration positions, which can be achieved by manually moving the multi-line structured light scanning device or automatically moving the multi-line structured light scanning device by a robot, so that the line structured light emitter in the multi-line structured light scanning device projects the multi-line structured light onto the target calibration plate at multiple calibration positions.

[0036] It is understandable that there will be a certain amount of positional offset between the line structured light emitter and the camera during the use of the multi-line structured light scanning device, so it is necessary to recalibrate the line structured light surface parameters, that is, to recalibrate the multi-line structured light scanning device. After determining multiple calibration positions, the line structured light emitter will project multiple line structured lights onto the target calibration plate at each calibration position in turn. At the same time, after the line structured light emitter projects at each calibration position, the camera is controlled to collect the target calibration plate to obtain the line structured cursor mapping at each calibration position, thereby obtaining multiple line structured cursor mappings at different calibration positions.

[0037] Step 102 : Process the line structure light mapping based on each calibrated position to obtain a target line structure light three-dimensional point.

[0038] The line structured light 3D point is the 3D point of the line structured light obtained after binocular reconstruction. If the line structured light projected by the line structured light emitter is laser, the line structured light 3D point refers to the laser line 3D point, that is, the laser line 3D point obtained after binocular reconstruction.

[0039] In the embodiments of the present disclosure, there are many ways to obtain the target line structured light three-dimensional point based on the line structure cursor mapping of each calibration position, which can be selected and set according to the application scenario. In some implementations, the line structure cursor mapping of each calibration position is identified to obtain the candidate line structured light three-dimensional point of each calibration position, and all the candidate line structured light three-dimensional points are screened based on preset screening conditions to obtain the target line structured light three-dimensional point.

[0040] In some other embodiments, the pixels in the line structured light calibration map of each calibrated position are clustered to obtain the line structured light lines of the left and right views corresponding to each calibrated position, and the line structured light 3D points of each calibrated position are matched to obtain the line structured light 3D points, and the line structured light 3D points of each calibrated position are randomly screened to obtain the target line structured light 3D points.

[0041] The above two methods are merely examples of processing the line structure cursor mapping based on each calibration position to obtain the target line structure light three-dimensional point. The embodiments of the present disclosure do not impose specific restrictions on the method of processing the line structure cursor mapping based on each calibration position to obtain the target line structure light three-dimensional point.

[0042] Step 103 , processing is performed based on the target line structured light three-dimensional points and the preset baseline line structured light surface parameters to obtain a target rotation and translation matrix, and calculation is performed based on the target rotation and translation matrix and the baseline line structured light surface parameters to obtain current line structured light surface parameters.

[0043] Among them, the preset baseline line structured light surface parameters refer to the line structured light surface calibration results before leaving the factory. The only way to calibrate the line structured light surface is to use a large calibration plate (usually about 500*450 mm) to obtain the baseline line structured light surface parameters (such as plane parameters, curved surface parameters, the relative position relationship between the line structured light emitter and the camera, etc.). The baseline line structured light surface parameters have been accompanying the life cycle of the multi-line structured light scanning equipment.

[0044] Specifically, when using a multi-line structured light scanning device, there will be a certain amount of positional offset between the line structured light emitter and the camera, which can be quantified as a target rotation and translation matrix. At this time, the line structured light surface parameters need to be recalibrated. Since the baseline line structured light surface parameters are available, the calibration can be completed by only calculating the offset, that is, the corresponding target rotation and translation matrix.

[0045] In the embodiments of the present disclosure, there are many ways to obtain a target rotation and translation matrix based on the target line structured light three-dimensional points and preset baseline line structured light surface parameters. In some implementations, the baseline three-dimensional points are determined based on the baseline line structured light surface parameters, and calculations are performed based on the target line structured light three-dimensional points and the initial rotation and translation matrix to obtain updated line structured light three-dimensional points. The initial rotation and translation matrix is ​​adjusted until the distance between the baseline three-dimensional points and the updated line structured light three-dimensional points is less than a preset distance threshold, and the current initial rotation and translation matrix is ​​determined to be the target rotation and translation matrix.

[0046] In other implementations, the nearest iteration point iteration is performed based on the target line structured light three-dimensional point and the reference line structured light surface parameters, and after the iteration, the target rotation and translation matrix is ​​finally converged.

[0047] The above two methods are merely examples of processing based on the target line structured light three-dimensional points and the preset baseline line structured light surface parameters to obtain the target rotation and translation matrix. The embodiments of the present disclosure do not impose any specific restrictions on the implementation method of processing based on the target line structured light three-dimensional points and the preset baseline line structured light surface parameters to obtain the target rotation and translation matrix.

[0048] Furthermore, the target rotation and translation matrix and the reference line structured light surface parameters are calculated to obtain the current line structured light surface parameters, that is, the target rotation and translation matrix and the reference line structured light surface parameters are multiplied to obtain the current line structured light surface parameters.

[0049] The line structured light calibration scheme provided by the embodiment of the present disclosure controls the camera to collect data from the target calibration plate after the line structured light emitter projects at each calibration position, and obtains the line structured light calibration map of each calibration position; wherein, the number of line structured light rays on the target calibration plate is less than the number of multi-line structured light rays projected by the line structured light emitter; the line structured light calibration map of each calibration position is processed to obtain the target line structured light three-dimensional point; the target line structured light three-dimensional point and the preset baseline line structured light surface parameters are processed to obtain the target rotation and translation matrix, and the current line structured light surface parameters are calculated based on the target rotation and translation matrix and the baseline line structured light surface parameters. The above technical scheme is adopted to reduce the dependence of the line structured light calibration method on the size of the calibration plate, and the line structured light calibration can be completed on a small-sized calibration plate, thereby greatly reducing the size of the calibration plate, reducing the cost and improving portability.

[0050] Figure 2 This is a flow chart of another line structure light positioning method provided by the embodiment of the present disclosure. Based on the above embodiment, this embodiment further optimizes the above line structure light positioning method. Figure 2 As shown, the method includes:

[0051] Step 201, after the line structured light emitter projects at each calibration position, the camera is controlled to collect data from the target calibration plate to obtain a line structured light calibration map of each calibration position; wherein the number of line structured light rays on the target calibration plate is less than the number of multi-line structured light rays projected by the line structured light emitter.

[0052] It should be noted that step 201 is the same as step 101. Please refer to the description of step 101 for details, which will not be described in detail here.

[0053] Step 202 : Identify the line structure light pattern at each calibration position to obtain a candidate line structure light 3D point at each calibration position, and filter all the candidate line structure light 3D points based on a preset filtering condition to obtain a target line structure light 3D point.

[0054] In an embodiment of the present disclosure, each calibration position has a first line structured cursor mapping and a second line structured cursor mapping, and the line structured cursor mapping of each calibration position is identified to obtain a candidate line structured light three-dimensional point of each calibration position, including: respectively identifying the first line structured cursor mapping and the second line structured cursor mapping, the first line structured light line and the second line structured light line; performing three-dimensional matching based on the first line structured light line, the second line structured light line and a preset calibration plate plane to obtain a candidate line structured light three-dimensional point of each calibration position.

[0055] Specifically, for example, at the calibration position, the target calibration plate is photographed by a binocular camera to obtain a left view as the first line structure cursor map, and a right view as the second line structure cursor map. The pixel points in the left and right views are clustered respectively, and those with connected domains are connected to obtain corresponding line structured light lines. For example, the left view identifies 5 first line structured light lines and the right view identifies 6 second line structured light lines. Each first line structured light and each second line structured light are matched in three dimensions to obtain candidate line structured light three-dimensional points.

[0056] More specifically, the target calibration plate is a small-sized calibration plate (referred to as a small calibration plate, such as 210*297 mm). In order to calculate the target rotation and translation matrix, a small calibration plate is used for calibration. Paste some or all of the marker points on the small calibration plate, project the multi-line structured light onto the calibration plate, and collect it with a stereo camera. It is understandable that at this time, the line structured light captured by the camera on the small calibration plate is incomplete. Due to the limitation of the calibration plate format, the lines on both sides will be missing. At this time, it cannot be processed by the full-format line structured light surface calibration method, so it is necessary to obtain the target rotation and translation matrix for displacement compensation. That is, the rotation and translation matrix is ​​obtained based on the local point cloud ICP algorithm for displacement compensation.

[0057] Specifically, the three-dimensional points of the marker points on the small calibration plate are reconstructed, and plane fitting is performed, such as ax+by+cz+d=0, where a, b, c and d are plane parameters, and the plane equation of the calibration plate is obtained. The center lines of the line structured light on the left and right views are identified and clustered (that is, each line structured light center line is pixel clustered to obtain the line structured light lines of the left and right views respectively), and the line structured light lines of the left and right views are identified in turn, and then the line structured light lines are matched in three dimensions according to the corresponding ones to obtain the three-dimensional points of the ordered line structured light, that is, the candidate line structured light three-dimensional points of each calibration position.

[0058] Among them, three-dimensional matching can be understood as performing three-dimensional reconstruction on a point on the left and right views respectively to obtain a three-dimensional point (x1, y1, z1), substituting it into the plane fitting formula ax1+by1+cz1+d=0, then the three-dimensional point is considered to be a candidate line structured light three-dimensional point of the calibration position.

[0059] Among them, all candidate line structured light three-dimensional points are screened based on preset screening conditions to obtain the target line structured light three-dimensional points, and the RANSAC algorithm can be used for screening.

[0060] In an embodiment of the present disclosure, all candidate line structured light three-dimensional points are screened based on preset screening conditions to obtain the target line structured light three-dimensional points, including: repeatedly randomly obtaining a target number of candidate line structured light three-dimensional points from all candidate line structured light three-dimensional points for plane fitting to obtain multiple candidate planes, calculating the distance between each remaining candidate line structured light three-dimensional point and each candidate plane each time to obtain multiple candidate distances, determining the target distance from the multiple candidate distances based on the distance size of each candidate distance, and using the candidate plane corresponding to the target distance as the target plane, using the candidate line structured light three-dimensional points corresponding to the calculated target plane as the reference identification lines of each calibration position, obtaining a predetermined number of line structured light lines at each calibration position based on the reference identification lines, and projecting the predetermined number of line structured light lines onto the target calibration plate to obtain the target line structured light three-dimensional points.

[0061] Specifically, for example, take a picture of n calibration positions (a positive integer of n>=2). The line structure cursor map of each calibration position is identified to obtain a candidate line structure light 3D point of each calibration position. Then all the ordered line structure light 3D points of n positions are obtained to form the 3D points with the highest planarity based on the target number of line structure light line 3D points. The line structure light line 3D points at the screened calibration positions all become the reference identification lines at their respective positions. Since each position is an ordered line, k line structure light 3D points on the surface composed of k line structure light rays can be selected.

[0062] For example, the reference identification line of the calibration position A is 4, so 4 line structured light rays are obtained, which are 2345 respectively, and are projected onto the target calibration plate to obtain 4 line structured light three-dimensional points.

[0063] Step 203 : determining a reference three-dimensional point based on the reference line structured light surface parameters, and performing calculation based on the target line structured light three-dimensional point and the initial rotation and translation matrix to obtain an updated line structured light three-dimensional point.

[0064] Step 204: adjust the initial rotation and translation matrix until the distance between the reference 3D point and the updated line structured light 3D point is less than a preset distance threshold, and determine the current initial rotation and translation matrix as the target rotation and translation matrix.

[0065] Step 205 : Calculate based on the target rotation and translation matrix and the reference line structured light surface parameters to obtain current line structured light surface parameters.

[0066] Specifically, since the deformation is small, the rotation and translation matrix is ​​close to the unit matrix, so the unit matrix is ​​used as the initial value to perform the nearest iteration point iteration on the target line structured light 3D points, such as k line structured light 3D points, and the baseline line structured light surface parameters. The offset obtained by the final convergence after iteration is used as the target rotation and translation matrix, and the baseline line structured light surface parameters are applied to the target rotation and translation matrix to obtain the accurate line structured light surface parameters after deformation. Thus, the multi-line line structured light scanning equipment is calibrated using a small calibration plate.

[0067] The line structured light calibration scheme provided by the embodiment of the present disclosure controls the camera to collect the target calibration plate after the line structured light emitter projects at each calibration position, and obtains the line structured light calibration map of each calibration position, wherein the number of line structured light rays on the target calibration plate is less than the number of multi-line structured light rays projected by the line structured light emitter, identifies the line structured light calibration map of each calibration position, obtains the candidate line structured light 3D points of each calibration position, screens all the candidate line structured light 3D points based on preset screening conditions, obtains the target line structured light 3D points, determines the reference 3D points based on the reference line structured light surface parameters, calculates based on the target line structured light 3D points and the initial rotation and translation matrix, obtains the updated line structured light 3D points, adjusts the initial rotation and translation matrix until the distance between the reference 3D points and the updated line structured light 3D points is less than the preset distance threshold, determines the current initial rotation and translation matrix as the target rotation and translation matrix, and calculates based on the target rotation and translation matrix and the reference line structured light surface parameters to obtain the current line structured light surface parameters. By adopting the above technical solution, the dependence of the line structure light calibration algorithm on the size of the calibration board can be reduced, and the line structure light calibration can be completed on a non-global calibration board, that is, a small-size calibration board, thereby reducing costs and improving portability.

[0068] Figure 3The structure diagram of a line structured light positioning device provided by an embodiment of the present disclosure is shown in FIG. 1 , which can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 3 As shown, the device comprises:

[0069] The acquisition module 301 is used to control the camera to acquire the target calibration plate after the line structured light emitter projects at each calibration position, so as to obtain a line structured light calibration map at each calibration position, wherein the number of line structured lights on the target calibration plate is less than the number of multi-line structured lights projected by the line structured light emitter;

[0070] A first processing module 302 is used to process the line structured light calibration map of each calibration position to obtain a target line structured light three-dimensional point;

[0071] The second processing module 303 is used to process the target line structured light three-dimensional points and the preset reference line structured light surface parameters to obtain a target rotation and translation matrix;

[0072] The calculation module 304 is used to perform calculation based on the target rotation and translation matrix and the reference line structured light surface parameters to obtain current line structured light surface parameters.

[0073] Optionally, the first processing module 302 includes:

[0074] An identification unit, used to identify the line structure light calibration image of each calibration position to obtain a candidate line structure light three-dimensional point of each calibration position;

[0075] The screening unit is used to screen all candidate line structured light three-dimensional points based on preset screening conditions to obtain the target line structured light three-dimensional points.

[0076] Optionally, each of the calibrated positions has a first line structure cursor mapping and a second line structure cursor mapping, and the identification unit is specifically used to:

[0077] Respectively identifying the first line structured light pattern and the second line structured light pattern, the first line structured light line and the second line structured light line;

[0078] Based on the first line structured light line, the second line structured light line and a preset calibration plate plane, three-dimensional matching is performed to obtain a candidate line structured light three-dimensional point of each calibration position.

[0079] Optionally, the screening unit is specifically used for:

[0080] Repeating randomly acquiring a target number of candidate line structured light three-dimensional points from all the candidate line structured light three-dimensional points to perform plane fitting, to obtain multiple candidate planes;

[0081] Calculate the distance between each remaining candidate line structured light three-dimensional point and each candidate plane to obtain multiple candidate distances;

[0082] Based on the distance size of each candidate distance, determine the target distance from the multiple candidate distances, and use the candidate plane corresponding to the target distance as the target plane;

[0083] Calculating the candidate line structured light three-dimensional points corresponding to the target plane as the reference identification lines of each calibration position;

[0084] Based on the reference identification lines, a predetermined number of line structured light lines of each calibration position are obtained, and the predetermined number of line structured light lines are projected onto the target calibration plate to obtain the target line structured light three-dimensional points.

[0085] Optionally, the second processing module is specifically used to:

[0086] Determine a reference three-dimensional point based on the reference line structured light surface parameter;

[0087] Calculating based on the target line structured light three-dimensional point and the initial rotation and translation matrix to obtain an updated line structured light three-dimensional point;

[0088] The initial rotation and translation matrix is ​​adjusted until the distance between the reference three-dimensional point and the updated line structured light three-dimensional point is less than a preset distance threshold, and the current initial rotation and translation matrix is ​​determined to be the target rotation and translation matrix.

[0089] Optionally, the target calibration plate is unfolded and has a length of 200 mm to 250 mm and a width of 280 mm to 320 mm.

[0090] The line structure light positioning device provided in the embodiment of the present disclosure can be arranged in a multi-line line structure light scanning device, can execute the line structure light positioning method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0091] The multi-line structured light scanning device can be a handheld scanner or an automatic scanning device, and can be used for surface scanning or industrial scanning.

[0092] The embodiments of the present disclosure further provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the line structure cursor positioning method provided by any embodiment of the present disclosure.

[0093] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 4, which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure. The electronic device 400 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0094] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0095] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0096] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the line structure light positioning method of the embodiment of the present disclosure are executed.

[0097] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0098] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0099] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0100] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: after the line structured light emitter projects at each calibration position, controls the camera to collect data from the target calibration plate to obtain a line structured light calibration map for each calibration position, wherein the number of line structured light rays on the target calibration plate is less than the number of multi-line structured light rays projected by the line structured light emitter; processes the line structured light calibration map for each calibration position to obtain a target line structured light three-dimensional point; processes the target line structured light three-dimensional point and preset baseline line structured light surface parameters to obtain a target rotation and translation matrix, and calculates based on the target rotation and translation matrix and the baseline line structured light surface parameters to obtain current line structured light surface parameters.

[0101] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate 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 a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

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

[0103] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0104] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0105] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0106] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0107] processor;

[0108] a memory for storing instructions executable by the processor;

[0109] The processor is used to read the executable instructions from the memory and execute the instructions to implement any line structure optical positioning method provided in the present disclosure.

[0110] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute any of the line structure light positioning methods provided by the present disclosure.

[0111] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0112] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0113] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A line structure light positioning method, characterized in that: include: After the line structured light emitter projects at each calibration position, the camera is controlled to collect the target calibration plate to obtain a line structured light calibration map of each calibration position; wherein the number of line structured light rays on the target calibration plate is less than the number of multi-line structured light rays projected by the line structured light emitter; the calibration position is the relative position of the line structured light emitter and the target calibration plate; Processing is performed based on the line structure light calibration map of each calibration position to obtain a target line structure light three-dimensional point; Processing based on the target line structured light three-dimensional point and the preset reference line structured light surface parameters to obtain a target rotation and translation matrix, and calculating based on the target rotation and translation matrix and the reference line structured light surface parameters to obtain current line structured light surface parameters; The processing based on the target line structured light three-dimensional points and the preset reference line structured light surface parameters to obtain the target rotation and translation matrix includes: Determine a reference three-dimensional point based on the reference line structured light surface parameter; Calculating based on the target line structured light three-dimensional point and the initial rotation and translation matrix to obtain an updated line structured light three-dimensional point; The initial rotation and translation matrix is ​​adjusted until the distance between the reference three-dimensional point and the updated line structured light three-dimensional point is less than a preset distance threshold, and the current initial rotation and translation matrix is ​​determined to be the target rotation and translation matrix.

2. The line structure optical positioning method according to claim 1, characterized in that: The processing based on the line structure light calibration map of each calibration position, the target line structure light three-dimensional point, includes: Identify the line structured light calibration image of each calibration position to obtain a candidate line structured light three-dimensional point of each calibration position; All candidate line structured light three-dimensional points are screened based on preset screening conditions to obtain the target line structured light three-dimensional point.

3. The line structure optical positioning method according to claim 2, characterized in that: Each of the calibration positions has a first line structure light fixed image and a second line structure light fixed image, and the line structure light fixed image of each of the calibration positions is identified to obtain a candidate line structure light three-dimensional point of each of the calibration positions, including: Respectively identifying the first line structured light pattern and the second line structured light pattern, the first line structured light line and the second line structured light line; Based on the first line structured light line, the second line structured light line and a preset calibration plate plane, three-dimensional matching is performed to obtain a candidate line structured light three-dimensional point of each calibration position.

4. The line structure optical positioning method according to claim 2, characterized in that: The step of screening all candidate line structured light three-dimensional points based on a preset screening condition to obtain the target line structured light three-dimensional point includes: Repeating randomly acquiring a target number of candidate line structured light three-dimensional points from all the candidate line structured light three-dimensional points to perform plane fitting, to obtain multiple candidate planes; Calculate the distance between each remaining candidate line structured light three-dimensional point and each candidate plane to obtain multiple candidate distances; Based on the distance size of each candidate distance, determine the target distance from the multiple candidate distances, and use the candidate plane corresponding to the target distance as the target plane; Calculating the candidate line structured light three-dimensional points corresponding to the target plane as the reference identification lines of each calibration position; Based on the reference identification lines, a predetermined number of line structured light lines of each calibration position are obtained, and the predetermined number of line structured light lines are projected onto the target calibration plate to obtain the target line structured light three-dimensional points.

5. The line structure optical positioning method according to any one of claims 1 to 4, characterized in that: The target calibration plate is not folded and has a length of 200 mm to 250 mm and a width of 280 mm to 320 mm.

6. A linear structured light positioning device, characterized in that: include: An acquisition module, used for controlling the camera to acquire the target calibration plate after the line structured light emitter projects at each calibration position, so as to obtain a line structured light calibration map of each calibration position; wherein the number of line structured light rays on the target calibration plate is less than the number of multi-line structured light rays projected by the line structured light emitter; and the calibration position is the relative position of the line structured light emitter and the target calibration plate; A first processing module, configured to process the line structured light calibration map of each calibration position to obtain a target line structured light three-dimensional point; A second processing module, configured to perform processing based on the target line structured light three-dimensional points and preset reference line structured light surface parameters to obtain a target rotation and translation matrix; A calculation module, used for calculating based on the target rotation and translation matrix and the reference line structured light surface parameters to obtain current line structured light surface parameters; Wherein, the second processing module is specifically used for: Determine a reference three-dimensional point based on the reference line structured light surface parameter; Calculating based on the target line structured light three-dimensional point and the initial rotation and translation matrix to obtain an updated line structured light three-dimensional point; The initial rotation and translation matrix is ​​adjusted until the distance between the reference three-dimensional point and the updated line structured light three-dimensional point is less than a preset distance threshold, and the current initial rotation and translation matrix is ​​determined to be the target rotation and translation matrix.

7. The linear structured light positioning device according to claim 6, characterized in that: The second processing module is used to: Determine a reference three-dimensional point based on the reference line structured light surface parameter; Calculating based on the target line structured light three-dimensional point and the initial rotation and translation matrix to obtain an updated line structured light three-dimensional point; The initial rotation and translation matrix is ​​adjusted until the distance between the reference three-dimensional point and the updated line structured light three-dimensional point is less than a preset distance threshold, and the current initial rotation and translation matrix is ​​determined to be the target rotation and translation matrix.

8. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the line structure optical positioning method described in any one of claims 1-5.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the line structure light positioning method described in any one of claims 1-5.

Citation Information

Patent Citations

  • Numerical value calibration method for line structured light vision sensor

    CN105783773A

  • Monocular three-dimensional scanning system based three-dimensional reconstruction method and apparatus

    EP3457078A1