CN109559368A - Processing method, device, medium and the electronic equipment of plane picture - Google Patents

Processing method, device, medium and the electronic equipment of plane picture Download PDF

Info

Publication number
CN109559368A
CN109559368A CN201811393155.0A CN201811393155A CN109559368A CN 109559368 A CN109559368 A CN 109559368A CN 201811393155 A CN201811393155 A CN 201811393155A CN 109559368 A CN109559368 A CN 109559368A
Authority
CN
China
Prior art keywords
picture
dimensional
dimensional model
model
plane picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811393155.0A
Other languages
Chinese (zh)
Other versions
CN109559368B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811393155.0A priority Critical patent/CN109559368B/en
Publication of CN109559368A publication Critical patent/CN109559368A/en
Application granted granted Critical
Publication of CN109559368B publication Critical patent/CN109559368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/30Clipping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/08Indexing scheme for image data processing or generation, in general involving all processing steps from image acquisition to 3D model generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/22Cropping

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention provides a kind of processing methods of plane picture, processing unit, computer-readable medium and the electronic equipment of plane picture, wherein, the processing method of the plane picture includes: to be sheared according to the profile of two dimensional model in plane picture to the two dimensional model, obtains outline picture;According to the lines spacing of two dimensional model in the outline picture, the parameter for obtaining carrying out the two dimensional model three-dimensional obtains threedimensional model to be drawn based on the parameter;Projection process is carried out to the threedimensional model, obtains picture to be shown, to complete to show the three-dimensional of the plane picture.Treated the plane picture of technical solution through the embodiment of the present invention, has the effect of that three-dimensional is shown, it is thus possible to improve the degree true to nature that picture is shown.

Description

