3D camera galvanometer module motion nonlinear error calibration method and system
By determining the target galvanometer delay parameters and laser compensation parameters in a 3D camera, the imaging inaccuracy caused by nonlinear error in the forward and reverse motion of the light projection in the galvanometer structure is solved, and the acquisition efficiency and imaging accuracy are improved.
Patent Information
- Application Number
- CN202411698099.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-26
AI Technical Summary
There is nonlinear error in the forward and reverse motion of the light projection of the galvanometer structure in existing 3D cameras, resulting in inaccurate imaging and no effective solution has yet.
By determining the target galvanometer delay parameters under the preset initial camera exposure time and galvanometer motion time, adjusting the camera exposure time and galvanometer motion time, obtaining the corresponding relationship between the camera exposure time and galvanometer delay parameters, and using segmented linearity Interpolation method and nonlinear segment fitting determine the lighting time of the laser at different positions, obtain the laser compensation parameters, and eliminate the nonlinear error of the round-trip motion of the galvanometer motor.
Effectively eliminate nonlinear errors in the positive and negative motion of the structured light projection of the galvanometer, improve imaging accuracy, improve the point cloud acquisition efficiency and maximum frame rate of the galvanometer motor, and improve structured light accuracy and point cloud quality.
Smart Images

Figure CN119211507A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of camera calibration, and in particular to a method and system for calibrating the motion nonlinear error of a 3D camera galvanometer module. Background Art
[0002] With the development of science and technology, the visual industry is developing rapidly, and the market demand for 3D cameras is growing. 3D cameras can be divided into structured light cameras and line scan cameras according to the imaging principle. Among them, structured light cameras can be divided into laser galvanometer modules, DLP modules, MEMS laser modules, speckle projectors, etc. according to the different projection modules.
[0003] In previous projection modules, the laser galvanometer module usually projects in only one direction, resulting in a large time loss for each projection and low efficiency in overall point cloud acquisition. If structured light sequence projection is performed directly during the round trip of the galvanometer, during point cloud calculation, due to certain nonlinear errors in the forward and reverse motions, a large number of holes in the image will be caused by calculation failures.
[0004] Currently, no effective solution has been proposed for the problem of inaccurate imaging caused by nonlinear errors in the forward and reverse movements of galvanometer structured light projection in related technologies. Summary of the invention
[0005] The embodiments of the present application provide a method, system, electronic device and storage medium for calibrating the nonlinear error of the motion of a 3D camera galvanometer module, so as to at least solve the problem in the related art that the forward and reverse motions of the galvanometer structured light projection have nonlinear errors, resulting in inaccurate imaging.
[0006] In a first aspect, an embodiment of the present application provides a method for calibrating a motion nonlinear error of a 3D camera galvanometer module, the method comprising: Under a preset initial camera exposure time and a preset initial galvanometer movement time, determining a target galvanometer delay parameter that aligns the center position of the galvanometer motor's reciprocating motion; Adjust the stepping modification camera exposure time and the galvanometer movement time to obtain the corresponding relationship between the camera exposure time and the galvanometer delay parameter, wherein the camera exposure time needs to cover the movement period of the galvanometer motor; Under different camera exposure times and galvanometer movement times, with the goal of minimizing the nonlinear error of the reciprocating motion of the galvanometer motor, determining the lighting time of the laser at different positions; According to the lighting time, laser compensation parameters are obtained when the galvanometer motor runs to different positions at different galvanometer movement speeds.
[0007] In some embodiments, determining the target galvanometer delay parameter to align the center position of the reciprocating motion of the galvanometer motor comprises: Obtain a first forward and reverse error corresponding to a first galvanometer delay parameter and a second forward and reverse error corresponding to a second galvanometer delay parameter, wherein the first galvanometer delay parameter is 0, and the second galvanometer delay parameter needs to be adjusted according to actual conditions so that the product of the first forward and reverse error and the second forward and reverse error is less than 0; Between the first galvanometer delay parameter and the second galvanometer delay parameter, a target galvanometer delay parameter that minimizes the forward and reverse path errors is determined by dichotomy.
[0008] In some embodiments, obtaining a first forward and reverse error corresponding to a first galvanometer delay parameter includes: Setting the galvanometer delay of the galvanometer motor according to the first galvanometer delay parameter, and collecting a plurality of forward motion images and reverse motion images; The first forward and reverse motion errors are obtained based on the forward motion image and the reverse motion image.
[0009] In some embodiments, obtaining the first forward and reverse motion errors based on the forward motion image and the reverse motion image includes: Based on the forward motion image and the reverse motion image, determining the horizontal coordinates of the single stripe light at the center of the forward motion and the horizontal coordinates of the single stripe light at the center of the reverse motion; Taking the average of the horizontal coordinates of the single stripe light at the center of the positive motion to obtain the positive motion coordinates; Taking an average of the horizontal coordinates of the single stripe light at the center of the reverse motion to obtain the reverse motion coordinates; The first forward and reverse motion errors are obtained according to the forward motion coordinates and the reverse motion coordinates.
[0010] In some embodiments, the step of determining the lighting time of the laser at different positions with the goal of minimizing the nonlinear error of the reciprocating motion of the galvanometer motor comprises: Based on a preset laser galvanometer controller sequence diagram, the galvanometer motor is controlled to perform forward and reverse motion, and a first nonlinear error between the actual position and the theoretical position of each laser scanning line in the forward motion and a second nonlinear error between the actual position and the theoretical position of the laser scanning line in the reverse motion are obtained, wherein the preset laser galvanometer controller sequence diagram is marked with the theoretical position of each laser scanning line; Based on piecewise linear interpolation and nonlinear piecewise linear fitting, the lighting time of the laser at different positions is determined with the goal of minimizing the first nonlinear error and the first nonlinear error.
[0011] In a second aspect, an embodiment of the present application provides a 3D camera galvanometer module motion nonlinear error calibration system, the system comprising: a fixing device, a 2D camera, an embedded computing module and a galvanometer motor to be calibrated, The fixing device is used to fix the galvanometer motor to be calibrated in a detachable manner; The 2D camera is used to collect forward and reverse motion images of the galvanometer motor to be calibrated; The embedded computing module is respectively connected to the 2D camera and the galvanometer motor to be calibrated for communication, and is used to control the galvanometer motor to be calibrated and the 2D camera, and performs delay parameter calibration and laser compensation parameter calibration on the galvanometer motor to be calibrated through the 3D camera galvanometer module motion nonlinear error calibration method described in the first aspect.
[0012] In some of the embodiments, the system also includes a host computer, which is communicatively connected to the embedded computing module, and is used to receive the delay parameter calibration results and laser compensation parameter calibration results uploaded by the embedded computing module, and associate the serial number of the galvanometer motor to be calibrated with the delay parameter calibration results and laser compensation parameter calibration results.
[0013] In some of the embodiments, the system further comprises a display module, and the display module is used to display the forward and reverse motion images.
[0014] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for calibrating the motion nonlinear error of a 3D camera galvanometer module as described in the first aspect above is implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for calibrating the motion nonlinear error of a 3D camera galvanometer module as described in the first aspect above.
[0016] Compared with the related art, the 3D camera galvanometer module motion nonlinear error calibration method provided in the embodiment of the present application determines the target galvanometer delay parameter that aligns the center position of the reciprocating motion of the galvanometer motor under the preset initial camera exposure time and the preset initial galvanometer motion time, adjusts the step-by-step modification of the camera exposure time and the galvanometer motion time, and obtains the corresponding relationship between the camera exposure time and the galvanometer delay parameter, wherein the camera exposure time needs to cover the motion cycle of the galvanometer motor, and under different camera exposure times and galvanometer motion times, the nonlinear error of the reciprocating motion of the galvanometer motor is minimized as the goal, and the laser lighting time at different positions is determined. According to the lighting time, the laser compensation parameter when the galvanometer motor runs to different positions at different galvanometer motion speeds is obtained, which solves the problem of inaccurate imaging caused by the nonlinear error in the forward and reverse motion of the galvanometer structured light projection in the related art. The galvanometer delay parameter and the laser compensation parameter are obtained, and the reciprocating motion is roughly calibrated using the galvanometer delay parameter, and the laser compensation parameter is used for precise calibration, thereby eliminating the nonlinear error in the forward and reverse motion. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 is a flow chart of a method for calibrating motion nonlinear errors of a 3D camera galvanometer module according to an embodiment of the present application; Figure 2 is a flow chart of calibrating a galvanometer delay parameter according to an embodiment of the present application; Figure 3 is a flow chart of laser compensation parameter calibration according to an embodiment of the present application; Figure 4 It is a structural block diagram of a 3D camera galvanometer module motion nonlinear error calibration system according to an embodiment of the present application; Figure 5 is a schematic diagram of a 3D camera galvanometer module motion nonlinear error calibration system according to an embodiment of the present application; Figure 6 It is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0019] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0020] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0021] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantity limitation, and may indicate the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0022] This embodiment provides a method for calibrating the motion nonlinear error of a 3D camera galvanometer module. Figure 13D camera galvanometer module motion nonlinear error calibration method according to an embodiment of the present application, such as Figure 1 As shown, the process includes the following steps: Step S101 , determining a target galvanometer delay parameter for aligning the center position of the reciprocating motion of the galvanometer motor under a preset initial camera exposure time and a preset initial galvanometer motion time.
[0023] Before the galvanometer delay parameter calibration is performed, when the laser performs forward and return motion through the galvanometer, the center of the image will not coincide due to delay mismatch. In order to simplify the nonlinear calibration, the center of the image needs to be aligned first.
[0024] Set the initial camera exposure time t cexp and the galvanometer movement time t mexp , where the camera exposure time should cover the galvanometer motion cycle. After the galvanometer control module outputs a central single stripe light, the galvanometer delay parameter calibration is performed.
[0025] In some embodiments, step S101 specifically includes: Step S1011, obtain the first forward and reverse error corresponding to the first galvanometer delay parameter and the second forward and reverse error corresponding to the second galvanometer delay parameter, the first galvanometer delay parameter is 0, and the second galvanometer delay parameter needs to be adjusted according to actual conditions so that the product of the first forward and reverse error and the second forward and reverse error is less than 0.
[0026] The first galvanometer delay parameter t1 is set to 0, and the forward and reverse errors of the galvanometer movement when t1=0 are obtained, that is, the first forward and reverse errors.
[0027] In some embodiments, obtaining the first forward and reverse error corresponding to the first galvanometer delay parameter in step S1011 includes: Step S201 , setting the galvanometer delay of the galvanometer motor according to the first galvanometer delay parameter, and collecting a plurality of forward motion images and reverse motion images.
[0028] Step S202: obtaining a first forward and reverse motion error based on the forward motion image and the reverse motion image.
[0029] In some embodiments, step S202 specifically includes: Step S2021, based on the forward motion image and the reverse motion image, determine the horizontal coordinates of the single stripe light at the center of the forward motion and the horizontal coordinates of the single stripe light at the center of the reverse motion.
[0030] Step S2022, taking the average of the horizontal coordinates of the single stripe light at the center of the positive motion to obtain the positive motion coordinates.
[0031] Step S2023, taking the average of the horizontal coordinates of the single stripe light at the center of the reverse motion to obtain the reverse motion coordinates.
[0032] Step S2024, obtaining the first forward and reverse motion errors according to the forward motion coordinates and the reverse motion coordinates.
[0033] Collect M forward and reverse motion images, calculate the horizontal coordinates of the single streak light at the center of the forward and reverse motion and take the average value. p -X n , where X p is the positive motion coordinate, X n is the reverse motion coordinate.
[0034] According to the above method of obtaining the first forward and reverse motion error, the second forward and reverse motion error e2 corresponding to the second galvanometer delay parameter t2 is measured. The value of the second galvanometer delay parameter t2 needs to be adjusted according to actual tests to satisfy e1×e2<0.
[0035] Step S1012, between the first galvanometer delay parameter and the second galvanometer delay parameter, determine the target galvanometer delay parameter that minimizes the forward and reverse path error by using a dichotomy method.
[0036] Between (t1, e1) and (t2, e2), the galvanometer delay parameter and the motion error satisfy monotonicity. Use the dichotomy method to find the appropriate galvanometer delay parameter t c , making the galvanometer delay t=t c When the forward and reverse motion error e=0 or e is the smallest, t c is the galvanometer motion time t mexp The optimal delay under the condition is the target galvanometer delay parameter.
[0037] Continue to refer to Figure 1 After determining the target galvanometer delay parameter under the preset initial camera exposure time and the preset initial galvanometer movement time, execute step S102.
[0038] Step S102, adjusting and stepping the camera exposure time and the galvanometer movement time to obtain the corresponding relationship between the camera exposure time and the galvanometer delay parameter, wherein the camera exposure time needs to cover the movement period of the galvanometer motor.
[0039] By adjusting the step, modifying the camera exposure time and the galvanometer movement time, repeating the above operations, determining the target galvanometer delay parameters under each camera exposure time and galvanometer movement time, completing the delay parameter calibration within the entire exposure range, and obtaining the corresponding relationship between the camera exposure time and the galvanometer delay parameters (T sequence). Figure 2 It is a flow chart of calibrating the delay parameters of a galvanometer according to an embodiment of the present application.
[0040] Step S103 , under different camera exposure times and galvanometer movement times, with the goal of minimizing the nonlinear error of the reciprocating motion of the galvanometer motor, determines the lighting time of the laser at different positions.
[0041] Through the above-mentioned galvanometer delay parameter calibration, the center position of the reciprocating motion of the galvanometer motor is aligned, and then the fitting compensation is performed by piecewise linear fitting, and the laser compensation parameters are calibrated to further calibrate the error. During the experiment, it was found that the laser lighting delay is relatively stable relative to the movement of the galvanometer motor. Therefore, this embodiment compensates for the nonlinearity of the motor by adjusting the laser lighting time at different positions.
[0042] In some embodiments, step S103 specifically includes: Step S1031, based on the preset laser galvanometer controller sequence diagram, the galvanometer motor is controlled to perform forward and reverse motion, and a first nonlinear error between the actual position and the theoretical position of each laser scanning line in the forward motion and a second nonlinear error between the actual position and the theoretical position of the laser scanning line in the reverse motion are obtained, wherein the preset laser galvanometer controller sequence diagram marks the theoretical position of each laser scanning line.
[0043] Step S1032, based on the piecewise linear interpolation method and the nonlinear piecewise linear fitting, with the first nonlinear error and the minimum first nonlinear error as the goal, determine the lighting time of the laser at different positions.
[0044] The galvanometer motion is divided into a preset number (n) of partitions. The sequence diagram of the laser galvanometer controller is n+1 laser scanning line mode (the laser scanning line is located at the edge of each partition). The laser scanning line is defined as L0~L 16 , a forward motion is P, a reverse motion is N, and the nth laser scanning line of the forward motion is L pn . Define X(L pn ) is the laser scanning line L pn The actual position in the image, X(n) is the theoretical position of the nth laser scan line.
[0045] When there is no nonlinear error in the laser galvanometer, L pn and L n(16-n) There should be complete overlap. Since there is actually a nonlinear error, the nonlinear error is defined as: e pn =ABS(X(L pn )-X(n)) e nn =ABS(X(L n(16-n) )-X(n)) Among them, e pn is the nonlinear error of the nth laser scanning line in the forward motion, enn is the nonlinear error of the nth laser scanning line in the reverse motion, X(L n(16-n) ) is the actual position of the 16th-nth laser scanning line in the image during the reverse motion, and ABS() represents the absolute value.
[0046] The preset algorithm is used to obtain a set of laser lighting time series S in the forward motion of the galvanometer. p The lighting time sequence S of the galvanometer reverse motion n , so that E p =(e p0 ,e p1 ,...,e p16 ) and E n =(e n0 ,e n1 ,...,e n16 ) are all 0 or reach a minimum value. Optionally, the preset algorithm is bisection or piecewise linear interpolation.
[0047] Calculate the laser lighting time within the entire motion range, taking the nth interval of forward motion as an example:
[0048] Among them, S p is the galvanometer moving to x p Position, time after linear fitting; S pn is the time when the galvanometer moves to the nth laser scanning line, S pn+1 is the time when the galvanometer moves to the n+1th laser scanning line, S full is the total time of movement from left to right. Through n+1 time points, the time points of the entire range are segmented and fitted.
[0049] The lighting time of the return motion is calculated by the same method, and a nonlinear piecewise linear fitting is performed over the entire domain.
[0050] Step S104, according to the lighting time, obtaining laser compensation parameters when the galvanometer motor runs to different positions at different galvanometer movement speeds.
[0051] Calibrate under different exposures and obtain two sets of data: Spmexp(exp, pn) and Snmexp(exp, nn). exp is the time it takes for the galvanometer to move from left to right, pn is the nth laser scan line in the forward motion, and nn is the nth laser scan line in the reverse motion. Spmexp(exp, pn) is the lighting time sequence of the forward motion under different exposures, and Snmexp(exp, nn) is the lighting time sequence of the reverse motion under different exposures. Thus, the laser compensation parameters are obtained when the galvanometer motor runs to different positions at different galvanometer motion speeds. Figure 3It is a flow chart of laser compensation parameter calibration according to an embodiment of the present application.
[0052] When projecting, linear interpolation is performed according to the calibrated time parameters to obtain the corresponding real time. In engineering implementation, for operations during operation, the combined values of all exposures and positions can be calculated according to Spmexp(exp, pn) and Snmexp(exp, nn), and table lookup is performed to achieve the purpose of calibrating the nonlinear error of the 3D camera galvanometer module motion.
[0053] The piecewise linear interpolation method and the application of the table lookup method make it unnecessary to calibrate all positions and exposure values during the calibration process, which reduces the calibration time and improves the efficiency of error elimination.
[0054] Through the above steps, under the preset initial camera exposure time and the preset initial galvanometer movement time, the target galvanometer delay parameter that aligns the center position of the reciprocating motion of the galvanometer motor is determined, the camera exposure time and the galvanometer movement time are adjusted and modified step by step, and the corresponding relationship between the camera exposure time and the galvanometer delay parameter is obtained, wherein the camera exposure time needs to cover the motion cycle of the galvanometer motor, and under different camera exposure times and galvanometer movement times, the nonlinear error of the reciprocating motion of the galvanometer motor is minimized as the goal, and the laser lighting time at different positions is determined. According to the lighting time, the laser compensation parameters when the galvanometer motor runs to different positions at different galvanometer movement speeds are obtained, which solves the problem of inaccurate imaging caused by nonlinear errors in the forward and reverse motion of the galvanometer structured light projection in the related art. The galvanometer delay parameter and the laser compensation parameter are obtained, and the reciprocating motion is roughly calibrated using the galvanometer delay parameter, and the laser compensation parameter is used for precise calibration, thereby eliminating the nonlinear error in the forward and reverse motion.
[0055] Improve the efficiency of galvanometer movement and the maximum frame rate through reciprocating motion; perform coarse positioning of reciprocating motion based on galvanometer delay parameter calibration; and control the laser lighting duration based on laser compensation parameters to perform nonlinear calibration, improve structured light accuracy, eliminate matching problems caused by nonlinearity in reciprocating motion, and improve the quality of point clouds generated by the galvanometer motor.
[0056] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0057] This embodiment also provides a 3D camera galvanometer module motion nonlinear error calibration system, which is used to implement the above-mentioned embodiments and preferred implementations, and will not be repeated here. As used below, the terms "module", "unit", "subunit", etc. can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0058] Figure 4 3D camera galvanometer module motion nonlinear error calibration system according to an embodiment of the present application, such as Figure 4 As shown, the system includes: a fixing device 41, a 2D camera 42, an embedded computing module 43 and a galvanometer motor 44 to be calibrated.
[0059] The fixing device 41 is used to fix the galvanometer motor 44 to be calibrated in a detachable manner.
[0060] The platform of the galvanometer motor laser module to be calibrated is fixed by the fixing device 41, and the calibration module can be quickly switched.
[0061] The 2D camera 42 is used to collect forward and reverse motion images of the galvanometer motor 44 to be calibrated.
[0062] During the calibration process, the forward and reverse motion images of the galvanometer motor to be calibrated are captured by a 2D camera.
[0063] The embedded computing module 43 is respectively connected to the 2D camera 42 and the galvanometer motor 44 to be calibrated, and is used to control the galvanometer motor 44 to be calibrated and the 2D camera 42, and through the above-mentioned 3D camera galvanometer module motion nonlinear error calibration method, the delay parameter calibration and laser compensation parameter calibration of the galvanometer motor to be calibrated are performed.
[0064] The galvanometer motor 44 to be calibrated includes a laser based on FPGA and a galvanometer control module, and the galvanometer control module includes a galvanometer controller and a laser controller.
[0065] In some of the embodiments, the system also includes a host computer 45, which is communicatively connected to the embedded computing module 43, and is used to receive the delay parameter calibration results and the laser compensation parameter calibration results uploaded by the embedded computing module 43, and associate the serial number of the galvanometer motor to be calibrated with the delay parameter calibration results and the laser compensation parameter calibration results.
[0066] The host computer 45 is used to count the calibration results and back up, and store the calibration data according to the serial number of the corresponding galvanometer motor. The parameter sequence T, Spmexp (exp, pn), Snmexp (exp, nn) is saved on the host computer for subsequent assembly and production.
[0067] Optionally, a calibration program is set on the host computer, and after the galvanometer motor to be calibrated is installed on the fixing device, the calibration process is controlled by the calibration program on the host computer.
[0068] In some of the embodiments, the system further comprises a display module for displaying forward and reverse motion images.
[0069] Figure 5 It is a schematic diagram of a 3D camera galvanometer module motion nonlinear error calibration system according to an embodiment of the present application.
[0070] Through the above system, the galvanometer delay parameters and laser compensation parameters are obtained, the reciprocating motion is roughly calibrated using the galvanometer delay parameters, and the laser compensation parameters are used for precise calibration, thereby eliminating the nonlinear errors existing in the forward and reverse motions, and solving the problem of inaccurate imaging caused by the nonlinear errors in the forward and reverse motions of the galvanometer structured light projection in the related technology.
[0071] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0072] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0073] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0074] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: S1, determining a target galvanometer delay parameter that aligns the center position of the reciprocating motion of the galvanometer motor under a preset initial camera exposure time and a preset initial galvanometer motion time.
[0075] S2, adjusting the stepping modification camera exposure time and the galvanometer movement time to obtain the corresponding relationship between the camera exposure time and the galvanometer delay parameter, wherein the camera exposure time needs to cover the movement period of the galvanometer motor.
[0076] S3, under different camera exposure time and galvanometer movement time, with the goal of minimizing the nonlinear error of the galvanometer motor's reciprocating motion, determine the laser lighting time at different positions.
[0077] S4, according to the lighting time, obtain the laser compensation parameters when the galvanometer motor runs to different positions at different galvanometer movement speeds.
[0078] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0079] In one embodiment, Figure 6 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 6 As shown, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 6 As shown. The electronic device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for calibrating the motion nonlinear error of a 3D camera galvanometer module is implemented.
[0080] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0081] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0082] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0083] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for calibrating the nonlinear error of a 3D camera galvanometer module motion, characterized in that: The method comprises: Under a preset initial camera exposure time and a preset initial galvanometer movement time, determining a target galvanometer delay parameter that aligns the center position of the galvanometer motor's reciprocating motion; Adjust the stepping modification camera exposure time and the galvanometer movement time to obtain the corresponding relationship between the camera exposure time and the galvanometer delay parameter, wherein the camera exposure time needs to cover the movement period of the galvanometer motor; Under different camera exposure times and galvanometer movement times, the laser lighting time at different positions is determined with the goal of minimizing the nonlinear error of the galvanometer motor's reciprocating motion; According to the lighting time, laser compensation parameters are obtained when the galvanometer motor runs to different positions at different galvanometer movement speeds.
2. The method according to claim 1, characterized in that: Determining the target galvanometer delay parameter that aligns the center position of the galvanometer motor's reciprocating motion comprises: Obtain a first forward and reverse error corresponding to a first galvanometer delay parameter and a second forward and reverse error corresponding to a second galvanometer delay parameter, wherein the first galvanometer delay parameter is 0, and the second galvanometer delay parameter needs to be adjusted according to actual conditions so that the product of the first forward and reverse error and the second forward and reverse error is less than 0; Between the first galvanometer delay parameter and the second galvanometer delay parameter, a target galvanometer delay parameter that minimizes the forward and reverse path errors is determined by dichotomy.
3. The method according to claim 2, characterized in that The step of obtaining the first forward and reverse error corresponding to the first galvanometer delay parameter comprises: Setting the galvanometer delay of the galvanometer motor according to the first galvanometer delay parameter, and collecting a plurality of forward motion images and reverse motion images; The first forward and reverse errors are obtained based on the forward motion image and the reverse motion image.
4. The method according to claim 3, characterized in that The obtaining the first forward and reverse motion errors based on the forward motion image and the reverse motion image comprises: Based on the forward motion image and the reverse motion image, determining the horizontal coordinates of the single stripe light at the center of the forward motion and the horizontal coordinates of the single stripe light at the center of the reverse motion; Taking the average of the horizontal coordinates of the single stripe light at the center of the positive motion to obtain the positive motion coordinates; Taking an average of the horizontal coordinates of the single stripe light at the center of the reverse motion to obtain the reverse motion coordinates; The first forward and reverse motion errors are obtained according to the forward motion coordinates and the reverse motion coordinates.
5. The method according to claim 1, characterized in that The step of determining the lighting time of the laser at different positions with the goal of minimizing the nonlinear error of the reciprocating motion of the galvanometer motor comprises: Based on a preset laser galvanometer controller sequence diagram, the galvanometer motor is controlled to perform forward and reverse motion, and a first nonlinear error between the actual position and the theoretical position of each laser scanning line in the forward motion and a second nonlinear error between the actual position and the theoretical position of the laser scanning line in the reverse motion are obtained, wherein the preset laser galvanometer controller sequence diagram is marked with the theoretical position of each laser scanning line; Based on piecewise linear interpolation and nonlinear piecewise linear fitting, the lighting time of the laser at different positions is determined with the goal of minimizing the first nonlinear error and the first nonlinear error.
6. A 3D camera galvanometer module motion nonlinear error calibration system, characterized in that: The system includes: a fixing device, a 2D camera, an embedded computing module and a galvanometer motor to be calibrated. The fixing device is used to fix the galvanometer motor to be calibrated in a detachable manner; The 2D camera is used to collect forward and reverse motion images of the galvanometer motor to be calibrated; The embedded computing module is respectively connected to the 2D camera and the galvanometer motor to be calibrated for communication, and is used to control the galvanometer motor to be calibrated and the 2D camera, and performs delay parameter calibration and laser compensation parameter calibration on the galvanometer motor to be calibrated through the 3D camera galvanometer module motion nonlinear error calibration method described in any one of claims 1 to 5.
7. The system according to claim 6, characterized in that The system also includes a host computer, which is communicatively connected to the embedded computing module and is used to receive the delay parameter calibration results and laser compensation parameter calibration results uploaded by the embedded computing module, and associate the serial number of the galvanometer motor to be calibrated with the delay parameter calibration results and laser compensation parameter calibration results.
8. The system according to claim 6, characterized in that The system also includes a display module, which is used to display the forward and reverse motion images.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for calibrating the motion nonlinear error of a 3D camera galvanometer module according to any one of claims 1 to 5 is implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for calibrating the motion nonlinear error of a 3D camera galvanometer module as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
High-precision galvanometer error self-correcting device and high-precision galvanometer error self-correcting method based on machine vision
CN105620050A
Double-line laser scanning system and method
CN114779465A
Galvanometer correction method and device, computer equipment, storage medium and program product
CN117359135A
Galvanometer calibration method, device and equipment based on laser galvanometer camera and medium
CN118090151A
Laser light-on and light-off delay track compensation method based on galvanometer control
CN118466399A
Cited By
Galvanometer scanning multi-field collaborative dynamic calibration method and system
CN122505138A
A galvanometer scanning multi-field cooperative dynamic calibration method and system
CN122505138B