CN114979592A - Image curved surface geometric correction method and device, electronic equipment and storage medium - Google Patents

Image curved surface geometric correction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114979592A
CN114979592A CN202210336026.8A CN202210336026A CN114979592A CN 114979592 A CN114979592 A CN 114979592A CN 202210336026 A CN202210336026 A CN 202210336026A CN 114979592 A CN114979592 A CN 114979592A
Authority
CN
China
Prior art keywords
control point
projected
grid
curved surface
picture
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.)
Granted
Application number
CN202210336026.8A
Other languages
Chinese (zh)
Other versions
CN114979592B (en
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.)
Zhongxu Xinda Beijing Technology Development Co ltd
Original Assignee
Zhongxu Xinda Beijing Technology Development Co ltd
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 Zhongxu Xinda Beijing Technology Development Co ltd filed Critical Zhongxu Xinda Beijing Technology Development Co ltd
Priority to CN202210336026.8A priority Critical patent/CN114979592B/en
Publication of CN114979592A publication Critical patent/CN114979592A/en
Application granted granted Critical
Publication of CN114979592B publication Critical patent/CN114979592B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3179Video signal processing therefor
    • H04N9/3185Geometric adjustment, e.g. keystone or convergence

Landscapes

  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a method and a device for correcting the geometry of an image curved surface, electronic equipment and a storage medium. The method comprises the steps of obtaining a preset control point and generating a first grid corresponding to a picture to be projected according to the preset control point; acquiring curved surface information of an entity to be projected, and adjusting a preset control point according to the curved surface information to obtain a current control point; generating a plurality of B-spline surfaces according to the current control point; splicing the plurality of B spline surfaces to obtain a second grid; rendering the picture according to the second grid and projecting according to the rendered second grid. The method comprises the steps of obtaining the curved surface information of an entity to be projected and mapped, adjusting preset control points in a picture to be projected and mapped according to the curved surface information of the entity to be projected and mapped, and generating a plurality of B-spline curved surfaces according to a B-spline curve calculation formula on the current control points, so that the picture with large curvature and irregular shape can be quickly adjusted or corrected, and projection and mapping demonstration can be quickly achieved in various complex application scenes.

Description

