CN109146770A - A kind of strain image generation method, device, electronic equipment and computer readable storage medium - Google Patents

A kind of strain image generation method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN109146770A
CN109146770A CN201810838408.4A CN201810838408A CN109146770A CN 109146770 A CN109146770 A CN 109146770A CN 201810838408 A CN201810838408 A CN 201810838408A CN 109146770 A CN109146770 A CN 109146770A
Authority
CN
China
Prior art keywords
deformation
sphere
action
image
strain image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810838408.4A
Other languages
Chinese (zh)
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.)
Beijing Microlive Vision Technology Co Ltd
Original Assignee
Beijing Microlive Vision Technology 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 Beijing Microlive Vision Technology Co Ltd filed Critical Beijing Microlive Vision Technology Co Ltd
Priority to CN201810838408.4A priority Critical patent/CN109146770A/en
Publication of CN109146770A publication Critical patent/CN109146770A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/18Image warping, e.g. rearranging pixels individually

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The present invention discloses a kind of strain image generation method, device, electronic equipment and computer readable storage medium.Wherein the strain image generation method includes: the type setting command in response to receiving, and the type of deformation is arranged;In response to the range setting command received, the sphere of action of deformation is set;According to the setting result treatment imaging sensor acquired image of above-mentioned setting command, strain image is generated.The embodiment of the present disclosure solves the technical issues of can only carrying out deformation to image using default effect in the prior art, improves the flexibility ratio for generating strain image by taking the technical solution.

Description

