CN110378841A - Display processing method and device - Google Patents
Display processing method and device Download PDFInfo
- Publication number
- CN110378841A CN110378841A CN201910669393.8A CN201910669393A CN110378841A CN 110378841 A CN110378841 A CN 110378841A CN 201910669393 A CN201910669393 A CN 201910669393A CN 110378841 A CN110378841 A CN 110378841A
- Authority
- CN
- China
- Prior art keywords
- spatial
- graph
- vertex
- space
- analyzed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 239000007787 solid Substances 0.000 claims abstract description 38
- 238000009877 rendering Methods 0.000 claims abstract 4
- 238000012545 processing Methods 0.000 claims description 48
- 238000000034 method Methods 0.000 claims description 42
- 238000004590 computer program Methods 0.000 claims description 5
- 230000001131 transforming effect Effects 0.000 claims description 5
- 230000009466 transformation Effects 0.000 claims description 4
- 238000013461 design Methods 0.000 description 26
- 238000012360 testing method Methods 0.000 description 22
- 230000008569 process Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 238000004458 analytical method Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 6
- 230000003993 interaction Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012015 optical character recognition Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 210000004556 brain Anatomy 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 229910003460 diamond Inorganic materials 0.000 description 1
- 239000010432 diamond Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/08—Projecting images onto non-planar surfaces, e.g. geodetic screens
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
The embodiment of the present invention provides a kind of display processing method and device, after electronic equipment gets the planar graph to be analyzed on two-dimensional surface for describing space multistory figure, according to the flat image to be analyzed, determine the spatial position on each vertex of space multistory figure, and the line relationship on different vertex, and then according to the spatial position on each vertex and line relationship rendering space solid figure.During being somebody's turn to do, by drawing out the space multistory figure in three-dimensional space based on the several picture in two-dimensional surface, realize the purpose space multistory figure for being difficult to present and analyze on two-dimensional surface being presented in three-dimensional space.
Description
Technical Field
The embodiment of the invention relates to the technical field of intelligent search, in particular to a display processing method and device.
Background
At present, with the continuous development of the technology, the learning mode of photographing and searching questions is more and more popularized, and a plurality of application software for solving the operation difficulty appears on the market. In the process of photographing and searching for the questions, firstly, starting application software used for photographing and searching for the questions on the electronic equipment to start the application software; then, starting a photographing function of the application software, and photographing the test questions to obtain test question images; and finally, uploading the test question image to a server, identifying the test questions in the test question image by the server, retrieving answer analysis matched with the test questions, and sending the answer analysis to the electronic equipment.
In fact, in order to encourage users to actively think and learn, the users are only considered to use photographing to search for questions when the problems cannot be solved through thinking. For the test question of solid geometry, because the user is difficult to build a three-dimensional space solid figure in the brain and sea according to the geometry described by the two-dimensional plane. In this case, if the questions are searched by photographing, it is difficult for the user to understand the test questions even if the user obtains the answer analysis.
Therefore, how to generate a spatial solid figure in a three-dimensional space based on a geometric body described by a two-dimensional plane in a test question to visually present the spatial solid figure to a user is regarded as a problem to be solved by the industry.
Disclosure of Invention
The embodiment of the invention provides a display processing method and a display processing device, which are used for drawing a spatial solid figure in a three-dimensional space based on a geometric image in a two-dimensional plane, so that the purpose of presenting a solid geometric image which is difficult to present and analyze on the two-dimensional plane in the three-dimensional space is achieved.
In a first aspect, an embodiment of the present invention provides a display processing method, including:
acquiring a planar graph to be analyzed, wherein the planar graph to be analyzed is used for describing a spatial stereo graph;
converting the planar graph to be analyzed into a spatial stereo graph;
and displaying the spatial stereo graph.
In one possible design, the converting the planar image to be analyzed into a spatial stereo image includes:
determining the spatial position of each vertex of the spatial three-dimensional graph according to the planar graph to be analyzed;
determining a connection line relation between different vertexes in each vertex;
and drawing the space three-dimensional graph according to the space position of each vertex and the connection line relation.
In one possible design, the drawing the spatial stereo graph according to the spatial positions of the vertices and the line relation includes:
associated characters extracted from the planar image to be analyzed are used for describing the spatial three-dimensional graph;
generating a first geometric rule according to the associated characters, wherein the first geometric rule is used for indicating the relation of different elements forming the space solid figure, and the elements comprise points, lines or planes;
and drawing the spatial solid graph according to the first geometric rule, the spatial positions of the vertexes and the connection line relation.
In a possible design, the determining the spatial positions of the vertices of the spatial stereo image according to the planar image to be analyzed includes:
determining the space coordinates of each vertex of the space stereo graph according to the space coordinate system in the planar graph to be analyzed;
and determining the space position of each vertex of the space stereo graph according to the space coordinate of each vertex of the space stereo graph.
In a possible design, the determining the spatial positions of the vertices of the spatial stereo image according to the planar image to be analyzed includes:
determining a space coordinate system according to the relative position of elements in the planar graph to be analyzed, wherein the elements comprise points, lines or surfaces;
and determining the spatial position of each vertex of the spatial three-dimensional graph according to the spatial coordinate system.
In one possible design, the determining the spatial positions of the vertices of the spatial stereo image according to the spatial coordinate system includes:
drawing scales on each coordinate axis in the space coordinate system;
and determining the distance of each vertex in the vertexes relative to each coordinate axis in the space coordinate system, so as to obtain the space position of the corresponding vertex in the space stereo graph.
In a possible design, after the drawing the spatial stereo image according to the spatial positions of the respective vertices and the connection line relationship, the method further includes:
receiving a second geometric rule input by a user, wherein the second geometric rule is a rule self-defined by the user;
and transforming the spatial stereo graph according to the second geometric rule, wherein the transformation comprises at least one of scaling, moving and rotating.
In a possible design, after the drawing the spatial stereo image according to the spatial positions of the respective vertices and the connection line relationship, the method further includes:
and identifying the operation of a user on the space stereo graph, and transforming the space stereo graph according to the operation, wherein the operation comprises moving the vertex of the space stereo graph, zooming any one edge of the space stereo graph, rotating the space stereo graph, and moving the vertex or the edge of the space stereo graph.
In one possible design, the obtaining a planar graph to be analyzed includes:
receiving a shooting instruction input by a user, and processing the shooting instruction to shoot the planar graph to be analyzed; or receiving an uploading instruction input by a user, and processing the uploading instruction to obtain the planar graph to be analyzed.
In one possible design, the determining the connection line relationship between different vertices in each vertex includes: identifying a type of a line relation between the first vertex and the second vertex, the type comprising a solid line relation or a dashed line relation; and storing the type of the connection line relation between the first vertex and the second vertex.
In a second aspect, an embodiment of the present invention provides a display processing apparatus, including:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a planar graph to be analyzed, and the planar graph to be analyzed is used for describing a spatial stereo graph;
the processing module is used for converting the planar graph to be analyzed into a spatial stereo graph;
and the display module is used for displaying the space three-dimensional graph.
In a feasible design, the processing module is configured to determine a spatial position of each vertex of the spatial three-dimensional graph according to the planar graph to be analyzed, determine a connection relationship between different vertices in each vertex, and draw the spatial three-dimensional graph according to the spatial position of each vertex and the connection relationship.
In a feasible design, the processing module is configured to extract associated characters from the planar image to be analyzed when the spatial stereo graph is drawn according to the spatial position of each vertex and the connection relation, where the associated characters are used to describe the spatial stereo graph; generating a first geometric rule according to the associated characters, wherein the first geometric rule is used for indicating the relation of different elements forming the space solid figure, and the elements comprise points, lines or planes; and drawing the spatial solid graph according to the first geometric rule, the spatial positions of the vertexes and the connection line relation.
In a feasible design, when determining the spatial position of each vertex of the spatial stereo graph according to the planar graph to be analyzed, the processing module is configured to determine the spatial coordinate of each vertex of the spatial stereo graph according to a spatial coordinate system in the planar graph to be analyzed; and determining the space position of each vertex of the space stereo graph according to the space coordinate of each vertex of the space stereo graph.
In a possible design, when determining the spatial positions of the vertices of the spatial three-dimensional graph according to the planar graph to be analyzed, the processing module is configured to determine a spatial coordinate system according to the relative positions of elements in the planar graph to be analyzed, where the elements include points, lines, or planes; and determining the spatial position of each vertex of the spatial three-dimensional graph according to the spatial coordinate system.
In a feasible design, when the processing module determines the spatial position of each vertex of the spatial stereo graph according to the spatial coordinate system, the processing module is configured to draw a scale for each coordinate axis in the spatial coordinate system, and determine a distance between each vertex in the each vertex and each coordinate axis in the spatial coordinate system, so as to obtain the spatial position of the corresponding vertex in the spatial stereo graph.
In one possible design, the apparatus further comprises:
a receiving module, configured to receive a second geometric rule input by a user after the processing module draws the spatial three-dimensional graph according to the spatial position of each vertex and the connection relation, where the second geometric rule is a rule defined by the user;
the processing module is further configured to transform the spatial stereo image according to the second geometric rule, where the transform includes at least one of scaling, moving, and rotating.
In a feasible design, the processing module is further configured to identify an operation of a user on the spatial stereo graph after the spatial stereo graph is drawn according to the spatial position of each vertex and the connection relation, and transform the spatial stereo graph according to the operation, where the operation includes moving a vertex of the spatial stereo graph, scaling any edge of the spatial stereo graph, rotating the spatial stereo graph, and moving a vertex or an edge of the spatial stereo graph.
In a possible design, the obtaining module is configured to receive a shooting instruction input by a user, and process the shooting instruction to shoot the planar graph to be analyzed; or receiving an uploading instruction input by a user, and processing the uploading instruction to obtain the planar graph to be analyzed.
In one possible design, the apparatus further comprises: the processing module is further used for identifying the type of the connection relation between the first vertex and the second vertex after determining the connection relation between different vertices in the vertices, wherein the type comprises a solid line connection relation or a dotted line connection relation;
the storage module is further configured to store a type of a connection relationship between the first vertex and the second vertex.
In a third aspect, an embodiment of the present invention provides a display processing apparatus, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method according to the first aspect or various possible implementations of the first aspect.
In a fourth aspect, embodiments of the present invention provide a storage medium, which stores instructions that, when executed on an electronic device, cause the electronic device to perform the method according to the first aspect or any of the possible implementations of the first aspect.
In a fifth aspect, embodiments of the present invention provide a computer program product, which, when run on an electronic device, causes the electronic device to perform the method according to the first aspect or the various possible implementations of the first aspect.
According to the display processing method and device provided by the embodiment of the invention, after the planar image to be analyzed for describing the spatial stereo image on the two-dimensional plane is obtained, the spatial position of each vertex of the spatial stereo image and the connection relation of different vertices are determined according to the planar image to be analyzed, and the spatial stereo image is drawn according to the spatial position and the connection relation of each vertex. In the process, the spatial solid figure in the three-dimensional space is drawn based on the geometric image in the two-dimensional plane, so that the purpose of presenting the solid geometric image which is difficult to present and analyze on the two-dimensional plane in the three-dimensional space is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of an operating environment of a display processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a display processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another display processing method provided by the embodiments of the present invention;
fig. 4 is a schematic diagram illustrating a planar graph to be analyzed and associated text in the display processing method according to the embodiment of the present invention;
fig. 5 is a schematic structural diagram of a display processing apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of another display processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another display processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In general, the stereo geometry is to describe a spatial stereo image in a three-dimensional space using two-dimensional plane images. However, in fact, many users are not strong in spatial imagination, and thus it is difficult to understand the spatial stereo graphic described by the two-dimensional image. Therefore, for the geometric test questions with high difficulty, even though a plurality of tools such as photographing and searching the questions can quickly find the answers of the questions and display the answers to the questions to the user, the user cannot establish the presentation effect of the spatial stereo graph in the mind according to the geometric images described in the two-dimensional plane, so that the user can hardly really understand the entity even if the user obtains the answer analysis.
In view of this, embodiments of the present invention provide a display processing method and apparatus, which draw a spatial stereo graphic in a three-dimensional space based on a geometric image in a two-dimensional plane, so as to achieve a purpose of presenting a stereo geometric image that is difficult to present and analyze on the two-dimensional plane in the three-dimensional space.
Fig. 1 is a schematic operating environment diagram of a display processing method according to an embodiment of the present invention. Referring to fig. 1, an electronic device establishes network connection with a server, and after obtaining a planar graph to be analyzed, the electronic device draws a spatial stereo graph based on the planar graph to be analyzed, and sends a test question corresponding to the planar graph to be analyzed to the server, so that the server retrieves an answer analysis matched with the server, and sends the answer analysis to the electronic device; or the server can also obtain the planar graph to be analyzed, draw the spatial stereo graph based on the planar graph to be analyzed, retrieve the answer analysis matched with the test question corresponding to the planar graph to be analyzed according to the test question, and send the answer analysis to the electronic equipment.
Next, a detailed description will be given of a display processing method according to an embodiment of the present invention, taking the example of generating a spatial stereo image by an electronic device in addition to fig. 1. For example, see fig. 2.
Fig. 2 is a flowchart of a display processing method according to an embodiment of the present invention, which illustrates how to generate a spatial stereo image in detail from the perspective of an electronic device, and the embodiment includes:
101. and acquiring a planar graph to be analyzed, wherein the planar graph to be analyzed is used for describing a spatial stereo graph.
For example, an APP (application) is installed on the electronic device, and the APP may be an APP carried by an operating system of the electronic device or an APP of a third party downloaded by a user. When a user answers the solid geometry test questions, for the test questions which cannot establish the presentation effect of the space solid graph in the mind according to the plane graph presented in the two-dimensional plane, the plane graph to be analyzed is obtained through the APP. For example, the user clicks a shooting button of the APP to input a shooting instruction, the electronic device receives the shooting instruction, and takes a picture of the test question, so that the plane figure to be analyzed is shot. For another example, when a user browses a test question by using an electronic device, for a test question which cannot establish a presentation effect of a spatial three-dimensional graph in the brain according to a geometric image described in a two-dimensional plane, long-press, copy and the like are performed on the test question, so that the geometric image in the test question is stored locally, and a planar graph to be analyzed is obtained. And then, clicking a preview button of the APP by the user, finding the plane graph to be analyzed and uploading the plane graph to be analyzed so as to load the plane graph to be analyzed on the APP.
102. And converting the planar graph to be analyzed into a spatial stereo graph.
After the electronic equipment acquires the planar graph to be analyzed, the planar image to be analyzed is converted into a spatial stereo graph according to the position relation of points, lines, surfaces and the like in the planar graph to be analyzed or in combination with associated characters of test questions and the like.
103. And displaying the spatial stereo graph.
In this step, the electronic device displays a three-dimensional spatial stereo graphic on the screen, so that the user can visually and clearly see the presentation effect of the spatial stereo graphic.
According to the display processing method provided by the embodiment of the invention, after the electronic equipment acquires the planar graph to be analyzed for describing the spatial stereo graph on the two-dimensional plane, the planar graph to be analyzed is converted into the spatial stereo graph and displayed. In the process, the spatial solid figure in the three-dimensional space is drawn based on the geometric image in the two-dimensional plane, so that the purpose of presenting the spatial image which is difficult to present and analyze on the two-dimensional plane in the three-dimensional space is achieved.
Fig. 3 is a flowchart of another display processing method according to an embodiment of the present invention, which is used for explaining how to generate a spatial stereo image in detail from the perspective of an electronic device, and the embodiment includes:
201. and acquiring a planar graph to be analyzed, wherein the planar graph to be analyzed is used for describing a spatial stereo graph.
Specifically, refer to the description of step 101 above, and are not described herein again.
202. And determining the spatial position of each vertex of the spatial three-dimensional graph according to the planar graph to be analyzed.
For example, since the planar graph to be analyzed is substantially an image on a two-dimensional plane for describing the spatial stereo graph, and when the spatial stereo graph is drawn, the spatial position of each vertex of the spatial stereo graph needs to be determined, in this step, the spatial position of each vertex of the corresponding spatial stereo graph needs to be determined according to the planar graph to be analyzed.
203. And determining the connection line relation among different vertexes in each vertex.
For example, when the spatial stereo image is drawn after the vertices of the spatial stereo image are determined, it is necessary to determine the connection line relationship between the vertices and whether the connection line is a broken line or a solid line, and therefore, in this step, it is necessary to identify the connection line relationship between different vertices according to an image recognition technique or the like.
204. And drawing the space three-dimensional graph according to the space position of each vertex and the connection line relation.
Illustratively, after the spatial position of each vertex of the spatial stereo graph, the connection relation of different vertices in each vertex, and the like are determined, the vertices may be connected in a canvas, so as to draw the spatial stereo graph. For example, in the Web page (Web) technology, it is necessary to draw a 3D solid geometry image in a Web page by using an Application Program Interface (API) of a Web graphics library (Web GL) through coordinate information of a set point, connection information, and the like in a canvas. The Web GL is a 3D drawing protocol and comprises Web GL1.0 and Web GL2.0, wherein the Web GL1.0 is based on OpenGL ES 2.0, provides an API of 3D graphics, uses HTML5 canvas (canvas) and allows a document object model interface to be utilized; the Web GL2.0 is based on OpenGL ES3.0, is an extension of the Web GL1.0, introduces a new API, and can realize automatic memory management by using part of JavaScript.
205. And displaying the spatial stereo graph.
206. And identifying the operation of the user on the space three-dimensional graph, and transforming the space three-dimensional graph according to the operation.
The operation comprises moving a vertex of the spatial stereo graph, zooming any one edge of the spatial stereo graph, rotating the spatial stereo graph, and moving the vertex or the edge of the spatial stereo graph. For example, the user presses a vertex and drags, thereby triggering the spatial stereo graphic to deform. Assuming that the spatial stereo image is displayed according to the first geometric rule before the operation, and the spatial stereo image is a cube under the first geometric rule, the user can press and drag the vertex a during the interaction process, so that the cube is transformed into a diamond shape, and the like. Wherein the first geometric rule is used for indicating the relation of different elements constituting the space solid figure, and the elements comprise points, lines or planes.
In addition, in the interaction process, besides that the user operates the spatial solid figure on the screen of the electronic device in a pressing, dragging and other modes to enable the spatial solid figure to generate shape transformation, a user-defined geometric rule, which is hereinafter referred to as a second geometric rule, can be input through the screen of the electronic device. And after receiving a second geometric rule input by the user, the electronic equipment transforms the spatial solid graph according to the second geometric rule, wherein the transformation comprises at least one of zooming, moving and rotating.
For example, the user may input the second geometric rule in the electronic device by handwriting, voice, or the like, so that the electronic device recalculates the coordinates of each vertex of the spatial stereo graphic according to the second geometric rule, thereby performing operations such as enlarging, reducing, rotating, or deforming the spatial stereo graphic. Assuming that before the operation, the spatial solid pattern is displayed according to a first geometric rule, the spatial solid pattern includes two edges perpendicular to each other, which are AB and BC, respectively, and AB is equal to BC under the first geometric rule, then in the interaction process, the user may input a second geometric rule, such as AB is equal to 2BC, so that the spatial solid pattern changes.
The above-described enlargement, reduction, rotation, and the like of the spatial stereo graphic may be triggered by using an API of the web GL. Wherein,
according to the display processing method provided by the embodiment of the invention, after the planar image to be analyzed for describing the spatial stereo image on the two-dimensional plane is obtained, the spatial position of each vertex of the spatial stereo image and the connection relation of different vertices are determined according to the planar image to be analyzed, and then the spatial stereo image is drawn according to the spatial position and the connection relation of each vertex. In the process, the space solid graph in the three-dimensional space is drawn based on the geometric image in the two-dimensional plane, so that the purpose of presenting the space solid graph which is difficult to present and analyze on the two-dimensional plane in the three-dimensional space is achieved.
In general, a solid geometry test question has, in addition to a planar figure to be analyzed on a two-dimensional plane, corresponding associated text describing the spatial solid figure. For example, referring to fig. 4, fig. 4 is a schematic diagram illustrating a planar graph to be analyzed and associated text in a display processing method according to an embodiment of the present invention.
Referring to fig. 4, the planar graph to be analyzed on the two-dimensional plane is a graph for characterizing a cube, and the spatial solid graph is a graph, i.e. 8 vertexes of the cube are A, B, C, D, A1, B1, C1, and D1, respectively, and AB ═ BC, BC ═ CD, CD ═ DA, AD ═ CD. The dotted box represents text.
When drawing the spatial stereo graph, the spatial position and the connection relation of each vertex are considered, and associated characters are also required to be considered. At this time, when the electronic device draws the spatial three-dimensional graph according to the spatial position of each vertex and the connection relation, acquiring associated characters of the planar graph to be analyzed, wherein the associated characters are used for describing the spatial three-dimensional graph, converting the associated characters into texts, and generating a first geometric rule according to the texts, wherein the first geometric rule is used for indicating the relation of different elements forming the spatial three-dimensional graph, and the elements comprise points, lines or planes; and determining the spatial position of each vertex of the spatial solid figure according to the first geometric rule.
For example, when a planar graph to be analyzed is obtained by a photographing mode, after the geometric image and the associated characters are displayed in a viewing frame, photographing is performed, so that an original image containing the geometric image and the associated characters is obtained, the geometric image and the associated characters are respectively extracted from the original image, and an image is separately generated for the geometric image part, so that the image to be analyzed is obtained; for the associated text portion, the associated text is converted into text by Optical Character Recognition (OCR) technology or the like, and then the text is represented as a first geometric rule by using a geometric rule library. And finally, when the space three-dimensional graph is drawn, drawing the space three-dimensional graph based on the first geometric rule, the space position of each vertex and the connection line relation.
Generally, an image for describing a spatial stereo graphic on a two-dimensional plane has two situations, one is that a coordinate system is established on the two-dimensional plane, and at this time, the electronic device determines the spatial position of each vertex of the spatial stereo graphic according to the coordinate system; in another case, no spatial coordinate system is established on the two-dimensional plane, and at this time, the electronic device determines the spatial position of each vertex of the spatial stereo graph according to the image characteristics of the planar graph to be analyzed, such as the relative position of each vertex. Next, how to determine the positions of the respective vertices of the spatial stereo image will be described in detail.
First, a coordinate system is established on a two-dimensional plane.
In this case, when the electronic device determines the spatial position of each vertex of the spatial stereo graphic according to the planar graphic to be analyzed, the electronic device determines the spatial coordinate of each vertex of the spatial stereo graphic according to the spatial coordinate system in the planar graphic to be analyzed, and determines the spatial position of each vertex of the spatial stereo graphic according to the spatial coordinate of each vertex of the spatial stereo graphic.
Illustratively, for a planar graph to be analyzed with a coordinate system, after a user obtains the planar graph to be analyzed by photographing or other methods, the OCR technology is utilized to identify the coordinate position of each vertex in the space, i.e. the spatial position, according to the coordinate information labeled by each vertex in the planar graph to be analyzed. Then, the electronic device restores the spatial stereo graphic described on the two-dimensional plane to the spatial stereo graphic in the three-dimensional space according to the spatial coordinate system and the information of each vertex, the solid line, the dotted line and the like on the two-dimensional plane, and the user can change the presentation effect again through an interactive mode of rotating, zooming in, zooming out, moving each vertex and the like.
In this embodiment, the purpose of restoring a planar graph to be analyzed, which is used for describing a spatial stereo graph on a two-dimensional plane, to a three-dimensional space is achieved.
Secondly, no coordinate system is established on the two-dimensional plane.
In this case, when the electronic device determines the spatial position of each vertex of the spatial three-dimensional graph according to the planar graph to be analyzed, a spatial coordinate system is determined according to the relative position of elements in the planar graph to be analyzed, where the elements include points, lines, or planes; and determining the spatial position of each vertex of the spatial three-dimensional graph according to the spatial coordinate system.
For example, for a planar graph to be analyzed without a coordinate system, after a user obtains the planar graph to be analyzed by photographing or other methods, a spatial coordinate system is identified according to the relative position of each vertex, and then the position space of each vertex is determined based on the spatial coordinate system. For example, a scale is drawn for each coordinate axis in the spatial coordinate system; and determining the distance of each vertex in the vertexes relative to each coordinate axis in the space coordinate system, so as to obtain the space position of the corresponding vertex in the space stereo graph.
When the position space of each vertex is determined based on the space coordinate system, all coordinate axes of the space coordinate system are subjected to scale subdivision in an equidistant mode, the distance between the vertex and the coordinate axes is determined, the scale of the vertex on the coordinate axes can be obtained, and then the scales of the three coordinate axes are combined, and the space position of the vertex can be obtained. For example, the vertex a { x1, y1, z1}, where x1, y1, z1 are the lengths of the unit scale values in the subdivision process with equidistant scales, respectively.
In this embodiment, the purpose of restoring a planar graph to be analyzed, which is used for describing a spatial stereo graph on a two-dimensional plane, to a three-dimensional space is achieved.
In the foregoing embodiment, after determining the connection relationship between different vertices in each vertex, the electronic device identifies, for any two first vertices and second vertices having the connection relationship among the vertices, a type of the connection relationship between the first vertex and the second vertex, where the type includes a solid line connection relationship or a dotted line connection relationship, and then stores the type of the connection relationship between the first vertex and the second vertex.
For example, after determining the connection line relationship between different vertices in the vertices, the electronic device may identify vertices implementing connection and vertices implementing dotted connection according to an image recognition technique, and then store the identified results, such as { a, B, solid line }, { A, C, dotted line }, where A, B, C are the vertices of the spatial solid pattern, respectively, and vertex a and vertex B are connected by a solid line, and vertex a and vertex C are connected by a dotted line.
In the above embodiment, after the spatial stereo graphic is drawn, the spatial stereo graphic may be transformed according to the input of the user. That is, the spatial stereo graphic is an interactive spatial stereo graphic. The interaction process is explained in detail below.
In a feasible implementation manner, after the electronic device draws the spatial solid graph according to the spatial position of each vertex and the connection relation, a second geometric rule input by a user is received, where the second geometric rule is a rule defined by the user, and the spatial solid graph is transformed according to the second geometric rule.
For example, the user may input the second geometric rule in the electronic device by handwriting, voice, or the like, so that the electronic device recalculates the coordinates of each vertex of the spatial stereo graphic according to the second geometric rule, thereby performing operations such as enlarging, reducing, rotating, or deforming the spatial stereo graphic. Continuing with the example in fig. 3, under the first geometric rule, AB is BC, the user may input AB is 2BC, etc. during the interaction process, so that the spatial stereo image changes.
Fig. 5 is a schematic structural diagram of a display processing apparatus according to an embodiment of the present invention, where the display processing apparatus may be implemented by software and/or hardware. As shown in fig. 4, the display processing apparatus 100 includes:
the acquisition module 11 is configured to acquire a planar graph to be analyzed, where the planar graph to be analyzed is used to describe a spatial stereo graph;
the processing module 12 is configured to convert the planar graph to be analyzed into a spatial stereo graph;
and the display module 13 is used for displaying the spatial stereo graph.
In a feasible design, the processing module 12 is configured to determine a spatial position of each vertex of the spatial three-dimensional graph according to the planar graph to be analyzed, determine a connection line relationship between different vertices in each vertex, and draw the spatial three-dimensional graph according to the spatial position of each vertex and the connection line relationship.
In a feasible design, the processing module 12 is configured to extract associated characters from the planar image to be analyzed when the spatial stereo graph is drawn according to the spatial position of each vertex and the connection relation, where the associated characters are used to describe the spatial stereo graph; generating a first geometric rule according to the associated characters, wherein the first geometric rule is used for indicating the relation of different elements forming the space solid figure, and the elements comprise points, lines or planes; and drawing the spatial solid graph according to the first geometric rule, the spatial positions of all the vertexes and the line relation.
In a feasible design, the processing module 12 is configured to, when determining the spatial position of each vertex of the spatial stereo graphic according to the planar graphic to be analyzed, determine the spatial coordinate of each vertex of the spatial stereo graphic according to a spatial coordinate system in the planar graphic to be analyzed, and determine the spatial position of each vertex of the spatial stereo graphic according to the spatial coordinate of each vertex of the spatial stereo graphic.
In a possible design, when determining the spatial position of each vertex of the spatial stereo graph according to the planar graph to be analyzed, the processing module 12 is configured to determine a spatial coordinate system according to the relative position of elements in the planar graph to be analyzed, where the elements include points, lines, or planes, and determine the spatial position of each vertex of the spatial stereo graph according to the spatial coordinate system.
In a possible design, when determining the spatial position of each vertex of the spatial stereo graph according to the spatial coordinate system, the processing module 12 is configured to draw a scale for each coordinate axis in the spatial coordinate system, and determine a distance between each vertex in the each vertex and each coordinate axis in the spatial coordinate system, so as to obtain the spatial position of the corresponding vertex in the spatial stereo graph.
Fig. 6 is a schematic structural diagram of another display processing apparatus according to an embodiment of the present invention, and the display processing apparatus further includes, on the basis of fig. 5:
a receiving module 14, configured to receive a second geometric rule input by a user after the processing module 12 draws the spatial three-dimensional graph according to the spatial position of each vertex and the connection relation, where the second geometric rule is a rule defined by the user;
the processing module 12 is further configured to transform the spatial stereo image according to the second geometric rule, where the transform includes at least one of scaling, moving, and rotating.
In a feasible design, the processing module 12 is further configured to identify an operation of a user on the spatial stereo graph after drawing the spatial stereo graph according to the spatial position of each vertex and the connection relation, and transform the spatial stereo graph according to the operation, where the operation includes moving a vertex of the spatial stereo graph, scaling any edge of the spatial stereo graph, rotating the spatial stereo graph, and moving a vertex or an edge of the spatial stereo graph.
In a possible design, the obtaining module 11 is configured to receive a shooting instruction input by a user, and process the shooting instruction to shoot the planar graph to be analyzed; or receiving an uploading instruction input by a user, and processing the uploading instruction to obtain the planar graph to be analyzed.
In one possible design, referring again to fig. 6, the apparatus further includes: the processing module 12, after determining a connection relationship between different vertices in the vertices, is further configured to identify a type of connection relationship between the first vertex and the second vertex, where the type includes a solid connection relationship or a dashed connection relationship;
the storage module 15 is further configured to store a type of a connection relationship between the first vertex and the second vertex.
Fig. 7 is a schematic structural diagram of another display processing apparatus according to an embodiment of the present invention. As shown in fig. 7, the display processing apparatus 200 includes:
at least one processor 21 and memory 22;
the memory 22 stores computer-executable instructions;
the at least one processor 21 executes computer-executable instructions stored by the memory 22 to cause the at least one processor 21 to perform the display processing method as described above.
For a specific implementation process of the processor 21, reference may be made to the above method embodiments, which implement similar principles and technical effects, and this embodiment is not described herein again.
Optionally, the display processing apparatus 200 further includes a communication section 23. The processor 21, the memory 22, and the communication unit 23 may be connected by a bus 24.
An embodiment of the present invention further provides a storage medium, where a computer executing instruction is stored in the storage medium, and the computer executing instruction is used to implement the display processing method described above when executed by a processor.
Embodiments of the present invention further provide a computer program product, which, when running on a server, causes the server to execute the display processing method as described above.
In the above embodiments, it should be understood that the described apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for enabling a display processing apparatus (which may be a personal computer, a server, or a network device) or a processor (processor) to perform some steps of the methods according to the embodiments of the present invention.
It should be understood that the processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present invention are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in a terminal or server.
In the embodiments of the present invention, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and following related objects are in a relationship of "division". "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (13)
1. A display processing method, comprising:
acquiring a planar graph to be analyzed, wherein the planar graph to be analyzed is used for describing a spatial stereo graph;
converting the planar graph to be analyzed into a spatial stereo graph;
and displaying the spatial stereo graph.
2. The method according to claim 1, wherein said converting the planar image to be analyzed into a spatial stereo image comprises:
determining the spatial position of each vertex of the spatial three-dimensional graph according to the planar graph to be analyzed;
determining a connection line relation between different vertexes in each vertex;
and drawing the space three-dimensional graph according to the space position of each vertex and the connection line relation.
3. The method according to claim 2, wherein said rendering the spatial stereo graphic according to the spatial positions of the respective vertices and the line relation comprises:
associated characters extracted from the planar image to be analyzed are used for describing the spatial three-dimensional graph;
generating a first geometric rule according to the associated characters, wherein the first geometric rule is used for indicating the relation of different elements forming the space solid figure, and the elements comprise points, lines or planes;
and drawing the spatial solid graph according to the first geometric rule, the spatial positions of the vertexes and the connection line relation.
4. The method according to claim 2 or 3, wherein the determining the spatial position of each vertex of the spatial stereo graph according to the planar graph to be analyzed comprises:
determining the space coordinates of each vertex of the space stereo graph according to the space coordinate system in the planar graph to be analyzed;
and determining the space position of each vertex of the space stereo graph according to the space coordinate of each vertex of the space stereo graph.
5. The method according to claim 2 or 3, wherein the determining the spatial position of each vertex of the spatial stereo graph according to the planar graph to be analyzed comprises:
determining a space coordinate system according to the relative position of elements in the planar graph to be analyzed, wherein the elements comprise points, lines or surfaces;
and determining the spatial position of each vertex of the spatial three-dimensional graph according to the spatial coordinate system.
6. The method of claim 5, wherein determining the spatial position of each vertex of the spatial volume map according to the spatial coordinate system comprises:
drawing scales on each coordinate axis in the space coordinate system;
and determining the distance of each vertex in the vertexes relative to each coordinate axis in the space coordinate system, so as to obtain the space position of the corresponding vertex in the space stereo graph.
7. The method according to any one of claims 2 to 6, wherein after the rendering the spatial stereo image according to the spatial positions of the vertices and the connection relation, the method further comprises:
receiving a second geometric rule input by a user, wherein the second geometric rule is a rule self-defined by the user;
and transforming the spatial stereo graph according to the second geometric rule, wherein the transformation comprises at least one of scaling, moving and rotating.
8. The method according to any one of claims 2 to 6, wherein after the rendering the spatial stereo image according to the spatial positions of the vertices and the connection relation, the method further comprises:
and identifying the operation of a user on the space stereo graph, and transforming the space stereo graph according to the operation, wherein the operation comprises moving the vertex of the space stereo graph, zooming any one edge of the space stereo graph, rotating the space stereo graph, and moving the vertex or the edge of the space stereo graph.
9. The method according to any one of claims 1 to 8, wherein the obtaining of the planar graph to be analyzed comprises:
receiving a shooting instruction input by a user, and processing the shooting instruction to shoot the planar graph to be analyzed;
or,
and receiving an uploading instruction input by a user, and processing the uploading instruction to obtain the planar graph to be analyzed.
10. The method according to any one of claims 2 to 6, wherein each vertex comprises a first vertex and a second vertex, and after determining the link relation between different vertices in each vertex, the method further comprises:
identifying a type of a line relation between the first vertex and the second vertex, the type comprising a solid line relation or a dashed line relation;
and storing the type of the connection line relation between the first vertex and the second vertex.
11. A display processing apparatus characterized by comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a planar graph to be analyzed, and the planar graph to be analyzed is used for describing a spatial stereo graph;
the processing module is used for converting the planar graph to be analyzed into a spatial stereo graph;
and the display module is used for displaying the space three-dimensional graph.
12. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of the claims 1-10 when executing the program.
13. A storage medium having stored therein instructions that, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910669393.8A CN110378841A (en) | 2019-07-24 | 2019-07-24 | Display processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910669393.8A CN110378841A (en) | 2019-07-24 | 2019-07-24 | Display processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110378841A true CN110378841A (en) | 2019-10-25 |
Family
ID=68255302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910669393.8A Pending CN110378841A (en) | 2019-07-24 | 2019-07-24 | Display processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110378841A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113689523A (en) * | 2021-08-26 | 2021-11-23 | 联想(北京)有限公司 | Graph drawing method and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104809940A (en) * | 2015-05-14 | 2015-07-29 | 广东小天才科技有限公司 | Projection device and projection method for geometric solid figure |
CN107248192A (en) * | 2017-06-27 | 2017-10-13 | 广州视源电子科技股份有限公司 | Three-dimensional graph drawing method, device, equipment and storage medium |
CN109785434A (en) * | 2017-11-14 | 2019-05-21 | 上海谦问万答吧云计算科技有限公司 | A kind of method, apparatus and storage medium of drawing three-dimensional solid figure |
-
2019
- 2019-07-24 CN CN201910669393.8A patent/CN110378841A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104809940A (en) * | 2015-05-14 | 2015-07-29 | 广东小天才科技有限公司 | Projection device and projection method for geometric solid figure |
CN107248192A (en) * | 2017-06-27 | 2017-10-13 | 广州视源电子科技股份有限公司 | Three-dimensional graph drawing method, device, equipment and storage medium |
CN109785434A (en) * | 2017-11-14 | 2019-05-21 | 上海谦问万答吧云计算科技有限公司 | A kind of method, apparatus and storage medium of drawing three-dimensional solid figure |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113689523A (en) * | 2021-08-26 | 2021-11-23 | 联想(北京)有限公司 | Graph drawing method and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110458918B (en) | Method and device for outputting information | |
KR101420041B1 (en) | Item model based on descriptor and images | |
US8836728B2 (en) | Techniques to magnify images | |
CN106846497B (en) | Method and device for presenting three-dimensional map applied to terminal | |
CN108876706B (en) | Thumbnail generation from panoramic images | |
CN106997613B (en) | 3D model generation from 2D images | |
Tafti et al. | A comparative study on the application of SIFT, SURF, BRIEF and ORB for 3D surface reconstruction of electron microscopy images | |
CN108536467B (en) | Code positioning processing method and device, terminal equipment and storage medium | |
CN109492607B (en) | Information pushing method, information pushing device and terminal equipment | |
CN108268200A (en) | Image processing method and device, electronic equipment, computer program and storage medium | |
WO2019052371A1 (en) | 3d model data processing method, device and system | |
CN111581208A (en) | Data visualization display method and device | |
CN108597034B (en) | Method and apparatus for generating information | |
CN111241385B (en) | Information processing method, device, computer system and medium | |
Pal et al. | Interactive exploration and flattening of deformed historical documents | |
GB2555168A (en) | Using labels to track high-frequency offsets for patch-matching algorithms | |
CN110378841A (en) | Display processing method and device | |
CN114170381A (en) | Three-dimensional path display method and device, readable storage medium and electronic equipment | |
CN110765296A (en) | Image searching method, terminal device and storage medium | |
CN104063796B (en) | Object information display method, system and device | |
CN112487943B (en) | Key frame de-duplication method and device and electronic equipment | |
CN112652056B (en) | 3D information display method and device | |
CN111127310B (en) | Image processing method and device, electronic equipment and storage medium | |
CN114913277A (en) | Method, device, equipment and medium for three-dimensional interactive display of object | |
Setlur et al. | Semantic Resizing of Charts Through Generalization: A Case Study with Line Charts |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191025 |