Processing method, device, medium and the electronic equipment of plane picture
Technical field
The present invention relates to image processing technologies, processing method, plan view in particular to a kind of plane picture Processing unit, computer-readable medium and the electronic equipment of piece.
Background technique
With the continuous development of Internet technology and universal, the demand that user entertains network is increasing.It is with game Example, presently, there are handling plane picture, to reach the technology for making plane picture possess 3D visual effect.Thus, such as Where pats face picture to improve its three-dimensional display effect and become user's focus of attention problem.
In the prior art, for the processing of plane picture in game, scene is realized generally by simple process illumination Three-dimensional sense, achieve the effect that plane picture three-dimensional is shown.However, can not only make to show that picture lacks in this way The spatial impression of planar point set perspective, and the effect of true also original picture cannot be played, plane picture can not be carried out effective Processing.
Therefore, the degree true to nature of the processing method of plane picture in the prior art is to be improved.
It should be noted that information is only used for reinforcing the reason to background of the invention disclosed in above-mentioned background technology part Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
A kind of processing method for being designed to provide plane picture of the embodiment of the present invention, the processing unit of plane picture, Computer-readable medium and electronic equipment, and then plane image processing method in the prior art is overcome at least to a certain extent The lower defect of degree true to nature.
Other characteristics and advantages of the invention will be apparent from by the following detailed description, or partially by the present invention Practice and acquistion.
According to a first aspect of the embodiments of the present invention, a kind of processing method of plane picture is provided, comprising: according to plane The profile of two dimensional model shears the two dimensional model in picture, obtains outline picture;According to two in the outline picture The lines spacing of dimension module, the parameter for obtaining carrying out the two dimensional model three-dimensional are obtained with being drawn based on the parameter To threedimensional model;Projection process is carried out to the threedimensional model, obtains picture to be shown, to complete to the plane picture Three-dimensional is shown.
In some embodiments of the invention, aforementioned schemes are based on, it is described according to two dimensional model in the outline picture Lines spacing obtains the parameter that three-dimensional is carried out to the two dimensional model, comprising: obtain two dimensional model in the outline picture N number of lines spacing;Based on the first preset ratio relationship, the thickness of the model at N number of lines is determined according to N number of lines spacing Degree, and using the phantom thicknesses as the parameter for carrying out three-dimensional to the two dimensional model, wherein N is positive integer.
In some embodiments of the invention, aforementioned schemes are based on, it is described to be drawn based on the parameter, obtain three-dimensional Model, comprising: according to the phantom thicknesses at N number of lines, respectively stretch the corresponding position of the two dimensional model;It draws Model after system stretching, obtains the corresponding threedimensional model of the two dimensional model.
In some embodiments of the invention, aforementioned schemes are based on, according to the profile of two dimensional model in plane picture to institute It states two dimensional model to be sheared, obtains outline picture, comprising: according to the profile of M two dimensional model in plane picture to the M Two dimensional model is sheared, and M outline picture corresponding with the M two dimensional model is obtained;According to two in the outline picture The lines spacing of dimension module, the parameter for obtaining carrying out the two dimensional model three-dimensional are obtained with being drawn based on the parameter To threedimensional model, comprising: for each of described M outline picture, according to the two dimensional model in the outline picture Lines spacing obtains the parameter that three-dimensional is carried out to the two dimensional model, to be drawn based on the parameter, obtains M three Dimension module, wherein M is positive integer.
In some embodiments of the invention, aforementioned schemes are based on, after obtaining M threedimensional model, further includes: splicing The M threedimensional model, to obtain the corresponding threedimensional model of the plane picture.
In some embodiments of the invention, aforementioned schemes are based on, after obtaining the corresponding threedimensional model of plane picture, Further include: on the basis of the texture of two dimensional model in the plane picture, texture rendering is carried out to the threedimensional model;And/or On the basis of the color of two dimensional model in the plane picture, colouring processing is carried out to the threedimensional model.
In some embodiments of the invention, aforementioned schemes are based on, it is described that projection process is carried out to the threedimensional model, Before obtaining picture to be shown, further includes: the display size based on two dimensional model in the plane picture, according to the second default ratio Example relationship adjusts display size of the threedimensional model in engine.
According to a second aspect of the embodiments of the present invention, a kind of processing unit of plane picture is provided, comprising: shearing mould Block obtains outline picture for shearing according to the profile of two dimensional model in plane picture to the two dimensional model;Draw mould Block obtains the ginseng that three-dimensional is carried out to the two dimensional model for the lines spacing according to two dimensional model in the outline picture Number, to be drawn based on the parameter, obtains threedimensional model;Processing module, for project to the threedimensional model Processing, obtains picture to be shown, to complete to show the three-dimensional of the plane picture.
According to a third aspect of the embodiments of the present invention, a kind of computer-readable medium is provided, computer is stored thereon with Program realizes the processing side of the plane picture as described in first aspect in above-described embodiment when described program is executed by processor Method.
According to a fourth aspect of the embodiments of the present invention, a kind of electronic equipment is provided, comprising: one or more processors; Storage device, for storing one or more programs, when one or more of programs are held by one or more of processors When row, so that one or more of processors realize the processing side of the plane picture as described in first aspect in above-described embodiment Method.
Technical solution provided in an embodiment of the present invention can include the following benefits:
In the technical solution provided by some embodiments of the present invention, on the one hand, according to two dimensional model in plane picture Profile the two dimensional model is sheared, outline picture is obtained, so that outline picture is generated according to two dimensional model, with two Dimension module is more close to reduce the gap after three-dimensional between threedimensional model and two dimensional model;In turn, according to the outline The lines spacing of two dimensional model in picture, obtain to the two dimensional model carry out three-dimensional parameter, with based on the parameter into Row is drawn, and threedimensional model is obtained, and the visual angle that may cause after two dimensional model three-dimensional can not only be avoided to expose the false, and can Improve the accuracy that threedimensional model is drawn;On the other hand, it by carrying out projection process to the threedimensional model, obtains to be shown Picture enables to the two dimensional model in picture to be shown to have three-dimensional to complete to show the three-dimensional of the plane picture The effect of three-dimensional, and picture to be shown itself or plane picture, remain the plane properties, molding sense of plane picture itself And artistic conception of the picture, improve the degree true to nature that plane picture three-dimensional is shown.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 diagrammatically illustrates the processing method flow chart of the plane picture of embodiment according to the present invention;
Fig. 2 diagrammatically illustrates the processing method flow chart of plane picture according to another embodiment of the present invention;
Fig. 3 diagrammatically illustrates the processing method flow chart of the plane picture of another embodiment according to the present invention;
Fig. 4 diagrammatically illustrates the processing unit block diagram of the plane picture of embodiment according to the present invention;
Fig. 5 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In example.In the following description, many details are provided to provide and fully understand to the embodiment of the present invention.However, It will be appreciated by persons skilled in the art that technical solution of the present invention can be practiced without one or more in specific detail, Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side Method, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step, It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
In the prior art, for the processing of plane picture in game, the three-dimensional sense of scene is realized generally by illumination, However, such that display picture lack planar point set perspective spatial impression, lose original Artistic Conception and molding sense, no The effect that true also original picture can be played leads to picture also it is possible to will cause the visual angle of exposing the false after plane picture three dimensional stress The degree true to nature of display is lower.Therefore, using the processing method of plane picture in the prior art, can not to plane picture into Row effectively display, the degree true to nature that three-dimensional is shown is to be improved.
In the present embodiment, the processing method for providing firstly a kind of plane picture, overcomes logical at least to a certain extent Cross the plane picture degree true to nature of prior art processing defect to be improved.
Fig. 1 diagrammatically illustrates the processing method flow chart of plane picture according to an embodiment of the invention, this is flat The executing subject of the processing method of face picture can be the server handled plane picture.
With reference to Fig. 1, the processing method of plane picture according to an embodiment of the invention the following steps are included:
Step S101 shears the two dimensional model according to the profile of two dimensional model in plane picture, obtains outline Picture;
Step S102 obtains carrying out the two dimensional model according to the lines spacing of two dimensional model in the outline picture The parameter of three-dimensional obtains threedimensional model to be drawn based on the parameter;
Step S103 carries out projection process to the threedimensional model, obtains picture to be shown, to complete to the plane The three-dimensional of picture is shown.
In technical solution provided by embodiment shown in Fig. 1, on the one hand, according to the profile of two dimensional model in plane picture The two dimensional model is sheared, outline picture is obtained, so that outline picture is generated according to two dimensional model, with two dimensional model More close to reduce the gap after three-dimensional between threedimensional model and two dimensional model;In turn, according in the outline picture The lines spacing of two dimensional model obtains the parameter that three-dimensional is carried out to the two dimensional model, to be drawn based on the parameter, Threedimensional model is obtained, the visual angle that may cause after two dimensional model three-dimensional can not only be avoided to expose the false, and from can be improved three The accuracy that dimension module is drawn;On the other hand, by carrying out projection process to the threedimensional model, picture to be shown is obtained, To complete to show the three-dimensional of the plane picture, enable to the two dimensional model in picture to be shown that there is 3 D stereo Effect, and picture to be shown itself or plane picture remain the plane properties, molding sense and picture of plane picture itself Face artistic conception improves the degree true to nature that plane picture three-dimensional is shown.
The specific implementation process of each step in Fig. 1 is described in detail below:
In step s101, the two dimensional model is sheared according to the profile of two dimensional model in plane picture, is obtained Outline picture.
In the exemplary embodiment, plane picture can be the two-dimension pictures such as ancient painting, photo;Two dimension in plane picture Role (such as: mountain, personage, animal etc.) in model, that is, picture;The profile of two dimensional model is the group of drawn role in plane picture At lines (such as: the lines on the mountain signed in ancient painting);What so-called outline picture showed is the profile of two dimensional model, is exactly The chamfered shape that personage, building, the chain of mountains, trees in picture etc. are only presented, the thin portion shadow lamina without showing it is secondary, similar to use Role's image that scissors is cut.
In the exemplary embodiment, referring to the example above, in 3Ds MAX software, can choose for ancient painting or its Two dimensional model in his paintings photo carries out outer profile shearing, obtains outline picture.Wherein, it for same width plane picture, cuts Corner cut degree is fixed.Illustratively, shearing inclination can be set to overlook 30 degree.Certainly, according to actual needs, can also set Other angles are set as shearing inclination, are all belonged to the scope of protection of the present invention.
In the exemplary embodiment, in plane picture can comprising multiple two dimensional models (such as: M, M is positive integer), Therefore, it is necessary to be sheared according to the outline of M two dimensional model in plane picture to this M two dimensional model, corresponded to M outline picture.Wherein, outer profile shearing is carried out to M two dimensional model in this plane picture using same shearing inclination, So that the M outline picture obtained after shearing obtains under the same perspective, to be conducive to graphic image after raising processing The degree true to nature of display.
In step s 102, it according to the lines spacing of two dimensional model in the outline picture, obtains to the two dimensional model The parameter for carrying out three-dimensional obtains threedimensional model to be drawn based on the parameter.
In the exemplary embodiment, Fig. 2 diagrammatically illustrates plane picture according to another embodiment of the invention Processing method flow chart, specifically illustrate and the flow chart of threedimensional model obtained according to outline picture.
With reference to Fig. 2, the method which provides includes step S201- step S203, below in conjunction with Fig. 2 to step S102 It explains.
In step s 201, N number of lines spacing of two dimensional model in the outline picture is obtained.
In the exemplary embodiment, it after obtaining M outline picture, needs to acquire in each outline picture N number of lines spacing of two dimensional model, N is positive integer.
In step S202, for each of described M outline picture, according to the two-dimentional mould in the outline picture N number of lines spacing of type, the parameter for obtaining carrying out the two dimensional model three-dimensional are obtained with being drawn based on the parameter To M threedimensional model.
In the exemplary embodiment, for each outline picture, the spacing according to N number of lines is needed, with default ratio Example relationship determines the phantom thicknesses at N number of lines, also, using phantom thicknesses as the ginseng for carrying out three-dimensional to two dimensional model Number.Such as: the spacing between lines and lines is 1 centimetre, it is possible to according to the proportionate relationship of 1:1, at the two lines Phantom thicknesses be set as 1 centimetre, the two dimensional model three-dimensional parameter at this also accordingly be 2 centimetres;And so on, if in addition Spacing between both threads item is 2 centimetres, then can set 2 centimetres for the phantom thicknesses at this, that is to say, that two at this Dimension module three-dimensional parameter is 2 centimetres.
In the exemplary embodiment, after obtaining two dimensional model three-dimensional parameter (i.e. phantom thicknesses), basis is needed The parameter stretches the corresponding position of two dimensional model, such as: phantom thicknesses are 1 centimetre, then during stretching, making this The model at place is to 1 centimetre of front projection, in turn, the model after stretching is drawn in 3Ds MAX.Phase is done to M outline picture respectively Same treatment process, drafting obtain corresponding M threedimensional model.
In step S203, splice the M threedimensional model, to obtain the corresponding threedimensional model of the plane picture.
In the exemplary embodiment, after obtaining the corresponding M threedimensional model of two dimensional model, reference plane figure is needed The M threedimensional model that piece splices obtains the corresponding threedimensional model of plane picture.
In the exemplary embodiment, after obtaining the corresponding threedimensional model of plane picture, it is also necessary to reference plane figure Piece carries out rendering processing to threedimensional model, to achieve the effect that also original picture improves picture degree true to nature.Fig. 3 is diagrammatically illustrated The processing method flow chart of the plane picture of another embodiment according to the present invention is specifically illustrated and is carried out to obtained threedimensional model Render the flow chart of processing.
With reference to Fig. 3, the method which provides includes step S301 and step S302, is explained below in conjunction with Fig. 3 Step S203.
In step S301, on the basis of the texture of two dimensional model in the plane picture, the threedimensional model is carried out Texture rendering;And/or on the basis of the color of two dimensional model in the plane picture, the threedimensional model is carried out at colouring Reason.
In the exemplary embodiment, after obtaining the corresponding threedimensional model of plane picture, if corresponding to same plane The threedimensional model of figure have it is multiple, then need first in BodyPaint 3D carry out lines location confirmation, to lines location After confirmation, which, which is one, has relief basic model, lacks color and texture.Therefore, it is necessary to right Threedimensional model carries out texture rendering and colouring processing, and model is made to reach the display effect with original plane picture striking resemblances Fruit.
In the exemplary embodiment, it needs that the corresponding threedimensional model of plane picture is first put into Adobe Photoshop In software, in turn, the texture according to two dimensional model in original image is needed, texture is carried out to the corresponding threedimensional model of plane picture It draws;If plane picture is gray scale picture, without carrying out colouring processing;If plane picture is color image, according to plane The color of two dimensional model in picture carries out colouring processing to the corresponding threedimensional model of plane picture.
In step s 302, the display size based on two dimensional model in the plane picture is closed according to the second preset ratio System adjusts display size of the threedimensional model in engine.
In the exemplary embodiment, texture rendering and colouring processing are being carried out to the corresponding threedimensional model of plane picture Later, available complete threedimensional model.In turn, the display size according to two dimensional model in plane picture will be needed, it will be complete Whole threedimensional model is put into NeoX game engine, is adjusted with display size of the display scale of 1:1 to threedimensional model, with Reach the display effect of two dimensional model highest reduction degree in complete model and plane picture.The display scale can be according to practical feelings Condition sets itself, belongs to the scope of protection of the present invention.
It after determining the threedimensional model in step S102 by the embodiment shown in Fig. 2 and Fig. 3, continues to refer to figure 1, in step In rapid S103, projection process is carried out to the threedimensional model, obtains picture to be shown, to complete to found the plane picture Bodyization display.
In the exemplary embodiment, it after adjusting display size, in NeoX game engine, needs to three-dimensional mould Type carries out projection process, goes projection process, is the plane effect in order to preferably restore plane picture (ancient painting), reaches model It is plane, role is solid, the i.e. display effect of " role's migration in picture ", is guaranteeing the molding sense of ancient painting with artistic conception While, reach the vivid effect that plane picture three-dimensional is shown.
The device of the invention embodiment introduced below can be used for executing the processing side of the above-mentioned plane picture of the present invention Method.
Fig. 4 diagrammatically illustrates the processing unit block diagram of plane picture according to an embodiment of the invention, the plane The processing unit of picture can be set in the server handled plane picture.
Referring to shown in Fig. 4, the processing unit block diagram 400 of plane picture according to an embodiment of the invention, including such as Lower module: shear module 401, drafting module 402 and processing module 403.It is illustrated in detailed below:
Shear module 401 is obtained for being sheared according to the profile of two dimensional model in plane picture to the two dimensional model To outline picture.
In the exemplary embodiment, it in 3Ds MAX software, can choose as in ancient painting or other paintings photos Two dimensional model carries out outer profile shearing, obtains outline picture.Wherein, the angle of shearing can be set to the 30 degree of fixations of unified vertical view Visual angle, because overlooking 30 degree of angles is to test out the most perfect shearing inclination obtained by a large amount of visual angles.Certainly, according to practical need It wants, may be set to be other shearing inclinations, all belong to the scope of protection of the present invention.
In the exemplary embodiment, in plane picture can comprising multiple two dimensional models (such as: M, M is positive integer), Therefore, shear module is used to shear this M two dimensional model according to the outline of M two dimensional model in plane picture, Obtain corresponding M outline picture.
Drafting module 402 is obtained for the lines spacing according to two dimensional model in the outline picture to the two-dimentional mould The parameter that type carries out three-dimensional obtains threedimensional model to be drawn based on the parameter.
In the exemplary embodiment, for each outline picture, the spacing according to N number of lines is needed, with default ratio Example relationship determines the phantom thicknesses at N number of lines, also, using phantom thicknesses as the ginseng for carrying out three-dimensional to two dimensional model Number.Such as: the spacing between lines and lines is 1 centimetre, it is possible to according to the proportionate relationship of 1:1, at the two lines Phantom thicknesses be set as 1 centimetre, the two dimensional model three-dimensional parameter at this also accordingly be 2 centimetres;And so on, if in addition Spacing between both threads item is 2 centimetres, then can set 2 centimetres for the phantom thicknesses at this, that is to say, that two at this Dimension module three-dimensional parameter is 2 centimetres.
In the exemplary embodiment, after obtaining two dimensional model three-dimensional parameter (i.e. phantom thicknesses), basis is needed The parameter stretches the corresponding position of two dimensional model, such as: phantom thicknesses are 1 centimetre, then during stretching, making this The model at place is to 1 centimetre of front projection, in turn, the model after stretching is drawn in 3Ds MAX.Phase is done to M outline picture respectively Same treatment process, drafting obtain corresponding M threedimensional model.
Processing module 403 obtains picture to be shown, for carrying out projection process to the threedimensional model with completion pair The three-dimensional of the plane picture is shown.
In the exemplary embodiment, processing module is used on the basis of the texture of two dimensional model in the plane picture, Texture rendering is carried out to the threedimensional model;And/or on the basis of the color of two dimensional model in the plane picture, to described three Dimension module carries out colouring processing.
In the exemplary embodiment, after obtaining the corresponding threedimensional model of plane picture, if corresponding to same plane The threedimensional model of figure have it is multiple, then need first in BodyPaint 3D carry out lines location confirmation, to lines location After confirmation, which, which is one, has relief basic model, lacks color and texture.Therefore, mould is handled Block needs to carry out threedimensional model texture rendering and colouring processing, reaches model with original plane picture striking resemblances Display effect.
In the exemplary embodiment, it needs that the corresponding threedimensional model of plane picture is first put into Adobe Photoshop In software, in turn, processing module needs the texture according to two dimensional model in original image, threedimensional model corresponding to plane picture Carry out texture rendering;If plane picture is gray scale picture, without carrying out colouring processing;If plane picture is color image, Processing module needs the color according to two dimensional model in plane picture, carries out at colouring to the corresponding threedimensional model of plane picture Reason.
In the exemplary embodiment, processing module also needs the display size based on two dimensional model in plane picture, root Display size of the threedimensional model in engine is adjusted according to the second preset ratio relationship;And the threedimensional model is gone Projection process obtains picture to be shown, to complete to show the three-dimensional of the plane picture.
Each functional module and above-mentioned plan view due to the processing unit of the plane picture of example embodiments of the present invention The step of example embodiment of the processing method of piece, is corresponding, therefore for undisclosed details in apparatus of the present invention embodiment, asks Referring to the embodiment of the processing method of the above-mentioned plane picture of the present invention.
Below with reference to Fig. 5, it illustrates the computer systems 500 for the electronic equipment for being suitable for being used to realize the embodiment of the present invention Structural schematic diagram.The computer system 500 of electronic equipment shown in Fig. 5 is only an example, should not be to the embodiment of the present invention Function and use scope bring any restrictions.
As shown in figure 5, computer system 500 includes central processing unit (CPU) 501, it can be read-only according to being stored in Program in memory (ROM) 502 or be loaded into the program in random access storage device (RAM) 503 from storage section 508 and Execute various movements appropriate and processing.In RAM 503, it is also stored with various programs and data needed for system operatio.CPU 501, ROM 502 and RAM 503 is connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to bus 504。
I/O interface 505 is connected to lower component: the importation 506 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 508 including hard disk etc.; And the communications portion 509 of the network interface card including LAN card, modem etc..Communications portion 509 via such as because The network of spy's net executes communication process.Driver 510 is also connected to I/O interface 505 as needed.Detachable media 511, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 510, in order to read from thereon Computer program be mounted into storage section 508 as needed.
Particularly, according to an embodiment of the invention, may be implemented as computer above with reference to the process of flow chart description Software program.For example, the embodiment of the present invention includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 509, and/or from detachable media 511 are mounted.When the computer program is executed by central processing unit (CPU) 501, executes and limited in the system of the application Above-mentioned function.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium can be for example but not limited to Electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.It is computer-readable The more specific example of storage medium can include but is not limited to: have electrical connection, the portable computing of one or more conducting wires Machine disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM Or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned Any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage program it is tangible Medium, the program can be commanded execution system, device or device use or in connection.And in the present invention, Computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carrying Computer-readable program code.The data-signal of this propagation can take various forms, and including but not limited to electromagnetism is believed Number, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable storage medium Any computer-readable medium other than matter, the computer-readable medium can be sent, propagated or transmitted for being held by instruction Row system, device or device use or program in connection.The program code for including on computer-readable medium It can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. or above-mentioned any conjunction Suitable combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part realizes that described unit also can be set in the processor.Wherein, the title of these units is in certain situation Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying electronic equipment. Above-mentioned computer-readable medium carries one or more program, when the electronics is set by one for said one or multiple programs When standby execution, so that the electronic equipment realizes the processing method such as above-mentioned plane picture as described in the examples.
For example, the electronic equipment may be implemented as shown in Figure 1: step S101, according to two-dimentional in plane picture The profile of model shears the two dimensional model, obtains outline picture;Step S102, according to two-dimentional in the outline picture The lines spacing of model, the parameter for obtaining carrying out the two dimensional model three-dimensional are obtained with being drawn based on the parameter Threedimensional model;Step S103 carries out projection process to the threedimensional model, obtains picture to be shown, to complete to described flat The three-dimensional of face picture is shown.
For another example, each step as shown in figures 2 and 3 may be implemented in the electronic equipment.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, touch control terminal or network equipment etc.) executes embodiment according to the present invention Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of processing method of plane picture characterized by comprising
The two dimensional model is sheared according to the profile of two dimensional model in plane picture, obtains outline picture;
According to the lines spacing of two dimensional model in the outline picture, the parameter that three-dimensional is carried out to the two dimensional model is obtained, To be drawn based on the parameter, threedimensional model is obtained;
Projection process is carried out to the threedimensional model, obtains picture to be shown, to complete the three-dimensional to the plane picture Display.
2. the method according to claim 1, wherein the lines according to two dimensional model in the outline picture Spacing obtains the parameter that three-dimensional is carried out to the two dimensional model, comprising:
Obtain N number of lines spacing of two dimensional model in the outline picture;
Based on the first preset ratio relationship, the phantom thicknesses at N number of lines are determined according to N number of lines spacing, and will The phantom thicknesses are as the parameter for carrying out three-dimensional to the two dimensional model, wherein N is positive integer.
3. method according to claim 1 or 2, which is characterized in that it is described to be drawn based on the parameter, obtain three-dimensional Model, comprising:
According to the phantom thicknesses at N number of lines, the corresponding position of the two dimensional model is stretched respectively;
The model after stretching is drawn, the corresponding threedimensional model of the two dimensional model is obtained.
4. the method according to claim 1, wherein according to the profile of two dimensional model in plane picture to described two Dimension module is sheared, and outline picture is obtained, comprising:
The M two dimensional model is sheared according to the profile of M two dimensional model in plane picture, is obtained and the M two The corresponding M outline picture of dimension module;
According to the lines spacing of two dimensional model in the outline picture, the parameter that three-dimensional is carried out to the two dimensional model is obtained, To be drawn based on the parameter, threedimensional model is obtained, comprising:
Each of described M outline picture is obtained according to the lines spacing of the two dimensional model in the outline picture The parameter for carrying out three-dimensional to the two dimensional model obtains M threedimensional model, wherein M to be drawn based on the parameter For positive integer.
5. according to the method described in claim 4, it is characterized in that, after obtaining M threedimensional model, further includes:
Splice the M threedimensional model, to obtain the corresponding threedimensional model of the plane picture.
6. the method according to claim 3 or 5, which is characterized in that after obtaining the corresponding threedimensional model of plane picture, Further include:
On the basis of the texture of two dimensional model in the plane picture, texture rendering is carried out to the threedimensional model;And/or
On the basis of the color of two dimensional model in the plane picture, colouring processing is carried out to the threedimensional model.
7. method according to claim 1 or 2, which is characterized in that it is described that projection process is carried out to the threedimensional model, Before obtaining picture to be shown, further includes:
Based on the display size of two dimensional model in the plane picture, the threedimensional model is adjusted according to the second preset ratio relationship Display size in engine.
8. a kind of processing unit of plane picture characterized by comprising
Shear module obtains outline for shearing according to the profile of two dimensional model in plane picture to the two dimensional model Picture;
Drafting module obtains carrying out the two dimensional model for the lines spacing according to two dimensional model in the outline picture The parameter of three-dimensional obtains threedimensional model to be drawn based on the parameter;
Processing module obtains picture to be shown, for carrying out projection process to the threedimensional model to complete to the plane The three-dimensional of picture is shown.
9. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is executed by processor The processing method of plane picture of the Shi Shixian as described in any one of claims 1 to 7.
10. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing When device executes, so that one or more of processors realize the place of the plane picture as described in any one of claims 1 to 7 Reason method.
CN201811393155.0A 2018-11-21 2018-11-21 Processing method and device of plane picture, medium and electronic equipment Active CN109559368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811393155.0A CN109559368B (en) 2018-11-21 2018-11-21 Processing method and device of plane picture, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811393155.0A CN109559368B (en) 2018-11-21 2018-11-21 Processing method and device of plane picture, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109559368A true CN109559368A (en) 2019-04-02
CN109559368B CN109559368B (en) 2023-06-09

