CN108765299B - Three-dimensional graphic marking system and method - Google Patents

Three-dimensional graphic marking system and method Download PDF

Info

Publication number
CN108765299B
CN108765299B CN201810383241.7A CN201810383241A CN108765299B CN 108765299 B CN108765299 B CN 108765299B CN 201810383241 A CN201810383241 A CN 201810383241A CN 108765299 B CN108765299 B CN 108765299B
Authority
CN
China
Prior art keywords
marked
posture
picture
content
marking
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.)
Active
Application number
CN201810383241.7A
Other languages
Chinese (zh)
Other versions
CN108765299A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201810383241.7A priority Critical patent/CN108765299B/en
Publication of CN108765299A publication Critical patent/CN108765299A/en
Application granted granted Critical
Publication of CN108765299B publication Critical patent/CN108765299B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Image Generation (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of multimedia, and discloses a three-dimensional graph marking system and a method for solving the problem of the change of the marking posture of a three-dimensional graph, wherein the three-dimensional graph marking system comprises: the marked picture acquisition module is used for acquiring a first posture picture of the marked content; the conversion mode acquisition module is used for acquiring a mode that a surface to be marked in an expanded image of the target three-dimensional graph is turned and rotated relative to a standard posture; the image adjusting module is used for acquiring a second posture image of the marked content, and the posture of the marked content obtained when the second posture image is turned and rotated according to the turning and rotating mode of the surface to be marked is the same as the posture of the marked content of the first posture image; and the marking module is used for sticking the second posture picture on the surface to be marked to finish marking. The invention realizes that the mark gesture is consistent with the expectation.

Description

Three-dimensional graphic marking system and method
Technical Field
The invention relates to the technical field of multimedia, in particular to a three-dimensional graph marking system and a three-dimensional graph marking method.
Background
The description of the background of the invention pertaining to the related art to which this invention pertains is given for the purpose of illustration and understanding only of the summary of the invention and is not to be construed as an admission that the applicant is explicitly or implicitly admitted to be prior art to the date of filing this application as first filed with this invention.
To explain the structure of the stereoscopic pattern and the like, it is often necessary to obtain an expanded pattern. For example, in the teaching of solid geometry, students are often required to know whether a certain unfolded view can be folded into a specific solid figure (e.g., a cube). In order to better illustrate the correspondence between the expanded pattern and the three-dimensional pattern, the inventor proposes that a three-dimensional pattern can be gradually expanded into an expanded pattern, and the expanded pattern can also be gradually folded into a three-dimensional pattern. The inventors have found that, in the state of the developed figure, different marks (such as numbers, letters, figures, and the like) are given to the respective faces constituting the three-dimensional figure, and are helpful in understanding the correspondence between the developed figure and the three-dimensional figure. After the expanded graph is folded into the three-dimensional graph, the mark still exists, and the corresponding relation between each surface in the three-dimensional graph and the expanded graph can be better understood. In this process, the inventors found that the posture (direction, inversion, etc.) of the mark may change, which is not suitable for the usual viewing habit.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a three-dimensional graphic marking system, which mainly aims to achieve the purpose that the marked posture is consistent with the expectation.
In order to achieve the purpose, the invention mainly provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides a stereoscopic image marking system, including:
the marked picture acquisition module is used for acquiring a first posture picture of the marked content;
the conversion mode acquisition module is used for acquiring a mode that a surface to be marked in an expanded image of the target three-dimensional graph is turned and rotated relative to a standard posture;
the image adjusting module is used for acquiring a second posture image of the marked content, and the posture of the marked content obtained when the second posture image is overturned and rotated according to the overturning and rotating mode of the surface to be marked is the same as the posture of the marked content of the first posture image;
and the marking module is used for sticking the second posture picture on the surface to be marked to finish marking.
In a second aspect, an embodiment of the present invention provides a method for marking a three-dimensional graphic, including the following steps:
acquiring a first posture picture of the marked content;
acquiring a mode of turning and rotating a surface to be marked in an expanded image of the target three-dimensional graph relative to a standard posture;
acquiring a second posture picture of the marked content, wherein the posture of the marked content obtained when the second posture picture is turned and rotated according to the turning and rotating mode of the surface to be marked is the same as the posture of the marked content of the first posture picture;
and pasting the second posture picture on the surface to be marked to finish marking.
In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method described above.
In a fourth aspect, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the method described above.
Compared with the prior art, the embodiment of the invention has the beneficial effects that:
the three-dimensional graph marking method provided by the embodiment of the invention adjusts the posture of the marked content, and the adjusted posture (second posture) of the marked content is overturned and rotated according to the overturning and rotating mode of the surface to be marked to obtain the expected posture (first posture) of the marked content, so that the posture of the marked content is consistent with the expected posture no matter how the three-dimensional graph is unfolded.
Drawings
FIG. 1 shows a schematic view of an embodiment of a stereographic marking system of the present invention.
FIG. 2 shows a schematic view of another embodiment of the stereographic marking system of the present invention.
Fig. 3 shows a schematic view of one of the faces of a cube after unfolding.
Fig. 4 shows a perspective view of a cube in comparison with its expanded view.
Fig. 5 and 6 are developed views respectively showing the perspective view of fig. 4 developed in other development manners.
FIG. 7 is a diagram illustrating the effect presented after marking according to the embodiment of the present invention.
FIG. 8 illustrates a flow chart of an embodiment of a method of stereoscopic graphical marking of the present invention.
Fig. 9 shows a flow chart of another embodiment of the stereoscopic graphical marking method of the invention.
Detailed Description
The present invention will be described in further detail with reference to the following examples, which are not intended to limit the invention thereto. In the following description, different "one embodiment" or "an embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Fig. 1 is a schematic view illustrating an embodiment of a solid graphic marking system according to the present invention. Referring to fig. 1, a stereoscopic graphic marking system according to an embodiment of the present invention includes:
the marked picture acquiring module 10 is used for acquiring a first posture picture of the marked content;
the conversion mode acquisition module 11 is used for acquiring a mode that a surface to be marked in an expanded image of the target three-dimensional graph is turned and rotated relative to a standard posture;
the image adjusting module 12 is configured to acquire a second posture image of the mark content, where a posture of the mark content obtained when the second posture image is turned and rotated according to a turning and rotating mode of the surface to be marked is the same as a posture of the mark content of the first posture image;
and the marking module 13 is used for sticking the second posture picture on the surface to be marked to finish marking.
The three-dimensional graphic marking system of the embodiment of the invention pre-adjusts the gesture (including the reversal, the direction and the like) of the marked content in the marking process according to the rotation and turning rules of the surface to be marked, so that the presented gesture of the marked content is consistent with the gesture (the first gesture, namely the gesture of the marked content presented by the first gesture picture) expected by a user after the marked content is rotated and turned. Because the marked content is pertinently pre-adjusted, the direction of the marked content conforms to the expectation no matter how the three-dimensional graph is unfolded for marking.
The transformation mode obtaining module 11 in the embodiment of the present invention may obtain a mode in which a surface to be marked in an expanded view of a target three-dimensional figure is flipped and rotated with respect to a standard posture, where the obtained mode may include whether the surface to be marked is flipped with respect to the standard posture (a special mode that the surface to be marked is not flipped and may also be regarded as flipped, and zero flipping), a rotation angle (a rotation angle may be regarded as zero when the surface to be marked is not rotated), and the like. Of course, the above-described modes may also include the sequence of flipping and rotating as the sequence of flipping and rotating may need to be determined in some cases. After the mode is obtained, the turning and/or rotating rule of the marked content can be determined, how the marked content changes is determined, and a foundation is laid for adjusting the posture of the marked content and enabling the finally presented marked content to accord with the expected posture. FIG. 2 shows a schematic view of another embodiment of the stereographic marking system of the present invention. Referring to fig. 2, the conversion mode obtaining module 11 in the embodiment of the present invention may specifically include:
the overturning judgment module 111 judges whether the surface to be marked in the expanded image is overturned;
and a rotation angle acquisition module 112 for acquiring the rotation angle of the surface to be marked in the development drawing.
The conversion mode obtaining module 11 in this embodiment specifically obtains the mode of turning and rotating after the surface to be marked is marked through the turning judging module 111 and the rotation angle obtaining module 112, and the efficiency can be improved through the cooperation of the two modules.
The transformation mode acquiring module 11 in another embodiment of the stereoscopic image marking system of the present invention may further include a sequence acquiring module 113 for acquiring a sequence of turning and rotating the surface to be marked in the expanded view.
In the three-dimensional model, each face has an orientation. When the mark is made in the development view, the posture of the mark content follows the posture of the surface. If the surface to be marked is the same as the standard posture, the posture of the marked content is the same as the input, otherwise, the mark content changes along with the posture of the surface to be marked. Each of the three-dimensional figures has two surfaces, one of which is located outside the three-dimensional figure and called a front surface, and the other of which is located inside the three-dimensional figure and called a back surface. The front of the constituting surface in the solid figure is assumed to be in a standard posture toward the user. In addition, the constituent surfaces also have directions in the plane. Fig. 3 shows a schematic diagram of one of the faces of the cube after the solid figure is unfolded, and by taking fig. 3 as an example, it is assumed that the standard posture is achieved when vertex 1 is located at the upper left corner. Then the back is facing the user, it is flipped over from the standard pose, and vertex 1 is in the lower left corner, it is rotated from the standard pose. Therefore, generally, when the stereoscopic image is unfolded and the surface to be marked faces the front side of the user, the marked content cannot be turned over, and when the surface to be marked faces the back side of the user after the stereoscopic image is unfolded, the marked content is turned over after the surface to be marked faces the back side of the user. Therefore, in the embodiment of the present invention, the turning judgment module 111 determines whether the surface to be marked turns relative to the standard posture when being unfolded according to the relationship between the normal vector Nm of the surface model to be marked and the orientation Lm of the camera in the three-dimensional scene. When the model normal vector Nm faces the direction of the camera, the fact that all the constituent surfaces (surfaces to be marked) of the unfolded graph face the user in the front direction is shown, the surfaces to be marked cannot turn over relative to the standard posture when being unfolded, and the marking content cannot turn over after the surfaces to be marked are marked; on the contrary, the back of the surface to be marked faces the user, that is, the surface to be marked is turned over relative to the standard posture when being unfolded, so that the content of the mark can be turned over after the surface to be marked is marked. Specifically, the angle θ between the two vectors can be determined, where θ is Nm · Lm, and if θ <90, the surface to be marked is the front surface, otherwise, the back surface. In the embodiment of the invention, the gesture of the marked content in the first gesture picture is an expected display gesture (namely a first gesture) of the marked content, the gesture of the marked content in the second gesture picture is a display gesture (namely a second gesture) obtained after the marked content is adjusted, after the adjusted second gesture picture is input into a surface to be marked and marked, the second gesture picture is overturned and rotated according to the mode that the surface to be marked is overturned and rotated relative to the standard gesture, and the gesture of the marked content is the same as the gesture of the marked content in the first gesture picture. Under the condition of obtaining the first posture picture and the turning and rotating mode of the surface to be marked, the posture presented by the marked content in the second posture picture is determined, and then any means or mode can be adopted to obtain the second posture picture of the marked content. In one embodiment of the present invention, the picture adjustment module 12 obtains the second pose picture by reversely flipping and rotating the first pose picture in a flipping and rotating mode of the surface to be marked with respect to the standard pose. The second posture picture can be rapidly and accurately obtained by the embodiment. For example, when the marked content rotates 90 degrees counterclockwise, the first posture picture rotates 90 degrees clockwise to obtain a second posture picture, the second posture picture is pasted on the surface to be marked, and the second posture picture rotates 90 degrees counterclockwise according to the turning and rotating mode of the surface after the marking is the posture presented by the first posture picture.
The embodiment of the present invention does not limit the specific obtaining manner of the first-posture picture, for example, when a picture is adopted for marking, since the marking content itself is the picture, the selected picture for marking can be directly used as the first-posture picture. Of course, the first posture picture may also be obtained in other manners, for example, the first posture picture is obtained in a screenshot manner in the embodiment of the present invention. Specifically, the tag image obtaining module 10 may obtain a first gesture image from a tag content screenshot input in a to-be-tagged plane. Since the embodiment is to capture the mark content input in the to-be-marked surface, the size of the acquired first posture picture is adapted to the to-be-marked surface, and the first posture picture can be acquired quickly. The screenshot can be realized through the screenshot function of the system itself, and the screenshot can be realized through the installed application software.
The following describes the details of the present invention in the case of a cube. In the three-dimensional engine, all shapes are formed by splicing triangular surfaces. As shown in fig. 3, the model of the quadrangle 1234 is formed by combining two "triangular surfaces", and we use the first three vertices 1, 2, and 3 to construct two three-dimensional vectors 21 and 23, and calculate the normal vector N of the "plane 1234" by "cross product of vectors" to be 21 × 23. Assume that the spatial transformation amount of this quadrilateral model is Ms (three-dimensional transformation matrix), the camera orientation in the three-dimensional scene is L (three-dimensional vector), and the camera transformation amount is Mc (three-dimensional transformation matrix). Thus, the model normal vector Nm ═ N × Ms and the camera orientation Lm ═ L × MC of the changed quadrilateral 1234 can be calculated. If the model normal vector faces towards the camera, the face is indicated to be the front face, otherwise the face is the back face. We determine the angle between two vectors θ Nm · Lm by "vector dot product", which is the front side if θ <90 and the back side otherwise.
Suppose the pixel set of the first pose picture is { (x) 0 ,y 0 ,1)|0<x<Width, 0<y<Height, the turning matrix of the first posture picture is
Figure BDA0001641523490000061
The first pose picture flip formula is thus as follows:
Figure BDA0001641523490000062
fig. 4 shows a perspective view of a cube in comparison with its expanded view. Taking the expanded view (front facing the user) in fig. 4 as a standard posture, the marked content will not turn or rotate after being marked, and the posture of the marked content is the expected posture. If the side of the expanded three-dimensional figure in fig. 4, which faces the user, is opposite to the side of the expanded figure in fig. 4, that is, the back side faces the user, the marked content is turned over. In order to solve the problem, the embodiment of the invention may obtain the second posture picture of the marked content by correcting the marked content in advance (in this example, turning over), and then after pasting the second posture picture to the surface to be marked, finish marking (for example, after pasting, clicking a blank to finish marking), and then turning over the marked content to obtain the expected posture.
Because the space model is fixed, when the three-dimensional figure is unfolded, the three-dimensional figure can rotate around different axes for the same plane due to different unfolding modes. Fig. 4 shows a perspective view of a cube in comparison with its expanded view. The expanded view in fig. 4 is taken as a standard posture, and at this time, the marked content is not flipped or rotated after being marked, and the posture of the marked content is an expected posture. Fig. 5 and 6 are expanded views obtained by expanding the perspective view in fig. 4 in other expansion manners, respectively, and in fig. 5, the axis around which the "front" surface (marked with a "front" character), the "rear" surface (marked with a "rear" character), and the "top" surface (marked with a "mountain-shaped" figure) of the perspective view are expanded is different from the axis around in fig. 4, so that after the conventional marking, the marked content rotates, and the posture of the marked content is different from the expected posture (the direction changes). The axis of the "front" surface (marked with the "front" word) in fig. 6 is different from the axis of the "front" surface in fig. 4, so that after the conventional marking, the marked content rotates, and the marked content is in a different posture (changed in direction) from the expected posture. In order to make the pose of the marker presentation match the expectation, the pose of the marker content needs to be adjusted in advance. Taking fig. 6 as an example, since the mode of flipping and rotation (no flipping, 90 ° counterclockwise rotation) of the "front" face (face to be marked) with respect to the standard pose, and the expected pose of the face mark content (the pose assumed by the first pose picture, see the mark content pose of the "front" face in the development of fig. 4) have been obtained, the pose assumed by the second pose picture, that is, the pose of the first pose picture rotated 90 ° clockwise, can be obtained. And pasting the second gesture picture to the front surface, completing the mark (for example, clicking a blank space after pasting to complete the mark), and rotating the content of the mark according to the mode of turning and rotating the front surface (rotating 90 degrees anticlockwise) to obtain the expected gesture, referring to fig. 7, wherein fig. 7 is an effect diagram presented after the mark according to the embodiment of the invention.
With reference to fig. 6 and fig. 7, how to rotate the first pose picture is determined, and the details of "front" are as follows: the first two vertexes (1, 2) of the front model are taken to form a vector 12 3D (three-dimensional vector), referred to herein as the "direction vector" of a surface, assume that the projection matrix of the model is M p Then the two-dimensional projection of the "direction vector" is 12 ═ 12 3D *M p (taking x and y values to form a two-dimensional vector). Since it is desirable that the vertical direction D is (0, -1), the rotation angle a is 12 · D calculated by vector dot product, and the figure is rotated as follows:
Figure BDA0001641523490000081
in a second aspect, an embodiment of the present invention provides a method for marking a three-dimensional graphic, where the method for marking a three-dimensional graphic according to the embodiment of the present invention can be implemented by the system for marking a three-dimensional graphic according to any of the embodiments described above, and therefore, the description of the system for marking a three-dimensional graphic according to any of the embodiments described above can be used to understand the method for marking a three-dimensional graphic according to the embodiment of the present invention. FIG. 8 illustrates a flow chart of an embodiment of a method of stereoscopic graphical marking of the present invention. Referring to fig. 8, the method for marking a three-dimensional figure according to the embodiment of the present invention includes the steps of:
acquiring a first posture picture of the marked content;
acquiring a turning and rotating mode of a surface to be marked in an expanded image of the target three-dimensional graph relative to a standard posture;
acquiring a second posture picture of the marked content, wherein the posture of the marked content obtained when the second posture picture is overturned and rotated according to the mode of overturning and rotating the surface to be marked is the same as the posture of the marked content of the first posture picture;
and pasting the second posture picture on the surface to be marked to finish marking.
The method for marking the three-dimensional graph in the embodiment of the invention pre-adjusts the gesture (including the reversal, the direction and the like) of the marked content in the marking process according to the rule of the rotation and the turning of the marked surface, so that the presented gesture of the marked content is consistent with the gesture expected by a user (the gesture presented by the mark in the first gesture picture) after the marked content rotates and turns along with the surface to be marked. Because the marked content is pertinently pre-adjusted, the posture of the marked content conforms to the expectation no matter how the three-dimensional graph is unfolded for marking.
In the embodiment of the present invention, the mode of acquiring the inversion and rotation of the to-be-marked surface with respect to the standard posture may include whether the to-be-marked surface is inverted with respect to the standard posture (a special mode that the to-be-marked surface is not inverted and may also be regarded as inverted, and is zero-inverted), a rotation angle (the rotation angle may be regarded as zero when the to-be-marked surface is not rotated), and the like. Of course, the above-described modes may also include the sequence of flipping and rotating as the sequence of flipping and rotating may need to be determined in some cases. After the mode is obtained, the turning and/or rotating rule of the marked content can be determined, how the marked content changes is determined, and a foundation is laid for adjusting the posture of the marked content and enabling the finally presented marked content to accord with the expected posture. In different cases, the mode of acquiring the inversion and rotation of the surface to be marked relative to the standard posture can be only inversion, only rotation, or both inversion and rotation. When there is only flipping or only rotation, the order of flipping and rotation is not required.
Fig. 9 shows a flow chart of another embodiment of the stereoscopic graphical marking method of the invention. Referring to fig. 9, in the embodiment of the method of the present invention, the obtaining the second pose picture of the mark content includes the following steps:
judging whether the surface to be marked is overturned relative to the standard posture, if so, overturning the first posture picture according to an overturning mode;
and acquiring the rotation angle of the surface to be marked relative to the standard posture, and reversely rotating the first posture picture by the angle.
The embodiment flips and rotates the first pose picture according to a known rule to obtain a second pose picture. The specific determination of whether the surface to be marked is flipped and rotated relative to the standard pose can be further described in the following embodiments.
In the three-dimensional engine, different three-dimensional figures have different unfolding rules, and the turning and rotating modes can be determined by determining the orientation after unfolding and the axis around when unfolding according to the specific unfolding rules.
In the three-dimensional model, each face has an orientation. When the mark is made in the development figure, the posture of the mark content follows the posture of the surface. If the surface to be marked is the same as the standard posture, the posture of the marked content is the same as the input, otherwise, the mark content changes along with the posture of the surface to be marked. Each of the three-dimensional figures has two surfaces, one of which is located outside the three-dimensional figure and is called a front surface, and the other of which is located inside the three-dimensional figure and is called a back surface. The front of the constituting surface in the solid figure is assumed to be in a standard posture toward the user. In addition, the constituent surfaces also have directions in the plane. Fig. 3 shows a schematic diagram of one of the faces of the cube after the solid figure is unfolded, and by taking fig. 3 as an example, it is assumed that the standard posture is achieved when vertex 1 is located at the upper left corner. Then the back is oriented towards the user, it is positive or negative with respect to the standard pose, and vertex 1 is located in the lower left corner, it is rotated with respect to the standard pose. Therefore, generally, when the stereoscopic image is unfolded and the surface to be marked faces the front of the user, the marked content cannot be turned over after the surface to be marked is marked. And after the mark is unfolded, when the surface to be marked faces the back of the user, the content of the mark is turned over after the surface to be marked is marked. Therefore, in the embodiment of the invention, whether the surface to be marked is overturned relative to the standard posture is determined according to the relation between the normal vector Nm of the surface model to be marked and the camera orientation in the three-dimensional scene. When the model normal vector Nm faces the direction of the camera, the fact that all the forming surfaces (surfaces to be marked) of the expanded graph face the user in the front direction is indicated, the surfaces to be marked cannot turn over relative to the standard posture when the surfaces to be marked are expanded, and the marked contents cannot turn over after the surfaces to be marked are marked; conversely, the back of the surface to be marked faces the user, that is, the surface to be marked is turned over relative to the standard posture when being unfolded, so that the content marked after the surface to be marked is also turned over. Specifically, the angle θ between the two vectors can be used for judging, where θ is Nm · Lm, and if θ is less than 90, the surface to be marked is the front surface, otherwise, the surface to be marked is the back surface. In the embodiment of the invention, the gesture of the marked content in the first gesture picture is an expected display gesture of the marked content, the gesture of the marked content in the second gesture picture is a display gesture after the mark is adjusted, after the adjusted second gesture picture is input into the surface to be marked and marked, the second gesture picture is overturned and rotated according to the mode of overturning and rotating the surface to be marked relative to the standard gesture, and the displayed gesture of the marked content is the same as the gesture of the marked content in the first gesture picture. Under the condition of obtaining the mode that the first posture picture and the surface to be marked turn and rotate relative to the standard posture, the posture presented by the marked content in the second posture picture is determined, and then any means or mode can be adopted to obtain the second posture picture of the marked content. In one embodiment of the invention, the second pose picture is obtained by reversely flipping and rotating the first pose picture in a pattern of flipping and rotating the surface to be marked with respect to the standard pose. The second posture picture can be rapidly and accurately obtained by the embodiment. For example, when the marked content rotates 90 degrees counterclockwise, the first posture picture rotates 90 degrees clockwise to obtain a second posture picture, the second posture picture is pasted on the surface to be marked, and the second posture picture rotates 90 degrees counterclockwise according to the turning and rotating mode of the surface after the marking is the posture presented by the first posture picture.
The embodiment of the present invention does not limit the specific obtaining manner of the first-posture picture, for example, when a picture is adopted for marking, since the marking content itself is the picture, the selected picture for marking can be directly used as the first-posture picture. Of course, the first posture picture may also be obtained in other manners, for example, the first posture picture is obtained in a screenshot manner in the method according to the embodiment of the present invention. Specifically, the first gesture picture may be obtained by capturing a mark content input in the to-be-marked plane. For example, the mark content may be input in the surface to be marked, and then the screenshot obtains a first pose picture of the mark content. Inputting markup content in the to-be-marked surface may be at least one of inputting text, selecting a picture, and writing with a brush in the to-be-marked surface. The embodiment is to capture the mark content input in the to-be-marked surface, so that the size of the acquired first posture picture is matched with the to-be-marked surface, and the first posture picture can be acquired quickly. The screenshot can be realized through a screenshot function of the system itself, and the screenshot can be realized through installed application software, for example, the screenshot is performed in a snapshot mode and the like.
The following describes the cube as an example. In the three-dimensional engine, all shapes are spliced by 'triangular faces', and fig. 3 shows a schematic diagram of one face of a cubic solid figure after being unfolded. As shown in fig. 3, the model of the quadrangle 1234 is formed by combining two "triangular surfaces", and we use the first three vertices 1, 2, and 3 to construct two three-dimensional vectors 21 and 23, and calculate the normal vector N of the "plane 1234" by "cross product of vectors" to be 21 × 23. Assume that the spatial transformation amount of this quadrilateral model is Ms (three-dimensional transformation matrix), the camera orientation in the three-dimensional scene is L (three-dimensional vector), and the camera transformation amount is Mc (three-dimensional transformation matrix). Thus, the model normal vector Nm ═ N × Ms and the camera orientation Lm ═ L × MC of the changed quadrilateral 1234 can be calculated. If the model normal vector faces towards the camera, the surface is the front surface, and the surface is the back surface. We determine the angle between two vectors, Nm · Lm, by "vector dot product", the face being the front face if θ < 90.
Suppose the pixel set of the first pose picture is { (x) 0 ,y 0 ,1)|0<x<Width, 0<y<Height, the flip matrix of the first pose picture is
Figure BDA0001641523490000111
The first pose picture flip formula is thus as follows:
Figure BDA0001641523490000112
fig. 4 shows a perspective view of a cube in comparison with its expanded view. Taking the expanded view (facing the user from the front) in fig. 4 as a standard, the marked content will not turn or rotate after being marked, and the posture of the marked content is the expected posture. If the side of the expanded three-dimensional figure in fig. 4, which faces the user, is opposite to the side of the expanded figure in fig. 4, that is, the back side faces the user, the marked content is turned over. In order to solve the problem, the embodiment of the invention may obtain the second posture picture of the marked content by correcting the marked content in advance (in this example, turning over), and then after pasting the second posture picture to the surface to be marked, finish marking (for example, after pasting, clicking a blank to finish marking), and then turning over the marked content to obtain the expected posture.
Because the space model is fixed, when the three-dimensional figure is unfolded, the three-dimensional figure can rotate around different axes for the same plane due to different unfolding modes. Fig. 4 shows a perspective view of a cube in comparison with its expanded view. The expanded view in fig. 4 is taken as a standard posture, and at this time, the marked content is not flipped or rotated after being marked, and the posture of the marked content is an expected posture. Fig. 5 and 6 are expanded views obtained by expanding the perspective view in fig. 4 in other expansion manners, respectively, and in fig. 5, the axis around which the "front" surface (marked with a "front" character), the "rear" surface (marked with a "rear" character), and the "top" surface (marked with a "mountain-shaped" figure) of the perspective view are expanded is different from the axis around in fig. 4, so that after the conventional marking, the marked content rotates, and the posture of the marked content is different from the expected posture (the direction changes). The axis of the "front" surface (marked with the "front" word) in fig. 6 is different from the axis of the "front" surface in fig. 4, so that after the conventional marking, the marked content rotates, and the marked content is in a different posture (changed in direction) from the expected posture. In order to make the pose of the marker presentation match the expectation, the pose of the marker content needs to be adjusted in advance. Taking fig. 6 as an example, since the mode of flipping and rotating the "front" face (face to be marked) with respect to the standard posture (no flipping, 90 ° counterclockwise rotation) and the expected posture of the face mark content (the posture presented by the first posture picture, see the mark content posture of the "front" face in the development in fig. 4) have been obtained, the posture presented by the second posture picture, that is, the posture rotated 90 ° clockwise by the first posture picture, can be obtained. And pasting the second gesture picture to the front surface, completing the mark (for example, clicking a blank space after pasting to complete the mark), and rotating the content of the mark according to the mode of turning and rotating the front surface (rotating 90 degrees anticlockwise) to obtain the expected gesture, referring to fig. 7, wherein fig. 7 is an effect diagram presented after the mark according to the embodiment of the invention.
With reference to fig. 6 and fig. 7, how to rotate the first pose picture is determined, and the details of "front" are as follows: the first two vertexes (1, 2) of the front model are taken to form a vector 12 3D (three-dimensional vector), referred to herein as the "direction vector" of a surface, assume that the projection matrix of the model is M p Then the two-dimensional projection of the "direction vector" is 12 ═ 12 3D *M p (taking x and y values to form a two-dimensional vector). Since it is desirable that the vertical direction D is (0, -1), the rotation angle a is calculated as 12 · D by vector dot product, and the map is correctedThe profile rotates as follows:
Figure BDA0001641523490000131
in a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method described above.
In a fourth aspect, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the method described above.
It is clear to a person skilled in the art that the solution according to the embodiments of the invention can be implemented by means of software and/or hardware. The "unit" or "module" in this specification refers to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, an FPGA (Field-Programmable Gate Array), an IC (Integrated Circuit), or the like.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any of the above-described embodiments of the method. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the steps of any of the above-mentioned embodiments of the method are implemented. In the embodiment of the present invention, the processor is a control center of a computer system, and may be a processor of a physical machine or a processor of a virtual machine.
In the present disclosure, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or order; the term "plurality" means two or more unless expressly limited otherwise. The terms "mounted," "connected," "fixed," and the like are to be construed broadly, and for example, "connected" may be a fixed connection, a removable connection, or an integral connection; "coupled" may be direct or indirect through an intermediary. The specific meanings of the above terms in the present invention can be understood according to specific situations by those of ordinary skill in the art.
In the description of the present invention, it is to be understood that the terms "upper", "lower", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the referred device or unit must have a specific direction, be constructed in a specific orientation, and operate, and thus, should not be construed as limiting the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A stereoscopic graphical marking system comprising:
the marked picture acquisition module is used for acquiring a first posture picture of the marked content;
the conversion mode acquisition module is used for acquiring a mode that a surface to be marked in an expanded image of the target three-dimensional graph is turned and rotated relative to a standard posture;
the image adjusting module is used for acquiring a second posture image of the marked content, and the posture of the marked content obtained when the second posture image is overturned and rotated according to the overturning and rotating mode of the surface to be marked is the same as the posture of the marked content of the first posture image;
the marking module is used for sticking the second posture picture on the surface to be marked to finish marking;
wherein the conversion mode acquisition module comprises:
the turnover judging module is used for determining whether the surface to be marked is turned over according to the relation between the normal vector Nm of the surface model to be marked and the camera orientation in the three-dimensional scene;
and the rotation angle acquisition module is used for acquiring the rotation angle of the surface to be marked in the expanded image according to the surface model to be marked.
2. The system of claim 1, wherein the picture adjustment module obtains the second pose picture by reversely flipping and rotating the first pose picture in a flipping and rotating pattern of the surface to be marked.
3. The system according to claim 1, wherein the markup picture acquiring module acquires the first pose picture from a markup content screenshot input in a to-be-tagged plane.
4. The method for marking the three-dimensional graph comprises the following steps:
acquiring a first posture picture of the marked content;
acquiring a mode of turning and rotating a to-be-marked surface in an expanded image of a target three-dimensional graph relative to a standard posture, wherein the turning and rotating mode of the to-be-marked surface in the expanded image comprises whether turning and a rotating angle, whether turning of the to-be-marked surface is determined according to the relation between a normal vector Nm of a to-be-marked surface model and the orientation of a camera in a three-dimensional scene, and the rotating angle is obtained based on the to-be-marked surface model;
acquiring a second posture picture of the marked content, wherein the posture of the marked content obtained when the second posture picture is turned and rotated according to the turning and rotating mode of the surface to be marked is the same as the posture of the marked content of the first posture picture;
and pasting the second posture picture on the surface to be marked to finish marking.
5. The method of claim 4,
and the second posture picture is obtained by reversely overturning and rotating the first posture picture according to the overturning and rotating mode of the surface to be marked.
6. The method of claim 4, wherein the obtaining of the first pose picture of the markup content comprises:
and acquiring the first gesture picture from the screenshot of the marking content input in the to-be-marked surface.
7. The method according to claim 6, wherein the marking content input in the surface to be marked is: and inputting at least one of text, picture selection and brush writing in the surface to be marked.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 4 to 7.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of claims 4 to 7 when executing the program.
CN201810383241.7A 2018-04-26 2018-04-26 Three-dimensional graphic marking system and method Active CN108765299B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810383241.7A CN108765299B (en) 2018-04-26 2018-04-26 Three-dimensional graphic marking system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810383241.7A CN108765299B (en) 2018-04-26 2018-04-26 Three-dimensional graphic marking system and method

Publications (2)

Publication Number Publication Date
CN108765299A CN108765299A (en) 2018-11-06
CN108765299B true CN108765299B (en) 2022-08-16

Family

ID=64011835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810383241.7A Active CN108765299B (en) 2018-04-26 2018-04-26 Three-dimensional graphic marking system and method

Country Status (1)

Country Link
CN (1) CN108765299B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976614B (en) * 2019-03-28 2021-04-06 广州视源电子科技股份有限公司 Method, device, equipment and medium for marking three-dimensional graph

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100093400A1 (en) * 2008-10-10 2010-04-15 Lg Electronics Inc. Mobile terminal and display method thereof
CN103135882A (en) * 2011-12-02 2013-06-05 深圳泰山在线科技有限公司 Method and system for control of display of window image
CN107451235A (en) * 2017-07-25 2017-12-08 广州视源电子科技股份有限公司 The methods of exhibiting and device of Spatial Dimension mark
CN107507283A (en) * 2017-08-21 2017-12-22 广州视源电子科技股份有限公司 Expansion rendering method, device, electronic equipment and the storage medium of solid figure
CN107728883A (en) * 2017-10-19 2018-02-23 惠州Tcl移动通信有限公司 A kind of adjust automatically desk-top picture calibration method, mobile terminal and storage medium
CN107918549A (en) * 2017-11-27 2018-04-17 广州视睿电子科技有限公司 Labeling method, device, computer equipment and the storage medium of stereo unfolding drawing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100093400A1 (en) * 2008-10-10 2010-04-15 Lg Electronics Inc. Mobile terminal and display method thereof
CN103135882A (en) * 2011-12-02 2013-06-05 深圳泰山在线科技有限公司 Method and system for control of display of window image
CN107451235A (en) * 2017-07-25 2017-12-08 广州视源电子科技股份有限公司 The methods of exhibiting and device of Spatial Dimension mark
CN107507283A (en) * 2017-08-21 2017-12-22 广州视源电子科技股份有限公司 Expansion rendering method, device, electronic equipment and the storage medium of solid figure
CN107728883A (en) * 2017-10-19 2018-02-23 惠州Tcl移动通信有限公司 A kind of adjust automatically desk-top picture calibration method, mobile terminal and storage medium
CN107918549A (en) * 2017-11-27 2018-04-17 广州视睿电子科技有限公司 Labeling method, device, computer equipment and the storage medium of stereo unfolding drawing

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Embodiment, modalities and mathematical affordances;L. D. Edwards等;《Cognition, Equity & Society: International Perspectives》;20141231;1-23页 *
几何画板3D工具在立体几何教学中的应用研究;覃亚平等;《中国教育技术装备》;20170228(第04期);39-41+48页 *
初中数学图形与几何学习平台设计与应用研究;刘薇;《中国优秀硕士学位论文全文数据库 社会科学Ⅱ辑》;20150115(第01期);H130-1055页 *
异型折叠纸盒CAD系统尺寸标注方法的研究;黄利强等;《包装工程》;20110731;第32卷(第13期);35-38页 *

Also Published As

Publication number Publication date
CN108765299A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
US10360718B2 (en) Method and apparatus for constructing three dimensional model of object
RU2642167C2 (en) Device, method and system for reconstructing 3d-model of object
CN104966316B (en) A kind of 3D facial reconstruction method, device and server
US10600150B2 (en) Utilizing an inertial measurement device to adjust orientation of panorama digital images
EP1909226B1 (en) Apparatus, method, and medium for generating panoramic image
US8390617B1 (en) Visualizing oblique images
US11330172B2 (en) Panoramic image generating method and apparatus
US6526166B1 (en) Using a reference cube for capture of 3D geometry
CN107133918B (en) Method for generating panorama at any position in three-dimensional scene
US9595080B2 (en) Implementing and interpolating rotations from a computing input device
CN101383055A (en) Three-dimensional human face constructing method and system
CN105513063A (en) Calibration of parabolic refraction and reflection camera through Veronese mapping and checkerboard
CN103327357A (en) Three-dimensional picture presenting method and device
CN111524230B (en) Linkage browsing method for three-dimensional model and unfolded panoramic image and computer system
CN103020900A (en) Method and device for image processing
US20230086983A1 (en) Method for acquiring distance from moving body to at least one object located in any direction of moving body by utilizing camera-view depth map and image processing device using the same
CN108765299B (en) Three-dimensional graphic marking system and method
JP2018109946A (en) Display device, program, and method for display
CN116977532A (en) Cube texture generation method, apparatus, device, storage medium, and program product
CN208638479U (en) Panoramic picture acquisition device and mobile robot
Kushal et al. A Simple Method for Interactive 3D Reconstruction, Camera Calibration from a Single View.
CN103530869B (en) For mating the system and method that moving mass controls
CN109074670B (en) Information processing apparatus, image generating method, and recording medium
TWI297132B (en)
CN110727489B (en) Screen capturing image generation method, electronic device and computer readable storage medium

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