CN117036199A - Projector distortion compensation method and device based on linear grid model - Google Patents

Projector distortion compensation method and device based on linear grid model Download PDF

Info

Publication number
CN117036199A
CN117036199A CN202311084061.6A CN202311084061A CN117036199A CN 117036199 A CN117036199 A CN 117036199A CN 202311084061 A CN202311084061 A CN 202311084061A CN 117036199 A CN117036199 A CN 117036199A
Authority
CN
China
Prior art keywords
distortion
grid
linear
point
projector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311084061.6A
Other languages
Chinese (zh)
Inventor
刘凯
白艺
张文谦
张格悠
许斌
张博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan University
Original Assignee
Sichuan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan University filed Critical Sichuan University
Priority to CN202311084061.6A priority Critical patent/CN117036199A/en
Publication of CN117036199A publication Critical patent/CN117036199A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Image Processing (AREA)
  • Transforming Electric Information Into Light Information (AREA)

Abstract

The application provides a projector distortion compensation method and a projector distortion compensation device based on a linear grid model, which relate to the technical field of three-dimensional reconstruction, are applied to stripe projection contour operation, grid distorted pixel planes and set grid size and grid index value of each grid; calibrating distortion parameters of the linear network model; calculating a grid index value corresponding to the distortion point, calculating a distortion parameter of the distortion point by using the grid index value, and compensating the distortion point in real time by using the calculated distortion parameter. Therefore, on the basis of post-distortion compensation, the compensation accuracy is ensured, and meanwhile, the distortion compensation speed is improved.

Description