Family

ID=65866787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811393155.0A Active CN109559368B (en) 2018-11-21 2018-11-21 Processing method and device of plane picture, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109559368B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958007A (en) * 2010-09-20 2011-01-26 南京大学 Three-dimensional animation posture modeling method by adopting sketch
CN105719277A (en) * 2016-01-11 2016-06-29 国网新疆电力公司乌鲁木齐供电公司 Transformer station three-dimensional modeling method and system based on surveying and mapping and two-dimensional image
CN107622524A (en) * 2017-09-29 2018-01-23 百度在线网络技术(北京)有限公司 Display methods and display device for mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101958007A (en) * 2010-09-20 2011-01-26 南京大学 Three-dimensional animation posture modeling method by adopting sketch
CN105719277A (en) * 2016-01-11 2016-06-29 国网新疆电力公司乌鲁木齐供电公司 Transformer station three-dimensional modeling method and system based on surveying and mapping and two-dimensional image
CN107622524A (en) * 2017-09-29 2018-01-23 百度在线网络技术(北京)有限公司 Display methods and display device for mobile terminal

Also Published As

Publication number Publication date
CN109559368B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
CN114820905B (en) Virtual image generation method and device, electronic equipment and readable storage medium
US20190259216A1 (en) Refining local parameterizations for applying two-dimensional images to three-dimensional models
CN107660338A (en) The stereoscopic display of object
CN113327278A (en) Three-dimensional face reconstruction method, device, equipment and storage medium
TW200907854A (en) Universal rasterization of graphic primitives
US11217035B2 (en) Generating height maps from normal maps based on boundary conditions of virtual boundaries
CN109410213A (en) Polygon pel method of cutting out, computer readable storage medium, electronic equipment based on bounding box
CN109671147A (en) Texture mapping generation method and device based on threedimensional model
CN108882025A (en) Video frame treating method and apparatus
CN109584377A (en) A kind of method and apparatus of the content of augmented reality for rendering
CN112258619A (en) Image processing method and device
CN113379885A (en) Virtual hair processing method and device, readable storage medium and electronic equipment
CN114424239A (en) De-noising technique for cyclic blur in ray tracing applications
CN110930492A (en) Model rendering method and device, computer readable medium and electronic equipment
CN114708374A (en) Virtual image generation method and device, electronic equipment and storage medium
US20230401346A1 (en) Session collaboration system
CN109993760A (en) A kind of edge detection method and device of picture
US8952968B1 (en) Wave modeling for computer-generated imagery using intersection prevention on water surfaces
CN109559368A (en) Processing method, device, medium and the electronic equipment of plane picture
CN111462269A (en) Image processing method and device, storage medium and electronic equipment
US20220392251A1 (en) Method and apparatus for generating object model, electronic device and storage medium
CN108256477B (en) Method and device for detecting human face
KR102005492B1 (en) Apparatus and method for simplification of 3d mesh data
CN115861510A (en) Object rendering method, device, electronic equipment, storage medium and program product
Wang et al. Interactive Exploration of 4D Geometry with Volumetric Halos.

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