Image curved surface geometric correction method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of image curved surface geometric correction and image splicing fusion, in particular to an image curved surface geometric correction method and device, electronic equipment and a storage medium.
Background
In the present society where computer output display devices are diversified, various demands have been made on the shape profile of output contents. For example, when the output end is a projector, the projection result cannot reach the intended target due to various factors of optical projection, and the final picture may be a non-regular rectangle or a regular quadrangle due to construction design, natural conditions, fields and the like; it may also be desirable that the output content be able to conform to certain physical surfaces, such as physical entities like buildings, cars, models, etc.; and a complete picture may be achieved by splicing multiple picture blocks. In view of the above, in practical applications, it is necessary to be able to customize the shape of the output screen (not necessarily a quadrilateral). In order to meet the requirements, a technology for correcting the geometric shape of the picture in practical application is developed, the geometric mesh of the picture is determined by self-defining through a configuration tool, then when the geometric mesh needs to be adjusted, the adjustment of the geometric mesh is realized by adjusting control points on the mesh, an output picture is rendered in a well-defined mesh shape by using output end software after the adjustment is completed, and finally the curvature of the output picture is adapted to the actual curvature of an entity. In the existing technology for correcting a curved surface, a third-order bezier curve is generally created according to a control point specified by a user, the control point is adjusted through the bezier curve, and then the bezier curved surface is calculated according to the adjusted control point to realize the correction of the curved surface.
However, in the prior art, the moving mode of the control point depends excessively on a fixed algorithm, the algorithm may need to be modified for different scenes, and it is troublesome to adjust a scene with a large curvature and a smooth curved surface through a bezier curve. In order to solve the above problems, the prior art generally solves the problem by increasing the curve dimension from third order to N order and splitting the original third order curve for multiple times. However, increasing the curve dimension from third to N would result in the previous calculations being completely emptied; splitting the original third-order curve for many times increases the complexity of the algorithm, the adjustment effect is not expected, and the expected image rendering result is adversely affected.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method and an apparatus for correcting an image curved surface geometry, an electronic device, and a storage medium, so as to solve the problems that in the prior art, a moving manner of a control point excessively depends on a fixed algorithm, the algorithm may need to be modified for different scenes, and adjustment of a scene with a large curvature and a smooth curved surface is troublesome through a bezier curve.
Based on the above purpose, the present invention provides an image surface geometry correction method, which is applied to a projection mapping display technology, and comprises:
acquiring a preset control point on a picture to be projected, and generating a first grid corresponding to the picture to be projected according to the preset control point;
acquiring curved surface information of an entity to be projected, and adjusting the first grid according to the curved surface information to obtain a current control point;
generating a plurality of B-spline surfaces according to the current control point;
splicing the B spline surfaces to obtain a surface mesh; wherein, the second mesh is the curved surface mesh obtained after the adjustment;
rendering the picture to be projected according to the second grid, and projecting based on the rendered picture to be projected.
Optionally, the obtaining of the preset control point and generating a first grid corresponding to the to-be-projected picture according to the preset control point include:
connecting the preset control points to generate a plane quadrangle;
and gridding the plane quadrangle to obtain the first grid.
Optionally, the obtaining curved surface information of the entity to be projected, adjusting the first mesh according to the curved surface information, and determining the current control point includes:
in response to determining that the curvature of the first grid is the same as the curvature of the entity to be projected, taking the preset control point as the current control point;
and in response to determining that the curvature of the first grid is different from the curvature of the entity to be projected, adjusting the first grid, and determining the current control point according to the adjusted first grid.
Optionally, the adjusting the first grid in response to determining that the curvature of the first grid is different from the curvature of the entity to be projected, and determining the current control point according to the adjusted first grid includes:
in response to determining that the adjusted curvature of the first grid is smaller than the curvature of the entity to be projected, the adjustment is to add a control point on the first grid;
in response to determining that the curvature of the first mesh is greater than the curvature of the entity to be projected, the adjusting is to prune preset control points in the first mesh.
Optionally, if it is determined that the adjusted curvature of the first mesh is smaller than the curvature of the entity to be projected, the adjusting is to add a control point to the first mesh, and includes:
determining a curved surface of a control point to be inserted on the first grid based on the curvature of the entity to be projected;
and determining a line into which the control point is to be inserted on the curved surface, and inserting a new control point at a preset insertion position between two control points on the line.
Optionally, the generating a plurality of B-spline surfaces according to the current control point includes:
according to the current control point, calculating by the formula shown as follows:
Figure BDA0003573404600000031
wherein u is the texture direction of the control point in the transverse direction, v is the texture direction of the control point in the longitudinal direction, i and j are the positions of the control point in the transverse direction and the longitudinal direction respectively, and N is i,k Is a u-direction basis function, N j,i And k is the curve times of the control point in the transverse direction and l is the curve times of the control point in the longitudinal direction.
Based on the same inventive concept, one or more embodiments of the present specification further provide an image surface geometry correction apparatus, which is applied to a projection mapping display technology, and includes:
the first generation module is configured to acquire preset control points on a picture to be projected and generate a first grid corresponding to the picture to be projected according to the preset control points;
the correction module is configured to acquire curved surface information of an entity to be projected, adjust the first grid according to the curved surface information and determine a current control point;
the second generation module is configured to generate a plurality of B-spline surfaces according to the current control point;
the splicing module is configured to splice the B spline surfaces to obtain a second grid; wherein the curved surface mesh is the adjusted mesh;
and the projection module is configured to render the picture to be projected according to the second grid and project the picture to be projected based on the rendered picture to be projected.
Optionally, the second generating module includes:
according to the current control point, calculating by the formula shown as follows:
Figure BDA0003573404600000032
wherein u is the texture direction of the control point in the transverse direction, v is the texture direction of the control point in the longitudinal direction, i and j are the positions of the control point in the transverse direction and the longitudinal direction respectively, and N is i,k Is a u-direction basis function, N j,i And k is the transverse curve times of the control point, and l is the longitudinal curve times of the control point.
Based on the same inventive concept, one or more embodiments of the present specification further provide an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the method as described in any one of the above items when executing the program.
Based on the same inventive concept, one or more embodiments of the present specification also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described in any one of the above.
As can be seen from the foregoing, the image curved surface geometry correction method, device, electronic device and storage medium provided by the present invention, wherein the image curved surface geometry correction method includes: firstly, a plane quadrangle corresponding to a picture to be projected is created through a preset control point, and gridding is carried out on the plane quadrangle to obtain a plane grid corresponding to the picture to be projected; then obtaining curved surface information of an entity to be projected, and adding control points and deleting control points to the first grid according to the curved surface information to obtain a current control point; finally, calculating according to the current control point through a B spline curve calculation formula to obtain a plurality of B spline curved surfaces with different curvatures, and simultaneously splicing the plurality of B spline curved surfaces to obtain a second grid; wherein the second mesh is a curved mesh obtained after correction; and then rendering the picture to be projected according to the second grid, and projecting according to the rendered picture to be projected. The invention generates a plurality of B-spline curved surfaces by acquiring the curved surface information of the entity to be projected, adjusting the preset control points in the mapping picture to be projected according to the curved surface information of the entity to be projected and mapping, and simultaneously adjusting and calculating the current control points according to the B-spline curve calculation formula.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below, it is obvious that the drawings in the description below are only embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for correcting geometric shape of an image curved surface according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an addition control point according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a B-spline surface according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a planar grid in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of a surface mesh in accordance with an embodiment of the present invention;
FIG. 6 is a diagram illustrating an original image to be projected according to an embodiment of the present invention;
fig. 7 is a projection image obtained after rendering according to the curved surface mesh according to the embodiment of the present invention;
FIG. 8 is a schematic diagram of an apparatus for correcting image surface geometry according to an embodiment of the present invention;
fig. 9 is a schematic diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
It should be noted that technical terms or scientific terms used in the embodiments of the present invention should have a general meaning as understood by those having ordinary skill in the art to which the present invention belongs, unless otherwise defined. The use of "first," "second," and similar language in the embodiments of the present invention does not denote any order, quantity, or importance, but rather the terms "first," "second," and similar language are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items.
As described in the background section, the projection technology is not only applied to daily indoor work and study, but also applied to outdoor performance and exhibition scenes, and when the projector projects outdoors, the projected surface may not be a conventional plane, and may be a surface on which a picture to be projected is projected on a building or a surface on which a car is located. This requires that the image to be projected should completely fit the surface of the building or the surface of the automobile, and the surface of the building or the surface of the automobile is not a plane but various curved surfaces, so that the curvature of the image to be projected should be adjusted to completely fit the image to be projected on the surface of the entity (building or automobile or other objects) to be projected.
In the existing correction method for the curved surface geometry, adjustment of a control point excessively depends on a bezier curve, and the bezier curves used in different scenes need to be specifically adjusted to enable an algorithm to correspond to the current scene, and in the implementation process, the previous calculation result is cleared every time the algorithm is adjusted, which causes inconvenience for practical application. Moreover, when a scene with a large curvature and a smooth curved surface is adjusted by the bezier curve, not only the complexity of the algorithm is increased, but also the expected image rendering result is adversely affected.
In view of this, embodiments of the present invention provide a method and an apparatus for correcting an image surface geometry, an electronic device, and a storage medium. The correction method of the image surface geometry comprises the following steps:
firstly, generating a plane grid with the same size as a picture to be projected through a mathematical formula according to preset control points; then, acquiring the curved surface information of the entity to be projected, increasing control points and decreasing control points for the first mesh according to the curved surface information of the entity to be projected, re-determining the current control points according to the adjusted first mesh, meanwhile, calculating through a B spline formula according to the information of the current control points to obtain a plurality of B spline curves, and determining the B spline curved surface according to a plurality of generated B spline curves; wherein the B-spline curve, i.e. B-spline curve, is a linear combination of B-spline basis functions. Finally, splicing the B spline surfaces to obtain a surface mesh; wherein the curved surface mesh is a corrected mesh.
According to the method, the device, the electronic equipment and the storage medium for correcting the image curved surface geometry, the curvature of the picture to be projected is adjusted according to the curvature of the entity to be projected, so that the curvature of the picture to be projected can be the same as the curvature of the entity to be projected, and the picture to be projected can be completely attached to the surface of the entity to be projected when being projected onto the surface of the entity to be projected. Specifically, the curvature of a curve related to the added or deleted control points and the curvature of a curved surface related to the curve are changed by adding or deleting the control points on the picture to be projected, and the plurality of curved surfaces are further spliced to realize the correction of the whole curved surface.
Referring to fig. 1, the method for correcting the image surface geometry is applied to a projection mapping display technology, and includes the following steps:
step 101, obtaining a preset control point on a picture to be projected, and generating a first grid corresponding to the picture to be projected according to the preset control point.
In the embodiment, firstly, a preset control point on a picture to be projected is obtained, and the preset control point is connected to generate a plane quadrangle; and then gridding the plane quadrangle to obtain the first grid. The number of control points for generating the planar quadrangle is 4; the first mesh includes a plurality of sub-meshes.
In some embodiments, the first mesh comprises 40x40 subgrids.
In some embodiments, the position information of the preset control point is determined first; and then generating the first grid with the position information corresponding to the picture to be projected according to the position information. The position information is the coordinates of the preset control points, the first grid includes a plurality of preset control points, each preset control point in the first grid has a unique coordinate point corresponding to the control point, and the coordinate value of the position of the control point can be obtained according to the coordinate axis shown in fig. 4.
In some embodiments, a picture to be projected is first acquired, and control points for generating a mesh are preset on the picture to be projected. Then, gridding the picture to be projected according to the preset control points, and generating a first grid with the same integral size as the picture to be projected. Wherein the first mesh is a planar mesh comprising a plurality of quadrilateral meshes, each quadrilateral mesh comprising 4 x4 control points, wherein the points at the four corners are controlled by a user, the remaining 12 of the interior are controlled by an algorithm, are invisible to the user, and each control point has a corresponding coordinate point.
In some embodiments, the first grid is a 3 by 3 grid (i.e., a 9 grid), each grid consisting of 4 control points.
In some embodiments, after setting a plurality of control points, the first mesh is generated by calculating according to the coordinate information of the control points according to the following B-spline curve formula:
Figure BDA0003573404600000071
wherein u is the texture direction of the control point in the transverse direction, v is the texture direction of the control point in the longitudinal direction, i and j are the positions of the control point in the transverse direction and the longitudinal direction respectively, and N is i,k Is a u-direction basis function, N j,i Is a v-direction basis function, k is the curve times of the control point in the transverse direction, l is the curve times of the control point in the longitudinal direction, P ij I is more than or equal to 0 and less than or equal to m, j is more than or equal to 0 and less than or equal to n, m is the total number of interpolation in the u direction, and n is the total number of interpolation in the v direction.
Specifically, the generating of the first grid includes: firstly, determining control points on a picture to be projected, wherein the distances between the control points and the control points are the same; then, determining a plurality of line segments according to the determined control points, wherein the line segments are used for connecting the control points adjacent to the control points; finally, a first grid corresponding to the picture to be projected is generated (as shown in fig. 4) according to the plurality of crossed line segments.
102, obtaining curved surface information of an entity to be projected, adjusting the first grid according to the curved surface information, and determining a current control point.
In this embodiment, first, comparing a curvature of a first grid with a curvature of the entity to be projected, and in response to determining that the curvature of the first grid is the same as the curvature of the entity to be projected, taking the preset control point as the current control point; in response to determining that the curvature of the first mesh is different from the curvature, adjusting the first mesh, and determining the current control point according to the adjusted first mesh. When the curvature of the first grid is determined to be different from the curvature, further determining whether the curvature of the first grid is smaller than the curvature of the entity to be projected or larger than the curvature of the entity to be projected; in response to determining that the adjusted curvature of the first grid is smaller than the curvature of the entity to be projected, the adjustment is to add a control point on the first grid; in response to determining that the curvature of the first mesh is greater than the curvature of the entity to be projected, the adjusting is to prune preset control points in the first mesh.
In some embodiments, the first mesh is an adaptive mesh. When the first mesh is a self-adaptive mesh, the curvature of the first mesh is determined according to the actual condition of the picture to be projected, and may be a plane mesh or a curved surface, when the first mesh is a plane mesh, the curvature of the first mesh is 0, and when the first mesh is a curved surface mesh, the curvature is determined according to the curvature degree of the curved surface mesh. Wherein the curvature represents the amount of curve curvature. The curvature of a planar curve is the rotation rate of the tangential direction angle to the arc length of a certain point on the curve, and is defined by differentiation, and the degree of deviation of the curve from a straight line is indicated. The larger the curvature, the more curved the curve is.
In some embodiments, in response to determining that the curvature of the first mesh is smaller than the curvature of the entity to be projected, referring to fig. 2, an insertion surface is first determined and a new control point is inserted at a preset insertion position of the insertion surface; and then generating a first curve and a second curve according to the new control point, and respectively taking the new control point as an end point of the first curve and a starting point of the second curve. The preset insertion position may be 0.5 of the insertion curved surface, or may be other insertion positions of 0.6, 0.7, 0.4, or other insertion positions according to actual situations, and is also within the protection scope of the present application.
Specifically, when the first mesh is a curved mesh, the curve on the curved mesh is first split in the horizontal and vertical components. When the line to be inserted is a curve, referring to fig. 2, a B-spline is interpolated at 0.5, the original curve is divided into a first curve and a second curve according to the newly inserted control point, and the control point is used as the ending point of the first curve and the starting point of the second curve, so that the coordinate value of the new control point of the grid is re-interpolated and calculated on the premise of ensuring that the data of the original curve is not changed. The curves p0-p6 are divided into p0-p3 and p3-p6 as shown in reference to fig. 2.
In some embodiments, the original curve is divided into a first curve which can be p0-p3, and can also be p3-p 6; the second curve may be p0-p3, or p3-p6, which is not limited herein.
In some embodiments, in response to determining that the curvature of the first mesh is greater than the curvature of the entity to be projected, first determining coordinates of the control points to be deleted and deleting the control points; and then, splicing the curves at the two ends of the control point to obtain a new curve.
In some embodiments, the user may reduce or delete the control point specifically by combining two curves into one curve, where there is no fixed formula, data may be lost, and the rule of combining is defined by an algorithm and may be modified according to a user's habit.
And 103, generating a plurality of B-spline surfaces according to the current control point.
In this embodiment, after the curvature adjustment of the preset control point in the curvature of the first mesh is performed according to the curvature of the entity to be projected, and the current control point is determined, the B-spline surface is obtained by calculating according to the following formula according to the lateral and longitudinal direction basis functions, the lateral curve times, and the longitudinal curve times of the current control point:
Figure BDA0003573404600000091
wherein u is the texture direction of the control point in the transverse direction, v is the texture direction of the control point in the longitudinal direction, i and j are the positions of the control point in the transverse direction and the longitudinal direction respectively, and N is the position of the control point in the longitudinal direction i,k Is a u-direction basis function, N j,i Is a v directional basis function, k isThe curve times of the control point in the transverse direction, and l is the curve times of the control point in the longitudinal direction.
In some embodiments, the number of curves, i.e., the number of times a spline curve, is determined by the basis function taken in the mathematical definition of the spline curve. Intuitively, a smooth parametric curve segment of the spline curve is determined by several adjacent continuous broken line segments of the control polygon, namely several splines. For example, quadratic splines and cubic splines are most commonly used. Wherein, a certain curve segment of the secondary spline is only related to the two corresponding broken line segments and the vertexes of the three control polygons, and changing one of the vertexes will affect the three spline curve segments. Similarly, for cubic splines, a curve segment is determined by three corresponding broken line segments and four control points.
Step 104, splicing the B spline surfaces to obtain a second grid; and the second mesh is the curved surface mesh obtained after the adjustment.
In this embodiment, after the control points are calculated by the B-spline curve to obtain the B-spline curve, the following formula is used to calculate to obtain the surface mesh:
Figure BDA0003573404600000092
wherein i ∈ [0, n ]]And i represents a B-spline curve of order k +1, where p i For control points (i ═ 0, 1, 2.., n) as control points, t denotes nodes, there are 0-m (m ═ n + k +1) nodes, and this sequence of nodes is called a node vector; n is a radical of i,k Represents the ith k-th order B-spline basis function, described by a recursive formula, wherein the recursive formula is shown below:
Figure BDA0003573404600000093
as shown in fig. 3, the second mesh obtained after the splicing is composed of a plurality of control points, the control points are sequentially connected to determine a B-spline curve, and the B-spline curves are intersected to form a B-spline surface. Because each entity to be projected is composed of a plurality of parts, and the curvature of each part is different, the B-spline surfaces corresponding to the plurality of parts need to be spliced, so as to obtain the surface mesh with different curvatures of the parts as shown in fig. 5.
And 105, rendering the picture to be projected according to the second grid, and projecting based on the rendered picture to be projected.
In some embodiments, the display end generates a vertex buffer from the control points and the grid, the vertex buffer being applied to the image texture resources to be displayed. A vertex in the vertex buffer generates a series of primitives in a rendering engine (e.g., OpenGL, DirectX3D, Vulkan) according to a set primitive type (e.g., a triangle list), a Texture sampler calculates a color value according to Texture coordinates (uv in the above) and covers the primitives, a Texture resource of an image is a picture that we want to show to a user, which generally exists in the form of a video file or an image file on a hard disk, after decoding the file, our media server is processed by a program into Texture data of a frame, and the Texture data is stored in a display memory and fixed in a format (e.g., format of Texture2D, ID3D11Texture2D, etc.) defined by each engine, as shown in fig. 7, the picture is obtained by projecting an original picture to be projected as shown in fig. 6 after rendering according to a second mesh obtained after modification; fig. 6 and 7 are only reference diagrams, and do not represent that the surface geometry correction in the present application is only used to correct the picture shown in fig. 6, and obtain the picture shown in fig. 7. It can be seen that the curvature of the same position of the corresponding picture is significantly different in the picture shown in fig. 7 compared to the picture shown in fig. 6.
In some embodiments, in the existing technology for surface correction, a third-order bezier curve is generally created according to control points specified by a user, the control points are adjusted through the bezier curve, and then the bezier surface is calculated according to the adjusted control points to realize the surface correction. However, the moving mode of the control point excessively depends on the fixed algorithm, and the requirements on the complexity of the algorithm are different in different scenes, so that the algorithm needs to be adjusted for multiple times when corresponding to different scenes, so that the algorithm corresponds to the current scene, and the previous calculation result can be emptied after the algorithm is adjusted once in the implementation process; moreover, when a scene with a large curvature and a smooth curved surface is adjusted by the bezier curve, not only the complexity of the algorithm is increased, but also the expected image rendering result is adversely affected.
In view of the above, the image curved surface geometric correction method, the apparatus, the electronic device and the storage medium provided by the present invention, wherein the image curved surface geometric correction method first creates a planar quadrangle corresponding to the picture to be projected through a preset control point, and meshes the planar quadrangle to obtain a planar mesh corresponding to the picture to be projected; then obtaining curved surface information of an entity to be projected, and adding control points and deleting control points to the first grid according to the curved surface information to obtain a current control point; finally, calculating according to the current control point through a B spline curve calculation formula to obtain a plurality of B spline curved surfaces with different curvatures, and simultaneously splicing the plurality of B spline curved surfaces to obtain a second grid; the curved surface mesh is obtained after correction; and then rendering the picture to be projected according to the second grid, and projecting according to the rendered picture to be projected. The invention generates a plurality of B-spline curved surfaces by acquiring the curved surface information of the entity to be projected, adjusting the preset control points in the picture to be projected according to the curved surface information of the entity to be projected and simultaneously adjusting the current control points according to the B-spline curve calculation formula, and the adjustment and calculation of the control points are simple, and the picture with large curvature and irregular shape can be quickly adjusted or corrected without depending on a specific adjustment algorithm or formula, so that the target projection mapping demonstration is quickly achieved in various complex application scenes.
It should be noted that the method of the embodiment of the present invention may be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In the case of such a distributed scenario, one of the multiple devices may only perform one or more steps of the method according to the embodiment of the present invention, and the multiple devices interact with each other to complete the method.
It should be noted that the above describes some embodiments of the invention. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same inventive concept, the invention also provides a curved surface geometric correction device corresponding to the method of any embodiment.
Referring to fig. 8, the image surface geometry correcting apparatus includes:
a first generating module 801 configured to acquire a preset control point on a picture to be projected, and generate a first grid corresponding to the picture to be projected according to the preset control point;
a correction module 802, configured to obtain curved surface information of an entity to be projected, adjust the first mesh according to the curved surface information, and determine a current control point;
a second generating module 803, configured to generate a plurality of B-spline surfaces according to the current control point;
a splicing module 804 configured to splice the plurality of B-spline surfaces to obtain a second mesh; wherein, the second mesh is the curved surface mesh obtained after the adjustment;
the projection module 805 is configured to render the to-be-projected picture according to the second grid, and project the to-be-projected picture based on the rendered to-be-projected picture.
In some embodiments, the second generating module 803 includes:
according to the current control point, calculating by the formula shown below:
Figure BDA0003573404600000121
wherein u is the texture direction of the control point in the transverse direction, v is the texture direction of the control point in the longitudinal direction, i and j are the positions of the control point in the transverse direction and the longitudinal direction respectively, and N is the position of the control point in the longitudinal direction i,k Is a u-direction basis function, N j,i And k is the transverse curve times of the control point, and l is the longitudinal curve times of the control point.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations of the invention.
The apparatus of the foregoing embodiment is used to implement the corresponding curved surface geometry correction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above embodiments, the invention further provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the method for correcting a surface geometry according to any of the above embodiments.
Fig. 9 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and the output devices may include a display, speaker, vibrator, indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only the components necessary to implement the embodiments of the present disclosure, and need not include all of the components shown in the figures.
The electronic device of the above embodiment is used to implement the corresponding curved surface geometry correction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present invention also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the image surface geometry correction method according to any of the above embodiments.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the image surface geometry correction method according to any of the above embodiments, and have the beneficial effects of the corresponding method embodiment, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures for simplicity of illustration and discussion, and so as not to obscure the embodiments of the invention. Furthermore, devices may be shown in block diagram form in order to avoid obscuring embodiments of the present invention, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the embodiments of the present invention are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the invention, it should be apparent to one skilled in the art that embodiments of the invention can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the invention.

