CN105678696A - Image acquisition method and electronic equipment - Google Patents

Image acquisition method and electronic equipment Download PDF

Info

Publication number
CN105678696A
CN105678696A CN201410670018.2A CN201410670018A CN105678696A CN 105678696 A CN105678696 A CN 105678696A CN 201410670018 A CN201410670018 A CN 201410670018A CN 105678696 A CN105678696 A CN 105678696A
Authority
CN
China
Prior art keywords
picture
prospect image
image
degree
size
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410670018.2A
Other languages
Chinese (zh)
Other versions
CN105678696B (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 CN201410670018.2A priority Critical patent/CN105678696B/en
Priority to US14/658,756 priority patent/US9607394B2/en
Publication of CN105678696A publication Critical patent/CN105678696A/en
Application granted granted Critical
Publication of CN105678696B publication Critical patent/CN105678696B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses an information processing method comprising the following steps: acquiring a first operation for selecting a foreground image from a first picture; determining the foreground image in the first picture based on the first operation; acquiring the state information of the foreground image; acquiring a second operation for putting the foreground image in a second picture; determining the second picture used as a background based on the second operation; acquiring the state information of the second picture; determining the target size of the foreground image in the second picture according to the state information of the foreground image and the state information of the second picture; scaling the foreground image to the target size; and displaying the foreground image at the target size in the second picture, and presenting the foreground image to users. The invention further discloses electronic equipment.

Description

A kind of information processing method and electronics
Technical field
The present invention relates to electronic technology, particularly relate to a kind of information processing method and electronics.
Background technology
Background replacement is a common function in picture editting's application software. It is such process that background is replaced: by the object O in a width picture A, being placed in another width picture B as prospect, wherein object O is called as foreground object or prospect image. In this process that background is replaced, it usually needs foreground object O is carried out contracting and puts. Foreground object is carried out contracting put, generally have two reasons: first reason is, put the scale size coupling making foreground object O and picture B in human vision by contracting; 2nd reason is, after foreground object O is moved to picture B, it is necessary to contracting to foreground object O to put adapts to new background (i.e. picture B). These manual contractings are let slip journey and are made the learning difficulty of background replacement function bigger, for amateur editor and be not easy grasp.
Summary of the invention
In view of this, the embodiment of the present invention is for solving at least one problem of existence in prior art and provide a kind of information processing method and electronics, it is possible to auto zoom prospect image, thus promotes Consumer's Experience.
The technical scheme of the embodiment of the present invention is achieved in that
First aspect, the embodiment of the present invention provides a kind of information processing method, and described method comprises:
Obtaining the first operation, described first operation is for choosing prospect image from the first picture;
Based on described first operation, it is determined that be arranged in the prospect image of the first picture;
Obtain the status information of described prospect image;
Obtaining the 2nd operation, described 2nd operation is for being placed in second picture by described prospect image;
Based on described 2nd operation, it is determined that as the second picture of background;
Obtain the status information of described second picture;
Status information according to described prospect image and the status information of described second picture, it is determined that the target size that described prospect image is occupied in described second picture;
Described prospect image is scaled described target size;
Described prospect image is displayed in described second picture with described target size, presents to user.
Second aspect, the embodiment of the present invention provides a kind of electronics, described electronics comprises the first acquiring unit, the first determining unit, the 2nd acquiring unit, the 3rd acquiring unit, the 2nd determining unit, the 4th acquiring unit, the 3rd determining unit, unit for scaling and display unit, wherein:
Described first acquiring unit, for obtaining the first operation, described first operation is for choosing prospect image from the first picture;
Described first determining unit, for based on described first operation, it is determined that be arranged in the prospect image of the first picture;
Described 2nd acquiring unit, for obtaining the status information of described prospect image;
Described 3rd acquiring unit, for obtaining the 2nd operation, described 2nd operation is for being placed in second picture by described prospect image;
Described 2nd determining unit, for based on described 2nd operation, it is determined that as the second picture of background;
Described 4th acquiring unit, for obtaining the status information of described second picture;
Described 3rd determining unit, for the status information of the status information according to described prospect image and described second picture, it is determined that the target size that described prospect image is occupied in described second picture;
Described unit for scaling, for being scaled described target size by described prospect image;
Described display unit, for being displayed in described second picture with described target size by described prospect image, presents to user.
The information processing method that the embodiment of the present invention provides and electronics, wherein: obtain the first operation, described first operation is for choosing prospect image from the first picture; Based on described first operation, it is determined that be arranged in the prospect image of the first picture; Obtain the status information of described prospect image; Obtaining the 2nd operation, described 2nd operation is for being placed in second picture by described prospect image; Based on described 2nd operation, it is determined that as the second picture of background; Obtain the status information of described second picture; Status information according to described prospect image and the status information of described second picture, it is determined that the target size that described prospect image is occupied in described second picture; Described prospect image is scaled described target size; Described prospect image is displayed in described second picture with described target size, presents to user; So, it is possible to auto zoom prospect image, thus promote Consumer's Experience.
Accompanying drawing explanation
Fig. 1-1 is the realization flow schematic diagram of the embodiment of the present invention one information processing method;
Fig. 1-2 to Fig. 1-5 is the operation schematic diagram that in the embodiment of the present invention one, first operation and the 2nd is operating as the action with continuity;
Fig. 1-6 to Fig. 1-10 is the operation schematic diagram that in the embodiment of the present invention one, first operation and the 2nd is operating as two actions;
Fig. 2 is the realization flow schematic diagram of the embodiment of the present invention two information processing method;
Fig. 3 is the composition structural representation of the embodiment of the present invention three electronics.
Embodiment
The embodiment of the present invention provides a kind of information processing method, belong to image processing field, it is applied to electronics, described electronics comprises the terminals such as smart mobile phone, panel computer, notebook computer, desktop computer, navigating instrument, personal digital assistant (PDA), electronics reader, described electronics can run application program (hereinafter referred to as application), and this application at least comprises an application for editing picture; The electronics of the embodiment of the present invention preferably can also comprise an image acquisition units such as camera, and this camera is except having except the imaging function of common camera, and this camera can also be used to get the degree of depth information of captured object. In specific implementation process, this camera can be array camera (ArrayCamera), array camera is made up of multiple optical system and multiple image sensor, array camera can gather two or more pictures simultaneously, then form image by algorithm generated data, and algorithm can be adopted to estimate degree of depth information.Multiple sensors in array camera also contribute to creating various special-effect, and such as it can select any object to focus, and any object in scene can be selected again to focus when taking pictures or after shooting; Array camera can also be focused multiple object.
The information processing method that the embodiment of the present invention provides can be realized by the treater calling program code in electronics, or this information processing method embodies with application program, the production firm of electronics can directly preset in the electronic device for user institute, certain user can also download this application program such as picture editor from application shop and apply, regardless of which kind of mode, this information processing manner can be kept in computer-readable storage medium in the way of program code. It should be noted that, this electronics is except comprising treater and storage media, it is also possible to comprise above-mentioned array shooting first-class.
Below in conjunction with the drawings and specific embodiments, the technical solution of the present invention is further elaborated.
Fig. 1-1 is the realization flow schematic diagram of the embodiment of the present invention one information processing method, and as Figure 1-1, the method comprises:
Step 101, obtains the first operation, and described first operation is for choosing prospect image from the first picture; Based on described first operation, it is determined that be arranged in the prospect image of the first picture;
Here, described first operation can be default action, in the process of specific implementation, first operation can be default action during picture editor applies, such as, start picture editor's application, utilize described picture editor application to open the first picture, then the instrument such as selected instrument, the clipping tool etc. that carry in adopting picture editor to apply choose an object from the first picture, using this object as prospect image. Can certainly there is easier operating method, such as, if the display unit of electronics is touch-sensitive display screen, so user can grow by certain object in the first picture, using this object as foreground object, wherein long by referring to that operating body stops more than certain threshold value on object, such as, stopping and within more than 2 seconds, think long by operation, operating body can be finger can also be pointer, adopt finger long can be on time adopt single finger long by or two finger length by.
Here, described first picture is made up of pixel, and each pixel can comprise lower column information, as: colouring information and degree of depth information. Wherein colouring information can be adopt gray scale information to represent, it is also possible to adopts chromatic information to represent, when adopting gray scale information and the expression of color only brightness, can be represented by saturation ratio, tone, brightness when adopting chromatic information to represent.
Step 102, obtains the status information of described prospect image;
Here, described status information at least comprises size occupied by object in degree of depth information and picture, and described size refers to the size in the region occupied by object, and in general, the size occupied by object can adopt the number of pixel to represent. The status information of described prospect image comprises the size occupied by the degree of depth information of prospect image and described prospect image. The technician of this area can obtain the status information of described prospect image by various prior art, repeats no more here.
Step 103, obtains the 2nd operation, and described 2nd operation is for being placed in second picture by described prospect image; Based on described 2nd operation, it is determined that as the second picture of background;
Here, described first picture is different from described second picture, and described difference mainly refers to that the first picture is different from the background of second picture.
Step 104, obtains the status information of described second picture;
Here, the status information of described second picture comprises the degree of depth information of each object in described second picture, when second picture comprises multiple object, in described second picture, the degree of depth information of each object can be the same, can also be different, wherein can be the object in certain part, certainly second picture of the face of people or limbs can also the be scenery of the object in second picture is such as a tree greatly, or still life is such as desk, body of wall etc.
Step 105, according to the status information of the status information of described prospect image and described second picture, it is determined that the target size that described prospect image is occupied in described second picture;
Step 106, is scaled described target size by described prospect image; Described prospect image is displayed in described second picture with described target size, presents to user.
In the embodiment of the present invention, when the display unit of described electronics is touch-sensitive display screen, described acquisition first operates, it is possible to comprise steps A 1 and steps A 2; Wherein,
Steps A 1, whether detection there is the touch control operation of first predetermined condition;
Steps A 2, when described operation meets described first predetermined condition, it is determined that for obtaining the first operation.
Here, described touch control operation meets described first predetermined condition, it is possible to realize through but not limited to following form: whether described touch control operation is for clicking touching operation; Or, whether described touch control operation is double-click touching operation.
Here, when the display unit of described electronics is non-touch display screen, when namely described electronics adopts traditional key-press input mode, described acquisition first operates, and comprises step B1 and step B2, wherein:
Step B1, whether detection there is the button operation of second predetermined condition;
Step B2, when described button operation meets described 2nd predetermined condition, it is determined that for obtaining the first operation.
Here, described button operation meets described 2nd predetermined condition, it is possible to realize through but not limited to following form: whether described button operation is long by a certain button, such as, press function key HOME key more than 2 seconds; Or, whether described button operation is the combination of some button, the such as combination of function key HOME key and volume key.
In the embodiment of the present invention, described first operation is operating as the action with continuity with the described 2nd; Or, described first operation and the described 2nd is operating as two actions that interval has first time period. When described first operation and the described 2nd is operating as two actions that interval has first time period, above-mentioned acquisition first operation is applicable to described acquisition the 2nd class of operation seemingly, therefore repeats no more.
It is operating as the action with continuity with the described 2nd below with described first operation, the scene that the technical scheme that the embodiment of the present invention provides may be used for is described: start picture editor's application, as shown in Figure 1-2, described picture editor application is utilized to open two pictures 11 and 14, wherein, first picture 11 comprises a book 13, and book 13 is put one-pen 12; Second picture 14 comprises a desk 15, and desk is placed a pile book 16. Then, as Figure 1-3, with the head of a household by the pen 12 in the first picture 11, namely selected pen 12 is as prospect image, then drags and is placed on the desk 15 of second picture 14 by pen 12. As Figure 1-4, user discharges pen 12 in suitable position;As Figure 1-5, the size reduction of pen 12 is the size of pen 17, user can perception, pen 12 size in former first picture has been reduced by application program, obtains the size of pen 17, better to mate with the background in second picture. It should be noted that, in the process pressing pen 12 with the head of a household, application program will obtain the status information of pen 12, when user is when discharging pen 12, application program also can obtain the status information of second picture 14, like this, application program will according to the status information of the status information of pen 12 and second picture 14, it is determined that the target size that pen 12 is occupied in second picture 14; Then pen 12 is scaled described target size (i.e. the size of pen 17); Pen 12 is displayed in second picture 14 with the size of pen 17 the most at last, presents to user. In the present embodiment, user drags the action that this is a succession of to target location of prospect image by long by selected prospect image, realizes the first above-mentioned operation and the 2nd operation.
It is operating as two actions that interval has first time period below with described first operation and the described 2nd, the scene that the technical scheme that the embodiment of the present invention provides may be used for is described: start picture editor's application, as shown in figures 1 to 6, described picture editor application is utilized to open the first picture 11, wherein, first picture 11 comprises a book 13, and book 13 is put one-pen 12. As shown in figs. 1-7, then, user is by the pen 12 (pen 12 in Fig. 1-7 is dotted line, to show that pen 12 is by user-selected fixed) in selected first picture 11 of the selection tool in application program, and namely selected pen 12 is as prospect image. Then as shown in figures 1-8, utilizing described picture editor application to open second picture 14, second picture 14 comprises a desk 15, and desk is placed a pile book 16; As shown in figs 1-9, then user selects suitable position by mouse or picking and is placed on the desk 15 of second picture 14 by originally selected pen 12. As Figure 1-10 shows, the size reduction of pen 12 is the size of pen 17, user can perception, pen 12 size in former first picture has been reduced by application program, obtains the size of pen 17, better to mate with the background in second picture. It should be noted that, in the process of the selected pen 12 of user, application program will obtain the status information of pen 12, when user is when discharging pen 12, application program also can obtain the status information of second picture 14, like this, application program will according to the status information of the status information of pen 12 and second picture 14, it is determined that the target size that pen 12 is occupied in second picture 14; Then pen 12 is scaled described target size (i.e. the size of pen 17); Pen 12 is displayed in second picture 14 with the size of pen 17 the most at last, presents to user. In the present embodiment, user selectes prospect image and determines that second picture is that two actions by having certain time interval realize.
The information processing method that the embodiment of the present invention provides and electronics, wherein: obtain the first operation, based on described first operation, it is determined that be arranged in the prospect image of the first picture; Obtain the status information of described prospect image; Obtain the 2nd operation, based on described 2nd operation, it is determined that as the second picture of background; Obtain the status information of described second picture; Status information according to described prospect image and the status information of described second picture, it is determined that the target size that described prospect image is occupied in described second picture; Described prospect image is scaled described target size; Described prospect image is displayed in described second picture with described target size, presents to user; So, it is possible to auto zoom prospect image, thus promote Consumer's Experience.
Embodiment two
Based on the above embodiments one, the embodiment of the present invention provides a kind of information processing method, is applied to electronics, and Fig. 2 is the realization flow schematic diagram of the embodiment of the present invention two information processing method, and as shown in Figure 2, the method comprises:
Step 201, obtains the first operation, and described first operation is for choosing prospect image from the first picture;Based on described first operation, it is determined that be arranged in the prospect image of the first picture;
Here, described first operation can be default action, in the process of specific implementation, first operation can be default action during picture editor applies, such as, start picture editor's application, utilize described picture editor application to open the first picture, then the instrument such as selected instrument, the clipping tool etc. that carry in adopting picture editor to apply choose an object from the first picture, using this object as prospect image. Can certainly there is easier operating method, such as, if the display unit of electronics is touch-sensitive display screen, so user can grow by certain object in the first picture, using this object as foreground object, wherein long by referring to that operating body stops more than certain threshold value on object, such as, stopping and within more than 2 seconds, think long by operation, operating body can be finger can also be pointer, adopt finger long can be on time adopt single finger long by or two finger length by.
Here, described first picture is made up of pixel, and each pixel can comprise lower column information, as: colouring information and degree of depth information. Wherein colouring information can be adopt gray scale information to represent, it is also possible to adopts chromatic information to represent, when adopting gray scale information and the expression of color only brightness, can be represented by saturation ratio, tone, brightness when adopting chromatic information to represent.
Step 202, obtains the first occupied in described first picture size of described prospect image and described prospect image the first degree of depth information in described first picture;
Step 203, obtains the 2nd operation, and described 2nd operation is for being placed in second picture by described prospect image; Based on described 2nd operation, it is determined that as the second picture of background;
Here, described first picture is different from described second picture, and described difference mainly refers to that the first picture is different from the background of second picture.
Step 204, obtains the 2nd degree of depth information of described second picture;
Step 205, determines, according to described first size, described first degree of depth information and described 2nd degree of depth information, the target size that described prospect image is occupied in described second picture;
Step 206, is scaled described target size by described prospect image; Described prospect image is displayed in described second picture with described target size, presents to user.
In the embodiment of the present invention, step 205 determines, according to described first size, described first degree of depth information and described 2nd degree of depth information, the target size C' that described prospect image is occupied in described second picture, specifically can be calculated by following formula (1):
C ′ = d ′ d C - - - ( 1 ) ,
In formula (1), C' is target size, and C is described first size, and d' is described first degree of depth information, and d is described 2nd degree of depth information.
In the embodiment of the present invention, the first size that described acquisition described prospect image is occupied in described first picture, comprising:
Obtain the sum of all pixels included by described prospect image, specifically comprise:
Judge the pixel in described first picture one by one whether in described foreground object, obtain the first judged result;
When described first judged result shows that described pixel is in described foreground object, the number of pixels included by described foreground object adds 1;
When described first judged result shows that described pixel is not in described foreground object, judge the next pixel in described first picture whether in described foreground object.
The method obtaining the sum of all pixels included by described prospect image of above-mentioned offer, namely each pixel is checked in the first picture one by one whether in prospect image, if it is determined that this pixel in prospect image then the sum of all pixels in prospect image add 1, otherwise judging next pixel whether in prospect image, the sum of all pixels that can obtain prospect image when finally checking complete is C.
In the embodiment of the present invention, described status information also comprises the focal length of the image acquisition units for pictures taken;
Accordingly, step 205, determine to comprise the target size that described prospect image is occupied in described second picture according to described first size, described first degree of depth information and described 2nd degree of depth information:
According to described first size, described first degree of depth information, described 2nd degree of depth information, for take the image acquisition units of described first picture focal length, for taking the focal length of the image acquisition units of described second picture, determine the target size that described prospect image is occupied in described second picture, specifically can be calculated by following formula (2):
C ′ = d ′ + f ′ d + f C - - - ( 2 ) ,
In formula (2), C' is target size, C is described first size, d' is described first degree of depth information, d is described 2nd degree of depth information, f' is the focal length of the image acquisition units for taking described second picture, and f is the focal length of the image acquisition units taking described first picture, and wherein image acquisition units comprises camera or camera. Wherein, focal length is a fixing inner parameter of image acquisition units, it is possible to the method demarcated by standard pattern is obtained, and has had existing algorithm can obtain the focal length of image acquisition units at present, has therefore repeated no more.
For formula (2), when the first picture and second picture adopt same image acquisition units, formula (2) can be deformed into formula (3):
C ′ = d ′ + f d + f C - - - ( 3 ) .
The first degree of depth information in above-mentioned formula (1) and formula (2) and what the 2nd degree of depth information can obtain from corresponding image acquisition units, corresponding degree of depth information can be had for each pixel, the first degree of depth information in the embodiment of the present invention can be the mean value of the degree of depth information of prospect image, and the 2nd degree of depth information can be the mean value of the degree of depth information of second picture.
In the embodiment of the present invention, above-mentioned formula (1) and formula (2) are derived by following step and are obtained, and first introduce below and how to derive formula (2):
d ′ + f ′ d + f = C ′ C ⇒ C ′ = d ′ + f ′ d + f C ;
In upper formula,Known, due to the image acquisition units for taking described second picture focal distance f ' be far smaller than d', and the focal distance f taking the image acquisition units of described first picture is far smaller than d, therefore can derive formula (1):
d ′ + f ′ d + f = C ′ C ⇒ d ′ d = C ′ C ⇒ C ′ = d ′ d C .
Embodiment three
Based on above-mentioned embodiment of the method, the embodiment of the present invention provides a kind of electronics, and the function that in following description, each unit included by this electronics realizes can be realized by the treater calling program code in electronics; Fig. 3 is the composition structural representation of the embodiment of the present invention three electronics, as shown in Figure 3, this electronics 300 comprises the first acquiring unit 301, first determining unit 302, the 2nd acquiring unit 303, the 3rd acquiring unit 304, the 2nd determining unit 305, the 4th acquiring unit 306, the 3rd determining unit 307, unit for scaling 308 and display unit 309, wherein:
Described first acquiring unit 301, for obtaining the first operation, described first operation is for choosing prospect image from the first picture;
Described first determining unit 302, for based on described first operation, it is determined that be arranged in the prospect image of the first picture;
Described 2nd acquiring unit 303, for obtaining the status information of described prospect image;
Described 3rd acquiring unit 304, for obtaining the 2nd operation, described 2nd operation is for being placed in second picture by described prospect image;
Described 2nd determining unit 305, for based on described 2nd operation, it is determined that as the second picture of background;
Described 4th acquiring unit 306, for obtaining the status information of described second picture;
Described 3rd determining unit 307, for the status information of the status information according to described prospect image and described second picture, it is determined that the target size that described prospect image is occupied in described second picture;
Described unit for scaling 308, for being scaled described target size by described prospect image;
Described display unit 309, for being displayed in described second picture with described target size by described prospect image, presents to user.
Here, described first operation can be default action, in the process of specific implementation, first operation can be default action during picture editor applies, such as, start picture editor's application, utilize described picture editor application to open the first picture, then the instrument such as selected instrument, the clipping tool etc. that carry in adopting picture editor to apply choose an object from the first picture, using this object as prospect image. Can certainly there is easier operating method, such as, if the display unit of electronics is touch-sensitive display screen, so user can grow by certain object in the first picture, using this object as foreground object, wherein long by referring to that operating body stops more than certain threshold value on object, such as, stopping and within more than 2 seconds, think long by operation, operating body can be finger can also be pointer, adopt finger long can be on time adopt single finger long by or two finger length by.
Here, described first picture is made up of pixel, and each pixel can comprise lower column information, as: colouring information and degree of depth information. Wherein colouring information can be adopt gray scale information to represent, it is also possible to adopts chromatic information to represent, when adopting gray scale information and the expression of color only brightness, can be represented by saturation ratio, tone, brightness when adopting chromatic information to represent.
Here, described status information at least comprises size occupied by object in degree of depth information and picture, and described size refers to the size in the region occupied by object, and in general, the size occupied by object can adopt the number of pixel to represent. The status information of described prospect image comprises the size occupied by the degree of depth information of prospect image and described prospect image. The technician of this area can obtain the status information of described prospect image by various prior art, repeats no more here.
Here, described first picture is different from described second picture, and described difference mainly refers to that the first picture is different from the background of second picture.
Here, the status information of described second picture comprises the degree of depth information of each object in described second picture, when second picture comprises multiple object, in described second picture, the degree of depth information of each object can be the same, can also be different, wherein can be the object in certain part, certainly second picture of the face of people or limbs can also the be scenery of the object in second picture is such as a tree greatly, or still life is such as desk, body of wall etc.
In the embodiment of the present invention, described first operation is operating as the action with continuity with the described 2nd; Or, described first operation and the described 2nd is operating as two actions that interval has first time period. When described first operation and the described 2nd is operating as two actions that interval has first time period, above-mentioned acquisition first operation is applicable to described acquisition the 2nd class of operation seemingly, therefore repeats no more.
It is operating as the action with continuity with the described 2nd below with described first operation, the scene that the technical scheme that the embodiment of the present invention provides may be used for is described: start picture editor's application, as shown in Figure 1-2, described picture editor application is utilized to open two pictures 11 and 14, wherein, first picture 11 comprises a book 13, and book 13 is put one-pen 12; Second picture 14 comprises a desk 15, and desk is placed a pile book 16. Then, as Figure 1-3, with the head of a household by the pen 12 in the first picture 11, namely selected pen 12 is as prospect image, then drags and is placed on the desk 15 of second picture 14 by pen 12. As Figure 1-4, user discharges pen 12 in suitable position; As Figure 1-5, the size reduction of pen 12 is the size than 17, user can perception, pen 12 size in former first picture has been reduced by application program, obtains the size of pen 17, better to mate with the background in second picture. It should be noted that, in the process pressing pen 12 with the head of a household, application program will obtain the status information of pen 12, when user is when discharging pen 12, application program also can obtain the status information of second picture 14, like this, application program will according to the status information of the status information of pen 12 and second picture 14, it is determined that the target size that pen 12 is occupied in second picture 14; Then described target size (namely size) than 17 will be scaled than 12; Pen 12 is displayed in second picture 14 with the size of pen 17 the most at last, presents to user. In the present embodiment, user drags the action that this is a succession of to target location of prospect image by long by selected prospect image, realizes the first above-mentioned operation and the 2nd operation.
It is operating as two actions that interval has first time period below with described first operation and the described 2nd, the scene that the technical scheme that the embodiment of the present invention provides may be used for is described: start picture editor's application, as shown in figures 1 to 6, described picture editor application is utilized to open the first picture 11, wherein, first picture 11 comprises a book 13, and book 13 is put one-pen 12. As shown in figs. 1-7, then, user is by the pen 12 (pen 12 in Fig. 1-7 is dotted line, to show that pen 12 is by user-selected fixed) in selected first picture 11 of the selection tool in application program, and namely selected pen 12 is as prospect image. Then as shown in figures 1-8, utilizing described picture editor application to open second picture 14, second picture 14 comprises a desk 15, and desk is placed a pile book 16; As shown in figs 1-9, then user selects suitable position by mouse or picking and is placed on the desk 15 of second picture 14 by originally selected pen 12. As Figure 1-10 shows, the size reduction of pen 12 is the size than 17, user can perception, pen 12 size in former first picture has been reduced by application program, obtains the size of pen 17, better to mate with the background in second picture. It should be noted that, in the process of the selected pen 12 of user, application program will obtain the status information of pen 12, when user is when discharging pen 12, application program also can obtain the status information of second picture 14, like this, application program will according to the status information of the status information of pen 12 and second picture 14, it is determined that the target size that pen 12 is occupied in second picture 14; Then described target size (namely size) than 17 will be scaled than 12;Pen 12 is displayed in second picture 14 with the size of pen 17 the most at last, presents to user. In the present embodiment, user selectes prospect image and determines that second picture is that two actions by having certain time interval realize.
The information processing method that the embodiment of the present invention provides and electronics, wherein: the first acquiring unit 301 obtains the first operation, the first determining unit 302 is based on described first operation, it is determined that be arranged in the prospect image of the first picture; 2nd acquiring unit 303 obtains the status information of described prospect image; 3rd acquiring unit 304 obtains the 2nd operation, and described 2nd determining unit 305 is based on described 2nd operation, it is determined that as the second picture of background; Described 4th acquiring unit 306 obtains the status information of described second picture; Described 3rd determining unit 307 is according to the status information of the status information of described prospect image and described second picture, it is determined that the target size that described prospect image is occupied in described second picture; Described prospect image is scaled described target size by described unit for scaling 308; Described prospect image is displayed in described second picture by described display unit 309 with described target size, presents to user; So, it is possible to auto zoom prospect image, thus promote Consumer's Experience.
Embodiment four
Based on the above embodiments three, the embodiment of the present invention provides a kind of electronics, and the function that in following description, each unit included by this electronics realizes can be realized by the treater calling program code in electronics; This electronics comprises the first acquiring unit, the first determining unit, the 2nd acquiring unit, the 3rd acquiring unit, the 2nd determining unit, the 4th acquiring unit, the 3rd determining unit, unit for scaling and display unit, wherein:
Described first acquiring unit, for obtaining the first operation, described first operation is for choosing prospect image from the first picture;
Here, described first operation can be default action, in the process of specific implementation, first operation can be default action during picture editor applies, such as, start picture editor's application, utilize described picture editor application to open the first picture, then the instrument such as selected instrument, the clipping tool etc. that carry in adopting picture editor to apply choose an object from the first picture, using this object as prospect image. Can certainly there is easier operating method, such as, if the display unit of electronics is touch-sensitive display screen, so user can grow by certain object in the first picture, using this object as foreground object, wherein long by referring to that operating body stops more than certain threshold value on object, such as, stopping and within more than 2 seconds, think long by operation, operating body can be finger can also be pointer, adopt finger long can be on time adopt single finger long by or two finger length by.
Described first determining unit, for based on described first operation, it is determined that be arranged in the prospect image of the first picture;
Here, described first picture is made up of pixel, and each pixel can comprise lower column information, as: colouring information and degree of depth information. Wherein colouring information can be adopt gray scale information to represent, it is also possible to adopts chromatic information to represent, when adopting gray scale information and the expression of color only brightness, can be represented by saturation ratio, tone, brightness when adopting chromatic information to represent.
Described 2nd acquiring unit, for obtaining the first occupied in described first picture size of described prospect image and described prospect image the first degree of depth information in described first picture;
Described 3rd acquiring unit, for obtaining the 2nd operation, described 2nd operation is for being placed in second picture by described prospect image;
Described 2nd determining unit, for based on described 2nd operation, it is determined that as the second picture of background;
Here, described first picture is different from described second picture, and described difference mainly refers to that the first picture is different from the background of second picture.
Described 4th acquiring unit, for obtaining the 2nd degree of depth information of described second picture;
Described 3rd determining unit, for determining, according to described first size, described first degree of depth information and described 2nd degree of depth information, the target size that described prospect image is occupied in described second picture;
Described unit for scaling, for being scaled described target size by described prospect image;
Described display unit, for being displayed in described second picture with described target size by described prospect image, presents to user.
In the embodiment of the present invention, described 3rd determining unit determines, according to described first size, described first degree of depth information and described 2nd degree of depth information, the target size C' that described prospect image is occupied in described second picture, specifically can be calculated by following formula (1):
C ′ = d ′ d C - - - ( 1 ) ,
In formula (1), C' is target size, and C is described first size, and d' is described first degree of depth information, and d is described 2nd degree of depth information.
In the embodiment of the present invention, described 2nd acquiring unit obtains the first size that described prospect image is occupied in described first picture, comprising:
Obtain the sum of all pixels included by described prospect image, specifically comprise:
Judge the pixel in described first picture one by one whether in described foreground object, obtain the first judged result;
When described first judged result shows that described pixel is in described foreground object, the number of pixels included by described foreground object adds 1;
When described first judged result shows that described pixel is not in described foreground object, judge the next pixel in described first picture whether in described foreground object.
The method obtaining the sum of all pixels included by described prospect image of above-mentioned offer, namely each pixel is checked in the first picture one by one whether in prospect image, if it is determined that this pixel in prospect image then the sum of all pixels in prospect image add 1, otherwise judging next pixel whether in prospect image, the sum of all pixels that can obtain prospect image when finally checking complete is C.
In the embodiment of the present invention, described status information also comprises the focal length of the image acquisition units for pictures taken;
Accordingly, described 3rd determining unit, determine to comprise the target size that described prospect image is occupied in described second picture according to described first size, described first degree of depth information and described 2nd degree of depth information:
According to described first size, described first degree of depth information, described 2nd degree of depth information, for take the image acquisition units of described first picture focal length, for taking the focal length of the image acquisition units of described second picture, determine the target size that described prospect image is occupied in described second picture, specifically can be calculated by following formula (2):
C ′ = d ′ + f ′ d + f C - - - ( 2 ) ,
In formula (2), C' is target size, C is described first size, d' is described first degree of depth information, d is described 2nd degree of depth information, f' is the focal length of the image acquisition units for taking described second picture, f is the focal length of the image acquisition units taking described first picture, and wherein image acquisition units comprises camera or camera.Wherein, focal length is a fixing inner parameter of image acquisition units, it is possible to the method demarcated by standard pattern is obtained, and has had existing algorithm can obtain the focal length of image acquisition units at present, has therefore repeated no more.
For formula (2), when the first picture and second picture adopt same image acquisition units, formula (2) can be deformed into formula (3):
C ′ = d ′ + f d + f C - - - ( 3 ) .
The first degree of depth information in above-mentioned formula (1) and formula (2) and what the 2nd degree of depth information can obtain from corresponding image acquisition units, corresponding degree of depth information can be had for each pixel, the first degree of depth information in the embodiment of the present invention can be the mean value of the degree of depth information of prospect image, and the 2nd degree of depth information can be the mean value of the degree of depth information of second picture.
In the embodiment of the present invention, above-mentioned formula (1) and formula (2) are derived by following step and are obtained, and first introduce below and how to derive formula (2):
d ′ + f ′ d + f = C ′ C ⇒ C ′ = d ′ + f ′ d + f C ;
In upper formula,Known, due to the image acquisition units for taking described second picture focal distance f ' be far smaller than d', and the focal distance f taking the image acquisition units of described first picture is far smaller than d, therefore can derive formula (1):
d ′ + f ′ d + f = C ′ C ⇒ d ′ d = C ′ C .
In several embodiments that the application provides, it should be appreciated that, disclosed equipment and method, it is possible to realize by another way. Apparatus embodiments described above is only schematic, such as, the division of described unit, it is only a kind of logic function to divide, actual can have other dividing mode when realizing, and as: multiple unit or assembly can be in conjunction with, maybe can be integrated into another system, or some features can ignore, or do not perform. In addition, the coupling each other of shown or discussed each integral part or directly coupling or communication connection can be the indirect coupling by some interfaces, equipment or unit or communication connection, it is possible to be electrical, machinery or other form.
The above-mentioned unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location; Both a place can be positioned at, it is also possible to be distributed on multiple NE; Part or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in various embodiments of the present invention can all be integrated in a processing unit, it is also possible to is that each unit is individually as a unit, it is also possible to two or more unit are in a unit integrated; Above-mentioned integrated unit both can adopt the form of hardware to realize, it is also possible to the form adopting hardware to add software functional unit realizes.
One of ordinary skill in the art will appreciate that: all or part of step realizing aforesaid method embodiment can be completed by the hardware that programmed instruction is relevant, aforesaid program can be stored in computer read/write memory medium, this program, when performing, performs the step comprising aforesaid method embodiment; And aforesaid storage media comprises: mobile storage equipment, read-only storage (ReadOnlyMemory, ROM), magnetic disc or CD etc. various can be program code stored medium.
Or, if the above-mentioned integrated unit of the present invention realize using the form of software function module and as independent production marketing or when using, it is also possible to be stored in a computer read/write memory medium.Based on such understanding, the technical scheme of the embodiment of the present invention in essence or says that part prior art contributed can embody with the form of software product, this computer software product is stored in a storage media, comprises some instructions with so that a computer equipment (can be Personal Computer, server or the network equipment etc.) performs all or part of of method described in each embodiment of the present invention. And aforesaid storage media comprises: mobile storage equipment, ROM, magnetic disc or CD etc. various can be program code stored medium.
The above; it is only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, any it is familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention. Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (10)

1. an information processing method, it is characterised in that, described method comprises:
Obtaining the first operation, described first operation is for choosing prospect image from the first picture;
Based on described first operation, it is determined that be arranged in the prospect image of the first picture;
Obtain the status information of described prospect image;
Obtaining the 2nd operation, described 2nd operation is for being placed in second picture by described prospect image;
Based on described 2nd operation, it is determined that as the second picture of background;
Obtain the status information of described second picture;
Status information according to described prospect image and the status information of described second picture, it is determined that the target size that described prospect image is occupied in described second picture;
Described prospect image is scaled described target size;
Described prospect image is displayed in described second picture with described target size, presents to user.
2. method according to claim 1, it is characterised in that, described first operation is operating as the action with continuity with the described 2nd; Or,
Described first operation and the described 2nd is operating as two actions that interval has first time period.
3. method according to claim 1, it is characterised in that, described status information comprises in the degree of depth information of object in picture and picture the size occupied by object;
Accordingly, obtain the status information of described prospect image, comprising:
Obtain the first occupied in described first picture size of described prospect image and described prospect image the first degree of depth information in described first picture;
Accordingly, obtain the status information of described second picture, comprising:
Obtain the 2nd degree of depth information of described second picture;
Accordingly, according to the status information of described prospect image and the status information of described second picture, it is determined that the target size that described prospect image is occupied in described second picture, comprising:
The target size that described prospect image is occupied in described second picture is determined according to described first size, described first degree of depth information and described 2nd degree of depth information.
4. method according to claim 3, it is characterised in that, described status information also comprises the focal length of the image acquisition units for pictures taken;
Accordingly, determine to comprise the target size that described prospect image is occupied in described second picture according to described first size, described first degree of depth information and described 2nd degree of depth information:
According to described first size, described first degree of depth information, described 2nd degree of depth information, for take the image acquisition units of described first picture focal length, for taking the focal length of the image acquisition units of described second picture, it is determined that the target size that described prospect image is occupied in described second picture.
5. method according to claim 3, it is characterised in that, the first size that described acquisition described prospect image is occupied in described first picture, comprising:
Obtain the sum of all pixels included by described prospect image.
6. an electronics, it is characterized in that, described electronics comprises the first acquiring unit, the first determining unit, the 2nd acquiring unit, the 3rd acquiring unit, the 2nd determining unit, the 4th acquiring unit, the 3rd determining unit, unit for scaling and display unit, wherein:
Described first acquiring unit, for obtaining the first operation, described first operation is for choosing prospect image from the first picture;
Described first determining unit, for based on described first operation, it is determined that be arranged in the prospect image of the first picture;
Described 2nd acquiring unit, for obtaining the status information of described prospect image;
Described 3rd acquiring unit, for obtaining the 2nd operation, described 2nd operation is for being placed in second picture by described prospect image;
Described 2nd determining unit, for based on described 2nd operation, it is determined that as the second picture of background;
Described 4th acquiring unit, for obtaining the status information of described second picture;
Described 3rd determining unit, for the status information of the status information according to described prospect image and described second picture, it is determined that the target size that described prospect image is occupied in described second picture;
Described unit for scaling, for being scaled described target size by described prospect image;
Described display unit, for being displayed in described second picture with described target size by described prospect image, presents to user.
7. electronics according to claim 6, it is characterised in that, described first operation is operating as the action with continuity with the described 2nd; Or,
Described first operation and the described 2nd is operating as two actions that interval has first time period.
8. electronics according to claim 6 or 7, it is characterised in that, described status information comprises in the degree of depth information of object in picture and picture the size occupied by object;
Accordingly, described 2nd acquiring unit comprises the first acquisition module and the 2nd acquisition module, wherein said first acquisition module, for obtaining the first occupied in described first picture size of described prospect image;
Described 2nd acquisition module, for obtaining first degree of depth information of described prospect image in described first picture;
Accordingly, described 4th acquiring unit, for obtaining the 2nd degree of depth information of described second picture;
Accordingly, described 3rd determining unit, for determining, according to described first size, described first degree of depth information and described 2nd degree of depth information, the target size that described prospect image is occupied in described second picture.
9. electronics according to claim 8, it is characterised in that, described status information also comprises the focal length of the image acquisition units for pictures taken;
Accordingly, described 3rd determining unit, for according to described first size, described first degree of depth information, described 2nd degree of depth information, for take the image acquisition units of described first picture focal length, for taking the focal length of the image acquisition units of described second picture, it is determined that the target size that described prospect image is occupied in described second picture.
10. electronics according to claim 8, it is characterised in that, described first acquisition module, for obtaining the sum of all pixels included by described prospect image.
CN201410670018.2A 2014-11-20 2014-11-20 A kind of information processing method and electronic equipment Active CN105678696B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410670018.2A CN105678696B (en) 2014-11-20 2014-11-20 A kind of information processing method and electronic equipment
US14/658,756 US9607394B2 (en) 2014-11-20 2015-03-16 Information processing method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410670018.2A CN105678696B (en) 2014-11-20 2014-11-20 A kind of information processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN105678696A true CN105678696A (en) 2016-06-15
CN105678696B CN105678696B (en) 2019-03-29

Family

ID=56958044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410670018.2A Active CN105678696B (en) 2014-11-20 2014-11-20 A kind of information processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN105678696B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375662A (en) * 2016-09-22 2017-02-01 宇龙计算机通信科技(深圳)有限公司 Photographing method and device based on double cameras, and mobile terminal
CN108270978A (en) * 2016-12-30 2018-07-10 纳恩博(北京)科技有限公司 A kind of image processing method and device
CN112689196A (en) * 2021-03-09 2021-04-20 北京世纪好未来教育科技有限公司 Interactive video playing method, player, equipment and storage medium
CN113507575A (en) * 2021-09-08 2021-10-15 上海英立视电子有限公司 Human body self-photographing lens generation method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070133880A1 (en) * 2005-12-09 2007-06-14 Microsoft Corporation Background Removal In A Live Video
US20080228928A1 (en) * 2007-03-15 2008-09-18 Giovanni Donelli Multimedia content filtering
US20080228929A1 (en) * 2007-03-15 2008-09-18 Nokia Corporation Pulling information from information sources via refer requests
CN101305401A (en) * 2005-11-14 2008-11-12 微软公司 Stereo video for gaming
CN101853498A (en) * 2009-03-31 2010-10-06 华为技术有限公司 Image synthetizing method and image processing device
CN102855459A (en) * 2011-06-30 2013-01-02 株式会社理光 Method and system for detecting and verifying specific foreground objects
CN102932541A (en) * 2012-10-25 2013-02-13 广东欧珀移动通信有限公司 Mobile phone photographing method and system
CN103024271A (en) * 2012-12-14 2013-04-03 广东欧珀移动通信有限公司 Method photographing on electronic device and electronic device adopting method
CN103442181A (en) * 2013-09-06 2013-12-11 深圳市中兴移动通信有限公司 Image processing method and image processing device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101305401A (en) * 2005-11-14 2008-11-12 微软公司 Stereo video for gaming
US20070133880A1 (en) * 2005-12-09 2007-06-14 Microsoft Corporation Background Removal In A Live Video
US20080228928A1 (en) * 2007-03-15 2008-09-18 Giovanni Donelli Multimedia content filtering
US20080228929A1 (en) * 2007-03-15 2008-09-18 Nokia Corporation Pulling information from information sources via refer requests
CN101853498A (en) * 2009-03-31 2010-10-06 华为技术有限公司 Image synthetizing method and image processing device
CN102855459A (en) * 2011-06-30 2013-01-02 株式会社理光 Method and system for detecting and verifying specific foreground objects
CN102932541A (en) * 2012-10-25 2013-02-13 广东欧珀移动通信有限公司 Mobile phone photographing method and system
CN103024271A (en) * 2012-12-14 2013-04-03 广东欧珀移动通信有限公司 Method photographing on electronic device and electronic device adopting method
CN103442181A (en) * 2013-09-06 2013-12-11 深圳市中兴移动通信有限公司 Image processing method and image processing device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375662A (en) * 2016-09-22 2017-02-01 宇龙计算机通信科技(深圳)有限公司 Photographing method and device based on double cameras, and mobile terminal
WO2018053906A1 (en) * 2016-09-22 2018-03-29 宇龙计算机通信科技(深圳)有限公司 Dual camera-based shooting method and device, and mobile terminal
CN106375662B (en) * 2016-09-22 2019-04-12 宇龙计算机通信科技(深圳)有限公司 A kind of image pickup method based on dual camera, device and mobile terminal
CN108270978A (en) * 2016-12-30 2018-07-10 纳恩博(北京)科技有限公司 A kind of image processing method and device
CN108270978B (en) * 2016-12-30 2021-08-13 纳恩博(北京)科技有限公司 Image processing method and device
CN112689196A (en) * 2021-03-09 2021-04-20 北京世纪好未来教育科技有限公司 Interactive video playing method, player, equipment and storage medium
CN112689196B (en) * 2021-03-09 2021-06-11 北京世纪好未来教育科技有限公司 Interactive video playing method, player, equipment and storage medium
CN113507575A (en) * 2021-09-08 2021-10-15 上海英立视电子有限公司 Human body self-photographing lens generation method and system
CN113507575B (en) * 2021-09-08 2021-11-26 上海英立视电子有限公司 Human body self-photographing lens generation method and system

Also Published As

Publication number Publication date
CN105678696B (en) 2019-03-29

Similar Documents

Publication Publication Date Title
RU2618939C2 (en) Image processing device, tactile sensation controlling method and recording medium
CN104375797B (en) Information processing method and electronic equipment
KR101482080B1 (en) Method for providing GUI and multimedia device using the same
KR102162419B1 (en) System and method for perceiving images with multimodal feedback
EP3120217B1 (en) Display device and method for controlling the same
US10346011B2 (en) User interface for the application of image effects to images
CN105847674A (en) Preview image processing method based on mobile terminal, and mobile terminal therein
US20160148343A1 (en) Information Processing Method and Electronic Device
CN109145970B (en) Image-based question and answer processing method and device, electronic equipment and storage medium
TWI547853B (en) System and method for displaying user interface
US20160077726A1 (en) User interface based interaction method and related apparatus
US20190102056A1 (en) User interface for manipulating light-field images
CN105224187A (en) Menu execution control method and terminal equipment
CN105678696A (en) Image acquisition method and electronic equipment
GB2541582A (en) Hint based spot healing techniques
US9280847B2 (en) Image composition apparatus, image retrieval method, and storage medium storing program
US20140293113A1 (en) Method of providing an adjusted digital image representation of a view, and an apparatus
CN108304839A (en) A kind of image processing method and device
US20190053607A1 (en) Electronic apparatus and method for providing makeup trial information thereof
CN103543916A (en) Information processing method and electronic equipment
CN104657056A (en) Theme color adjustment method
US20130236117A1 (en) Apparatus and method for providing blurred image
EP3340015A1 (en) Display device for adjusting transparency of indicated object and display method for the same
KR101214674B1 (en) Apparatus and method for generating mosaic image including text
CN109766530B (en) Method and device for generating chart frame, storage medium and electronic equipment

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