Projector distortion compensation method and device based on linear grid model
Technical Field
The application relates to the technical field of three-dimensional reconstruction, in particular to a projector distortion compensation method and device based on a linear grid model.
Background
Three-dimensional reconstruction is to reconstruct a three-dimensional object in a virtual world, which is the reverse operation of a camera, namely, the camera presents the real object in a two-dimensional picture, and three-dimensional reconstruction is to present the information in the two-dimensional picture in a three-dimensional virtual space. The fringe projection profilometry has the advantages of non-contact, high precision and the like, and is widely applied to optical three-dimensional morphology measurement. Phase shift profilometry and fourier transform profilometry are two main ways of acquiring phase for fringe projection profilometry. When the stripe projection profilometry measures an object, a projector projects sinusoidal phase shift stripes onto the measured object, a deformed sinusoidal stripe image acquired by a camera is utilized to carry out phase arctangent calculation by utilizing the deformed sinusoidal stripe image to be wrapped in [ -pi, pi ], depth information of the surface of the object is carried in the wrapping phase, and the wrapping phase needs to be unfolded through a phase unfolding algorithm. And reconstructing the three-dimensional morphology of the object by using the relationship between the unfolded phase and the depth.
In practice, however, the projector lens in fringe projection profilometry may not be in an ideal undistorted state. The lens distortion brings phase errors and causes three-dimensional morphology measurement errors of objects. Projecting a stripe pattern with increased reverse distortion in advance can reduce accuracy errors caused by distortion of the projector lens. However, not all stripe patterns can be accurately distortion-compensated using the predistortion method. Adding predistortion to some fringes can cause additional errors, such as a binary fringe pattern. Although post-distortion compensation is not so limited, the process of numerically compensating for the distorted fringe pattern is often cumbersome and time consuming.
Disclosure of Invention
Accordingly, the present application is directed to a method and apparatus for compensating distortion of a projector based on a linear grid model, which can ensure compensation accuracy and increase the speed of distortion compensation on the basis of post-distortion compensation.
In a first aspect, an embodiment of the present application provides a method for compensating distortion of a projector based on a linear grid model, which is applied to a fringe projection profilometry, and the method includes the following steps:
gridding the distorted pixel plane, and setting a grid size and a grid index value of each grid;
calibrating distortion parameters of the linear network model;
calculating a grid index value corresponding to the distortion point;
and calculating a distortion parameter of the distortion point by using the grid index value, and compensating the distortion point in real time by using the calculated distortion parameter.
In some embodiments, wherein the grid size of each grid is 1 x 1 pixel units, the grid index value is set as the coordinate value of the grid start point.
In some embodiments, the calibrating the distortion parameters of the linear network model includes the steps of:
calibrating distortion parameters of the linear network model based on the first linear function and the second linear function to express the relationship between the distortion error distance and the distortion point;
and obtaining a first linear parameter of the first linear function and a second linear parameter of the second linear function by using a plurality of equally spaced points selected in the grid.
In some embodiments, the distortion error distance includes a lateral distortion error distance and a longitudinal distortion error distance, and the obtaining the first linear parameter of the first linear function by using a plurality of equally spaced points selected in the grid includes the following steps:
expressing a relationship between the distortion point and its lateral distortion error distance and longitudinal distortion error distance based on a first linear function comprising a first linear function;
selecting a plurality of equally-spaced distortion points in the grid, and calculating respective transverse distortion error distances and longitudinal distortion error distances of the distortion points by using a polynomial model;
and linearly fitting the distorted coordinate value, the transverse distortion error distance and the longitudinal distortion error distance to obtain a first linear parameter of the first linear function.
In some embodiments, the calculating the grid index value corresponding to the distortion point includes the following steps:
determining a captured image category; the image categories include unidirectional stripes, circular stripes and bidirectional stripes;
aiming at the determined image category, adopting a corresponding formula to calculate a grid index value corresponding to the distortion point; and calculating grid index values corresponding to the distortion points according to three different formulas corresponding to the unidirectional stripes, the circular stripes and the bidirectional stripes.
In some embodiments, for unidirectional stripes and circular stripes, coordinate values of distortion points are calculated based on epipolar constraint, and then corresponding grid index values are obtained by using the calculated coordinate values of the distortion points.
In some embodiments, the calculating the distortion parameters of the distortion point by using the grid index value and the real-time compensating the distortion point by using the calculated distortion parameters includes the following steps:
calculating a lateral distortion error distance and a longitudinal distortion error distance of the distortion point using the grid index value and based on the first linear function and the second linear function;
and compensating the distortion point in real time based on the calculated transverse distortion error distance and the longitudinal distortion error distance to obtain a coordinate value of the undistorted point.
In a second aspect, an embodiment of the present application provides a real-time structured light reconstruction device, applied to fringe projection profilometry, the device comprising:
the gridding module is used for gridding the distorted pixel plane and setting the grid size and the grid index value of each grid;
the calibration module is used for calibrating distortion parameters of the linear network model;
the calculation module is used for calculating grid index values corresponding to the distortion points;
and the compensation module is used for calculating the distortion parameters of the distortion points by using the grid index values and compensating the distortion points in real time by using the calculated distortion parameters.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a bus, where the memory stores machine-readable instructions executable by the processor, where the processor and the memory communicate through the bus when the electronic device is running, and where the machine-readable instructions, when executed by the processor, perform the steps of a method for compensating for distortion in a projector based on a linear grid model according to any one of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to perform the steps of a method for compensating for distortion of a projector based on a linear grid model according to any one of the first aspect.
The application relates to a projector distortion compensation method and a projector distortion compensation device based on a linear grid model, which are applied to stripe projection contour operation, grid distortion pixel planes and set grid size and grid index value of each grid; calibrating distortion parameters of the linear network model; calculating a grid index value corresponding to the distortion point, calculating a distortion parameter of the distortion point by using the grid index value, and compensating the distortion point in real time by using the calculated distortion parameter. Therefore, on the basis of post-distortion compensation, the compensation accuracy is ensured, and meanwhile, the distortion compensation speed is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for projector distortion compensation based on a linear grid model according to an embodiment of the present application;
FIG. 2 shows a schematic diagram of a gridded distorted pixel plane according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of calibrating distortion parameters of a linear network model according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating calculation of grid index values corresponding to distortion points according to an embodiment of the present application;
FIG. 5 shows a schematic diagram of approximate distortion points of a circular stripe according to an embodiment of the present application;
FIG. 6 shows a flow chart of real-time compensation of the distortion point according to an embodiment of the present application;
FIG. 7 is a schematic view of a flat panel point cloud before and after distortion compensation according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of a projector distortion compensation apparatus based on a linear grid model according to an embodiment of the present application;
fig. 9 shows a block diagram of an electronic device according to an embodiment of the application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for the purpose of illustration and description only and are not intended to limit the scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In addition, the described embodiments are only some, but not all, embodiments of the application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that the term "comprising" will be used in embodiments of the application to indicate the presence of the features stated hereafter, but not to exclude the addition of other features.
In view of the technical problems set forth in the background art, the application provides a projector distortion compensation method, a projector distortion compensation device, an electronic device and a storage medium based on a linear grid model, which can ensure the compensation precision and improve the distortion compensation speed on the basis of post-distortion compensation.
Referring to fig. 1 of the specification, the application provides a projector distortion compensation method based on a linear grid model, which is applied to fringe projection contour surgery, and the method comprises the following steps:
s1, gridding a distorted pixel plane, and setting the grid size and the grid index value of each grid;
s2, calibrating distortion parameters of the linear network model;
s3, calculating a grid index value corresponding to the distortion point;
and S4, calculating distortion parameters of the distortion points by using the grid index values, and compensating the distortion points in real time by using the calculated distortion parameters.
In the embodiment of the application, the projector distortion compensation method based on the linear grid model can be operated on terminal equipment or a server; the terminal device may be a server terminal device, and when the projector distortion compensation method based on the linear grid model operates on a server, the projector distortion compensation method based on the linear grid model may be implemented and executed based on a cloud interaction system, where the cloud interaction system at least includes the server and a client device (i.e., the terminal device).
In step S1, when the distorted pixel plane is gridded, the size of the whole distorted grid model is set according to the size of the undistorted pixel plane of the projector, and then the whole distorted grid model is respectively gridded by integer pixel points (i p ,j p ) The grid size is 1×1 pixel unit as the start point of the grid. While the index value of the grid is set as the coordinate value (i) p ,j p ). In one embodiment, a schematic diagram of a gridded distorted pixel plane can be seen in the drawing of the specification, 2, wherein Part 1 I.e. one of the grids divided for the entire distorted pixel plane.
Referring to fig. 3 of the specification, in executing step S2, the calibrating distortion parameters of the linear network model includes the following steps:
s201, calibrating distortion parameters of a linear network model based on a first linear function and a second linear function to express the relation between a distortion error distance and a distortion point;
s202, obtaining a first linear parameter of the first linear function and a second linear parameter of the second linear function by using a plurality of equally-spaced distortion points selected in the grid.
That is, the present application describes the distortion error distance d in the grid using two linear functions p And distortion point (x) p ,y p ) Is a function of (a). Wherein the expression of the first linear function is as follows:
wherein: d, d x And d y Distortion error distance d p Distance component (d), i.e. transverse distortion error distance d x And a longitudinal distortion error distance d yK x 、K y 、B x And B y Four linear parameters that are a first linear function.
Also, in the present application, in order to obtain K of the first linear function x 、K y 、B x And B y The values of four linear parameters are that a plurality of equally spaced distortion points are selected in a grid, and the respective transverse distortion error distance and longitudinal distortion error distance of the distortion points are calculated by using a polynomial model; and linearly fitting the distorted coordinate value, the transverse distortion error distance and the longitudinal distortion error distance to obtain a first linear parameter of the first linear function.
Specifically, a plurality of equally spaced distortion points (x p ,y p ) The respective lateral distortion error distances d are calculated in advance using a conventional polynomial model or other model describing lens distortion x And a longitudinal distortion error distance d y Then the selected interval distortion point (x p ,y p ) Distance d of transverse distortion error x And a longitudinal distortion error distance d y A linear fit was performed. For the linear parameter K x And B x The fit expression is as follows:
wherein: l (L) min The minimum value of the sum of squares of residuals of the parameter fitting; c and N are the index and total number of the selected interval distortion points respectively; similarly, a linear parameter K can be obtained y And B y The specific steps are referred to above for obtaining the linear parameter K x And B x The steps of (1) are not described in detail herein.
Wherein the expression of the second linear function is as follows:
wherein: d (D) x (i p ,j p ) And D y (i p ,j p ) Two constant parameters.
Likewise, a plurality of equally spaced distortion points (x p ,y p ) Obtaining a second linear parameter D of a second linear function by linear fitting x (i p ,j p ) And D y (i p ,j p ) The specific steps can be seen from the above-mentioned linear parameter K x And B x The steps of (1) are not described in detail herein.
Referring to fig. 4 of the specification, when executing step S3, the calculating the grid index value corresponding to the distortion point includes the following steps:
s301, determining a captured image category; the image categories include unidirectional stripes, circular stripes and bidirectional stripes;
s302, aiming at the determined image category, adopting a corresponding formula to calculate a grid index value corresponding to the distortion point; and calculating grid index values corresponding to the distortion points according to three different formulas corresponding to the unidirectional stripes, the circular stripes and the bidirectional stripes.
That is, in the case of the formal distortion compensation flow, it is necessary to find the distortion point (x p ,y p ) Corresponding grid index values, and different image categories correspond to different formulas for calculating the grid index values corresponding to the distortion points. Wherein, for the bidirectional stripe, it can be directly obtained by the following formula:
for unidirectional stripes and circular stripes, coordinate values of distortion points are calculated based on epipolar constraint, and then corresponding grid index values are obtained by using the calculated coordinate values of the distortion points. Wherein for the point (x) p ,y p ) One-way fringes of coordinate values may be obtained by calculating a distortion point (x p ,y p ) X of the abscissa of (2) p Obtain the ordinate y p Or calculate the ordinate y p Obtain the abscissa x p The expression is as follows:
wherein:and->The pole and the phase zero can be directly obtained through a calibration matrix.
Also, for the case where the distortion point (x p ,y p ) Deriving the linear line l in figure 5 of the description e And distortion point (x) p ,y p ) The expression of the included angle θ in the abscissa xp direction is as follows:
then the polar diameter r is obtained by phase calculation p The coordinate values of an approximate distortion point can be obtained as follows:
referring to fig. 6 of the specification, in executing step S4, the calculating a distortion parameter of the distortion point using the grid index value, and performing real-time compensation on the distortion point using the calculated distortion parameter includes the following steps:
s401, calculating a transverse distortion error distance and a longitudinal distortion error distance of the distortion point by using the grid index value and based on the first linear function and the second linear function;
and S402, compensating the distortion point in real time based on the calculated transverse distortion error distance and the calculated longitudinal distortion error distance to obtain a coordinate value of the undistorted point.
That is, after the grid index value is obtained, the lateral distortion error distance d can be calculated by the first linear function and the second linear function in step S2, respectively, using a linear grid model x And a longitudinal distortion error distance d y Real-time projector distortion compensation is performed, i.e. at the point of distortion (x p ,y p ) X of the abscissa of (2) p And the ordinate y p The distortion displacement in the two directions is respectively the transverse distortion error distance d x And a longitudinal distortion error distance d y . The expression is as follows:
wherein:is the coordinate value of the distortion-compensated undistorted point.
And after obtaining the coordinate values of the undistorted points, the coordinate values of the distorted points (x p ,y p ) And coordinate values of undistorted pointsThree-dimensional reconstruction was performed for comparison. In an embodiment, a schematic view of a flat point cloud before and after distortion compensation can be seen in fig. 7 of the specification, wherein (a) in fig. 7 is a coordinate value (x p ,y p ) The distortion-free compensation flat plate point cloud obtained by three-dimensional reconstruction is shown in (b) of figure 7, wherein the coordinate value based on the distortion-free point is +.>And carrying out three-dimensional reconstruction to obtain a distortion-compensated flat plate point cloud.
Meanwhile, on an Intel i5-10500 CPU of 3.1GHz and an experimental computer using a single-thread C++ programming language, the calculation speed of the distortion compensation after traditional iteration is 40.06 frames per second, and the embodiment can reach 402.41 frames, and the speed is improved by more than 10 times.
Therefore, the projector distortion compensation method based on the linear grid model can ensure the compensation precision and improve the distortion compensation speed on the basis of post-distortion compensation.
Based on the same inventive concept, the embodiment of the application also provides a projector distortion compensation device based on a linear grid model, and because the principle of solving the problem of the device in the embodiment of the application is similar to that of the projector distortion compensation method based on the linear grid model in the embodiment of the application, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted.
As shown in fig. 8, an embodiment of the present application further provides a projector distortion compensation device based on a linear grid model, which is applied to fringe projection profilometry, and the device includes:
a gridding module 801, configured to gridde the distorted pixel plane, and set a grid size and a grid index value of each grid;
a calibration module 802, configured to calibrate distortion parameters of the linear network model;
a calculating module 803, configured to calculate a grid index value corresponding to the distortion point;
and the compensation module 804 is configured to calculate a distortion parameter of the distortion point by using the grid index value, and compensate the distortion point in real time by using the calculated distortion parameter.
In some embodiments, the mesh size divided by the meshing module 801 is 1×1 pixel unit, and the mesh index value is set as the coordinate value of the mesh start point.
In some embodiments, the calibrating module 802 calibrates distortion parameters of the linear network model, including:
calibrating distortion parameters of the linear network model based on the first linear function and the second linear function to express the relationship between the distortion error distance and the distortion point;
and obtaining a first linear parameter of the first linear function and a second linear parameter of the second linear function by using a plurality of equally spaced points selected in the grid.
In some embodiments, the distortion error distance includes a lateral distortion error distance and a longitudinal distortion error distance, and the scaling module 802 obtains the first linear parameter of the first linear function using a number of equally spaced points selected within the grid, including:
expressing a relationship between the distortion point and its lateral distortion error distance and longitudinal distortion error distance based on a first linear function comprising a first linear function;
selecting a plurality of equally-spaced distortion points in the grid, and calculating respective transverse distortion error distances and longitudinal distortion error distances of the distortion points by using a polynomial model;
and linearly fitting the distorted coordinate value, the transverse distortion error distance and the longitudinal distortion error distance to obtain a first linear parameter of the first linear function.
In some embodiments, the calculating module 803 calculates a grid index value corresponding to the distortion point, including:
determining a captured image category; the image categories include unidirectional stripes, circular stripes and bidirectional stripes;
aiming at the determined image category, adopting a corresponding formula to calculate a grid index value corresponding to the distortion point; and calculating grid index values corresponding to the distortion points according to three different formulas corresponding to the unidirectional stripes, the circular stripes and the bidirectional stripes.
In some embodiments, the calculating module 803 calculates the coordinate values of the distortion points based on epipolar constraint for unidirectional stripes and circular stripes, and then obtains the corresponding grid index values by using the calculated coordinate values of the distortion points.
In some embodiments, the compensation module 804 calculates a distortion parameter of the distortion point using the grid index value, and compensates the distortion point in real time using the calculated distortion parameter, including:
calculating a lateral distortion error distance and a longitudinal distortion error distance of the distortion point using the grid index value and based on the first linear function and the second linear function;
and compensating the distortion point in real time based on the calculated transverse distortion error distance and the longitudinal distortion error distance to obtain a coordinate value of the undistorted point.
The application relates to a projector distortion compensation device based on a linear grid model, which is applied to stripe projection contour operation, and is characterized in that a distorted pixel plane is meshed through a meshing module, and the grid size and the grid index value of each grid are set; calibrating distortion parameters of the linear network model through a calibration module; and calculating a grid index value corresponding to the distortion point through a calculation module, calculating a distortion parameter of the distortion point through a compensation module by using the grid index value, and compensating the distortion point in real time by using the calculated distortion parameter. Therefore, on the basis of post-distortion compensation, the compensation accuracy is ensured, and meanwhile, the distortion compensation speed is improved.
Based on the same concept of the present application, fig. 9 of the present disclosure shows a structure of an electronic device 900 according to an embodiment of the present application, where the electronic device 900 includes: at least one processor 901, at least one network interface 904 or other user interface 903, memory 905, at least one communication bus 902. The communication bus 902 is used to enable connected communications between these components. The electronic device 900 optionally includes a user interface 903, including a display (e.g., a touch screen, LCD, CRT, holographic imaging (holo graphic) or projection (Projector), etc.), a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, touch screen, etc.).
Memory 905 may include read-only memory and random access memory and provides instructions and data to processor 901. A portion of the memory 905 may also include non-volatile random access memory (NVRAM).
In some implementations, the memory 905 stores the following elements, protectable modules or data structures, or a subset thereof, or an extended set thereof:
an operating system 9051 containing various system programs for implementing various basic services and handling hardware-based tasks;
the application module 9052 contains various application programs such as a desktop (desktop), a Media Player (Media Player), a Browser (Browser), and the like for implementing various application services.
In the embodiment of the present application, the processor 901 is configured to execute steps in a method for compensating distortion of a projector based on a linear grid model, by calling a program or an instruction stored in the memory 905, so that the speed of compensating distortion can be improved while ensuring the compensation accuracy on the basis of post-distortion compensation.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs steps as in a projector distortion compensation method based on a linear grid model.
In particular, the storage medium can be a general-purpose storage medium, such as a mobile disk, a hard disk, or the like, on which a computer program is executed that can perform the above-described projector distortion compensation method based on the linear grid model.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments provided in the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present application for illustrating the technical solution of the present application, but not for limiting the scope of the present application, and although the present application has been described in detail with reference to the foregoing examples, it will be understood by those skilled in the art that the present application is not limited thereto: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the corresponding technical solutions. Are intended to be encompassed within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A method for compensating distortion of a projector based on a linear grid model, which is applied to fringe projection profilometry, the method comprising the steps of:
gridding the distorted pixel plane, and setting a grid size and a grid index value of each grid;
calibrating distortion parameters of the linear network model;
calculating a grid index value corresponding to the distortion point;
and calculating a distortion parameter of the distortion point by using the grid index value, and compensating the distortion point in real time by using the calculated distortion parameter.
2. The projector distortion compensation method based on a linear grid model according to claim 1, wherein the grid size of each grid is 1 x 1 pixel unit, and the grid index value is set as the coordinate value of the grid start point.
3. The method for compensating distortion of a projector according to claim 2, wherein said calibrating distortion parameters of the linear network model comprises the steps of:
calibrating distortion parameters of the linear network model based on the first linear function and the second linear function to express the relationship between the distortion error distance and the distortion point;
and obtaining a first linear parameter of the first linear function and a second linear parameter of the second linear function by using a plurality of equally-spaced distortion points selected in the grid.
4. A method of compensating for distortion in a projector based on a linear grid model according to claim 3, wherein the distortion error distance comprises a lateral distortion error distance and a longitudinal distortion error distance, and wherein the obtaining the first linear parameter of the first linear function using a plurality of equally spaced distortion points selected in the grid comprises the steps of:
expressing a relationship between the distortion point and its lateral distortion error distance and longitudinal distortion error distance based on a first linear function comprising a first linear function;
selecting a plurality of equally-spaced distortion points in the grid, and calculating respective transverse distortion error distances and longitudinal distortion error distances of the distortion points by using a polynomial model;
and linearly fitting the distorted coordinate value, the transverse distortion error distance and the longitudinal distortion error distance to obtain a first linear parameter of the first linear function.
5. The method for compensating distortion of a projector according to claim 4, wherein calculating the grid index value corresponding to the distortion point comprises the steps of:
determining a captured image category; the image categories include unidirectional stripes, circular stripes and bidirectional stripes;
aiming at the determined image category, adopting a corresponding formula to calculate a grid index value corresponding to the distortion point; and calculating grid index values corresponding to the distortion points according to three different formulas corresponding to the unidirectional stripes, the circular stripes and the bidirectional stripes.
6. The method for compensating distortion of a projector based on a linear grid model according to claim 5, wherein for unidirectional stripes and circular stripes, coordinate values of distortion points are calculated based on epipolar constraint, and then corresponding grid index values are obtained by using the calculated coordinate values of distortion points.
7. The method for compensating distortion of a projector according to claim 6, wherein the calculating distortion parameters of the distortion point using the grid index values and the real-time compensating the distortion point using the calculated distortion parameters comprises the steps of:
calculating a lateral distortion error distance and a longitudinal distortion error distance of the distortion point using the grid index value and based on the first linear function and the second linear function;
and compensating the distortion point in real time based on the calculated transverse distortion error distance and the longitudinal distortion error distance to obtain a coordinate value of the undistorted point.
8. A linear grid model-based projector distortion compensation apparatus for use in fringe projection profilometry, the apparatus comprising:
the gridding module is used for gridding the distorted pixel plane and setting the grid size and the grid index value of each grid;
the calibration module is used for calibrating distortion parameters of the linear network model;
the calculation module is used for calculating grid index values corresponding to the distortion points;
and the compensation module is used for calculating the distortion parameters of the distortion points by using the grid index values and compensating the distortion points in real time by using the calculated distortion parameters.
9. An electronic device, comprising: a processor, a memory and a bus, said memory storing machine readable instructions executable by said processor, said processor and said memory communicating over the bus when the electronic device is running, said machine readable instructions when executed by said processor performing the steps of a projector distortion compensation method based on a linear grid model as claimed in any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of a method for compensating for distortion of a projector based on a linear grid model as claimed in any one of claims 1 to 7.
CN202311084061.6A 2023-08-25 2023-08-25 Projector distortion compensation method and device based on linear grid model Pending CN117036199A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311084061.6A CN117036199A (en) 2023-08-25 2023-08-25 Projector distortion compensation method and device based on linear grid model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311084061.6A CN117036199A (en) 2023-08-25 2023-08-25 Projector distortion compensation method and device based on linear grid model