Claims (10)

1. An image curved surface geometric correction method is applied to a projection mapping display technology and comprises the following steps:
acquiring a preset control point on a picture to be projected, and generating a first grid corresponding to the picture to be projected according to the preset control point;
acquiring curved surface information of an entity to be projected, adjusting the first grid according to the curved surface information, and determining a current control point;
generating a plurality of B spline surfaces according to the current control point;
splicing the B spline surfaces to obtain a second grid; wherein, the second mesh is the curved surface mesh obtained after the adjustment;
rendering the picture to be projected according to the second grid, and projecting based on the rendered picture to be projected.
2. The correction method according to claim 1, wherein the acquiring a preset control point on the picture to be projected and generating a first grid corresponding to the picture to be projected according to the preset control point comprises:
connecting the preset control points to generate a plane quadrangle;
and gridding the plane quadrangle to obtain the first grid.
3. The correction method according to claim 1, wherein the obtaining curved surface information of the entity to be projected, adjusting the first mesh according to the curved surface information, and determining the current control point comprises:
in response to determining that the curvature of the first grid is the same as the curvature of the entity to be projected, taking the preset control point as the current control point;
and in response to determining that the curvature of the first grid is different from the curvature of the entity to be projected, adjusting the first grid, and determining the current control point according to the adjusted first grid.
4. The correction method according to claim 3, wherein the adjusting the first mesh in response to determining that the curvature of the first mesh is different from the curvature of the entity to be projected, and determining the current control point from the adjusted first mesh comprises:
in response to determining that the adjusted curvature of the first grid is smaller than the curvature of the entity to be projected, the adjustment is to add a control point on the first grid;
in response to determining that the curvature of the first mesh is greater than the curvature of the entity to be projected, the adjusting is to prune preset control points in the first mesh.
5. The correction method of claim 4, wherein the adjusting to add a control point on the first mesh in response to determining that the adjusted curvature of the first mesh is less than the curvature of the entity to be projected comprises: determining a curved surface of a control point to be inserted on the first grid based on the curvature of the entity to be projected;
and determining a line into which the control point is to be inserted on the curved surface, and inserting a new control point at a preset insertion position between two preset control points on the line.
6. The correction method according to claim 1, wherein said generating a number of B-spline surfaces from said current control points comprises:
according to the current control point, calculating by the formula shown as follows:
Figure FDA0003573404590000021
wherein u is the texture direction of the control point in the transverse direction, v is the texture direction of the control point in the longitudinal direction, i and j are the positions of the control point in the transverse direction and the longitudinal direction respectively, and N is the position of the control point in the longitudinal direction i,k Is a u-direction basis function, N j,i And k is the transverse curve times of the control point, and l is the longitudinal curve times of the control point.
7. An image curved surface geometric correction device is applied to projection mapping display technology and comprises the following steps:
the first generation module is configured to acquire preset control points on a picture to be projected and generate a first grid corresponding to the picture to be projected according to the preset control points;
the correction module is configured to acquire curved surface information of an entity to be projected, adjust the first grid according to the curved surface information and determine a current control point;
the second generation module is configured to generate a plurality of B-spline surfaces according to the current control point;
the splicing module is configured to splice the B spline surfaces to obtain a second grid; wherein, the second mesh is the curved surface mesh obtained after the adjustment;
and the projection module is configured to render the picture to be projected according to the second grid and project the picture to be projected based on the rendered picture to be projected.
8. The correction device of claim 7, wherein the second generation module comprises:
according to the current control point, calculating by the formula shown as follows:
Figure FDA0003573404590000022
wherein u is the texture direction of the control point in the transverse direction, v is the texture direction of the control point in the longitudinal direction, i and j are the positions of the control point in the transverse direction and the longitudinal direction respectively, and N is i,k Is a u-direction basis function, N j,i And k is the transverse curve times of the control point, and l is the longitudinal curve times of the control point.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method as claimed in any one of claims 1 to 6 when executing the program.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 6.
CN202210336026.8A 2022-03-30 2022-03-30 Image curved surface geometric correction method and device, electronic equipment and storage medium Active CN114979592B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210336026.8A CN114979592B (en) 2022-03-30 2022-03-30 Image curved surface geometric correction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210336026.8A CN114979592B (en) 2022-03-30 2022-03-30 Image curved surface geometric correction method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114979592A true CN114979592A (en) 2022-08-30
CN114979592B CN114979592B (en) 2024-04-26

