Summary of the invention
The embodiment of the present invention provides a kind of information processing method and electronic equipment, solves electronic equipment of the prior art and cannot automatically regulate the technical problem that shows the displaying ratio of object in image, strengthens the view effect that shows object.
The embodiment of the present application provides a kind of information processing method, is applied to the first electronic equipment, and described method comprises:
Obtain the first image;
Described the first image is carried out to recognition of face, obtain the residing primary importance information of the first face identifying in described the first image;
Based on described primary importance information, obtain the second image that comprises described the first face, wherein, described in described the second image, the second displaying ratio of the first face is not equal to the first displaying ratio of the first face described in described the first image.
Optionally, described based on described primary importance information, obtain the second image that comprises described the first face, specifically comprise:
Judge that whether described the first displaying ratio is less than the first default displaying ratio, obtains the first judged result;
In the time that described the first judged result shows that described the first displaying ratio is less than the described first default displaying ratio, based on described primary importance information, obtain described the second image that described the second displaying ratio is greater than described the first displaying ratio.
Optionally, described based on described primary importance information, obtain described the second image that described the second displaying ratio is greater than described the first displaying ratio, specifically comprise:
Adjust the focus of the image unit of described the first electronic equipment based on described primary importance information, adjust the focal length of long described image unit to increase extremely described second displaying ratio of displaying ratio of described the first face by the first preset ratio, and take and obtain described the second image; Or
Based on described primary importance information, intercept the topography that comprises described the first face in described the first image, amplify described topography by described the first preset ratio and obtain described the second image.
Optionally, described based on described primary importance information, obtain the second image that comprises described the first face, specifically comprise:
Judge that whether described the first displaying ratio is greater than the second default displaying ratio, obtains the second judged result;
In the time that described the second judged result shows that described the first displaying ratio is greater than the described second default displaying ratio, based on described primary importance information, obtain described the second image that described the second displaying ratio is less than described the first displaying ratio.
Optionally, described based on described primary importance information, obtain described the second image that described the second displaying ratio is less than described the first displaying ratio, specifically comprise:
Adjust the focus of the image unit of described the first electronic equipment based on described primary importance information, adjust the focal length of short described image unit to reduce extremely described second displaying ratio of displaying ratio of described the first face by the second preset ratio, and take and obtain described the second image; Or
Based on described primary importance information, intercept the topography that comprises described the first face in described the first image, dwindle described topography by described the first preset ratio and obtain described the second image.
Optionally, in the time that described the first electronic equipment and the second electronic equipment carry out video communication, described the first image is image corresponding to the first frame of video that described the second electronic equipment image unit that send or described the first electronic equipment gathers, based on described primary importance information, after obtaining the second image that comprises described the first face, described method also comprises:
By on described the first electronic equipment for the first viewing area of showing described the first image completely for showing described the second image;
Obtain described the second electronic equipment N+1 image corresponding to N+1 frame of video that send or that described image unit gathers, N is positive even numbers;
Obtain the N+2 image corresponding with described N+1 image, and show described N+2 image in described the first viewing area, wherein, described N+2 image is identical with the acquisition methods of described the second image.
Optionally, when described the first image be described the first electronic equipment obtain while taking pictures the first preview image time, based on described primary importance information, after obtaining the second image that comprises described the first face, described method also comprises:
By on described the first electronic equipment for the second viewing area of showing the first real scene image completely for showing described the second image, wherein, described the first real scene image is the parts of images that comprises described the first face in described the first image;
Obtain N+1 preview image, and the acquisition N+2 image corresponding with described N+1 preview image, wherein, described N+2 image is identical with the acquisition methods of described the second image, and N is positive even numbers;
Show described N+2 image in described the second viewing area, make user to select to preserve described N+1 preview image according to described N+2 image.
The embodiment of the present application also provides a kind of electronic equipment, and described electronic equipment comprises:
The first acquiring unit, for obtaining the first image;
Face identification unit, for described the first image is carried out to recognition of face, obtains the residing primary importance information of the first face identifying in described the first image;
Second acquisition unit, be used for according to described primary importance information, obtain the second image that comprises described the first face, wherein, described in described the second image, the second displaying ratio of the first face is not equal to the first displaying ratio of the first face described in described the first image.
Optionally, described second acquisition unit specifically comprises:
The first judgment sub-unit, for judging that whether described the first displaying ratio is less than the first default displaying ratio, obtains the first judged result;
First obtains subelement, be used in the time that described the first judged result shows that described the first displaying ratio is less than the described first default displaying ratio, based on described primary importance information, obtain described the second image that described the second displaying ratio is greater than described the first displaying ratio.
Optionally, described first obtains subelement, specifically for:
Adjust the focus of the image unit of described electronic equipment based on described primary importance information, adjust the focal length of long described image unit to increase extremely described second displaying ratio of displaying ratio of described the first face by the first preset ratio, and take and obtain described the second image; Or
Based on described primary importance information, intercept the topography that comprises described the first face in described the first image, amplify described topography by described the first preset ratio and obtain described the second image.
Optionally, described second acquisition unit, specifically comprises:
The second judgment sub-unit, for judging that whether described the first displaying ratio is greater than the second default displaying ratio, obtains the second judged result;
Second obtains subelement, be used in the time that described the second judged result shows that described the first displaying ratio is greater than the described second default displaying ratio, based on described primary importance information, obtain described the second image that described the second displaying ratio is less than described the first displaying ratio.
Optionally, described second obtains subelement, specifically for:
Adjust the focus of the image unit of described electronic equipment based on described primary importance information, adjust the focal length of short described image unit to reduce extremely described second displaying ratio of displaying ratio of described the first face by the second preset ratio, take and obtain described the second image; Or
Based on described primary importance information, intercept the topography that comprises described the first face in described the first image, dwindle described topography by described the first preset ratio and obtain described the second image.
Optionally, in the time that described electronic equipment and opposite end electronic equipment carry out video communication, described the first image is image corresponding to the first frame of video that electronic equipment image unit that send or described electronic equipment in described opposite end gathers, and described electronic equipment also comprises:
Display unit, be used at described second acquisition unit based on described primary importance information, after obtaining the second image that comprises described the first face, by described the first electronic equipment for the first viewing area of showing described the first image completely for showing described the second image;
Described second acquisition unit also for: obtain described second electronic equipment send N+1 image corresponding to N+1 frame of video, N is positive even numbers, and the acquisition N+2 image corresponding with described N+1 image;
Described display unit also for: show described N+2 image in described the first viewing area, wherein, described N+2 image is identical with the acquisition methods of described the second image.
Optionally, when described the first image be described electronic equipment obtain while taking pictures the first preview image time, described electronic equipment also comprises:
Display unit, be used at described second acquisition unit based on described primary importance information, after obtaining the second image that comprises described the first face, by on described the first electronic equipment for the second viewing area of showing the first real scene image completely for showing described the second image, wherein, described the first real scene image is the parts of images that comprises described the first face in described the first image;
Described second acquisition unit also for: obtain N+1 preview image, and the acquisition N+2 image corresponding with described N+1 preview image, wherein, described N+2 image is identical with the acquisition methods of described the second image, and N is positive even numbers;
Described display unit also for: show described N+2 image in described the second viewing area, make user to select to preserve described N+1 preview image according to described N+2 image.
Above-mentioned one or more technical schemes in the embodiment of the present application, at least have following one or more technique effects:
1, in the embodiment of the present application, by the first image is carried out to recognition of face, obtain the positional information of the first face in image, automatically adjust the displaying ratio of the first face according to the positional information of the first face, and regain taking the first face as the second main image, so neither change the position of camera, the position that does not change again user just can regulate the displaying ratio that shows object, what solved that in prior art, electronic equipment exists cannot regulate the technical problem that shows the displaying ratio of object in image automatically, has strengthened the view effect that shows object.
2, in the embodiment of the present application, due in the time carrying out displaying ratio adjustment, can first judge the size of the displaying ratio of the first face in the first image, for different displaying ratios, too small displaying ratio is tuned up, excessive displaying ratio is turned down, no matter make to take distance, finally can both obtain the second image of suitable displaying ratio, promote user's experience.
3, in the embodiment of the present application, owing to carrying out the automatic adjustment of displaying ratio according to the position of the first face, taking the first face as main acquisition the second image, make the first face in the second image in better view position, improve user to obtaining the satisfaction of image.
Embodiment
In the technical scheme providing in the embodiment of the present application, by being carried out to recognition of face, the first image obtaining also obtains the positional information of the first face identifying, automatically adjust the displaying ratio of the first face according to the positional information of the first face, and regain taking the first face as the second main image, realize the automatic adjusting that shows object displaying ratio, what solved that in prior art, electronic equipment exists cannot regulate the technical problem that shows the displaying ratio of object in image automatically, has strengthened the view effect that shows object.
Below in conjunction with accompanying drawing, the embodiment of the present application technical scheme main realized to principle, embodiment and the beneficial effect that should be able to reach is explained in detail.
Embodiment mono-
Please refer to Fig. 1, the embodiment of the present application provides a kind of information processing method, is applied in the first electronic equipment, and described electronic equipment comprises or is connected with an image unit, and described method comprises:
S101: obtain the first image;
S102: described the first image is carried out to recognition of face, obtain the residing primary importance information of the first face identifying in described the first image;
S103: based on described primary importance information, obtain the second image that comprises described the first face, wherein, described in described the second image, the second displaying ratio of the first face is not equal to the first displaying ratio of the first face described in described the first image.
In specific implementation process, in order to obtain the image that personage's displaying ratio is suitable, carry out S101 and obtain the first image.Concrete, the first electronic equipment can obtain the first image by coupled or self image unit; Also can, by receiving the first frame of video of the second electronic equipment transmission that carry out video calling with it, from the first frame of video, obtain the first image; The picture that can also browse from user, obtain the first image.For example: the camera that user opens on television set carries out video calling, television set is before forming camera picture so, first obtain in camera the first image that captures " user is sitting on the sofa on television set opposite ", or by receiving first frame of video of carrying out the second electronic equipment transmission of video calling with television set, from the first video, obtain " friend is sitting on the sofa on the second electronic equipment opposite " first image.After obtaining the first image, continue to carry out next step: S102.
S102: described the first image is carried out to recognition of face, obtain the residing primary importance information of the first face identifying in described the first image.Concrete, the first electronic equipment is opened face identification unit automatically, and after getting described the first image, described the first image is carried out to recognition of face, i.e. and scanning detects in described the first image whether have the existence of face, and obtains testing result.
For the difference of recognition of face testing result in S102, the subsequent operation difference that the first electronic equipment is corresponding, it is concrete: in the time that testing result shows not have face in described the first image, the first electronic equipment no longer carries out other operations to described the first image, output or transmission using the first image as shooting results figure; In the time that testing result shows there is face in described the first image, as first image of above-mentioned " user is sitting on the sofa on television set opposite " is carried out to recognition of face, identify and in the first image, there is facial image: the figure of user face, now the first electronic equipment is carried out following operation in order to obtain the first face:
First, judge in described the first image whether comprise at least two faces, obtain the 3rd judged result, described the 3rd judged result also has two kinds of situations:
The first is in described the first image, to comprise a face, as only comprised user's face in first image of " user is sitting on the sofa on television set opposite ", and now the first face in described the first image using this face;
The second situation is to comprise at least two faces in described the first image, the emphasis face now showing in order to obtain image, the first electronic equipment generates the first information as " please select emphasis to show object ", with prompting user select target face from described at least two faces, user can pass through remote controller, control button on mouse or the first electronic equipment carrys out select target face, after user has selected target face, the first electronic equipment can respond described user for selecting the selection operation of described target face, obtain the target face that described user selects, described target face is described the first face.For example: when comprising the first and second two people's face in the first image, the first electronic equipment can be after recognition of face so, the prompting frame that ejects select target face shows " please select emphasis to show object ", now user can pass through the directionkeys select target face of remote controller, suppose that user has selected the face of first as target face, television set will be confirmed after select command receiving user so, and the face of the first that user is selected is as the first face.
In above-mentioned two situations, obtain the first face in the first image by different modes, and after getting described the first face, obtain the residing primary importance information of the first face in described the first image.Concrete, described primary importance information can comprise the coordinate position of described the first face in described the first image, wherein, the coordinate position in described the first image of described the first face can be face's centre coordinate position of described the first face, also can be the coordinate position that indicates at least three points of the face feature of described the first face, as two residing coordinate positions of eyes, nose and mouth.After getting described primary importance information, continue to carry out S103.
S103: based on described primary importance information, obtain the second image that comprises described the first face, wherein, described in described the second image, the second displaying ratio of the first face is not equal to the first displaying ratio of the first face described in described the first image.Concrete, the first face described in described the second image is its object highlighting, the distance that the position of described the first face in described the second image is specifically as follows between center or position and described second picture centre of described the first face in described the second image of described the second image is preset value, described preset value specifically can be according to user need to carry out personal settings, as being set to 1/5th of the second image total length, for example: the second image length is 10, central point is (5, 4), in the second image, the center of the first face can be (5 so, 4), in the second image, the center of the first face can be also (4, 4), (6, 4), (5.5, 3.5) equidistant central point (5, 4) predeterminable range 2 is with the optional position in interior region.
In specific implementation process, in order to make the second displaying ratio of the first face in the second image can more meet user's requirement, the embodiment of the present application, based on described primary importance information, is obtained the second image that comprises described the first face, specifically carries out by following two kinds of modes:
First kind of way: first, judge whether described the first displaying ratio is less than the first default displaying ratio, obtain the first judged result, wherein, the described first default displaying ratio is specifically as follows the default setting 10% of the first electronic equipment, also can need to carry out personal settings as 15% according to oneself for user, in the time that the first displaying ratio of judging the first face described in the first image is more than or equal to the described first default displaying ratio, if the first displaying ratio is 20% to be greater than the first default displaying ratio 10%, now goes to the second way and do further judgement; In the time that the first displaying ratio of judging the first face described in the first image is less than the described first default displaying ratio, if the first displaying ratio is 7% to be less than the first default displaying ratio 10%, show the undersized specific features that cannot recognize clearly the first face of the first face in the first image, now need the displaying ratio of the first face to adjust accordingly, therefore next based on described primary importance information, obtain described the second image that described the second displaying ratio is greater than described the first displaying ratio.
Concrete, when the first image is while obtaining by the image unit of the first electronic equipment, can obtain described the second image that described the second displaying ratio is greater than described the first displaying ratio by the focal length of regulating camera units and focus; When the first image be that the second electronic equipment sends or the first electronic equipment in the existing existing image preserved, can be by the first image being carried out to sectional drawing and amplifying to process and obtain described the second image that described the second displaying ratio is greater than described the first displaying ratio.
In the time obtaining described the second image by regulating camera units, specifically can adjust based on described primary importance information the focus of described image unit, the reference object that forms described the first image is focused again, the position that the focus of described image unit is adjusted to described the first face place is the primary importance in primary importance information, and adjust the focal length of long described image unit to increase extremely described second displaying ratio of displaying ratio of described the first face by the first preset ratio, wherein, described the first preset ratio is specifically as follows takes 1.5~4 times of image unit focal length when the first image, thereby increase the displaying ratio of described the first face to described the second displaying ratio, after adjusting the focal length of long described image unit by the first preset ratio, take and obtain described the second image.
Obtaining when described the second image by the first image being carried out to sectional drawing and amplify to process, first, based on described primary importance information, intercept the topography that comprises described the first face in described the first image, concrete, the topography that intercepting comprises the first face can be with the primary importance in described primary importance information, and the position at the first face place is that sectional drawing emphasis carries out sectional drawing, and in the described topography wherein intercepting, the displaying ratio of the first face is the second displaying ratio; Then, amplify described topography by described the first preset ratio and obtain described the second image.
Below in conjunction with Fig. 2 and Fig. 3, the process of processing acquisition the second image by sectional drawing and amplification is illustrated: the first image that the first electronic equipment obtains by image unit as shown in Figure 2, due to distant apart from image unit of the reference object in the first image, the reference object of taking acquisition the first picture catching is more, in the first image forming, personage's " little Mei " facial displaying ratio is less, now the first electronic equipment can carry out recognition of face to the first image automatically, and detect the positional information of little Mei face, sectional drawing is carried out in position at little Mei face place, then amplify sectional drawing and obtain the second image, as shown in Figure 3: corresponding the tuning up of facial displaying ratio of little Mei, and there is the effect of looking of emphasis demonstration in the middle part of the second image.
The second way: first judge whether described the first displaying ratio is greater than the second default displaying ratio, obtain the second judged result, wherein, the described second default displaying ratio is greater than the described first default displaying ratio, the default setting that the described second default displaying ratio is specifically as follows the first electronic equipment is as 60%, also can be by user need to arrange voluntarily according to oneself.Described the second judged result that judgement obtains comprises two kinds of situations: the first situation: the second judged result shows that described the first displaying ratio is less than or equal to the described second default displaying ratio, again because the first displaying ratio is greater than the described first default displaying ratio, show that the first face in described the first image does not need to carry out displaying ratio adjustment, now the first electronic equipment obtains the second image no longer separately.The second situation: when the second judged result shows that described the first displaying ratio is greater than the described second default displaying ratio, based on described primary importance information, obtain described the second image that described the second displaying ratio is less than described the first displaying ratio.
Same, when the first image is while obtaining by the image unit of the first electronic equipment, can obtain described the second image that described the second displaying ratio is less than described the first displaying ratio by the focal length of regulating camera units and focus; When the first image be that the second electronic equipment sends or the first electronic equipment in the existing existing image preserved, also can be by the first image being carried out to sectional drawing and dwindling to process and obtain described the second image that described the second displaying ratio is less than described the first displaying ratio.
Focal length and focus by regulating camera units are obtained described the second image that described the second displaying ratio is less than described the first displaying ratio, specifically can obtain by following two steps: the first step, adjust the focus of described image unit based on described primary importance information; Second step, adjusts the focal length of short described image unit to reduce extremely described second displaying ratio of displaying ratio of described the first face, and takes and obtain described the second image by the second preset ratio.For example: the focus of supposing shooting the first image is between the user A and user B in the first image, focal length is 30 times of focal lengths, the first electronic equipment is after getting primary importance information so, can automatically the focus of video camera be adjusted in the primary importance of primary importance information representation, and the focal length of making a video recording is adjusted short to be 20 times of focal lengths, then to take and obtain the second image of reducing of the first face displaying ratio.
Obtain when described the second image by the first image being carried out to sectional drawing and dwindling to process, first, based on described primary importance information, intercept the topography that comprises described the first face in described the first image, concrete, the topography that intercepting comprises the first face can be with the primary importance in described primary importance information, and the position at the first face place is that sectional drawing emphasis carries out sectional drawing, and in the described topography wherein intercepting, the displaying ratio of the first face is the second displaying ratio; Then, dwindle described topography by described the first preset ratio and obtain described the second image.
The embodiment of the present application provides said method can be applied to different application scenarioss, is elaborated below in conjunction with three kinds of different application scenarioss:
Scene one, be applied to video calling
In the time that described the first electronic equipment and the second electronic equipment carry out video communication, described the first image is image corresponding to the first frame of video that described the second electronic equipment image unit that send or described the first electronic equipment gathers.The first electronic equipment obtains the first image from the first frame of video; Then, obtain the first face of the first image and corresponding primary importance information by recognition of face; Then the second image that, comprises the first face according to primary importance acquisition of information; After getting the second image that comprises described the first face, the embodiment of the present application is also further carried out following steps:
The first step, by described the first electronic equipment for the first viewing area of showing described the first image completely for showing described the second image;
Second step, obtains described the second electronic equipment N+1 image corresponding to N+1 frame of video that send or that described image unit gathers, and N is positive even numbers;
The 3rd step, obtains the N+2 image corresponding with described N+1 image, and shows described N+2 image in described the first viewing area, and wherein, described N+2 image is identical with the acquisition methods of described the second image.It should be noted that, described the second electronic equipment frame of video that send or that described image unit gathers is pressed odd-numbered, and the next frame after N+1 frame of video is N+3 frame of video, and the embodiment of the present application does not limit the numbering of frame of video.
For example: the first electronic equipment and the second electronic equipment are carrying out video calling, video image corresponding to frame of video of the first viewing area for showing that the second electronic equipment sends in the video calling window on the display unit of the first electronic equipment.The first electronic equipment, receiving after the first frame of video of the second electronic equipment transmission, first obtains the first image corresponding to the first frame of video, then the first image is carried out to recognition of face.Suppose that recognition of face goes out in the first image to have the first displaying ratio of a face A and face A to be less than the first preset ratio, the first electronic equipment obtains the positional information of face A in the first image accordingly so; Then from the first image, intercept the topography that comprises face A according to the positional information of face A, and obtain the second image according to the second displaying ratio enlarged partial image; And then, on the first viewing area of the first electronic equipment, show the second image, make user can better see the face A in video.Further, the first electronic equipment carries out identical processing to follow-up N+1 image corresponding to N+1 frame of video receiving, and shows the N+2 image corresponding with described N+1 image in the first viewing area.
Scene two, be applied at a distance and take pictures
The first electronic equipment is taken pictures at a distance by image unit, now described the first image be described the first electronic equipment obtain while taking pictures the first preview image time.The first electronic equipment obtains the first preview image by image unit; Then, obtain the first face of the first preview image and corresponding primary importance information by recognition of face; Then the second image that, comprises the first face according to primary importance acquisition of information; Further, the embodiment of the present application also, after obtaining the second image that comprises described the first face, is carried out following steps:
The first step, by described the first electronic equipment for the second viewing area of showing the first real scene image completely for showing described the second image, wherein, described the first real scene image is the parts of images that comprises described the first face in described the first image;
Second step, obtains N+1 preview image, and the acquisition N+2 image corresponding with described N+1 preview image, and wherein, described N+2 image is identical with the acquisition methods of described the second image, and N is positive even numbers;
The 3rd step, shows described N+2 image in described the second viewing area, makes user to select to preserve described N+1 preview image according to described N+2 image.
Please refer to Fig. 4, for example: the first electronic equipment obtains the first preview image by camera, the first electronic equipment obtains by recognition of face and topography's convergent-divergent processing the second image that comprises the first face, and on the second viewing area, show the second image, make user in the time taking pictures at a distance, whether the facial expression that can clearly see the people who is all taken pictures (as: is smiling face, the eyeball of whether closing one's eyes, whether see camera lens etc.), accordingly, also real-time acquisition N+1 preview image and obtain the N+2 image corresponding with described N+1 preview image of electronic equipment, show described N+2 image in described the second viewing area, can press shutter in the best time for this reason and preserve N+1 preview image, photographed gratifying photo.
Scene three, be applied to expression and look at pattern
When user is under picture expression browse mode when browsing pictures, the embodiment of the present application is better checked the facial expression (as: smiling face) of personage in picture for the ease of user, the first electronic equipment obtains the first image in the time that user opens the first image, then the first image is carried out to recognition of face, in the time recognizing the first face, according to the primary importance information at the first face place, the topography that acquisition comprises the first face also amplifies this topography and obtains the second image, and in the second viewing area for showing the first real scene image completely for showing described the second image, wherein, described the first real scene image is the parts of images that comprises described the first face in described the first image, be about to the position that second doubling of the image is presented at face place in the first image, so that finding expression fast, user meets the picture of Expected Results, avoid user manually to amplify again whole picture and check human face expression, greatly promote user's experience.
In the above embodiments of the present application, by the first image is carried out to recognition of face, obtain the positional information of the first face in image, automatically adjust the displaying ratio of the first face according to the positional information of the first face, and regain taking the first face as the second main image, so neither change the position of camera, the position that does not change again user just can regulate the displaying ratio that shows object, what solved that in prior art, electronic equipment exists cannot regulate the technical problem that shows the displaying ratio of object in image automatically, has strengthened the view effect that shows object.
Further, due in the time carrying out displaying ratio adjustment, can first judge the size of the displaying ratio of the first face in the first image, for different displaying ratios, too small displaying ratio is tuned up, excessive displaying ratio is turned down, no matter make to take distance, finally can both obtain the second image of suitable displaying ratio, promote user's experience.
Meanwhile, in the embodiment of the present application owing to carrying out the automatic adjustment of displaying ratio according to the position of the first face, taking the first face as main acquisition the second image, make the first face in the second image in better view position, improve user to obtaining the satisfaction of image.
Embodiment bis-
Please refer to Fig. 5, the embodiment of the present application provides a kind of electronic equipment, and described electronic equipment comprises:
The first acquiring unit 501, for obtaining the first image;
Face identification unit 502, for described the first image is carried out to recognition of face, obtains the residing primary importance information of the first face identifying in described the first image;
Second acquisition unit 503, be used for according to described primary importance information, obtain the second image that comprises described the first face, wherein, described in described the second image, the second displaying ratio of the first face is not equal to the first displaying ratio of the first face described in described the first image.
In specific implementation process, described second acquisition unit 503 specifically comprises: the first judgment sub-unit, for judging that whether described the first displaying ratio is less than the first default displaying ratio, obtains the first judged result; First obtains subelement, be used in the time that described the first judged result shows that described the first displaying ratio is less than the described first default displaying ratio, based on described primary importance information, obtain described the second image that described the second displaying ratio is greater than described the first displaying ratio.
In specific implementation process, described first obtains subelement, specifically for: the focus of adjusting the image unit of described electronic equipment based on described primary importance information, adjust the focal length of long described image unit to increase extremely described second displaying ratio of displaying ratio of described the first face by the first preset ratio, and take and obtain described the second image; Or, based on described primary importance information, intercept the topography that comprises described the first face in described the first image, amplify described topography by described the first preset ratio and obtain described the second image.
In specific implementation process, described second acquisition unit 503, specifically comprises: the second judgment sub-unit, for judging that whether described the first displaying ratio is greater than the second default displaying ratio, obtains the second judged result; Second obtains subelement, be used in the time that described the second judged result shows that described the first displaying ratio is greater than the described second default displaying ratio, based on described primary importance information, obtain described the second image that described the second displaying ratio is less than described the first displaying ratio.
In specific implementation process, described second obtains subelement specifically for the focus of adjusting the image unit of described electronic equipment based on described primary importance information, adjust the focal length of short described image unit to reduce extremely described second displaying ratio of displaying ratio of described the first face by the second preset ratio, take and obtain described the second image; Or, described second obtain subelement specifically for: based on described primary importance information, intercept the topography that comprises described the first face in described the first image, dwindle described topography by described the first preset ratio and obtain described the second image.
In specific implementation process, in the time that described electronic equipment and opposite end electronic equipment carry out video communication, described the first image is image corresponding to the first frame of video that electronic equipment image unit that send or described electronic equipment in described opposite end gathers, and described electronic equipment also comprises:
Display unit 504, be used at described second acquisition unit based on described primary importance information, after obtaining the second image that comprises described the first face, by described the first electronic equipment for the first viewing area of showing described the first image completely for showing described the second image;
Described second acquisition unit 503 also for: obtain described the second electronic equipment N+1 image corresponding to N+1 frame of video that send or that described image unit gathers, N is positive even numbers, and the acquisition N+2 image corresponding with described N+1 image;
Described display unit 504 also for: show described N+2 image in described the first viewing area, wherein, described N+2 image is identical with the acquisition methods of described the second image.
In specific implementation process, when described the first image be described electronic equipment obtain while taking pictures the first preview image time, described electronic equipment also comprises:
Display unit 504, be used at described second acquisition unit based on described primary importance information, after obtaining the second image that comprises described the first face, by on described the first electronic equipment for the second viewing area of showing the first real scene image completely for showing described the second image, wherein, described the first real scene image is the parts of images that comprises described the first face in described the first image;
Described second acquisition unit 503 also for: obtain N+1 preview image, and the acquisition N+2 image corresponding with described N+1 preview image, wherein, described N+2 image is identical with the acquisition methods of described the second image, and N is positive even numbers;
Described display unit 504 also for: show described N+2 image in described the second viewing area, make user to select to preserve described N+1 preview image according to described N+2 image.
By the one or more technical schemes in the embodiment of the present application, can be achieved as follows one or more technique effects:
1, in the embodiment of the present application, by the first image is carried out to recognition of face, obtain the positional information of the first face in image, automatically adjust the displaying ratio of the first face according to the positional information of the first face, and regain taking the first face as the second main image, so neither change the position of camera, the position that does not change again user just can regulate the displaying ratio that shows object, what solved that in prior art, electronic equipment exists cannot regulate the technical problem that shows the displaying ratio of object in image automatically, has strengthened the view effect that shows object.
2, in the embodiment of the present application, due in the time carrying out displaying ratio adjustment, can first judge the size of the displaying ratio of the first face in the first image, for different displaying ratios, too small displaying ratio is tuned up, excessive displaying ratio is turned down, no matter make to take distance, finally can both obtain the second image of suitable displaying ratio, promote user's experience.
3, in the embodiment of the present application, owing to carrying out the automatic adjustment of displaying ratio according to the position of the first face, taking the first face as main acquisition the second image, make the first face in the second image in better view position, improve user to obtaining the satisfaction of image.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the present invention can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) that wherein include computer usable program code.
The present invention is with reference to describing according to flow chart and/or the block diagram of the method for the embodiment of the present invention, equipment (system) and computer program.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction that makes to carry out by the processor of computer or other programmable data processing device produces the device for realizing the function of specifying at flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame on computer or other programmable devices.
Specifically, computer program instructions corresponding to information approach in the embodiment of the present application can be stored in CD, and hard disk, on the storage mediums such as USB flash disk, in the time that the computer program instructions corresponding with information approach in storage medium read or be performed by an electronic equipment, comprise the steps:
Obtain the first image;
Described the first image is carried out to recognition of face, obtain the residing primary importance information of the first face identifying in described the first image;
Based on described primary importance information, obtain the second image that comprises described the first face, wherein, described in described the second image, the second displaying ratio of the first face is not equal to the first displaying ratio of the first face described in described the first image.
Optionally, described based on described primary importance information, obtain the second image that comprises described the first face, specifically comprise: judge that whether described the first displaying ratio is less than the first default displaying ratio, obtains the first judged result; In the time that described the first judged result shows that described the first displaying ratio is less than the described first default displaying ratio, based on described primary importance information, obtain described the second image that described the second displaying ratio is greater than described the first displaying ratio.
Optionally, described based on described primary importance information, obtain described the second image that described the second displaying ratio is greater than described the first displaying ratio, specifically comprise: the focus of adjusting the image unit of described the first electronic equipment based on described primary importance information, adjust the focal length of long described image unit to increase extremely described second displaying ratio of displaying ratio of described the first face by the first preset ratio, and take and obtain described the second image; Or, based on described primary importance information, intercept the topography that comprises described the first face in described the first image, amplify described topography by described the first preset ratio and obtain described the second image.
Optionally, described based on described primary importance information, obtain the second image that comprises described the first face, specifically comprise: judge that whether described the first displaying ratio is greater than the second default displaying ratio, obtains the second judged result; In the time that described the second judged result shows that described the first displaying ratio is greater than the described second default displaying ratio, based on described primary importance information, obtain described the second image that described the second displaying ratio is less than described the first displaying ratio.
Optionally, described based on described primary importance information, obtain described the second image that described the second displaying ratio is less than described the first displaying ratio, specifically comprise: the focus of adjusting the image unit of described the first electronic equipment based on described primary importance information, adjust the focal length of short described image unit to reduce extremely described second displaying ratio of displaying ratio of described the first face by the second preset ratio, and take and obtain described the second image; Or, based on described primary importance information, intercept the topography that comprises described the first face in described the first image, dwindle described topography by described the first preset ratio and obtain described the second image.
Optionally, in the time that described the first electronic equipment and the second electronic equipment carry out video communication, described the first image is image corresponding to the first frame of video that described the second electronic equipment image unit that send or described the first electronic equipment gathers, based on described primary importance information, after obtaining the second image that comprises described the first face, described method also comprises: by described the first electronic equipment for the first viewing area of showing described the first image completely for showing described the second image; Obtain described the second electronic equipment N+1 image corresponding to N+1 frame of video that send or that described image unit gathers, N is positive even numbers; Obtain the N+2 image corresponding with described N+1 image, and show described N+2 image in described the first viewing area, wherein, described N+2 image is identical with the acquisition methods of described the second image.
Optionally, when described the first image be described the first electronic equipment obtain while taking pictures the first preview image time, based on described primary importance information, after obtaining the second image that comprises described the first face, described method also comprises: by described the first electronic equipment for the second viewing area of showing the first real scene image completely for showing described the second image, wherein, described the first real scene image is the parts of images that comprises described the first face in described the first image; Obtain N+1 preview image, and the acquisition N+2 image corresponding with described N+1 preview image, wherein, described N+2 image is identical with the acquisition methods of described the second image, and N is positive even numbers; Show described N+2 image in described the second viewing area, make user to select to preserve described N+1 preview image according to described N+2 image.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if these amendments of the present invention and within modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.