A kind of strain image generation method, device, electronic equipment and computer-readable storage Medium
Technical field
This disclosure relates to field of image processing more particularly to a kind of strain image generation method, device, electronic equipment and meter Calculation machine readable storage medium storing program for executing.
Background technique
With the development of computer technology, the application range of intelligent terminal has obtained extensive extension, such as can pass through Intelligent terminal listens to music, plays game, chats on line and take pictures.For the shooting technology of intelligent terminal, pixel of taking pictures Have reached ten million pixel or more, the effect of taking pictures of clarity with higher and the mm professional camera special that matches in excellence or beauty.
At present when being taken pictures using intelligent terminal, built-in software realization tradition of taking pictures when factory not only can be used The effect of taking pictures of function can also realize tool by downloading application program (Application, referred to as are as follows: APP) from network-side There is the effect of taking pictures of additional function, such as the APP of half-light detection, the U.S. functions such as face camera and super pixel may be implemented.
However current facial image deformation function, some preset deformation effects have been only included, shape can only be directly selected The effect of change can not flexibly edit deformation effects.
Summary of the invention
In view of this, the embodiment of the present disclosure provides a kind of strain image generation method, to the deformation effects to image into Row definition and editor, and generate strain image.
In a first aspect, the embodiment of the present disclosure provides a kind of strain image generation method, comprising: in response to the type received The type of deformation is arranged in setting command;In response to the range setting command received, the sphere of action of deformation is set;According to upper The setting result treatment imaging sensor acquired image of setting command is stated, strain image is generated.
Optionally, the type of the setting deformation, comprising: the type parameter of deformation and the extent index of deformation are set.
Optionally, it is described setting deformation sphere of action, comprising: the shape of sphere of action is set, wherein the shape by Multiple parameters description;The multiple parameter includes at least shape type parameter, center position parameter and length parameter.
Optionally, the setting result treatment imaging sensor acquired image according to above-mentioned setting command generates Strain image, comprising: call deformation algorithm corresponding with set deformation, the pixel in sphere of action is located to image and is done Deformation process obtains strain image.
Optionally, after the sphere of action of setting deformation, further includes: a standard picture is shown on the display apparatus, it will The sphere of action is shown on standard picture.
Optionally, after the sphere of action is shown on standard picture, further includes: according to above-mentioned setting command Setting result handles standard picture, generates the strain image of standard picture.
Optionally, the setting result treatment imaging sensor acquired image according to above-mentioned setting command generates Strain image, comprising: the characteristic point for obtaining standard picture, through the fixed sphere of action of the characteristic point in standard picture Position;From by identifying the first image corresponding with standard picture in imaging sensor institute acquired image;It will be in standard The position fixed in image is mapped in the first image;Deformation process is done to the first image, generates strain image.
Optionally, the sphere of action includes indicating the center position parameter of sphere of action position;The sphere of action Central point position P by 3 characteristic points A, B, C and 2 linear difference coefficient lambdas1And λ2Description, specifically: P be located at by A, B, in the triangle of C composition, D is the intersection point that the line segment extended line and line segment BC of P point are connected from A point, whereinWherein BD, BC, AP and AD respectively indicate the length of line segment.
Optionally, the sphere of action includes the length parameter for indicating sphere of action axial length;The sphere of action Length parameter R is described by 2 characteristic points E, F and length factor S, specifically: R=EF × S, wherein between EF E, F two o'clock Distance, length factor S calculated by EF and R.
Optionally, the sphere of action includes the angle parameter for indicating the rotation angle of sphere of action;The sphere of action Angle parameter angle described by 2 characteristic points G, H, specifically: use vectorDirection, the direction as sphere of action Reference direction.
Optionally, before generating strain image, further includes: in response to receiving deformation amplitude setting command, setting exists Deformation amplitude in the X-direction and Y direction of deformation effect range.
Second aspect, the embodiment of the present disclosure provide a kind of strain image generating means, comprising: Deformation Types setup module, For the type setting command in response to receiving, the type of deformation is set;Range setup module, in response to receiving The sphere of action of deformation is arranged in range setting command;Deformation execution module, at the setting result according to above-mentioned setting command Imaging sensor acquired image is managed, strain image is generated.
Optionally, the Deformation Types setup module: for the type parameter of deformation and the extent index of deformation to be arranged.
Optionally, the range setup module: for the shape of sphere of action to be arranged, wherein the shape is by multiple parameters Description;The multiple parameter includes at least shape type parameter, center position parameter and length parameter.
Optionally, the deformation execution module: for calling deformation algorithm corresponding with set deformation, to image position Deformation process is done in the pixel in sphere of action, obtains strain image.
Optionally, the strain image generating means further include: display module, for the sphere of action to be shown in mark On quasi- image.
Optionally, the deformation execution module: for obtaining the characteristic point of standard picture, pass through the fixed institute of the characteristic point State position of the sphere of action in standard picture;From by being identified and standard picture pair in imaging sensor institute acquired image The first image answered;The position fixed in standard picture is mapped in the first image;Deformation process is done to the first image, Generate strain image.
Optionally, the position P of the central point of the sphere of action is by 3 characteristic points A, B, C and 2 linear difference coefficients λ1And λ2Description, specifically: P is located in the triangle being made of A, B, C, and D is the line segment extended line and line segment that P point is connected from A point The intersection point of BC, whereinWherein BD, BC, AP and AD respectively indicate the length of line segment.
Optionally, the length parameter R of the sphere of action is described by 2 characteristic points E, F and length factor S, specifically: R=EF × S, wherein the distance between EF E, F two o'clock, length factor S are calculated by EF and R.
Optionally, the sphere of action further includes the angle parameter for indicating the rotation angle of sphere of action;The effect model The angle parameter angle enclosed is described by 2 characteristic points G, H, specifically: use vectorDirection, the side as sphere of action To reference direction.
Optionally, the strain image generating means, further includes: amplitude setup module, in response to receiving deformation The deformation amplitude in the X-direction and Y direction of deformation effect range is arranged in amplitude setting command.
The third aspect, the embodiment of the present disclosure provide a kind of electronic equipment, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one A processor executes, so that at least one described processor is able to carry out any strain image life in aforementioned first aspect At method.
Fourth aspect, the embodiment of the present disclosure provide a kind of non-transient computer readable storage medium, which is characterized in that this is non- Transitory computer readable storage medium stores computer instruction, and the computer instruction is for making computer execute aforementioned first aspect In any strain image generation method.
The embodiment of the present disclosure provides a kind of strain image generation method, device, electronic equipment and computer-readable storage medium Matter.Wherein the strain image generation method includes: the type setting command in response to receiving, and the type of deformation is arranged;Response In the range setting command received, the sphere of action of deformation is set;According to the setting result treatment image of above-mentioned setting command Sensor acquired image generates strain image.The embodiment of the present disclosure solves the prior art by taking the technical solution In the technical issues of deformation can only being carried out to image using default effect, improve the flexibility ratio for generating strain image.
Above description is only the general introduction of disclosed technique scheme, in order to better understand the technological means of the disclosure, and It can be implemented in accordance with the contents of the specification, and to allow the above and other objects, features and advantages of the disclosure can be brighter Show understandable, it is special below to lift preferred embodiment, and cooperate attached drawing, detailed description are as follows.
Detailed description of the invention
In order to illustrate more clearly of the embodiment of the present disclosure or technical solution in the prior art, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this public affairs The some embodiments opened for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow chart for the strain image generation method embodiment one that the embodiment of the present disclosure provides.
Fig. 2 a is the flow chart for the strain image generation method embodiment two that the embodiment of the present disclosure provides.
Fig. 2 b is the schematic diagram for the two Plays image of strain image generation method embodiment that the embodiment of the present disclosure provides;
Fig. 2 c is the strain image for the two Plays image of strain image generation method embodiment that the embodiment of the present disclosure provides Schematic diagram;
The center position schematic diagram of sphere of action in the strain image generation method that Fig. 3 provides for the embodiment of the present disclosure.
Fig. 4 is the flow chart for the strain image generation method embodiment two that the embodiment of the present disclosure provides.
Fig. 5 is the structural schematic diagram for the strain image generating means embodiment one that the embodiment of the present disclosure provides.
Fig. 6 is the structural schematic diagram for the strain image generating means embodiment two that the embodiment of the present disclosure provides.
Fig. 7 is the structural representation for the strain image generating means embodiment three that the embodiment of the present disclosure provides.
Fig. 8 is the structural schematic diagram of the electronic equipment provided according to the embodiment of the present disclosure.
Fig. 9 is the structural schematic diagram of the computer readable storage medium provided according to the embodiment of the present disclosure.
Figure 10 is that the strain image provided according to the embodiment of the present disclosure generates the structural schematic diagram of terminal.
Specific embodiment
Illustrate embodiment of the present disclosure below by way of specific specific example, those skilled in the art can be by this specification Disclosed content understands other advantages and effect of the disclosure easily.Obviously, described embodiment is only the disclosure A part of the embodiment, instead of all the embodiments.The disclosure can also be subject to reality by way of a different and different embodiment It applies or applies, the various details in this specification can also be based on different viewpoints and application, in the spirit without departing from the disclosure Lower carry out various modifications or alterations.It should be noted that in the absence of conflict, the feature in following embodiment and embodiment can To be combined with each other.Based on the embodiment in the disclosure, those of ordinary skill in the art are without creative efforts Every other embodiment obtained belongs to the range of disclosure protection.
It should be noted that the various aspects of embodiment within the scope of the appended claims are described below.Ying Xian And be clear to, aspect described herein can be embodied in extensive diversified forms, and any specific structure described herein And/or function is only illustrative.Based on the disclosure, it will be understood by one of ordinary skill in the art that one described herein Aspect can be independently implemented with any other aspect, and can combine the two or both in these aspects or more in various ways. For example, carry out facilities and equipments in terms of any number set forth herein can be used and/or practice method.In addition, can make With other than one or more of aspect set forth herein other structures and/or it is functional implement this equipment and/or Practice the method.
It should also be noted that, diagram provided in following embodiment only illustrates the basic structure of the disclosure in a schematic way Think, component count, shape and the size when only display is with component related in the disclosure rather than according to actual implementation in schema are drawn System, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel can also It can be increasingly complex.
In addition, in the following description, specific details are provided for a thorough understanding of the examples.However, fields The skilled person will understand that the aspect can be practiced without these specific details.
Fig. 1 is the flow chart for the strain image generation method embodiment one that the embodiment of the present disclosure provides, the present embodiment provides The strain image generation method can be executed by a strain image generating means, which may be implemented For software, or it is embodied as the combination of software and hardware, which, which can integrate, is arranged in image procossing system In certain equipment in system, such as in image processing server or image processing terminal equipment.As shown in Figure 1, this method includes Following steps:
The type of deformation is arranged in response to the type setting command received in S101;
At terminal device, user can be configured deformation by man-machine interface, for terminal device, Its type setting command for receiving user's input, is configured the type of deformation;It can be in the Deformation Types setting command Including Deformation Types parameter, the type parameter of the deformation specifies the type of deformation, and the Deformation Types may include amplification, contracting Small, translation, rotation, dragging etc..It also may include Deformation Types parameter and deformation degree in the Deformation Types setting command Two parameters of parameter, wherein the Deformation Types parameter is identical as Deformation Types parameter above-mentioned, the deformation extent index refers to Determined the degree of deformation, the degree of the deformation can be the multiple of such as zoom, the distance of translation, the angle of rotation, Distance of dragging etc..When the Deformation Types are translation, in the deformation extent index include target point position and The amplitude of target point is translated towards from central point, the amplitude can be negative, indicate the translation of opposite direction;The deformation degree ginseng It can also include translation attenuation coefficient in number, the translation attenuation coefficient is bigger, and translation amplitude is on the direction far from central point Decaying it is smaller.The Deformation Types further include a kind of special Deformation Types: flexible amplification/diminution can be adjusted freely The image deformation degree of the picture position of distance is not had in deformation region to central point.
The sphere of action of deformation is arranged in response to the range setting command received in S102;
At terminal device, user can be configured by sphere of action of the man-machine interface to deformation, at this point for end For end equipment, the range setting command of user's input is received, the sphere of action of deformation is configured;In general, institute State shape that sphere of action includes the sphere of action, for example round, ellipse, rectangle etc. and the sphere of action is big Small and position, such as the position in circular radius and the center of circle;Length, rotation angle and the elliptical center of elliptical major and minor axis Position;The side length of rectangle, the position for rotating angle and rectangular centre;It include multiple sphere of action parameters in the setting command The shape is described, the multiple sphere of action parameter includes the position coordinate parameters of shape type parameter, centroid point And the length parameter that shape is upward in screen axle may be used also for certain shapes such as ellipse and rectangle in the form parameter Rotation angle to include rotation angle parameter, the parameter define shape relative to screen axial direction;The shape is in screen axle Upward length parameter includes the sphere of action in the length in screen X-direction and/or the length in screen Y direction Degree.
It in one embodiment, can also include parameter max and min, wherein max determines outside in the multiple parameter Boundary, min determine that inner boundary, the inner boundary and outer boundary composition are located at a cyclic annular range in sphere of action, and image only exists Deformation occurs in cyclic annular range;Wherein max > min, and 0≤max≤1,0≤min≤1, under normal circumstances, max and min difference It indicates the length parameter proportionate relationship of outer boundary and inner boundary and sphere of action, for example works as max=1, indicate the outer of cyclic annular range The overlapping margins on boundary and sphere of action.It is understood that the ring-type can be annulus, elliptical ring, straight-flanked ring etc..
It in one embodiment, further include signX and signY in the multiple parameter, it is specific: to work as signX=-1, table Show and only needs to carry out deformation to half of sphere of action where the negative semiaxis of X-axis;Work as signX=1, expression is only needed to X-axis Half of sphere of action where positive axis is deformed;Work as signX=0, expression does not select deformation range in the X-axis direction;When SignY=-1 indicates only to need to carry out deformation to half of sphere of action where the negative semiaxis of Y-axis;Work as signY=1, indicates only It needs to deform half of sphere of action where the positive axis of Y-axis;Work as signY=0, expression does not select in the Y-axis direction Deformation range.Above-mentioned two parameter can be combined into a variety of sphere of actions, such as signX=1 and signY=1, expression pair Image in the sphere of action of the first quartile of sphere of action carries out deformation, and so on, it repeats no more.
S103 generates deformation map according to the setting result treatment imaging sensor acquired image of above-mentioned setting command Picture.
Different Deformation Types call different deformation process methods, when the sphere of action of deformation and the type of deformation are all true After fixed, corresponding deformation process method is called to carry out deformation process to the image within the scope of deformation effect, described image is logical Cross the image described image that the collected realtime graphic of imaging sensor is perhaps obtained by imaging sensor include picture or Video ultimately generates strain image.In the concrete realization, corresponding different deformation, presets different deformation algorithms, passes through Parameter configuration deformation algorithm is passed in step S101 and S102 in received order, to the image being located within the scope of deformation effect Pixel does deformation process, obtains final strain image.
The core concept of the present embodiment is: by setting Deformation Types and deformation effect range the two parameters, to deformation It is controlled.It, can the more flexible result for controlling deformation by above-mentioned strain image generation method.
Fig. 2 a is the flow chart for the strain image generation method embodiment two that the embodiment of the present disclosure provides, as shown in Figure 2 a, It may include steps of:
The type of deformation is arranged in response to the type setting command received in S201;
The sphere of action of deformation is arranged in response to the range setting command received in S202;
S203 shows a standard picture on the display apparatus, and the sphere of action is shown on the standard picture;
S204 generates deformation map according to the setting result treatment imaging sensor acquired image of above-mentioned setting command Picture.
As shown in figs. 2 b and 2 c, in this embodiment, it observes in order to facilitate user and adjusts deformation effect range, in step After S202, step S203 joined: showing a standard picture on the display apparatus, the sphere of action is shown in the mark On quasi- image.In one embodiment, the standard picture is facial image, and the sphere of action is an elliptic region, is used Elliptical major and minor axis and rotation angle can be set in family, the ellipse area can be shown on default location on facial image Domain, user can change the position of sphere of action by dragging elliptical central point at this time, for example drag from the region of nose To the region of eyes, then corresponding deformation process will be carried out to eye image, sphere of action and deformation as illustrated in fig. 2 c Effect
Sphere of action is shown on standard picture, also facilitates user to check the expected effects of deformation, and according to the effect tune The parameter of whole items deformation.In one embodiment, the relative position of the sphere of action is determined by characteristic point, in Fig. 2 b Shown in human face characteristic point.The characteristic point of image, which refers in image, to be had distinct characteristic and can effectively reflect image substantive characteristics And it can be identified for that the point of target object in image.If target object is face, just need to obtain face key point, if As soon as target image is a house, then needing to obtain the key point in house.Illustrate the acquisition methods of key point by taking face as an example, Facial contour mainly includes 5 eyebrow, eyes, nose, mouth and cheek parts, will also include pupil and nostril sometimes, generally For realize facial contour more completely described, need the number of key point at 60 or so, if the only basic knot of description Structure does not need that each position details is described in detail, or does not need description cheek, then can accordingly reduce key point number, If necessary to describe pupil, nostril or the five features for needing more details, then it can increase the number of key point.On the image The extraction of face key point is carried out, is equivalent to the corresponding position coordinate for finding each facial contour key point in facial image, i.e., Crucial point location, this process need to carry out based on the corresponding feature of key point, can clearly identify key point obtaining It after characteristics of image, scans for comparing in the picture according to this feature, is accurately positioned the position of key point on the image.Due to Characteristic point only occupies very small area (usually only several sizes to tens pixels) in the picture, and characteristic point is corresponding Feature on the image occupied region be generally also it is very limited and local, there are two types of feature extraction modes at present: (1) the one-dimensional range image feature extraction vertical along profile;(2) the two dimensional range image characteristics extraction of characteristic point Square Neighborhood. There are many kinds of implementation methods for above two mode, such as ASM and AAM class method, statistics energy function class method, regression analysis side Method, deep learning method, classifier methods, batch extracting method etc..Key point used in above-mentioned various implementation methods Number, accuracy and speed are different, suitable for different application scenarios.
Since the deformation for being deflected into the collected image of imaging sensor on standard picture needs a mapping relations, Different according to the mode of mapping, the mode of deformation can be divided into fixed deformation and tracking deformation, in one embodiment using solid Setting becomes, and this deformation is fairly simple, it is only necessary to the absolute position of entire deformation range in the image sensor is set, The pixel that implementation can be the Image Acquisition window by display device and imaging sensor corresponds, and judges deformation model Position in a display device is enclosed, the corresponding position of imaging sensor acquisition window acquired image is carried out later corresponding The advantages of deformation process, this deformation process mode be it is simple to operation in another embodiment, generate strain image when, first The characteristic point of standard picture in obtaining step S203 determines the sphere of action in standard picture by the characteristic point Position;From by identifying the first image corresponding with standard picture in imaging sensor institute acquired image;It will be in standard drawing Identified position is mapped in the first image as in;Deformation process is done to the first image, generates strain image.The deformation mode In, determine the relative position of deformation range in the target image, no matter how target image moves variation, and the deformation range is total On the relative position, achieve the purpose that track deformation.In a typical application, the standard picture has been referring to work Standard faces image, the standard picture pass through triangulation, there is 106 characteristic points, when sphere of action is arranged, utilize shape The relative position for becoming range and characteristic point determines relative position of the sphere of action in facial image, to the collected people of camera Face image does same triangulation, and later when mobile or rotation occurs for the face in camera, the deformation can be always It is fixed on the relative position on face, to achieve the effect that track deformation.
For the tracking deformation mode in above-described embodiment, standard picture and acquired image use same set of feature The number of point, characteristic point is identical, such as in standard picture No. 6 characteristic point and imaging sensor acquired image No. 6 Characteristic point, the position on standard picture and the position in acquired image are identical.Due to the center of sphere of action In general point is always located in some triangle interior, therefore can determine sphere of action central point using 3 characteristic points Position, as shown in figure 3, tri- points of A, B, C are the characteristic point in image, P is the center position of sphere of action, and D point is line segment The extended line of AP and the intersection point of line segment BC, wherein the coordinate of A point is (Xa,Ya), the coordinate of B point is (Xb,Yb), the coordinate of C point is (Xc,Yc), the coordinate of D point is (Xd,Yd), the coordinate of P point is (Xp,Yp), then available 2 linear difference coefficients Wherein BD, BC, AP and AD respectively indicate the length of line segment,
In standard picture In, the coordinate of A, B, C, P are known value, therefore BD, BC, AP and AD can be used and calculate λ1And λ2;To image sensing When device acquired image carries out deformation, it is necessary first to determine the sphere of action of deformation, can be used numbered with A, B, C point at this time Identical characteristic point A1、B1、C1, A1、B1And C1Coordinate in the coordinate system of imaging sensor be given value, at this time use A1、B1 And C1Coordinate value and linear difference coefficient lambda1And λ2P corresponding with P point can be calculated1Coordinate system of the point in imaging sensor In coordinate.If should be noted that A, B are identical with the number of C, A, B and C concurrent, P point is located on A point at this time, is not necessarily to Calculate λ1And λ2Value;When the number of B and C is identical, then B, C, D concurrent, triangle is degenerated to line segment at this time, and the position of P is by λ2Certainly It is fixed, without calculating λ1;When A and B concurrent or A and C concurrent, the case where the sequence of A, B and C can be exchanged, be converted into BC.It should Scheme is thus to calculate P point using the relative position between linear difference coefficient record deformation central point and three characteristic points and reflect It is mapped to the position in the coordinate system of imaging sensor, aforesaid way is example, actually any to record deformation using characteristic point The method of the position of central point can be introduced into the disclosure.When Deformation Types are translation or pull, above scheme can also be with Aiming spot for describing to translate and pull describes the target point for translating and pulling in standard picture in aforementioned manners It sets, when being mapped in imaging sensor acquired image, can determine the position of the target point in real image.Work as deformation When type is translation, two kinds of translational modes can also be preset, such as when the number of A point is less than 0, target point is located at sphere of action X The distalmost end of axis forward direction;When the number of A point is more than or equal to the label of 0, B point less than 0, target point is being located at sphere of action Y-axis just To distalmost end.
Other than the position at center, it is also necessary to record the length R of sphere of action, the length can by two characteristic point E, F and length factor S is described, specific: R=EF × S, R is given value in standard picture, and EF is characterized point E and characteristic point F Between line segment length, it is possible thereby to calculate length factor Under the coordinate system of imaging sensor, E, F are corresponding Characteristic point E1And F1Coordinate be given value, then length R of the sphere of action under the coordinate system of imaging sensor1Can by with Lower formula calculates:E1F1× S, for the sphere of action of some shapes, with multiple length, such as oval tool There are long axis and short axle, rectangle has long and width, multiple length factor S can be calculated separately for each length at this time, for remembering Record the relative length of each length.
User can be set whether sphere of action follows the rotation of target image and rotate, if not following rotation, only The x radial direction of sphere of action need to be kept parallel with screen width (horizontal) direction, while y radial direction is also inevitable high with screen It is parallel to spend (vertical) direction.It is rotated when sphere of action needs to follow the rotation of target image, then it needs to be determined that effect model The angle enclosed, the angle indicate that sphere of action needs to rotate how many angle to keep opposing stationary with the target image.Institute State the vector that angle can be made of two characteristic points G and HDirection determine, such as sphere of action X-axis with's Angle needs to keep a fixed value, and when the collected target image of imaging sensor rotates, the sphere of action is needed It will be withIt is kept fixed angle, makes corresponding rotation.
The record of the parameters of the above sphere of action is to calculate relative value for reference with characteristic point, and pass in image The actual parameter of sphere of action is calculated in the coordinate system of sensor, the disclosure is not limited the calculation of relative value, as long as It is able to record the mode of the relative value of sphere of action parameters, is used equally for the disclosure.
Fig. 4 is a kind of flow chart for strain image generation method embodiment three that the embodiment of the present disclosure provides, the embodiment In, on the basis of example 1, it further joined deformation amplitude setting steps.As shown in figure 4, may include walking as follows It is rapid:
The type of deformation is arranged in response to the type setting command received in S401;
The sphere of action of deformation is arranged in response to the range setting command received in S402;
X-direction and the Y-axis side of deformation effect range is arranged in response to receiving deformation amplitude setting command in S403 Upward deformation amplitude;
S404 generates deformation map according to the setting result treatment imaging sensor acquired image of above-mentioned setting command Picture.
In this embodiment, the setting command of deformation amplitude is further comprised, which is provided with sphere of action in the X-axis Deformation amplitude and deformation amplitude in Y direction.This can be set for the deformation of the types such as amplification, diminution, rotation Parameter, by taking amplification as an example, user can be set image in the X-axis direction and amplify 3 times, and image amplifies 2 times in the Y-axis direction, X-axis The amplification factor in the region between Y-axis can do gradual change processing;The deformation amplitude can be negative, negative number representation the type The reverse strain of deformation, such as the deformation for amplifying type, deformation amplitude are negative, then are equivalent to diminution deformation.In this way Available more diversified deformation process effect.
Fig. 5 is the structural schematic diagram for the strain image generating means embodiment one that the embodiment of the present disclosure provides, such as Fig. 5 institute Show, which includes: Deformation Types setup module 51, range setup module 52, deformation execution module 53.
The type of deformation is arranged for the type setting command in response to receiving in Deformation Types setup module 51;
The sphere of action of deformation is arranged for the range setting command in response to receiving in range setup module 52;
Deformation execution module 53, for the collected figure of setting result treatment imaging sensor according to above-mentioned setting command Picture generates strain image.
The method that Fig. 5 shown device can execute embodiment illustrated in fig. 1, the part that the present embodiment is not described in detail can join Examine the related description to embodiment illustrated in fig. 1.In implementation procedure and the technical effect embodiment shown in Figure 1 of the technical solution Description, details are not described herein.
Fig. 6 is the structural schematic diagram for the strain image generating means embodiment two that the embodiment of the present disclosure provides, such as
Shown in Fig. 6, on the basis of embodiment shown in Fig. 5, the device further include: display module 61.
The type of deformation is arranged for the type setting command in response to receiving in Deformation Types setup module 51;
The sphere of action of deformation is arranged for the range setting command in response to receiving in range setup module 52;
Display module 61 shows a standard picture in display device, and the sphere of action is shown in the standard On image;
Deformation execution module 53, for the collected figure of setting result treatment imaging sensor according to above-mentioned setting command Picture generates strain image.
The method that Fig. 6 shown device can execute embodiment illustrated in fig. 2, the part that the present embodiment is not described in detail can join Examine the related description to embodiment illustrated in fig. 2.In implementation procedure and the technical effect embodiment shown in Figure 2 of the technical solution Description, details are not described herein.
Fig. 7 is the structural schematic diagram for the strain image generating means embodiment three that the embodiment of the present disclosure provides.Such as
Shown in Fig. 7, on the basis of the embodiment described in Fig. 5, the device further include: amplitude setup module 71.
The type of deformation is arranged for the type setting command in response to receiving in Deformation Types setup module 51;
The sphere of action of deformation is arranged for the range setting command in response to receiving in range setup module 52;
Amplitude setup module 71, the deformation amplitude in X-direction and Y direction for deformation effect range to be arranged in;
Deformation execution module 53, for the collected figure of setting result treatment imaging sensor according to above-mentioned setting command Picture generates strain image.
The method that Fig. 7 shown device can execute embodiment illustrated in fig. 3, the part that the present embodiment is not described in detail can join Examine the related description to embodiment illustrated in fig. 3.In implementation procedure and the technical effect embodiment shown in Figure 3 of the technical solution Description, details are not described herein.
Fig. 8 is the hardware block diagram for illustrating electronic equipment according to an embodiment of the present disclosure.As shown in figure 8, according to the disclosure The electronic equipment 80 of embodiment includes memory 81 and processor 82.
The memory 81 is for storing non-transitory computer-readable instruction.Specifically, memory 81 may include one Or multiple computer program products, the computer program product may include various forms of computer readable storage mediums, example Such as volatile memory and/or nonvolatile memory.The volatile memory for example may include random access memory (RAM) and/or cache memory (cache) etc..The nonvolatile memory for example may include read-only memory (ROM), hard disk, flash memory etc..
The processor 82 can be central processing unit (CPU) or have data-handling capacity and/or instruction execution energy The processing unit of the other forms of power, and can control other components in electronic equipment 80 to execute desired function.? In one embodiment of the disclosure, which makes for running the computer-readable instruction stored in the memory 81 Obtain all or part of the steps that the electronic equipment 80 executes the strain image generation method of each embodiment of the disclosure above-mentioned.
Those skilled in the art will be understood that solve the technical issues of how obtaining good user experience effect, this It also may include structure well known to communication bus, interface etc. in embodiment, these well known structures should also be included in this hair Within bright protection scope.
Being described in detail in relation to the present embodiment can be with reference to the respective description in foregoing embodiments, and details are not described herein.
Fig. 9 is the schematic diagram for illustrating computer readable storage medium according to an embodiment of the present disclosure.As shown in figure 9, root According to the computer readable storage medium 90 of the embodiment of the present disclosure, it is stored thereon with non-transitory computer-readable instruction 91.When this When non-transitory computer-readable instruction 91 is run by processor, the strain image for executing each embodiment of the disclosure above-mentioned is generated The all or part of the steps of method.
Above-mentioned computer readable storage medium 90 includes but is not limited to: and optical storage media (such as: CD-ROM and DVD), magnetic Optical storage media (such as: MO), magnetic storage medium (such as: tape or mobile hard disk), with built-in rewritable nonvolatile The media (such as: storage card) of memory and media (such as: ROM box) with built-in ROM.
Being described in detail in relation to the present embodiment can be with reference to the respective description in foregoing embodiments, and details are not described herein.
Figure 10 is the hardware structural diagram for illustrating the terminal device according to the embodiment of the present disclosure.As shown in Figure 10, the shape Becoming image to generate terminal 100 includes above-mentioned strain image generating means embodiment.
The terminal device can be implemented in a variety of manners, and the terminal device in the disclosure can include but is not limited to such as Mobile phone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), navigation device, vehicle-mounted terminal equipment, vehicle-mounted display terminal, vehicle electronics rearview mirror etc. Mobile terminal device and such as number TV, desktop computer etc. fixed terminal equipment.
As the embodiment of equivalent replacement, which can also include other assemblies.As shown in Figure 10, the strain image Generating terminal 100 may include power supply unit 101, wireless communication unit 102, A/V (audio/video) input unit 103, user Input unit 104, sensing unit 105, interface unit 106, controller 107, output unit 108 and storage unit 109 etc..Figure 10 show the terminal with various assemblies, it should be understood that being not required for implementing all components shown, can also replace Implement more or fewer components in generation ground.
Wherein, wireless communication unit 102 allows the radio communication between terminal 100 and wireless communication system or network. A/V input unit 103 is for receiving audio or video signal.The order that user input unit 104 can be inputted according to user is raw At key input data with the various operations of controlling terminal equipment.Current state, the terminal 100 of the detection terminal 100 of sensing unit 105 Position, user it is mobile for the acceleration or deceleration of the orientation of the presence or absence of touch input of terminal 100, terminal 100, terminal 100 With direction etc., and generate order or the signal of operation for controlling terminal 100.Interface unit 106 is used as at least one External device (ED) connect with terminal 100 can by interface.Output unit 108 is configured to vision, audio and/or tactile side Formula provides output signal.Storage unit 109 can store the software program etc. of the processing and control operation that are executed by controller 107 Deng, or can temporarily store oneself data through exporting or will export.Storage unit 109 may include at least one type Storage medium.Moreover, terminal 100 can be with the network storage for the store function for executing storage unit 109 by network connection Device cooperation.The overall operation of the usual controlling terminal equipment of controller 107.In addition, controller 107 may include for reproduce or The multi-media module of multimedia playback data.Controller 107 can be with execution pattern identifying processing, by what is executed on the touchscreen Handwriting input or picture draw input and are identified as character or image.Power supply unit 101 receives outer under control of the controller 107 Portion's electric power or internal power and electric power appropriate needed for each element of operation and component are provided.
Such as computer software, hardware can be used in the various embodiments for the strain image generation method that the disclosure proposes Or any combination thereof computer-readable medium implement.Hardware is implemented, the strain image generation method that the disclosure proposes Various embodiments can be by using application-specific IC (ASIC), digital signal processor (DSP), digital signal Processing unit (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, controller, micro-control Device processed, is designed to execute at least one of electronic unit of function described herein to implement microprocessor, in some feelings Under condition, the various embodiments for the strain image generation method that the disclosure proposes can be implemented in controller 107.For software Implement, the disclosure propose strain image generation method various embodiments can with allow to execute at least one function or behaviour The individual software module made is implemented.Software code can be by the software application write with any programming language appropriate (or program) is implemented, and software code can store in storage unit 109 and executed by controller 107.
Being described in detail in relation to the present embodiment can be with reference to the respective description in foregoing embodiments, and details are not described herein.
The basic principle of the disclosure is described in conjunction with specific embodiments above, however, it is desirable to, it is noted that in the disclosure The advantages of referring to, advantage, effect etc. are only exemplary rather than limitation, must not believe that these advantages, advantage, effect etc. are the disclosure Each embodiment is prerequisite.In addition, detail disclosed above is merely to exemplary effect and the work being easy to understand With, rather than limit, it is that must be realized using above-mentioned concrete details that above-mentioned details, which is not intended to limit the disclosure,.
Device involved in the disclosure, device, equipment, system block diagram only as illustrative example and be not intended to It is required that or hint must be attached in such a way that box illustrates, arrange, configure.As those skilled in the art will appreciate that , it can be connected by any way, arrange, configure these devices, device, equipment, system.Such as "include", "comprise", " tool " etc. word be open vocabulary, refer to " including but not limited to ", and can be used interchangeably with it.Vocabulary used herein above "or" and "and" refer to vocabulary "and/or", and can be used interchangeably with it, unless it is not such that context, which is explicitly indicated,.Here made Vocabulary " such as " refers to phrase " such as, but not limited to ", and can be used interchangeably with it.
In addition, as used herein, the "or" instruction separation used in the enumerating of the item started with "at least one" It enumerates, so that enumerating for such as " at least one of A, B or C " means A or B or C or AB or AC or BC or ABC (i.e. A and B And C).In addition, wording " exemplary " does not mean that the example of description is preferred or more preferable than other examples.
It may also be noted that in the system and method for the disclosure, each component or each step are can to decompose and/or again Combination nova.These decompose and/or reconfigure the equivalent scheme that should be regarded as the disclosure.
The technology instructed defined by the appended claims can not departed from and carried out to the various of technology described herein Change, replace and changes.In addition, the scope of the claims of the disclosure is not limited to process described above, machine, manufacture, thing Composition, means, method and the specific aspect of movement of part.Can use carried out to corresponding aspect described herein it is essentially identical Function or realize essentially identical result there is currently or later to be developed processing, machine, manufacture, event group At, means, method or movement.Thus, appended claims include such processing, machine, manufacture, event within its scope Composition, means, method or movement.
The above description of disclosed aspect is provided so that any person skilled in the art can make or use this It is open.Various modifications in terms of these are readily apparent to those skilled in the art, and are defined herein General Principle can be applied to other aspect without departing from the scope of the present disclosure.Therefore, the disclosure is not intended to be limited to Aspect shown in this, but according to principle disclosed herein and the consistent widest range of novel feature.
In order to which purpose of illustration and description has been presented for above description.In addition, this description is not intended to the reality of the disclosure It applies example and is restricted to form disclosed herein.Although already discussed above multiple exemplary aspects and embodiment, this field skill Its certain modifications, modification, change, addition and sub-portfolio will be recognized in art personnel.

Claims (14)

1. a kind of strain image generation method characterized by comprising
In response to the type setting command received, the type of deformation is set;
In response to the range setting command received, the sphere of action of deformation is set;
According to the setting result treatment imaging sensor acquired image of above-mentioned setting command, strain image is generated.
2. strain image generation method as described in claim 1, which is characterized in that the type of the setting deformation, comprising:
The type parameter of deformation and the extent index of deformation are set.
3. strain image generation method as described in claim 1, which is characterized in that the sphere of action of the setting deformation, Include:
The shape of sphere of action is set, wherein the shape is described by multiple parameters;
The multiple parameter includes at least shape type parameter, center position parameter and length parameter.
4. strain image generation method as described in claim 1, which is characterized in that the setting according to above-mentioned setting command Result treatment imaging sensor acquired image generates strain image, comprising:
Deformation algorithm corresponding with set deformation is called, the pixel in the image being located in sphere of action is done at deformation Reason, obtains strain image.
5. strain image generation method as described in claim 1, which is characterized in that setting deformation sphere of action it Afterwards, further includes:
A standard picture is shown on the display apparatus, and the sphere of action is shown on standard picture.
6. strain image generation method as described in claim 5, which is characterized in that the sphere of action is being shown in mark After on quasi- image, further includes:
Standard picture is handled according to the setting result of above-mentioned setting command, generates the strain image of standard picture.
7. strain image generation method as claimed in claim 6, which is characterized in that according to the setting result of above-mentioned setting command Imaging sensor acquired image is handled, strain image is generated, comprising:
The characteristic point for obtaining standard picture passes through position of the fixed sphere of action of the characteristic point in standard picture;
From by identifying the first image corresponding with standard picture in imaging sensor institute acquired image;
The position fixed in standard picture is mapped in the first image;
Deformation process is done to the first image, generates strain image.
8. strain image generation method as claimed in claim 6, it is characterised in that:
The sphere of action includes indicating the center position parameter of sphere of action position;
The center position P of the sphere of action is by 3 characteristic points A, B, C and 2 linear difference coefficient lambdas1And λ2Description, tool Body are as follows:
P is located in the triangle being made of A, B, C, and D is the intersection point that the line segment extended line and line segment BC of P point are connected from A point, whereinWherein BD, BC, AP and AD respectively indicate the length of line segment.
9. strain image generation method as claimed in claim 6, it is characterised in that:
The sphere of action includes the length parameter for indicating sphere of action axial length;
The length parameter R of the sphere of action is described by 2 characteristic points E, F and length factor S, specifically:
R=EF × S
Wherein, the distance between EF E, F two o'clock, length factor S are calculated by EF and R.
10. strain image generation method as claimed in claim 6, it is characterised in that:
The sphere of action includes the angle parameter for indicating the rotation angle of sphere of action;
The angle parameter angle of the sphere of action is described by 2 characteristic points G, H, specifically:
Use vectorDirection, the reference direction in the direction as sphere of action.
11. strain image generation method as described in claim 1, which is characterized in that before generating strain image, also wrap It includes:
In response to receiving deformation amplitude setting command, the deformation in the X-direction and Y direction of deformation effect range is set Amplitude.
12. a kind of strain image generating means characterized by comprising
The type of deformation is arranged for the type setting command in response to receiving in Deformation Types setup module;
The sphere of action of deformation is arranged for the range setting command in response to receiving in range setup module;
Deformation execution module, it is raw for the setting result treatment imaging sensor acquired image according to above-mentioned setting command At strain image.
13. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one It manages device to execute, so that at least one described processor is able to carry out any strain image generation side claim 1-10 Method.
14. a kind of non-transient computer readable storage medium, which is characterized in that non-transient computer readable storage medium storage Computer instruction, the computer instruction are used to that computer perform claim to be made to require any strain image generation side 1-10 Method.
CN201810838408.4A 2018-07-27 2018-07-27 A kind of strain image generation method, device, electronic equipment and computer readable storage medium Pending CN109146770A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810838408.4A CN109146770A (en) 2018-07-27 2018-07-27 A kind of strain image generation method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810838408.4A CN109146770A (en) 2018-07-27 2018-07-27 A kind of strain image generation method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109146770A true CN109146770A (en) 2019-01-04

Family

ID=64798165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810838408.4A Pending CN109146770A (en) 2018-07-27 2018-07-27 A kind of strain image generation method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109146770A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111079588B (en) * 2019-12-03 2021-09-10 北京字节跳动网络技术有限公司 Image processing method, device and storage medium
CN117726499A (en) * 2023-05-29 2024-03-19 荣耀终端有限公司 Image deformation processing method, electronic device, and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096900A (en) * 2007-08-30 2011-06-15 精工爱普生株式会社 Image processing device, image processing method, and image processing program
CN103824253A (en) * 2014-02-19 2014-05-28 中山大学 Figure five sense organ deformation method based on image local precise deformation
CN107102803A (en) * 2017-04-27 2017-08-29 努比亚技术有限公司 A kind of image display method, equipment and computer-readable recording medium
CN108280883A (en) * 2018-02-07 2018-07-13 北京市商汤科技开发有限公司 It deforms the generation of special efficacy program file packet and deforms special efficacy generation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096900A (en) * 2007-08-30 2011-06-15 精工爱普生株式会社 Image processing device, image processing method, and image processing program
CN103824253A (en) * 2014-02-19 2014-05-28 中山大学 Figure five sense organ deformation method based on image local precise deformation
CN107102803A (en) * 2017-04-27 2017-08-29 努比亚技术有限公司 A kind of image display method, equipment and computer-readable recording medium
CN108280883A (en) * 2018-02-07 2018-07-13 北京市商汤科技开发有限公司 It deforms the generation of special efficacy program file packet and deforms special efficacy generation method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111079588B (en) * 2019-12-03 2021-09-10 北京字节跳动网络技术有限公司 Image processing method, device and storage medium
CN117726499A (en) * 2023-05-29 2024-03-19 荣耀终端有限公司 Image deformation processing method, electronic device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
KR102299764B1 (en) Electronic device, server and method for ouptting voice
CN110163048B (en) Hand key point recognition model training method, hand key point recognition method and hand key point recognition equipment
CN110766777B (en) Method and device for generating virtual image, electronic equipment and storage medium
CN108958610A (en) Special efficacy generation method, device and electronic equipment based on face
CN108986016B (en) Image beautifying method and device and electronic equipment
CN109064387A (en) Image special effect generation method, device and electronic equipment
CN108830787A (en) The method, apparatus and electronic equipment of anamorphose
US20150193951A1 (en) Displaying particle effect on screen of electronic device
CN109003224A (en) Strain image generation method and device based on face
CN108875594B (en) Face image processing method, device and storage medium
CN109063560A (en) Image processing method, device, computer readable storage medium and terminal
CN104050449A (en) Face recognition method and device
CN111383308B (en) Method for generating animation expression and electronic equipment
CN109118579A (en) The method, apparatus of dynamic generation human face three-dimensional model, electronic equipment
CN108830892A (en) Face image processing process, device, electronic equipment and computer readable storage medium
CN110072046A (en) Image composition method and device
CN108920368A (en) The method, apparatus and electronic equipment of data test
JP7383714B2 (en) Image processing method and device for animal faces
CN108921798A (en) The method, apparatus and electronic equipment of image procossing
CN109146770A (en) A kind of strain image generation method, device, electronic equipment and computer readable storage medium
CN113628221B (en) Image processing method, image segmentation model training method and related device
CN112149599B (en) Expression tracking method and device, storage medium and electronic equipment
CN114049674A (en) Three-dimensional face reconstruction method, device and storage medium
WO2021106855A1 (en) Data generation method, data generation device, model generation method, model generation device, and program
CN111507259B (en) Face feature extraction method and device and electronic equipment

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