Family

ID=82976301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210336026.8A Active CN114979592B (en) 2022-03-30 2022-03-30 Image curved surface geometric correction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114979592B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405647A (en) * 2023-03-29 2023-07-07 北京凯视达科技股份有限公司 Method and device for geometrically correcting projection picture, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120001908A1 (en) * 2009-03-09 2012-01-05 National University Corporation Shizuoka University Method and device for forming surface processed data
US20130128057A1 (en) * 2011-11-17 2013-05-23 National University of Sciences & Technology Geometric correction apparatus and method based on recursive bezier patch sub-division cross-reference to related application
CN103281549A (en) * 2013-05-22 2013-09-04 深圳市普乐方文化科技有限公司 Video deformation correcting method and system
CN104754264A (en) * 2015-03-13 2015-07-01 中国科学院空间应用工程与技术中心 Feature point based projection deformation correcting method and system
US20160125577A1 (en) * 2014-10-31 2016-05-05 Fu Tai Hua Industry (Shenzhen) Co., Ltd. Method and system for patching up a point cloud of an object

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120001908A1 (en) * 2009-03-09 2012-01-05 National University Corporation Shizuoka University Method and device for forming surface processed data
US20130128057A1 (en) * 2011-11-17 2013-05-23 National University of Sciences & Technology Geometric correction apparatus and method based on recursive bezier patch sub-division cross-reference to related application
CN103281549A (en) * 2013-05-22 2013-09-04 深圳市普乐方文化科技有限公司 Video deformation correcting method and system
US20160125577A1 (en) * 2014-10-31 2016-05-05 Fu Tai Hua Industry (Shenzhen) Co., Ltd. Method and system for patching up a point cloud of an object
CN104754264A (en) * 2015-03-13 2015-07-01 中国科学院空间应用工程与技术中心 Feature point based projection deformation correcting method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405647A (en) * 2023-03-29 2023-07-07 北京凯视达科技股份有限公司 Method and device for geometrically correcting projection picture, storage medium and electronic equipment
CN116405647B (en) * 2023-03-29 2024-02-06 北京凯视达科技股份有限公司 Method and device for geometrically correcting projection picture, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN114979592B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
US11830143B2 (en) Tessellation method using recursive sub-division of triangles
JP4385524B2 (en) Polygon data generation method and image display apparatus using the same
CN109448137B (en) Interaction method, interaction device, electronic equipment and storage medium
US11263356B2 (en) Scalable and precise fitting of NURBS surfaces to large-size mesh representations
JP2015515059A (en) Method for estimating opacity level in a scene and corresponding apparatus
CN109697748B (en) Model compression processing method, model mapping processing method, model compression processing device, and storage medium
CN107578467B (en) Three-dimensional modeling method and device for medical instrument
CN111260750B (en) Processing method and device for openFL drawing vector graphics and electronic equipment
US20220005261A1 (en) Method for instant rendering of voxels
CN109448123B (en) Model control method and device, storage medium and electronic equipment
US20120069037A1 (en) Resolution independent rendering of quadratic bezier curves using programmable graphics hardware
CN114979592B (en) Image curved surface geometric correction method and device, electronic equipment and storage medium
CN115546371A (en) Point cloud optimization method and system, electronic device and storage medium
CN113724331B (en) Video processing method, video processing apparatus, and non-transitory storage medium
CN109598672B (en) Map road rendering method and device
JP2023529790A (en) Method, apparatus and program for generating floorplans
CN110502305B (en) Method and device for realizing dynamic interface and related equipment
CN111008934A (en) Scene construction method, device, equipment and storage medium
US9311747B2 (en) Three-dimensional image display device and three-dimensional image display program
CN114119831A (en) Snow accumulation model rendering method and device, electronic equipment and readable medium
US10636210B2 (en) Dynamic contour volume deformation
CN113570691A (en) Storage optimization method and device for voxel model and electronic equipment
CN116778053B (en) Target engine-based map generation method, device, equipment and storage medium
EP2338153B1 (en) Method and system for anti-aliasing clipped polygons and polylines
US20240320921A1 (en) Late stage reprojection using tessellated mesh

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
GR01 Patent grant
GR01 Patent grant