CN105578035B - A kind of image processing method and electronic equipment - Google Patents

A kind of image processing method and electronic equipment Download PDF

Info

Publication number
CN105578035B
CN105578035B CN201510918099.8A CN201510918099A CN105578035B CN 105578035 B CN105578035 B CN 105578035B CN 201510918099 A CN201510918099 A CN 201510918099A CN 105578035 B CN105578035 B CN 105578035B
Authority
CN
China
Prior art keywords
subgraph
image
processed
composition
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510918099.8A
Other languages
Chinese (zh)
Other versions
CN105578035A (en
Inventor
王氚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201510918099.8A priority Critical patent/CN105578035B/en
Publication of CN105578035A publication Critical patent/CN105578035A/en
Application granted granted Critical
Publication of CN105578035B publication Critical patent/CN105578035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of image processing methods, the technical issues of may cause photo defect for solving the prior art when adjusting the position of photo main body or change photo length-width ratio.The described method includes: obtaining image to be processed;Detection obtains the first subgraph in the image to be processed;First subgraph includes the image information of at least one object;First object position is determined from least one target position that the image to be processed includes;First subgraph is moved to the first object position.The invention also discloses corresponding electronic equipments.

Description

A kind of image processing method and electronic equipment
Technical field
The present invention relates to electronic technology field more particularly to a kind of image processing methods and electronic equipment.
Background technique
Currently, more and more users are keen to clap as camera and mobile phone etc. have the universal of the equipment of shooting function Photo is taken the photograph, and easy post-processing can be carried out to photo by image processing software, for example, addition filter, photo are cut Cut out etc..
In the prior art, in order to be in the subject image (such as character image in photo) in photo in entire photo Meet in beautiful proportional positions, the method generallyd use is to cut out photo, or intelligence stretches photo size, passes through tensile diagram The length-width ratio of picture, and cooperate it is intelligent fill up scheme so that photo main body falls in and meets while entire photo length and width change In beautiful proportional positions.
However, photo defect can be made by directly cutting photo, and especially when edges include significant scenery, this side Method is lost more greatly caused by photo, and intelligence stretches photo and can change the original length-width ratio of photo, so as to cause the view of user Feel that experience is poor.
Summary of the invention
This application provides a kind of image processing method and electronic equipments, to solve the subject image in adjustment photo The technical issues of may cause photo defect when position or changing photo length-width ratio.
In a first aspect, providing a kind of information processing method, comprising:
Obtain image to be processed;
Detection obtains the first subgraph in the image to be processed;First subgraph includes at least one object Image information;
First object position is determined from least one target position that the image to be processed includes;
First subgraph is moved to the first object position.
Optionally, the method also includes:
According to the mode of composition of the image to be processed, at least one described target position is determined;The mode of composition packet Include trichotomy mode of composition, Fibonacci method mode of composition, balanced type mode of composition, symmetrical mode of composition or diagonal line structure At least one of figure mode.
Optionally, according to the trichotomy mode of composition of the image to be processed, at least one described target position, packet are determined It includes:
The length for obtaining the image to be processed determines the image to be processed in the longitudinal direction based on the length 3-point line position;And
The width for obtaining the image to be processed determines the image to be processed in the direction of the width based on the width 3-point line position;
Determine the intersection point of the 3-point line position on the 3-point line position and the width direction on the length direction for institute State at least one target position.
Optionally,
Before first subgraph is moved to the first object position, further includes:
Determine the boundary of first subgraph;
First subgraph is moved to the first object position, comprising:
Keep first subgraph constant, by being stretched and/or being compressed to the image outside the boundary so that institute It states the first subgraph and is moved to the first object position.
Optionally, by being stretched and being compressed to the image outside the boundary so that first subgraph is moved to institute State first object position, comprising:
According to position and the first object position of first subgraph in the image to be processed, from described The second subgraph and third subgraph are determined in the subgraph being located at outside the boundary that image to be processed includes;Wherein, described Second subgraph is subgraph pointed by the mobile direction of first subgraph, and the third subgraph is first son Subgraph pointed by the opposite direction in the mobile direction of image;
By compressing second subgraph, and the stretching third subgraph, so that first subgraph is moved to The first object position.
Second aspect provides a kind of electronic equipment, comprising:
Memory, for storing instruction;
Processor, for executing described instruction: obtaining image to be processed;Detection obtains first in the image to be processed Subgraph;First subgraph includes the image information of at least one object;Include from the image to be processed at least one First object position is determined in a target position;First subgraph is moved to the first object position.
Optionally, the processor is also used to:
According to the mode of composition of the image to be processed, at least one described target position is determined;The mode of composition packet Include trichotomy mode of composition, Fibonacci method mode of composition, balanced type mode of composition, symmetrical mode of composition or diagonal line structure At least one of figure mode.
Optionally, the processor is used for:
The length for obtaining the image to be processed determines the image to be processed in the longitudinal direction based on the length 3-point line position;And
The width for obtaining the image to be processed determines the image to be processed in the direction of the width based on the width 3-point line position;
Determine the intersection point of the 3-point line position on the 3-point line position and the width direction on the length direction for institute State at least one target position.
Optionally, the processor is also used to:
Before first subgraph is moved to the first object position, the side of first subgraph is determined Boundary;
Keep first subgraph constant, by being stretched and/or being compressed to the image outside the boundary so that institute It states the first subgraph and is moved to the first object position.
Optionally, the processor is used for:
According to position and the first object position of first subgraph in the image to be processed, from described The second subgraph and third subgraph are determined in the subgraph being located at outside the boundary that image to be processed includes;Wherein, described Second subgraph is subgraph pointed by the mobile direction of first subgraph, and the third subgraph is first son Subgraph pointed by the opposite direction in the mobile direction of image;
By compressing second subgraph, and the stretching third subgraph, so that first subgraph is moved to The first object position.
The third aspect provides a kind of electronic equipment, comprising:
First obtains module, for obtaining image to be processed;
Second obtains module, for detecting the first subgraph obtained in the image to be processed;First subgraph Image information including at least one object;
First determining module, for determining first object from least one target position that the image to be processed includes Position;
Mobile module, for first subgraph to be moved to the first object position.
In the application, electronic equipment can determine a mesh from least one target position included by image to be processed Cursor position, that is, first object position, then the first subgraph obtained from image to be processed is moved to first object position It sets.In this way, the first subgraph can be moved in the case where not changing the Aspect Ratio of image to be processed, it will not The defect of image is caused, the picture quality that user obtains is preferable, while also improving the image-capable of electronic equipment.
Detailed description of the invention
Fig. 1 is the flow chart of image processing method in the embodiment of the present invention;
Fig. 2 is the schematic diagram of the first mode of composition in the embodiment of the present invention;
Fig. 3 is the schematic diagram of second of mode of composition in the embodiment of the present invention;
Fig. 4 is the structural schematic diagram of electronic equipment in the embodiment of the present invention;
Fig. 5 is the structural block diagram of electronic equipment in the embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Electronic equipment in the embodiment of the present invention can be mobile phone, PC (personal computer), PAD (tablet computer) etc. no Same electronic equipment, the invention is not limited in this regard.
In addition, the terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates may exist Three kinds of relationships, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.Separately Outside, character "/" herein typicallys represent the relationship that forward-backward correlation object is a kind of "or" unless otherwise specified.
The preferred embodiment of the present invention is described in detail with reference to the accompanying drawing.
Referring to Figure 1, the embodiment of the present invention provides a kind of image processing method, and this method can be applied to electronic equipment, The process of this method is described as follows.
Step 101: obtaining image to be processed;
Step 102: detection obtains the first subgraph in image to be processed;First subgraph includes at least one object Image information;
Step 103: first object position is determined from least one target position that image to be processed includes;
Step 104: the first subgraph is moved to first object position.
Optionally, image to be processed can be the arbitrary image that electronic equipment can obtain, for example, image to be processed can To be stored in the image in electronic equipment, then electronic equipment directly can obtain image to be processed from local.Such as Image to be processed can be the image in network, then electronic equipment can download image to be processed from network.Such as Image to be processed can be stored in the image in another electronic equipment, then electronic equipment can by with another electronic equipment It interacts to obtain image to be processed, etc..
In the embodiment of the present invention, image to be processed may include arbitrary content, such as may include personage, scenery etc..
In the embodiment of the present invention, image to be processed can be the image of arbitrary format, such as JPEG (Joint Photographic Experts Group, Joint Photographic Experts Group) format, BMP (Bitmap, bitmap) format etc..
Lattice of the embodiment of the present invention for the acquisition modes of image to be processed, the content of image to be processed and image to be processed Formula etc. is with no restriction.
It may include one or more subgraphs in image to be processed, each subgraph may include at least one object Image information, the first subgraph can be any one subgraph included in image to be processed, therefore the first subgraph It also may include the image information of at least one object.For example, the first subgraph may include the image information of personage's first, or Person, the first subgraph also may include image information and image information of personage's second of personage's first, etc., the embodiment of the present invention This is not construed as limiting.
By carrying out image procossing (for example scratch figure) to image to be processed, can obtain included one in image to be processed Any one subgraph in the subgraph of acquisition can be determined as the first subgraph by a or multiple subgraphs.For from The mode of the first subgraph is determined in multiple subgraphs, such as can be determined at random by electronic equipment, or can also be by user Selection determination, etc., the embodiment of the present invention is not construed as limiting this.For example, including: the image comprising one tree in image to be processed The subgraph of the subgraph of information, the subgraph of image information comprising a people and the image information comprising a dog, that Electronic equipment can therefrom determine the first subgraph at random, such as can be by the subgraph of the image information comprising a people First subgraph, or can also therefrom select to determine the first subgraph with user, such as user's selection will include a dog Image information subgraph as first subgraph, etc..
It may include at least one of one or more target positions, that is, the embodiment of the present invention in image to be processed Target position, at least one target position can electronic equipment dispatch from the factory when set, or can also by user's sets itself, And it can also be modified as needed after setting.It, can be multiple from this if in image including multiple target positions A determining target position is as first object position in target position, in this case, the determination for first object position The mode embodiment of the present invention is not construed as limiting, such as can be determined at random by electronic equipment, or can also select to determine by user, Etc..
Optionally, for the mode of at least one determining target position, the embodiment of the present invention is also not construed as limiting.Such as it can be with At least one target position is determined according to the mode of composition of image to be processed, wherein mode of composition may include: trichotomy structure In figure mode, Fibonacci method mode of composition, balanced type mode of composition, symmetrical mode of composition or diagonal line mode of composition At least one, or can also include other any possible modes of composition, as long as can be determined from image to be processed to The mode of a few target position can be the mode of composition in the embodiment of the present invention.
The preferable target of visual effect can be more comprehensively determined in image to be processed by different modes of composition Position, for user selection target position it is more, electronic equipment is more intelligent, and the image-capable of electronic equipment compared with By force.
Below to several possible modes of composition, and according to mode of composition determine the method for at least one target position into Row explanation.
The first mode of composition:
Optionally, according to the trichotomy mode of composition of image to be processed, at least one target position is determined, comprising:
The length for obtaining image to be processed determines the 3-point line position of image to be processed in the longitudinal direction based on length; And
The width for obtaining image to be processed determines the 3-point line position of image to be processed in the direction of the width based on width;
The intersection point for determining the 3-point line position on length direction and the 3-point line position in width direction is at least one mesh Cursor position.
As shown in Fig. 2, on the length direction of image to be processed, by lines L3 and lines L4 by image averaging to be processed Ground is divided into three equal parts, and lines L3 and the position where lines L4 are the two 3-point line positions of image to be processed in the longitudinal direction It sets.Similarly, in the width direction of image to be processed, image averaging to be processed is divided by lines L1 and lines L2 third Part, then the position where lines L1 and lines L2 is the two 3-point line positions of image to be processed in the direction of the width.It is logical Four intersection positions can be determined in image to be processed by crossing lines L1, lines L2, lines L3 and lines L4, then can incite somebody to action Part intersection point in this four intersection points or the position where the intersection point of whole are determined as at least one of embodiment of the present invention Target position.
Usually in composition, the 3-point line that main body outstanding emphatically will be needed to be placed on image in an image can choose Intersection position on, preferable visual effect can be obtained in this way.Therefore, by trichotomy mode of composition, vision can be determined The preferable target position of effect, the image-capable of better user experience, electronic equipment are stronger.
Second of mode of composition:
At least one target position can be determined by the diagonal line mode of composition of image to be processed.For example, can be first Two of image to be processed or wherein a diagonal line are obtained, where partly or completely point that will be included on diagonal line Position be determined as at least one target position.
In general, will be needed in an image emphatically main body outstanding be placed on the diagonal line of whole image, can effectively benefit The sight of viewer is significantly guided into main body with the cornerwise length of picture, and visual effect is preferable, therefore, will be on diagonal line Point is determined as the mode of at least one target position, can obtain the preferable target position of appreciation effect, for a user, vision Experience preferably, while also improving the image-capable of electronic equipment.
The third mode of composition:
Optionally, at least one target position is determined, comprising:
It is closed according to the position of the 4th subgraph in image to be processed and the position of the 4th subgraph and the first subgraph System, determines at least one target position.
In practical applications, for it is some include multiple main objects image, for example, two people group photo photo, User may want to further the distance of two people, then can according to where one of people position and two people scheming Positional relationship as in determines at least one target position.
For example, as shown in figure 3, including two subgraphs in image to be processed: the such as image of the little girl comprising the left side The subgraph of information can be the 4th subgraph, and the subgraph of the image information of the spadger comprising the right can be the first subgraph Picture.As can be seen that spadger and little girl's distance are farther out, user may wish to further the distance of the two, then can be with Between subgraph in the image information of the little girl comprising the left side and the image information of the spadger comprising the right and distance The closer place in position where the subgraph of the image information of little girl comprising the left side determines lines L5, can be by lines L5 The position at place is determined as at least one target position, or can also will be where all or part of point included by lines L5 Position is determined as at least one target position.In this way, can more easily will be in image to be processed between different subgraphs Distance is furthered or is put far, and the image-capable of better user experience, electronic equipment is stronger.
In practical applications, mode of composition can there are many kinds of, cannot be illustrated one by one, it is above only to several compositions As long as mode for example, can determine that the mode of composition of target position all covers of the invention from image to be processed In protection scope.
Optionally, first object position may be the position where a point, since the first subgraph may be by very much The image of a point composition, makes then the first subgraph can be moved by the central point of the first subgraph and first object position pair The point answered is overlapped, or can also determine a point at random by electronic equipment in the first subgraph, so that the point after movement It corresponding with first object position can put and be overlapped, or the position of a point can also be selected in the first image by user, Enable after movement the position of the point it is corresponding with first object position point be overlapped, etc., the embodiment of the present invention to this not It limits.For example, continuing with referring to fig. 2, for example the position of point A is first object position, the corresponding figure of the bird in the lower right corner As being the first subgraph, user can choose determination, and the point B point A corresponding with first object position at bird eyes is heavy It closes.
Alternatively, first object position is also possible to be the position where a line, make then the first subgraph can be moved The center line of first subgraph is overlapped with first object position, or a line can also be determined in the first subgraph, so that The lines after movement can line corresponding with first object position be overlapped, in this case, determined in the first image Lines can be to be determined at random by electronic equipment, can also be selected by user determining, etc..The embodiment of the present invention does not limit this It is fixed.Position for example, continuing with referring to fig. 2, such as where lines L4 is first object position, and the bird in the lower right corner is corresponding Image is the first subgraph, can determine lines L0 and the first mesh included in the corresponding image of bird at random by electronic equipment The corresponding lines L4 of cursor position is overlapped.
Optionally, before the first subgraph is moved to first object position, further includes:
Determine the boundary of the first subgraph;
First subgraph is moved to first object position, comprising:
It keeps the first subgraph constant, stretched through the image of opposite side out-of-bounds and/or is compressed so that the first subgraph It is moved to first object position.
The boundary of first subgraph can be the edge wheel profile of the first subgraph, can by edge detection or its The method of his image procossing obtains.Alternatively, the boundary of the first subgraph is also possible to one comprising including the first subgraph Fixed shape, for example, can be the frame, etc. of the ellipse external with the first subgraph.The embodiment of the present invention is for first The method of determination on the boundary of subgraph is not construed as limiting.
After the boundary that the first subgraph has been determined, the first subgraph can be moved, mobile mode can To be: keep the first subgraph constant, that is, keep the Aspect Ratio of part in the boundary of the first subgraph, area and The parameters such as pixel value do not change, are then stretched and/or are compressed through the part outside the boundary to the first subgraph, in turn First subgraph is moved to first object position.In this way, the ratio that the first subgraph will not be changed, after processing Image it is more true to nature, user's visual experience is preferable, and the image-capable of electronic equipment is stronger.
Optionally, it is stretched and is compressed so that the first subgraph is moved to first object position by the image of opposite side out-of-bounds It sets, comprising:
According to position and first object position of first subgraph in image to be processed, include from image to be processed The second subgraph and third subgraph are determined in the subgraph outside boundary;Wherein, the second subgraph is the shifting of the first subgraph Subgraph pointed by dynamic direction, third subgraph are subgraph pointed by the opposite direction in the mobile direction of the first subgraph Picture;
By compressing the second subgraph, and stretching third subgraph, so that the first subgraph is moved to first object position.
Second subgraph can be subgraph pointed by the direction that the first subgraph to be moved, for the second subgraph Which parts of images pointed by the direction to be moved of specially the first subgraph, the embodiment of the present invention are not construed as limiting.For example, It is in image to be processed, the first subgraph is mobile toward the left side, then whole or the portion on the first subgraph left side can will be located at Partial image is as the second subgraph;Such as in image to be processed, the first subgraph is up moved, then can be with All or part of image above the first subgraph will be located at as the second subgraph.
For compressing the mode of the second subgraph, the embodiment of the present invention is not construed as limiting, to be compressed in the horizontal direction For, several possible modes are illustrated below:
The spacing between each column pixel can equidistantly be reduced, for example, can according to need compression length, with And the columns of the pixel for the subgraph to be compressed, calculate the value that reduced spacing is needed between each column pixel.For example, will 1 centimetre of compression of images, include 200 column pixels on the image to be compressed, then can calculate needs between each column pixel Reduce 0.05 millimeter of spacing, therefore the spacing between every two column pixel is reduced 0.05 millimeter just can be by compression of images 1 centimetre.
Alternatively, can be in such a way that pixel be deleted, for example, can detecte multiple row picture adjacent in the image for needing to compress The variation of color between vegetarian refreshments, if there is there is color change between several column pixels less even without color change, then One or more columns per page pixel can be deleted in this several column pixel, if the columns length in total for the pixel deleted with want The equal length of compression.
It can also be above using the identical mode compressed with horizontal direction likewise, being compressed in vertical direction Mode be that the method for compression is illustrated, can be compressed using one such mode in practical application, Various ways can be integrated to be compressed, the embodiment of the present invention is not construed as limiting.
Third subgraph can be subgraph pointed by the opposite direction in the direction that the first subgraph to be moved, for Three subgraphs are specially which parts of images, the embodiment of the present invention pointed by the opposite direction in the direction to be moved of the first subgraph It is not construed as limiting.For example, in image to be processed, the first subgraph is mobile toward the left side, then the first subgraph can will be located at As all or part of image on the right is as the second subgraph;It is such as in image to be processed, the first subgraph is past Upper movement, then all or part of image below the first subgraph can will be located at as the second subgraph.
For stretching the mode of third subgraph, the embodiment of the present invention is not construed as limiting, equally to carry out in the horizontal direction For stretching, several possible modes are illustrated below:
The spacing between each column pixel can equidistantly be increased, for example, can according to need stretching length, with And the columns of the pixel for the subgraph to be stretched, calculate the value for the spacing for needing to increase between each column pixel.For example, will 1 centimetre of image stretch, include 200 column pixels on the image of Yao Lashen, then can calculate needs between each column pixel 0.05 millimeter of spacing is increased, therefore the spacing between every two column pixel is increased 0.05 millimeter.
Alternatively, can be in such a way that pixel be filled up, for example, can detecte every two column adjacent in the image for needing to stretch The variation of color between pixel can be at this if two column pixel color changes are less even without color change The pixel that increase by one arranges between two column pixels or several column colors are same or similar, if same or similar with two column colors Pixel is one group, then only pixel can be increased in one group of pixel wherein, it can also be respectively in multiple groups pixel Inside increase pixel, as long as the length that the columns of increased pixel adds up and the equal length to be stretched.
It can also be above using the identical mode stretched with horizontal direction likewise, being stretched in vertical direction Mode be that the method for stretching is illustrated, can be stretched using one such mode in practical application, Various ways can be integrated to be stretched, the embodiment of the present invention is not construed as limiting.
For example, as shown in figure 3, the subgraph of the image information of the spadger comprising the right can be the first subgraph, line Position where L5 can be first object position.The subgraph of the image information of spadger comprising the right is moved to On position where lines L5, then the complete of the subgraph left side of the image information positioned at the spadger comprising the right can be determined Portion's subgraph is the second subgraph, or can also determine the subgraph and packet of the image information positioned at the spadger comprising the right Parts of images between the subgraph of the image information of little girl containing the left side is second subgraph, etc..Wherein, third subgraph As can be the image on the right of the subgraph of the image information of the spadger comprising the right.By being carried out to the second subgraph Compression, and third subgraph is stretched, it just can be realized and the corresponding subgraph of spadger be moved to where lines L5 Position on.
By above mode, first subgraph more convenient, efficiently can be moved in image to be processed The image-capable of one target position, electronic equipment is stronger.
Fig. 4 is referred to, based on the same inventive concept, the embodiment of the present invention provides a kind of electronic equipment, which can To include:
Memory 401, for storing instruction;
Processor 402, for executing the instruction of the storage of memory 401: obtaining image to be processed;Detection obtains figure to be processed The first subgraph as in;First subgraph includes the image information of at least one object;It include at least from image to be processed First object position is determined in one target position;First subgraph is moved to first object position.
Optionally, processor 402 is also used to:
According to the mode of composition of image to be processed, at least one target position is determined;Mode of composition includes trichotomy composition In mode, Fibonacci method mode of composition, balanced type mode of composition, symmetrical mode of composition or diagonal line mode of composition extremely Few one kind.
Optionally, processor 402 is used for:
The length for obtaining image to be processed determines the 3-point line position of image to be processed in the longitudinal direction based on length; And
The width for obtaining image to be processed determines the 3-point line position of image to be processed in the direction of the width based on width;
The intersection point for determining the 3-point line position on length direction and the 3-point line position in width direction is at least one mesh Cursor position.
Optionally, processor 402 is also used to:
Before the first subgraph is moved to first object position, the boundary of the first subgraph is determined;
It keeps the first subgraph constant, stretched through the image of opposite side out-of-bounds and/or is compressed so that the first subgraph It is moved to first object position.
Optionally, processor 402 is used for:
According to position and first object position of first subgraph in image to be processed, include from image to be processed The second subgraph and third subgraph are determined in the subgraph outside boundary;Wherein, the second subgraph is the shifting of the first subgraph Subgraph pointed by dynamic direction, third subgraph are subgraph pointed by the opposite direction in the mobile direction of the first subgraph Picture;
By compressing the second subgraph, and stretching third subgraph, so that the first subgraph is moved to first object position.
Fig. 5 is referred to, based on the same inventive concept, the embodiment of the present invention provides another electronic equipment, the electronic equipment May include:
First obtains module 501, for obtaining image to be processed;
Second obtains module 502, for detecting the first subgraph obtained in image to be processed;First subgraph includes extremely The image information of a few object;
First determining module 503, for determining first object from least one target position that image to be processed includes Position;
Mobile module 504, for the first subgraph to be moved to first object position.
Optionally, the first determining module 503 is also used to:
According to the mode of composition of the image to be processed, at least one described target position is determined;The mode of composition packet Include trichotomy mode of composition, Fibonacci method mode of composition, balanced type mode of composition, symmetrical mode of composition or diagonal line structure At least one of figure mode.
Optionally, the first determining module 503 is used for:
The length for obtaining the image to be processed determines the image to be processed in the longitudinal direction based on the length 3-point line position;And
The width for obtaining the image to be processed determines the image to be processed in the direction of the width based on the width 3-point line position;
Determine the intersection point of the 3-point line position on the 3-point line position and the width direction on the length direction for institute State at least one target position.
Optionally, electronic equipment further include:
Second determining module, for determining the boundary of first subgraph;
Mobile module 504 is used for:
Keep first subgraph constant, by being stretched and/or being compressed to the image outside the boundary so that institute It states the first subgraph and is moved to the first object position.
Optionally, mobile module 504 is used for:
According to position and the first object position of first subgraph in the image to be processed, from described The second subgraph and third subgraph are determined in the subgraph being located at outside the boundary that image to be processed includes;Wherein, described Second subgraph is subgraph pointed by the mobile direction of first subgraph, and the third subgraph is first son Subgraph pointed by the opposite direction in the mobile direction of image;
By compressing second subgraph, and the stretching third subgraph, so that first subgraph is moved to The first object position.
In the embodiment of the present invention, electronic equipment can be determined from least one target position included by image to be processed One target position, that is, first object position, then the first subgraph obtained from image to be processed is moved to first Target position.In this way, the first subgraph can be moved in the case where not changing the Aspect Ratio of image to be processed Picture not will cause the defect of image, and the picture quality that user obtains is preferable, while also improving the image procossing energy of electronic equipment Power.
It is apparent to those skilled in the art that for convenience and simplicity of description, only with above-mentioned each function The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds Block is completed, i.e., the internal structure of device is divided into different functional modules, to complete all or part of function described above Energy.The specific work process of the system, apparatus, and unit of foregoing description, can be with reference to corresponding in preceding method embodiment Journey, details are not described herein.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the module or unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to 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 unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the application The all or part of the steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, ROM (Read- Only Memory, read-only memory), RAM (Random Access Memory, random access memory), magnetic or disk Etc. the various media that can store program code.
Specifically, the corresponding computer program instructions of one of embodiment of the present invention image processing method can be deposited It stores up on CD, hard disk, the storage mediums such as USB flash disk, when the computer journey corresponding with a kind of image processing method in storage medium Sequence instruction is read or is performed by an electronic equipment, includes the following steps:
Obtain image to be processed;
Detection obtains the first subgraph in the image to be processed;First subgraph includes at least one object Image information;
First object position is determined from least one target position that the image to be processed includes;
First subgraph is moved to the first object position.
Optionally, other computer instruction is also stored in the storage medium, which exists During being performed, comprising:
According to the mode of composition of the image to be processed, at least one described target position is determined;The mode of composition packet Include trichotomy mode of composition, Fibonacci method mode of composition, balanced type mode of composition, symmetrical mode of composition or diagonal line structure At least one of figure mode.
Optionally, stored in the storage medium and step: according to the trichotomy mode of composition of the image to be processed, Determine at least one described target position, corresponding computer instruction is during being performed, comprising:
The length for obtaining the image to be processed determines the image to be processed in the longitudinal direction based on the length 3-point line position;And
The width for obtaining the image to be processed determines the image to be processed in the direction of the width based on the width 3-point line position;
Determine the intersection point of the 3-point line position on the 3-point line position and the width direction on the length direction for institute State at least one target position.
Optionally, first subgraph store in the storage medium and step: is moved to the first object Position, corresponding computer instruction is before being executed, further includes: determines the boundary of first subgraph;
Store in the storage medium and step: being moved to the first object position for first subgraph, right The computer instruction answered is during being performed, comprising: keeps first subgraph constant, by the figure outside the boundary As being stretched and/or being compressed so that first subgraph is moved to the first object position.
Optionally, stored in the storage medium and step: by the way that the image outside the boundary is stretched and pressed Contracting is so that first subgraph is moved to the first object position, and corresponding computer instruction is during being performed, packet It includes:
According to position and the first object position of first subgraph in the image to be processed, from described The second subgraph and third subgraph are determined in the subgraph being located at outside the boundary that image to be processed includes;Wherein, described Second subgraph is subgraph pointed by the mobile direction of first subgraph, and the third subgraph is first son Subgraph pointed by the opposite direction in the mobile direction of image;
By compressing second subgraph, and the stretching third subgraph, so that first subgraph is moved to The first object position.
The above, above embodiments are only to be described in detail technical solution of the present invention, but the above implementation The explanation of example is merely used to help understand method and its core concept of the invention, should not be construed as limiting the invention.This In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those skilled in the art, should all cover Within protection scope of the present invention.

Claims (9)

1. a kind of image processing method, comprising:
Obtain image to be processed;
Detection obtains the first subgraph in the image to be processed;First subgraph includes the image of at least one object Information;
First object position is determined from least one target position that the image to be processed includes;
First subgraph is moved to the first object position,
It wherein, further include determining first subgraph before first subgraph is moved to the first object position The boundary of picture, and
First subgraph is moved to the first object position, comprising: keep first subgraph constant, by right Image outside the boundary is stretched and/or is compressed so that first subgraph is moved to the first object position.
2. the method according to claim 1, wherein the method also includes:
According to the mode of composition of the image to be processed, at least one described target position is determined;The mode of composition includes three Point-score mode of composition, Fibonacci method mode of composition, balanced type mode of composition, symmetrical mode of composition or diagonal line composition side At least one of formula.
3. according to the method described in claim 2, it is characterized in that, according to the trichotomy mode of composition of the image to be processed, Determine at least one described target position, comprising:
The length for obtaining the image to be processed determines three points of the image to be processed in the longitudinal direction based on the length Line position;And
The width for obtaining the image to be processed determines three points of the image to be processed in the direction of the width based on the width Line position;
Determine the intersection point of the 3-point line position on the 3-point line position and the width direction on the length direction for described in extremely A few target position.
4. the method according to claim 1, wherein by the way that the image outside the boundary is stretched and is compressed So that first subgraph is moved to the first object position, comprising:
According to position and the first object position of first subgraph in the image to be processed, from described to from The second subgraph and third subgraph are determined in the subgraph being located at outside the boundary that reason image includes;Wherein, described second Subgraph is subgraph pointed by the mobile direction of first subgraph, and the third subgraph is first subgraph Subgraph pointed by the opposite direction in mobile direction;
By compressing second subgraph, and stretch the third subgraph so that first subgraph be moved to it is described First object position.
5. a kind of electronic equipment, comprising:
Memory, for storing instruction;
Processor, for executing described instruction:
Obtain image to be processed;
Detection obtains the first subgraph in the image to be processed;First subgraph includes the image of at least one object Information;
First object position is determined from least one target position that the image to be processed includes;
First subgraph is moved to the first object position,
Wherein the processor is also used to:
Before first subgraph is moved to the first object position, the boundary of first subgraph is determined;
Keep first subgraph constant, by being stretched and/or being compressed to the image outside the boundary so that described One subgraph is moved to the first object position.
6. electronic equipment according to claim 5, which is characterized in that the processor is also used to:
According to the mode of composition of the image to be processed, at least one described target position is determined;The mode of composition includes three Point-score mode of composition, Fibonacci method mode of composition, balanced type mode of composition, symmetrical mode of composition or diagonal line composition side At least one of formula.
7. electronic equipment according to claim 6, which is characterized in that the processor is used for:
The length for obtaining the image to be processed determines three points of the image to be processed in the longitudinal direction based on the length Line position;And
The width for obtaining the image to be processed determines three points of the image to be processed in the direction of the width based on the width Line position;
Determine the intersection point of the 3-point line position on the 3-point line position and the width direction on the length direction for described in extremely A few target position.
8. electronic equipment according to claim 5, which is characterized in that the processor is used for:
According to position and the first object position of first subgraph in the image to be processed, from described to from The second subgraph and third subgraph are determined in the subgraph being located at outside the boundary that reason image includes;Wherein, described second Subgraph is subgraph pointed by the mobile direction of first subgraph, and the third subgraph is first subgraph Subgraph pointed by the opposite direction in mobile direction;
By compressing second subgraph, and stretch the third subgraph so that first subgraph be moved to it is described First object position.
9. a kind of electronic equipment, comprising:
First obtains module, for obtaining image to be processed;
Second obtains module, for detecting the first subgraph obtained in the image to be processed;First subgraph includes The image information of at least one object;
First determining module, for determining first object position from least one target position that the image to be processed includes It sets;
Mobile module, for first subgraph to be moved to the first object position,
Wherein the electronic equipment further includes the second determining module, for determining the boundary of first subgraph, and
The mobile module is used for: keep first subgraph constant, by the image outside the boundary stretch and/ Or compression is so that first subgraph is moved to the first object position.
CN201510918099.8A 2015-12-10 2015-12-10 A kind of image processing method and electronic equipment Active CN105578035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510918099.8A CN105578035B (en) 2015-12-10 2015-12-10 A kind of image processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510918099.8A CN105578035B (en) 2015-12-10 2015-12-10 A kind of image processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN105578035A CN105578035A (en) 2016-05-11
CN105578035B true CN105578035B (en) 2019-03-29

Family

ID=55887643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510918099.8A Active CN105578035B (en) 2015-12-10 2015-12-10 A kind of image processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN105578035B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108366203B (en) * 2018-03-01 2020-10-13 北京金山安全软件有限公司 Composition method, composition device, electronic equipment and storage medium
CN111107281B (en) * 2019-12-30 2022-04-12 维沃移动通信有限公司 Image processing method, image processing apparatus, electronic device, and medium
CN111614901A (en) * 2020-05-27 2020-09-01 惠州Tcl移动通信有限公司 Image shooting method and device, storage medium and terminal
CN111756998B (en) * 2020-06-22 2021-07-13 维沃移动通信有限公司 Composition method, composition device and electronic equipment
CN113489918A (en) * 2020-10-28 2021-10-08 青岛海信电子产业控股股份有限公司 Terminal device, server and virtual photo-combination method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1497938A (en) * 2002-09-30 2004-05-19 ������������ʽ���� Image editing method, image editing device, program and storage medium
CN102843517A (en) * 2012-09-04 2012-12-26 京东方科技集团股份有限公司 Image processing method and device as well as display equipment
CN103544685A (en) * 2013-10-22 2014-01-29 华南理工大学 Method and system for beautifying composition of image based on main body adjustment
CN104243787A (en) * 2013-06-06 2014-12-24 华为技术有限公司 Photographing method and equipment, and photo management method
CN104935810A (en) * 2015-05-29 2015-09-23 努比亚技术有限公司 Photographing guiding method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130106990A1 (en) * 2011-11-01 2013-05-02 Microsoft Corporation Planar panorama imagery generation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1497938A (en) * 2002-09-30 2004-05-19 ������������ʽ���� Image editing method, image editing device, program and storage medium
CN102843517A (en) * 2012-09-04 2012-12-26 京东方科技集团股份有限公司 Image processing method and device as well as display equipment
CN104243787A (en) * 2013-06-06 2014-12-24 华为技术有限公司 Photographing method and equipment, and photo management method
CN103544685A (en) * 2013-10-22 2014-01-29 华南理工大学 Method and system for beautifying composition of image based on main body adjustment
CN104935810A (en) * 2015-05-29 2015-09-23 努比亚技术有限公司 Photographing guiding method and device

Also Published As

Publication number Publication date
CN105578035A (en) 2016-05-11

Similar Documents

Publication Publication Date Title
CN105578035B (en) A kind of image processing method and electronic equipment
CN107079141B (en) Image mosaic for 3 D video
EP3349182A1 (en) Method, apparatus and stream for immersive video format
CN102741879B (en) Method for generating depth maps from monocular images and systems using the same
US20170285916A1 (en) Camera effects for photo story generation
CN106200918B (en) A kind of information display method based on AR, device and mobile terminal
CN109690620A (en) Threedimensional model generating means and threedimensional model generation method
CN104811684B (en) A kind of three-dimensional U.S. face method and device of image
CN102271262B (en) Multithread-based video processing method for 3D (Three-Dimensional) display
CN102694969A (en) Image processing device and image processing method
CN108109161B (en) Video data real-time processing method and device based on self-adaptive threshold segmentation
CN110288534B (en) Image processing method, device, electronic equipment and storage medium
WO2013054462A1 (en) User interface control device, user interface control method, computer program, and integrated circuit
CN104394422A (en) Video segmentation point acquisition method and device
CN108111911B (en) Video data real-time processing method and device based on self-adaptive tracking frame segmentation
US11538138B2 (en) Methods and apparatus for applying motion blur to overcaptured content
CN107240147B (en) Image rendering method and system
DE112016002023T5 (en) Interpolation of views for telling visual stories
JP2013542505A (en) Method and apparatus for censoring content in an image
US10277877B2 (en) 3D system including a neural network
CN106598250B (en) A kind of VR display methods, device and electronic equipment
JP2022031304A (en) Video conversion system, video conversion method, and video conversion program
DE102021119882A1 (en) VIDEO BACKGROUND ESTIMATION USING SPATIAL-TEMPORAL MODELS
CN104378620B (en) Image processing method and electronic device
CN114758027A (en) Image processing method, image processing device, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant