CN108965715A - A kind of image processing method, mobile terminal and computer readable storage medium - Google Patents
A kind of image processing method, mobile terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN108965715A CN108965715A CN201810866523.2A CN201810866523A CN108965715A CN 108965715 A CN108965715 A CN 108965715A CN 201810866523 A CN201810866523 A CN 201810866523A CN 108965715 A CN108965715 A CN 108965715A
- Authority
- CN
- China
- Prior art keywords
- goal
- selling
- image
- paster
- grid
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/06—Ray-tracing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
- Image Analysis (AREA)
Abstract
The application is suitable for technical field of image processing, provide a kind of image processing method, mobile terminal and computer readable storage medium, the described method includes: passing through the structured light generators emitting structural optical information of the mobile terminal, the structure optical information reflected is received by the structure optical receiver of the mobile terminal, and the camera collection image by the mobile terminal, judge in the image of the camera acquisition with the presence or absence of goal-selling, if in the image of the camera acquisition, there are goal-sellings, the image then acquired based on the structure optical information reflected and the camera models the goal-selling, obtain the 3-D image of the goal-selling, paster processing is carried out to the goal-selling in the 3-D image, the paster of stereoscopic effect can be generated on the image by the application.
Description
Technical field
The application belongs to technical field of image processing more particularly to a kind of image processing method, mobile terminal and computer
Readable storage medium storing program for executing.
Background technique
The function of mobile terminal is increasingly rich, and in order to obtain special photo effect, many mobile terminals are provided with as figure
Piece carries out the function of paster processing, and paster processing is the photo based on head image in user's self-timer or other people shootings
On the basis of, increase the paster of various patterns, to generate different effects.
Currently, the function for the paster processing being arranged in mobile terminal, is usually covered on camera shooting for two-dimentional paster
On 2-dimentional photo, to generate paster photo.However, the effect for the paster photo that this paster processing generates is poor.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of image processing method, mobile terminal and computer-readable storage
Medium, the paster treatment effect to solve the problems, such as current image are poor.
The first aspect of the embodiment of the present application provides a kind of image processing method, is applied to mobile terminal, the method
Include:
Pass through the structured light generators emitting structural optical information of the mobile terminal;
The structure optical information reflected is received by the structure optical receiver of the mobile terminal, and passes through the movement
The camera collection image of terminal;
Judge in the image of the camera acquisition with the presence or absence of goal-selling;
If in the image of the camera acquisition, there are goal-sellings, based on the structure optical information reflected and institute
The image for stating camera acquisition models the goal-selling, obtains the 3-D image of the goal-selling;
Paster processing is carried out to the goal-selling in the 3-D image.
The second aspect of the embodiment of the present application provides a kind of mobile terminal, comprising:
Transmitting module, for passing through the structured light generators emitting structural optical information of the mobile terminal;
Acquisition module, for receiving the structure optical information reflected by the structure optical receiver of the mobile terminal, with
And the camera collection image by the mobile terminal;
Judgment module, with the presence or absence of goal-selling in the image for judging camera acquisition;
Modeling module, if for there are goal-selling, being reflected based on described in the image of camera acquisition
Structure optical information and the image of camera acquisition model the goal-selling, obtain the three-dimensional of the goal-selling
Image;
Processing module, for carrying out paster processing to the goal-selling in the 3-D image.
The third aspect of the embodiment of the present application provides a kind of mobile terminal, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, when the processor executes the computer program
The step of realizing the method that the embodiment of the present application first aspect provides.
The fourth aspect of the embodiment of the present application provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, and the computer program realizes the embodiment of the present application when being executed by one or more processors
On the one hand the step of the method provided.
5th aspect of the embodiment of the present application provides a kind of computer program product, and the computer program product includes
Computer program, the computer program realize that the embodiment of the present application first aspect provides when being executed by one or more processors
The method the step of.
The embodiment of the present application provides a kind of image processing method applied on mobile terminal, sets on the mobile terminal
Structured light generators, structure optical receiver and camera are set, by structured light generators emitting structural optical information, by receiving
Receiver acquires the structure optical information reflected, while by camera collection image, if in the image of camera acquisition
There are goal-sellings, then the image based on the structure optical information reflected and camera acquisition is to the goal-selling
It is modeled, obtains the 3-D image of the goal-selling, paster processing is carried out to the goal-selling in the 3-D image, by
In the paster processing that paster processing is in the 3-D image progress of the goal-selling of acquisition, therefore can obtain with stereoscopic effect
Paster image.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only some of the application
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation process schematic diagram of image processing method provided by the embodiments of the present application;
Fig. 2 is the implementation process schematic diagram of another image processing method provided by the embodiments of the present application;
Fig. 3 is the implementation process schematic diagram of another image processing method provided by the embodiments of the present application;
Fig. 4 is that a kind of outer surface at position by goal-selling provided by the embodiments of the present application is divided into and the first grid
The process schematic for the second grid matched;
Fig. 5 is a kind of schematic block diagram of mobile terminal provided by the embodiments of the present application;
Fig. 6 is the schematic block diagram of another mobile terminal provided by the embodiments of the present application.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, so as to provide a thorough understanding of the present application embodiment.However, it will be clear to one skilled in the art that there is no these specific
The application also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, so as not to obscure the description of the present application with unnecessary details.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " instruction is described special
Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step,
Operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this present specification merely for the sake of description specific embodiment
And be not intended to limit the application.As present specification and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in present specification and the appended claims is
Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt
Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or
" if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true
It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solution described herein, the following is a description of specific embodiments.
Fig. 1 is a kind of implementation process schematic diagram of image processing method provided by the embodiments of the present application, is applied to mobile whole
End, this method as shown in the figure may comprise steps of:
Step S101 passes through the structured light generators emitting structural optical information of the mobile terminal.
Step S102 receives the structure optical information reflected, Yi Jitong by the structure optical receiver of the mobile terminal
Cross the camera collection image of the mobile terminal.
In the embodiment of the present application, structure optical mode group and camera module, the knot are provided on the mobile terminal
Structure optical mode group includes structured light generators and structure optical receiver, and the structured light generators are used to generate structure light and emit,
Structure optical receiver is used to receive the structure optical information reflected by subject, since subject may be the object in movement
Body, it is possible to which control receives optical receiver and camera while acquiring information, and the acquisition of structure optical receiver is structure light letter
Breath, camera acquisition is image information.
Structured light generators can be certain throwing projected to luminous point, light slit, grating, grid or speckle on testee
Shadow the equipment or instrument is also possible to generate the laser of laser beam, and certainly, structure light can also be infrared ray etc..
The structure optical information of structured light generators transmitting can be fixed structure optical information, and the structure optical information is tool
There is the structure optical information of encoded information, since subject is 3 D stereo, so the structure optical information with encoded information
After the subject by 3 D stereo, it may occur that the structure optical information that deformation, i.e. structured light generators receive is transmitting
Information of the structure optical information after deformation.In general, can be according to the structure optical information and structure that structured light generators emit
The three-dimensional information of object present in the scene of the structure light information acquisition current shooting of optical receiver acquisition.
Step S103 judges in the image of the camera acquisition with the presence or absence of goal-selling.
Step S104, if there are goal-sellings in the image of camera acquisition, based on the structure reflected
Optical information and the image of camera acquisition model the goal-selling, obtain the three-dimensional figure of the goal-selling
Picture.
It in the embodiment of the present application, is in order to carry out paster processing for specific subject, so also needing to judge to take the photograph
It whether there is goal-selling in the image currently acquired as head, the goal-selling, which can be human body, can also be certain in human body
A position can also be other goal-sellings, herein with no restrictions certainly.
It is described to be acquired based on the structure optical information reflected and the camera as the another embodiment of the application
Image models the goal-selling, and the 3-D image for obtaining the goal-selling includes:
Based on the structure optical information that the structure optical information reflected and the structured light generators emit, determine described in
The three-dimensional information of goal-selling;
The image of three-dimensional information and the goal-selling based on the goal-selling is modeled, and the default mesh is obtained
Target 3-D image.
When, there are when goal-selling, while due to camera collection image, structure light is connect in the image of camera acquisition
The structure optical information that device is also reflected in reception is received, so, it is sent out based on the structure optical information reflected and the structure light
The structure optical information of raw device transmitting can be according to the three of the goal-selling after the three-dimensional information for determining the goal-selling
The image of dimension information and the goal-selling of camera acquisition is modeled, generate the 3-D image of goal-selling.The three-dimensional letter
Breath is with the threedimensional model of the goal-selling in the corresponding direction of camera optical axis, since structure optical information and camera are arranged at
On mobile terminal, so, the three-dimensional information of goal-selling is only using mobile terminal side as the three-dimensional mould of the goal-selling at visual angle
Type is not the threedimensional model in full angle space.The 3-D image of acquisition is namely visual angle based on mobile terminal side
Two dimensional image and the 3-D image synthesized based on the threedimensional model that mobile terminal side is visual angle.It is also understood that will preset
The two dimensional image processing of target is the 3-D image of the three-dimensional information with goal-selling, and the process specifically handled can refer to Fig. 2
With the mistake for the three-dimensional paster that two-dimentional paster is handled to the three-dimensional information for the position with goal-selling in embodiment illustrated in fig. 3
Journey.
It is described based on the structure optical information and the structured light generators reflected as the another embodiment of the application
The structure optical information of transmitting determines that the three-dimensional information of the goal-selling includes:
The position of goal-selling described in image based on camera acquisition, from the structure optical information reflected
It is middle to obtain the structure optical information reflected by the goal-selling;
Structure optical information based on the structure optical information for being predetermined target reflection and structured light generators transmitting,
Determine the three-dimensional information of the goal-selling.
In the embodiment of the present application, according to by the entire shooting of catoptric arrangement optical information and the structure light acquisition of information of transmitting
The three-dimensional information of picture, that is, contain goal-selling three-dimensional information and shooting picture described in it is other except goal-selling
The three-dimensional information of target can in order to separate the three-dimensional information of goal-selling from the three-dimensional information of entire shooting picture
With the position according to the goal-selling in acquisition image, goal-selling is obtained in the three-dimensional information of entire shooting picture
Position, to obtain the three-dimensional information of goal-selling.
Step S105 carries out paster processing to the goal-selling in the 3-D image.
In the embodiment of the present application, before carrying out paster processing to the goal-selling in the 3-D image, from default
Paster library obtain at least one two-dimentional paster, and obtain the position of the corresponding goal-selling of each two-dimentional paster.
The two dimension paster can be the paster for being associated with the position of goal-selling, be also possible to can be set in default mesh
Mark the paster of any part.For example, paster A can be the paster that hand can only be arranged in, it is also possible to that human body can be arranged in
The paster of any part.
According to the position of the corresponding goal-selling of the two dimension paster, the two-dimentional paster is attached to the position of goal-selling
On, so that the 3-D image for posting paster is obtained, it is then possible to obtain perspective view of the 3-D image on camera optical axis direction
Picture, so that it may obtain the two-dimentional paster image with stereoscopic effect.
Fig. 2 is the flow diagram of another image processing method provided by the embodiments of the present application, and Fig. 2 is shown in Fig. 1
On the basis of embodiment, it is described how carry out paster processing to the goal-selling in the 3-D image, may include following
Step:
Step S201 obtains the three-dimensional information at the position of the corresponding goal-selling of two-dimentional paster, at the two-dimentional paster
Reason is and the consistent three-dimensional paster of the three-dimensional information at the position of the goal-selling.
In the embodiment of the present application, the paster stored in preset paster library is two-dimentional paster, in order to will be two-dimentional
After paster is attached to the position of goal-selling, stereoscopic effect is obtained, needs the processing of two-dimentional paster to be the portion with the goal-selling
The consistent three-dimensional paster of the three-dimensional information of position.
It is described to handle the two-dimentional paster for three with the position of the goal-selling as the another embodiment of the application
Tieing up the consistent three-dimensional paster of information includes:
The two-dimentional paster is divided into the first grid of multiple default sizes;
The outer surface at the position of the corresponding goal-selling of two dimension paster described in 3-D image is divided into and described first
Second grid of mesh fitting;
Two-dimentional paster in each first grid is successively deformed into the shape with the second grid of first mesh fitting.
In the embodiment of the present application, it is the process of three-dimensional paster by the processing of two-dimentional paster, is also possible to paste two-dimentional paster
Process on 3-D image is put down if can form one after the outwardly deploying of the 3-D image at the position of goal-selling
Face then can directly paste the processing of two-dimentional paster with the consistent three-dimensional of the shape of the 3-D image at the position of the goal-selling
Paper.
However, two-dimentional paster is being located in fact, being hardly formed a smooth plane after the outwardly deploying of goal-selling
When reason is three-dimensional paster consistent with the three-dimensional information at the position of goal-selling, two-dimentional paster can have tensile deformation, so, it is
To preferably tensile deformation processing be carried out to two-dimentional paster, two-dimentional paster can be divided into the first net of multiple default sizes
Lattice, when grid is sufficiently small, it is possible to understand that a corresponding pixel per each grid, in practical application, in order to improve efficiency,
It can be set to each grid and correspond to multiple pixels.Due to the two-dimensional structure of two-dimentional paster, so the grid divided can be
Equal-sized first grid.Meanwhile by the outer surface at the position of the corresponding goal-selling of two dimension paster described in 3-D image
Be divided into the second grid with first mesh fitting, then successively by the two-dimentional paster in each first grid be deformed into
The shape of second grid of first mesh fitting.Assuming that only one pixel in the first grid, then with first net
It is all set to the pixel in matched second grid of lattice, if containing multiple pixels in the first grid, and with described the
Also contain multiple pixels in second grid of one mesh fitting, then it can be by the stretched place of two-dimentional paster in the first grid
Reason be deformed into the consistent shape of the second grid, since the first grid and the second grid are relatively small grids, and the
One grid and the second grid have reciprocal correspondence relationship.So even if there are not corresponding to inside grid when carrying out stretch processing,
It will not influence the stereoscopic effect of entire paster.
As the another embodiment of the application, the first grid packet that the two-dimentional paster is divided into multiple default sizes
It includes:
The datum mark of the two-dimentional paster, and the datum mark based on the two-dimentional paster are determined in the two-dimentional paster,
The two-dimentional paster is divided into the first grid of multiple default sizes;
Correspondingly, the outer surface at the position by the corresponding goal-selling of two dimension paster described in 3-D image is divided into
The second grid with first mesh fitting includes:
The datum mark at the position of the corresponding goal-selling of the two-dimentional paster is determined in the 3-D image, and is based on institute
The outer surface at the position of goal-selling described in the 3-D image is divided into and institute by the datum mark for stating the position of goal-selling
State the second grid of the first mesh fitting;
Correspondingly, second be successively deformed into the two-dimentional paster in each first grid with first mesh fitting
The shape of grid includes:
Two-dimentional paster in the first grid where the datum mark of the two-dimentional paster is deformed into and the goal-selling
Position datum mark where the second grid shape;
Centered on the first grid where the datum mark of the two-dimentional paster, successively two dimension in each first grid is pasted
Paper is deformed into the shape with the second grid of first mesh fitting.
In the embodiment of the present application, in order to preferably match the first grid and the second grid, in the two dimension patch
The datum mark of the two-dimentional paster, and the datum mark based on the two-dimentional paster are determined in paper, and the two-dimentional paster is divided into
First grid of multiple default sizes;The datum mark of two-dimentional paster can be the midpoint of two-dimentional paster;In the three-dimensional figure
The datum mark that the position of the corresponding goal-selling of the two-dimentional paster is determined as in can be passed through visualization interface pre- by user
If being chosen in the image at the position of target, it is also possible to obtain the center at the position of goal-selling, is being determined two
After the datum mark for tieing up the position of paster and goal-selling, so that it may first be and benchmark by corresponding first distortion of the mesh of datum mark
The shape of corresponding second grid of point.Then, then successively it is and first net by other first distortions of the mesh around datum mark
The shape of matched second grid of lattice.
The three-dimensional paster is merged with the 3-D image of the goal-selling, generates goal-selling by step S202
Three-dimensional paster image.
The three-dimensional paster image of the goal-selling is mapped in the image of the camera acquisition by step S203, raw
At the paster image of stereoscopic effect.
In the embodiment of the present application, the shape of the three-dimensional paster is consistent with the shape at the position of the goal-selling
, so, three-dimensional paster is covered on the position of the goal-selling can be by the three-dimensional paster and the goal-selling
3-D image merged, generate the three-dimensional paster image of goal-selling.
The two dimensional image when photo finally acquired due to us, so also needing the three-dimensional paster figure of the goal-selling
As being mapped in the image of the camera acquisition, the paster image of stereoscopic effect is generated.By the three-dimensional patch of the goal-selling
Paper image is mapped to the process in the image of the camera acquisition, it is understood that project 3-D image, projects
Direction be camera optical axis direction.
Fig. 3 is the flow diagram of another image processing method provided by the embodiments of the present application, and Fig. 3 is shown in Fig. 2
On the basis of embodiment, it is described how the datum mark at the position based on the goal-selling, it will be described in the 3-D image
The outer surface at the position of goal-selling is divided into the second grid with first mesh fitting, may comprise steps of:
Step S301, in the plane perpendicular to the camera optical axis where the datum mark at the position of the goal-selling
On do the first axle to intersect vertically and second axis.
In the embodiment of the present application, the 3-D image is using mobile terminal side as the 3-D image at visual angle, then will
After two-dimentional paster handles three-dimensional paster, three-dimensional paster should also be the three-dimensional paster using mobile terminal side as visual angle, Wo Menke
To will be perpendicular to the plane where the plane of camera optical axis is considered two-dimentional paster, we do on this plane intersects vertically
First axle and second axis, first axle and second axis may be considered hanging down when being divided into the first grid on two-dimentional paster
Two straight axis.For the understanding of more aspect, second axis be can be in the plane at this perpendicular to the camera optical axis
Gravity direction on axis (axis of vertical direction), first axle is exactly in the plane perpendicular to the camera optical axis
The axis (axis of horizontal direction) vertical with gravity direction
The outer surface at the position of goal-selling described in 3-D image is divided into and described first in order to better illustrate
The process of second grid of mesh fitting, may refer to Fig. 4, and Fig. 4 is to be parallel to the flat of horizontal plane along where first axle
Face 3-D image is splitted after top view, the straight line in Fig. 4 is first axle, and curve is the outer surface of 3-D image, A and A '
It is the top view of second axis.
The first axle is mapped to the goal-selling along the direction where the camera optical axis by step S302
Position outer surface, obtain the first curve, the second axis is mapped to along the direction where the camera optical axis
The outer surface at the position of the goal-selling obtains the second curve.
In the embodiment of the present application, continue by taking Fig. 4 as an example, first axle is reflected along the direction where the camera optical axis
It is mapped to the outer surface at the position of the goal-selling, obtains the first curve, the first curve is exactly the curve in Fig. 4, equally, first
It is corresponding to become A ', B ', C ' after A, B, C point in axis is mapped on the first curve.It can be seen that AB is on first axle
The curve distance of linear distance and A ' B ' on the first curve is equal.By the second axis along the camera optical axis
The direction at place is mapped to the outer surface at the position of the goal-selling, and the process for obtaining the second curve is referred to the first axle
Line is mapped to the outer surface at the position of the goal-selling along the direction where the camera optical axis, obtains the first curve
Process is no longer shown in figure.
Step S303, along the first curve, with preset step-length generate with first curve intersection and with second axis
The parallel multiple third axis of line, each third axis is mapped to along the normal direction of the point with first curve intersection
The outer surface at the position of the goal-selling, obtains multiple third curves, and the preset step-length is the side length of first grid.
In the embodiment of the present application, preset step-length is the side length of first grid, and the first grid is in the embodiment of the present application
In illustrated with positive direction, can be rectangle in practical application, if it is rectangle, correspondingly, preset step-length herein is just
For a rectangular side length.
Assuming that linear distance of the preset step-length between AC, AB=2AC, during obtaining third axis, C ' is just
The top view of third axis, B ' are also the top view of third axis, third axis and first curve intersection and with described the
Two axis are parallel, and (C ' is along the first curve for the curve distance of the point C ' Dao A ' of third axis and first curve intersection
The distance passed through to A ') it is n step-length, n is the integer more than or equal to 1.Similarly, the curve distance of B ' to A ' is also n step
It is long.After obtaining third axis, third axis may only one intersects with the outer surface of 3-D image point, it is also possible to deposit
In the point of multiple intersections, therefore, it is desirable to third axis be mapped to the outer surface of 3-D image, third curve is obtained, with C ' institute
Third axis for, the tangent line put by C ' is done on the first curve, then obtains the normal by C ' point, is i.e. C ' is corresponding
Normal, then along C ' corresponding normal direction will be mapped on 3-D image by the third axis of C ' point, so that it may obtain
Obtain third curve.
Step S304, along the second curve, with preset step-length generate with second curve intersection and with the first axle
The parallel multiple four axistyles of line, each four axistyle is mapped to along the normal direction of the point with second curve intersection
The outer surface at the position of the goal-selling obtains multiple 4th curves.
In the embodiment of the present application, along the second curve, with preset step-length generate with second curve intersection and with institute
The parallel multiple four axistyles of first axle are stated, by each four axistyle along the normal side of the point with second curve intersection
To the outer surface at the position for being mapped to the goal-selling, the process for obtaining multiple 4th curves is referred to obtain in step S303
The process of third curve is obtained, details are not described herein.
It should be noted that in practical applications, the acquisition process of the 4th curve can be according to the mistake for obtaining third curve
Each four axistyle is equally mapped to the goal-selling along the normal direction of the point with second curve intersection by journey
The outer surface at position obtains multiple 4th curves, is also possible to the direction by each four axistyle along the optical axis with camera
It is mapped to the outer surface at the position of the goal-selling, obtains multiple 4th curves.I.e. third curve needs the point along intersection
Normal direction mapping, the 4th curve need along camera optical axis method, i.e., it is identical as the mapping direction of second axis.
Step S305, first curve, the second curve, third curve and the 4th curve are by the position of the goal-selling
It is divided into the second grid with first mesh fitting.
In the embodiment of the present application, the outer surface of the 3-D image just generate first curve, second curve,
A plurality of third curve and a plurality of 4th curve, then first curve, the second curve, third curve and the 4th curve will be described
The position of goal-selling is divided into the second grid with first mesh fitting.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present application constitutes any limit
It is fixed.
Fig. 5 is that the schematic block diagram for the mobile terminal that one embodiment of the application provides only is shown and this Shen for ease of description
It please the relevant part of embodiment.
The mobile terminal 5 can be the software unit being built in the mobile terminals such as mobile phone, tablet computer, notebook, hard
Part unit or the unit of soft or hard combination can also be used as independent pendant and be integrated into the mobile phone, tablet computer, notebook etc.
In mobile terminal.
The mobile terminal 5 includes:
Transmitting module 51, for passing through the structured light generators emitting structural optical information of the mobile terminal;
Acquisition module 52, for receiving the structure optical information reflected by the structure optical receiver of the mobile terminal,
And the camera collection image by the mobile terminal;
Judgment module 53, with the presence or absence of goal-selling in the image for judging camera acquisition;
Modeling module 54, if being reflected for there are goal-sellings in the image of camera acquisition based on described
Structure optical information and the camera acquisition image the goal-selling is modeled, obtain the three of the goal-selling
Tie up image;
Processing module 55, for carrying out paster processing to the goal-selling in the 3-D image.
Optionally, the modeling module 54 includes:
Three-dimensional information acquiring unit 541, for based on the structure optical information and the structured light generators reflected
The structure optical information of transmitting, determines the three-dimensional information of the goal-selling;
Modeling unit 542, the image for three-dimensional information and the goal-selling based on the goal-selling are built
Mould obtains the 3-D image of the goal-selling.
Optionally, the three-dimensional information acquiring unit 541 includes:
Structure light acquisition of information subelement, the position of goal-selling described in the image for being acquired based on the camera
It sets, the structure optical information reflected by the goal-selling is obtained from the structure optical information reflected;
Three-dimensional information obtains subelement, for based on the structure optical information for being predetermined target reflection and the structure light
The structure optical information of generator transmitting, determines the three-dimensional information of the goal-selling.
Optionally, the mobile terminal 5 further include:
Paster obtains module 56, for obtaining at least one two-dimentional paster from preset paster library, and obtains each two dimension
The position of the corresponding goal-selling of paster;
Correspondingly, the processing module 55 includes:
Paster rises dimension unit 551, the three-dimensional information at the position for obtaining the corresponding goal-selling of the two-dimentional paster, will
The two dimension paster processing is and the consistent three-dimensional paster of the three-dimensional information at the position of the goal-selling;
Integrated unit 552 generates pre- for merging the three-dimensional paster with the 3-D image of the goal-selling
If the three-dimensional paster image of target;
Processing unit 553, for the three-dimensional paster image of the goal-selling to be mapped to the figure of the camera acquisition
As in, the paster image of stereoscopic effect is generated.
Optionally, the paster liter dimension unit 551 includes:
Two-dimentional paster divides subelement, for the two-dimentional paster to be divided into the first grid of multiple default sizes;
3-D image divides subelement, for by the position of the corresponding goal-selling of two dimension paster described in 3-D image
Outer surface is divided into the second grid with first mesh fitting;
Two-dimentional paster deforms subelement, for being successively deformed into the two-dimentional paster in each first grid and first net
The shape of matched second grid of lattice.
Optionally, the two-dimentional paster divides subelement and is also used to:
The datum mark of the two-dimentional paster, and the datum mark based on the two-dimentional paster are determined in the two-dimentional paster,
The two-dimentional paster is divided into the first grid of multiple default sizes;
It is also used to correspondingly, the 3-D image divides subelement:
The datum mark at the position of the corresponding goal-selling of the two-dimentional paster is determined in the 3-D image, and is based on institute
The outer surface at the position of goal-selling described in the 3-D image is divided into and institute by the datum mark for stating the position of goal-selling
State the second grid of the first mesh fitting;
The two dimension paster deformation subelement is also used to:
Two-dimentional paster in the first grid where the datum mark of the two-dimentional paster is deformed into and the goal-selling
Position datum mark where the second grid shape;
Centered on the first grid where the datum mark of the two-dimentional paster, successively two dimension in each first grid is pasted
Paper is deformed into the shape with the second grid of first mesh fitting.
Optionally, the 3-D image divides subelement and is also used to:
It is done in the plane perpendicular to the camera optical axis where the datum mark at the position of the goal-selling vertical
The first axle and second axis of intersection;
The first axle is mapped to the position of the goal-selling along direction where the camera optical axis
Outer surface obtains the first curve, and the second axis is mapped to described preset along the direction where the camera optical axis
The outer surface at the position of target obtains the second curve;
Along the first curve, generated and first curve intersection and parallel with the second axis more with preset step-length
Each third axis is mapped to the default mesh along the normal direction of the point with first curve intersection by a third axis
The outer surface at target position, obtains multiple third curves, and the preset step-length is the side length of first grid;
Along the second curve, generated and second curve intersection and parallel with the first axle more with preset step-length
Each four axistyle is mapped to the default mesh along the normal direction of the point with second curve intersection by a four axistyle
The outer surface at target position obtains multiple 4th curves;
First curve, the second curve, third curve and the 4th curve by the position of the goal-selling be divided into
Second grid of first mesh fitting.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of the mobile terminal is divided into different functional unit or module, to complete
All or part of function described above.Each functional unit in embodiment, module can integrate in one processing unit,
It is also possible to each unit to physically exist alone, can also be integrated in one unit with two or more units, above-mentioned collection
At unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function
Unit, module specific name be also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above-mentioned shifting
The specific work process for moving unit in terminal, module, can refer to corresponding processes in the foregoing method embodiment, no longer superfluous herein
It states.
Fig. 6 is the schematic block diagram for the mobile terminal that the another embodiment of the application provides.As shown in fig. 6, the shifting of the embodiment
Dynamic terminal 6 includes: one or more processors 60, memory 61 and is stored in the memory 61 and can be in the processing
The computer program 62 run on device 60.The processor 60 is realized when executing the computer program 62 at above-mentioned each image
Manage the step in embodiment of the method, such as step S101 to S105 shown in FIG. 1.Alternatively, the processor 60 executes the meter
The function of each module/unit in above-mentioned mobile terminal embodiment, such as module 51 to 55 shown in Fig. 5 are realized when calculation machine program 62
Function.
Illustratively, the computer program 62 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 61, and are executed by the processor 60, to complete the application.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for
Implementation procedure of the computer program 62 in the mobile terminal 6 is described.For example, the computer program 62 can be divided
It is cut into transmitting module, acquisition module, judgment module, modeling module, processing module.
The transmitting module, for passing through the structured light generators emitting structural optical information of the mobile terminal;
The acquisition module receives the structure light reflected for the structure optical receiver by the mobile terminal and believes
Breath, and pass through the camera collection image of the mobile terminal;
The judgment module, with the presence or absence of goal-selling in the image for judging camera acquisition;
The modeling module, if for there are goal-sellings in the image of camera acquisition, based on described anti-
The structure optical information penetrated and the image of camera acquisition model the goal-selling, obtain the goal-selling
3-D image;
The processing module, for carrying out paster processing to the goal-selling in the 3-D image.
Other modules or unit can refer to the description in embodiment shown in fig. 5, and details are not described herein.
The mobile terminal includes but are not limited to processor 60, memory 61.It will be understood by those skilled in the art that figure
6 be only an example of mobile terminal 6, does not constitute the restriction to mobile terminal 6, may include more more or less than illustrating
Component, perhaps combine certain components or different components, for example, the mobile terminal can also include input equipment, it is defeated
Equipment, network access equipment, bus etc. out.
The processor 60 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 61 can be the internal storage unit of the mobile terminal 6, such as the hard disk or interior of mobile terminal 6
It deposits.The memory 61 is also possible to the External memory equipment of the mobile terminal 6, such as be equipped on the mobile terminal 6
Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge
Deposit card (Flash Card) etc..Further, the memory 61 can also both include the storage inside list of the mobile terminal 6
Member also includes External memory equipment.The memory 61 is for storing needed for the computer program and the mobile terminal
Other programs and data.The memory 61 can be also used for temporarily storing the data that has exported or will export.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
Scope of the present application.
In embodiment provided herein, it should be understood that disclosed mobile terminal and method can pass through it
Its mode is realized.For example, mobile terminal embodiment described above is only schematical, for example, the module or list
Member division, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or
Component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point is shown
The mutual coupling or direct-coupling or communication connection shown or discussed can be through some interfaces, between device or unit
Coupling or communication connection are connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the application realizes above-mentioned implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on
The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium
It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code
Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described
The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice
Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and
Telecommunication signal.
Embodiment described above is only to illustrate the technical solution of the application, rather than its limitations;Although referring to aforementioned reality
Example is applied the application is described in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution should all
Comprising within the scope of protection of this application.
Claims (10)
1. a kind of image processing method, which is characterized in that be applied to mobile terminal, described image processing method includes:
Pass through the structured light generators emitting structural optical information of the mobile terminal;
The structure optical information reflected is received by the structure optical receiver of the mobile terminal, and passes through the mobile terminal
Camera collection image;
Judge in the image of the camera acquisition with the presence or absence of goal-selling;
If based on the structure optical information reflected and described being taken the photograph there are goal-selling in the image of camera acquisition
As head acquire image the goal-selling is modeled, obtain the 3-D image of the goal-selling;
Paster processing is carried out to the goal-selling in the 3-D image.
2. image processing method as described in claim 1, which is characterized in that described based on the structure optical information reflected
The goal-selling is modeled with the image of camera acquisition, the 3-D image for obtaining the goal-selling includes:
Based on the structure optical information that the structure optical information reflected and the structured light generators emit, determine described default
The three-dimensional information of target;
The image of three-dimensional information and the goal-selling based on the goal-selling is modeled, and the goal-selling is obtained
3-D image.
3. image processing method as claimed in claim 2, which is characterized in that described based on the structure optical information reflected
With the structure optical information of structured light generators transmitting, determine that the three-dimensional information of the goal-selling includes:
The position of goal-selling described in image based on camera acquisition, is obtained from the structure optical information reflected
Take the structure optical information reflected by the goal-selling;
Structure optical information based on the structure optical information for being predetermined target reflection and structured light generators transmitting, determines
The three-dimensional information of the goal-selling.
4. image processing method as claimed in claim 2, which is characterized in that the goal-selling in the 3-D image into
Before the processing of row paster, further includes:
At least one two-dimentional paster is obtained from preset paster library, and obtains the portion of the corresponding goal-selling of each two-dimentional paster
Position;
Correspondingly, the goal-selling progress paster processing in the 3-D image includes:
The three-dimensional information for obtaining the position of the corresponding goal-selling of the two-dimentional paster, by the two-dimentional paster processing for it is described
The consistent three-dimensional paster of the three-dimensional information at the position of goal-selling;
The three-dimensional paster is merged with the 3-D image of the goal-selling, generates the three-dimensional paster figure of goal-selling
Picture;
The three-dimensional paster image of the goal-selling is mapped in the image of the camera acquisition, generates the patch of stereoscopic effect
Paper image.
5. image processing method as claimed in claim 4, which is characterized in that it is described by the two-dimentional paster processing for it is described
The consistent three-dimensional paster of the three-dimensional information at the position of goal-selling includes:
The two-dimentional paster is divided into the first grid of multiple default sizes;
The outer surface at the position of the corresponding goal-selling of two dimension paster described in 3-D image is divided into and first grid
Matched second grid;
Two-dimentional paster in each first grid is successively deformed into the shape with the second grid of first mesh fitting.
6. image processing method as claimed in claim 5, which is characterized in that it is described the two-dimentional paster is divided into it is multiple pre-
If the first grid of size includes:
The datum mark of the two-dimentional paster, and the datum mark based on the two-dimentional paster are determined in the two-dimentional paster, by institute
State the first grid that two-dimentional paster is divided into multiple default sizes;
Correspondingly, the outer surface at the position by the corresponding goal-selling of two dimension paster described in 3-D image is divided into and institute
The second grid for stating the first mesh fitting includes:
The datum mark at the position of the corresponding goal-selling of the two-dimentional paster is determined in the 3-D image, and based on described pre-
If the datum mark at the position of target, the outer surface at the position of goal-selling described in the 3-D image is divided into and described
Second grid of one mesh fitting;
Correspondingly, second grid being successively deformed into the two-dimentional paster in each first grid with first mesh fitting
Shape include:
Two-dimentional paster in the first grid where the datum mark of the two-dimentional paster is deformed into the portion with the goal-selling
The shape of the second grid where the datum mark of position;
Centered on the first grid where the datum mark of the two-dimentional paster, successively paster two-dimentional in each first grid is become
Shape is the shape with the second grid of first mesh fitting.
7. image processing method as claimed in claim 6, which is characterized in that the base at the position based on the goal-selling
On schedule, the outer surface at the position of goal-selling described in the 3-D image is divided into second with first mesh fitting
Grid includes:
It intersects vertically in the plane perpendicular to the camera optical axis where the datum mark at the position of the goal-selling
First axle and second axis;
The first axle is mapped to the appearance at the position of the goal-selling along the direction where the camera optical axis
Face obtains the first curve, the second axis is mapped to the goal-selling along the direction where the camera optical axis
Position outer surface, obtain the second curve;
Along the first curve, generated and first curve intersection and parallel with the second axis multiple the with preset step-length
Each third axis is mapped to the goal-selling along the normal direction of the point with first curve intersection by three axis
The outer surface at position, obtains multiple third curves, and the preset step-length is the side length of first grid;
Along the second curve, generated and second curve intersection and parallel with the first axle multiple the with preset step-length
Each four axistyle is mapped to the goal-selling along the normal direction of the point with second curve intersection by four axistyle
The outer surface at position obtains multiple 4th curves;
First curve, the second curve, third curve and the 4th curve by the position of the goal-selling be divided into it is described
Second grid of the first mesh fitting.
8. a kind of mobile terminal characterized by comprising
Transmitting module, for passing through the structured light generators emitting structural optical information of the mobile terminal;
Acquisition module, for receiving the structure optical information reflected, Yi Jitong by the structure optical receiver of the mobile terminal
Cross the camera collection image of the mobile terminal;
Judgment module, with the presence or absence of goal-selling in the image for judging camera acquisition;
Modeling module, if there are goal-sellings in the image acquired for the camera, based on the structure reflected
Optical information and the image of camera acquisition model the goal-selling, obtain the three-dimensional figure of the goal-selling
Picture;
Processing module, for carrying out paster processing to the goal-selling in the 3-D image.
9. a kind of mobile terminal, including memory, processor and storage are in the memory and can be on the processor
The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 7 when executing the computer program
The step of any one the method.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey
Sequence realizes the step such as any one of claim 1 to 7 the method when the computer program is executed by one or more processors
Suddenly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810866523.2A CN108965715B (en) | 2018-08-01 | 2018-08-01 | Image processing method, mobile terminal and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810866523.2A CN108965715B (en) | 2018-08-01 | 2018-08-01 | Image processing method, mobile terminal and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108965715A true CN108965715A (en) | 2018-12-07 |
CN108965715B CN108965715B (en) | 2020-08-11 |
Family
ID=64466877
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810866523.2A Active CN108965715B (en) | 2018-08-01 | 2018-08-01 | Image processing method, mobile terminal and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108965715B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110740309A (en) * | 2019-09-27 | 2020-01-31 | 北京字节跳动网络技术有限公司 | image display method, device, electronic equipment and storage medium |
CN111882596A (en) * | 2020-03-27 | 2020-11-03 | 浙江水晶光电科技股份有限公司 | Structured light module three-dimensional imaging method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107564036A (en) * | 2017-08-01 | 2018-01-09 | 努比亚技术有限公司 | A kind of method for tracking target and terminal based on structure light |
WO2018039638A1 (en) * | 2016-08-26 | 2018-03-01 | Mems Start, Llc | Filtering pixels and uses thereof |
CN108062791A (en) * | 2018-01-12 | 2018-05-22 | 北京奇虎科技有限公司 | A kind of method and apparatus for rebuilding human face three-dimensional model |
-
2018
- 2018-08-01 CN CN201810866523.2A patent/CN108965715B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018039638A1 (en) * | 2016-08-26 | 2018-03-01 | Mems Start, Llc | Filtering pixels and uses thereof |
CN107564036A (en) * | 2017-08-01 | 2018-01-09 | 努比亚技术有限公司 | A kind of method for tracking target and terminal based on structure light |
CN108062791A (en) * | 2018-01-12 | 2018-05-22 | 北京奇虎科技有限公司 | A kind of method and apparatus for rebuilding human face three-dimensional model |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110740309A (en) * | 2019-09-27 | 2020-01-31 | 北京字节跳动网络技术有限公司 | image display method, device, electronic equipment and storage medium |
CN111882596A (en) * | 2020-03-27 | 2020-11-03 | 浙江水晶光电科技股份有限公司 | Structured light module three-dimensional imaging method and device, electronic equipment and storage medium |
CN111882596B (en) * | 2020-03-27 | 2024-03-22 | 东莞埃科思科技有限公司 | Three-dimensional imaging method and device for structured light module, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108965715B (en) | 2020-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109737974A (en) | A kind of 3D navigational semantic map updating method, device and equipment | |
CN109242961A (en) | A kind of face modeling method, apparatus, electronic equipment and computer-readable medium | |
CN105706143B (en) | Mix infrared and color component data point cloud | |
CN109840949A (en) | Augmented reality image processing method and device based on optical alignment | |
CN110111262A (en) | A kind of projector distortion correction method, device and projector | |
CN110336987A (en) | A kind of projector distortion correction method, device and projector | |
CN109816769A (en) | Scene map generation method, device and equipment based on depth camera | |
CN109683701A (en) | Augmented reality exchange method and device based on eye tracking | |
CN109816773A (en) | A kind of driving method, plug-in unit and the terminal device of the skeleton model of virtual portrait | |
CN110276317A (en) | A kind of dimension of object detection method, dimension of object detection device and mobile terminal | |
CN105608421B (en) | A kind of recognition methods of human action and device | |
CN110276829A (en) | The three dimensional representation handled by multiple dimensioned voxel Hash | |
CN104183019B (en) | Method for rebuilding 3D lines | |
CN110276774A (en) | Drawing practice, device, terminal and the computer readable storage medium of object | |
CN107274338A (en) | System, method and apparatus that low latency for depth map is deformed | |
CN101266546A (en) | Method for accomplishing operating system three-dimensional display and three-dimensional operating system | |
CN110337674A (en) | Three-dimensional rebuilding method, device, equipment and storage medium | |
CN106604003A (en) | Method and system for realizing curved-surface curtain projection via short-focus projection | |
CN104104936A (en) | Apparatus and method for forming light field image | |
CN109979013A (en) | Three-dimensional face chart pasting method and terminal device | |
CN108965715A (en) | A kind of image processing method, mobile terminal and computer readable storage medium | |
CN106131535A (en) | Video capture method and device, video generation method and device | |
CN106683163A (en) | Imaging method and system used in video monitoring | |
CN113724309B (en) | Image generation method, device, equipment and storage medium | |
JP7432793B1 (en) | Mapping methods, devices, chips and module devices based on three-dimensional point clouds |
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 |