Publications (1)

Publication Number Publication Date
CN117036199A true CN117036199A (en) 2023-11-10

Family

ID=88631580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311084061.6A Pending CN117036199A (en) 2023-08-25 2023-08-25 Projector distortion compensation method and device based on linear grid model

Country Status (1)

Country Link
CN (1) CN117036199A (en)

Similar Documents

Publication Publication Date Title
CN115272110B (en) Method and device for correcting distortion of projector in structured light three-dimensional reconstruction
CN111563959B (en) Updating method, device, equipment and medium of three-dimensional deformable model of human face
EP2932468A1 (en) Surface geometry imaging
CN107869966A (en) 3-dimensional form measuring method and 3-dimensional form measuring instrument
CN110006365B (en) Phase unwrapping method and device based on two-dimensional lookup table and electronic equipment
CN114663597B (en) Real-time structured light reconstruction method and device based on normalized expanded polar line geometry
CN114111633A (en) Projector lens distortion error correction method for structured light three-dimensional measurement
CN111928799A (en) Three-dimensional measurement method for realizing stripe image contrast enhancement based on deep learning
CN112967348A (en) Three-dimensional reconstruction method based on one-dimensional scanning structured light system and related components thereof
CN111161169A (en) Hoff transform-based absolute phase noise removal method and device and storage medium
CN109886910B (en) DEM (digital elevation model) correction method and device for external digital elevation model
CN115205360A (en) Three-dimensional outer contour online measurement and defect detection method of composite stripe projection steel pipe and application
CN111965646B (en) Satellite-borne radar data processing method, device, equipment and storage medium
CN117036199A (en) Projector distortion compensation method and device based on linear grid model
CN115115788B (en) Three-dimensional reconstruction method and device, electronic equipment and storage medium
CN113191963B (en) Projector residual distortion full-field calibration method and device without additional operation
Steger Algorithms for the orthographic-n-point problem
CN111241317B (en) Phase and modulation information acquisition method based on multiple two-dimensional lookup tables
CN111207697B (en) Phase and modulation acquisition method and device based on lookup table and electronic equipment
CN114897959A (en) Phase unwrapping method based on light field multi-view constraint and related components
CN113074661A (en) Projector corresponding point high-precision matching method based on polar line sampling and application thereof
CN115950359B (en) Three-dimensional reconstruction method and device and electronic equipment
Zhang et al. Rethinking phase height model of fringe projection profilometry: A geometry transformation viewpoint
CN116558445B (en) Phase decoding method of stripe projection and computer readable storage medium
CN105096383A (en) Single carrier interference fringe detection surface shape phase recovery method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination