CN104994281B - A kind of method and terminal of face distortion correction - Google Patents

A kind of method and terminal of face distortion correction Download PDF

Info

Publication number
CN104994281B
CN104994281B CN201510378947.0A CN201510378947A CN104994281B CN 104994281 B CN104994281 B CN 104994281B CN 201510378947 A CN201510378947 A CN 201510378947A CN 104994281 B CN104994281 B CN 104994281B
Authority
CN
China
Prior art keywords
face
distortion
region
distorted region
terminal
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.)
Expired - Fee Related
Application number
CN201510378947.0A
Other languages
Chinese (zh)
Other versions
CN104994281A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201510378947.0A priority Critical patent/CN104994281B/en
Publication of CN104994281A publication Critical patent/CN104994281A/en
Application granted granted Critical
Publication of CN104994281B publication Critical patent/CN104994281B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the invention discloses the method for face distortion correction and terminal, including:The picture of finding a view photographed to the camera of terminal carries out Face datection;If detecting in the picture of finding a view and there is M face, judge to be more than the distorted region of predetermined threshold value in the M face with the presence or absence of distortion factor, wherein, M is the integer more than or equal to 1;If so, carrying out distortion correction to the distorted region.Face in the picture of finding a view that can be photographed using the embodiment of the present invention to camera is detected, and carries out distortion correction to the face detected, so that, reduce the distortion degree for the face that distorted in wide-angle camera.

Description

A kind of method and terminal of face distortion correction
Technical field
The present embodiments relate to method and the end of technical field of electronic equipment, more particularly to a kind of face distortion correction End.
Background technology
With developing rapidly for information technology, the integrated achievable function of terminal is more and more, such as takes pictures, surfs the Net, swims Play, shopping etc., but terminal is not omnipotent, in the prior art, terminal can be realized and taken pictures, but model is taken pictures during taking pictures Enclose and there is certain constraint.
Under normal circumstances, it will recognize that and taken pictures using wide-angle camera, but wide-angle camera shoots the image come Distortion is produced in the region outside certain angle scope, the generation of this distortion is due to the characteristic of wide-angle camera itself Cause, particularly with the face progress distortion correction for thinking individually to shoot wide-angle camera, prior art is still not yet solved.
The content of the invention
The embodiments of the invention provide a kind of method and terminal of face distortion correction, to picture of finding a view wide-angle camera Face in face carries out distortion correction, so that, reduce the distortion degree of the face.
First aspect of the embodiment of the present invention discloses a kind of method of face distortion correction, including step:
The picture of finding a view photographed to the camera of terminal carries out Face datection;
If detecting in the picture of finding a view and there is M face, judge big with the presence or absence of distortion factor in the M face In the distorted region of predetermined threshold value, wherein, M is the integer more than or equal to 1;
If so, carrying out distortion correction to the distorted region.
Correspondingly, second aspect of the embodiment of the present invention discloses a kind of terminal, including:
Detection unit, Face datection is carried out for the picture of finding a view that the camera to terminal is photographed;
, there is M face if being detected for the detection unit in the picture of finding a view, judge the M in judging unit It is more than the distorted region of predetermined threshold value in individual face with the presence or absence of distortion factor, wherein, M is the integer more than or equal to 1;
Unit being corrected, being more than default threshold for there is distortion factor in judging the M face in the judging unit The distorted region of value, distortion correction is carried out to the distorted region.
What the embodiment of the present invention was photographed to the camera of terminal find a view, and picture carries out Face datection;If detecting described take There is M face in scape picture, judge to be more than the distorted region of predetermined threshold value in the M face with the presence or absence of distortion factor, Wherein, M is the integer more than or equal to 1;If so, carrying out distortion correction to the distorted region.Can using the embodiment of the present invention Face in the picture of finding a view photographed to camera is detected, and carries out distortion correction to the face detected, so that, subtract The distortion degree of distortion face in small wide-angle camera.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below will be to required in embodiment, description The accompanying drawing used is briefly described, it should be apparent that, drawings in the following description are only some realities of the embodiment of the present invention Example is applied, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to these accompanying drawings Obtain other accompanying drawings.
Fig. 1 illustrates for a kind of flow of first embodiment of the method for face distortion correction provided in an embodiment of the present invention Figure;
Fig. 2 illustrates for a kind of flow of second embodiment of the method for face distortion correction provided in an embodiment of the present invention Figure;
Fig. 3 illustrates for a kind of flow of 3rd embodiment of the method for face distortion correction provided in an embodiment of the present invention Figure;
Fig. 4 a are a kind of structural representation of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 4 b are a kind of another structural representation of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 4 c are a kind of another structural representation of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 4 d are a kind of another structural representation of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 4 e are a kind of another structural representation of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of the second embodiment of terminal provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the embodiment of the present invention, rather than whole implementation Example.Based on the embodiment in the embodiment of the present invention, those of ordinary skill in the art institute under the premise of creative work is not made The every other embodiment obtained, belongs to the scope of protection of the embodiment of the present invention.
In realization, in the embodiment of the present invention, terminal can include but is not limited to:Notebook computer, mobile phone, tablet personal computer, Intelligent wearable device etc..The system of terminal refers to the operating system of equipment, can include but is not limited to:Android system, plug Class's system, Windows systems, IOS (Mobile operating system of Apple Inc.'s exploitation), XP systems, the systems of windows 8 etc.. It should be noted that Android terminal refers to the terminal of android system, Saipan terminal refers to terminal of Saipan system, etc..On It is only citing to state terminal, and non exhaustive, including but not limited to above-mentioned terminal.
In the specific implementation, the camera described in the embodiment of the present invention is wide-angle camera, its scope is more than existing The photo angle of common camera.In the embodiment of the present invention problem to be solved be only wide-angle camera is photographed find a view The distorted region of face in picture carries out distortion correction, and other distorted regions are not processed.
Combination of embodiment of the present invention Fig. 1 to Fig. 5 to the method for face distortion correction provided in an embodiment of the present invention a kind of and Terminal is described.
Referring to Fig. 1, Fig. 1 is a kind of first embodiment of the method for face distortion correction provided in an embodiment of the present invention Schematic flow sheet.The method of face distortion correction described in the present embodiment, including step:
What S101, the camera to terminal were photographed find a view, and picture carries out Face datection.
Wherein, terminal can carry out Face datection to the picture of finding a view that the camera of the terminal is shot.Face datection can basis The face mask of people, face feature (such as nose, eyes, face, eyebrow), current human face detection tech is more ripe.
As a kind of possible embodiment, what terminal can be photographed in the camera to terminal find a view, and picture carries out face Before detection, the pre- photo angle scope of the camera of the terminal is determined, user, can be according to when the camera of terminal is started The angular range shot according to the scenery adjustment for wanting to take pictures, pre- photo angle scope is exactly user according to scenery institute occupied area in scene The size in domain is determined.Terminal can first obtain the touching instruction of the photo angle scope of user's selection, be determined according to the instruction The pre- photo angle scope of the camera of terminal.For example, if the scenery scope in scene is smaller, pre- photo angle scope can The camera lens scope of common camera is adjusted to, in this case, obtained photo distortion very little of taking pictures, it is believed that undistorted; If the scenery scope in scene is larger, the camera lens scope of common camera is had been over, the image of pre- photo angle scope can Distortion correction can be carried out.
As a kind of possible embodiment, the camera of terminal can be the front camera of terminal or rearmounted shooting Head;Or, the camera of terminal can for terminal wirelessly or wired mode control camera.
If S102, detecting in the picture of finding a view and there is M face, judge to whether there is in the M face and distort Coefficient is more than the distorted region of predetermined threshold value, wherein, M is the integer more than or equal to 1.
Wherein, if terminal, which is detected, has M face in picture of finding a view, it can determine whether whether deposited in the M face It is more than the distortion factor of predetermined threshold value in distortion factor.Because face occupies certain in the picture of finding a view that camera is photographed Area, thus, distortion factor of the face on diverse location, the position is different.It should be noted that under normal circumstances, by In the characteristic of wide-angle camera itself, thus, what the distortion of wide-angle camera existed always, and wide-angle camera is under normal circumstances With symmetry characteristic, with the center of wide-angle camera to both sides, distortion factor is presented symmetrical, and distortion factor exists Occurred in the prior art, and do not made excessive description herein.Distortion factor represents the distortion degree for the image that wide-angle camera is shot, The distortion factor of wide-angle camera is bigger, illustrates that distortion is bigger, and the distortion factor of wide-angle camera is within the specific limits, i.e., abnormal Variable coefficient is less than the situation of a certain predetermined threshold value, then it is believed that it is without abnormal that distortion factor, which is less than the corresponding region of a certain predetermined threshold value, Become region, its corresponding photo angle scope may be defined as undistorted photo angle scope.
As a kind of possible embodiment, terminal can determine that camera corresponding less than or equal to above-mentioned predetermined threshold value is clapped The corresponding angle scope for the picture of finding a view taken the photograph;And judge to whether there is the area outside the corresponding angle scope in M face Domain.
S103, if so, to the distorted region carry out distortion correction.
Wherein, it is abnormal to this if terminal, which is detected, has the distortion factor that distortion factor is more than predetermined threshold value in M face Become region and carry out distortion correction.Further, human face region is divided into distortion factor according to the big I of distortion factor to be less than Or region equal to predetermined threshold value and distortion factor are more than the distorted region of predetermined threshold value, predetermined threshold value can be more than to distortion factor Region carry out distortion correction, and to less than or equal to predetermined threshold value distorted region keep it is constant.
It is used as a kind of possible embodiment, it is assumed that distorted region includes distorted region i, terminal can obtain user for being somebody's turn to do Distorted region i distortion correction coefficient;Distortion correction is carried out to the distorted region i according to the distortion correction coefficient.Also It is to say, user can be corrected to any face distorted region using same distortion correction coefficient.
What the embodiment of the present invention was photographed to the camera of terminal find a view, and picture carries out Face datection;If detecting described take There is M face in scape picture, judge to be more than the distorted region of predetermined threshold value in the M face with the presence or absence of distortion factor, Wherein, M is the integer more than or equal to 1;If so, carrying out distortion correction to the distorted region.Can using the embodiment of the present invention Face in the picture of finding a view photographed to camera is detected, and carries out distortion correction to the face detected, so that, subtract The distortion degree of distortion face in small wide-angle camera.
Referring to Fig. 2, Fig. 2 is a kind of second embodiment of the method for face distortion correction provided in an embodiment of the present invention Schematic flow sheet.The method of face distortion correction described in the present embodiment, including step:
What S201, the camera to terminal were photographed find a view, and picture carries out Face datection.
Wherein, terminal can carry out Face datection to the picture of finding a view that the camera of the terminal is shot.Face datection can basis The face mask of people, face feature (such as nose, eyes, face, eyebrow), current human face detection tech is more ripe.
If S202, detecting in the picture of finding a view and there is M face, judge to whether there is in the M face and distort Coefficient is more than the distorted region of predetermined threshold value, wherein, M is the integer more than or equal to 1.
Wherein, if terminal, which is detected, has M face in picture of finding a view, it can determine whether whether deposited in the M face It is more than the distortion factor of predetermined threshold value in distortion factor.Because face occupies certain in the picture of finding a view that camera is photographed Area, thus, distortion factor of the face on diverse location, the position is different.
S203, if so, to the distorted region carry out distortion correction.
Wherein, it is abnormal to this if terminal, which is detected, has the distortion factor that distortion factor is more than predetermined threshold value in M face Become region and carry out distortion correction.Further, human face region is divided into distortion factor according to the big I of distortion factor to be less than Or region equal to predetermined threshold value and distortion factor are more than the distorted region of predetermined threshold value, predetermined threshold value can be more than to distortion factor Region carry out distortion correction, and to less than or equal to predetermined threshold value distorted region keep it is constant.
S204, the size for determining the human face region after distortion correction.
Wherein, terminal can determine that the size of the human face region after distortion correction, and terminal can be entered to the face after distortion correction Row contour detecting, to determine the size of human face region, or, terminal can according to the human face region size before non-distortion correction and The position for the corresponding pixel value for human face region obtain after a series of algorithm calculating determines the size of human face region.
S205, the first position of centre of gravity for determining according to the size of the human face region after the distortion correction distorted region Second position of centre of gravity of correcting area corresponding with the distorted region is calculated, by first position of centre of gravity and second weight Heart position is overlapped, and the correcting area is fused to the camera of the terminal using the position of centre of gravity after coincidence as center In the picture of finding a view photographed.
Wherein, terminal determines the first position of centre of gravity and meter of distorted region according to the size of the human face region after distortion correction The second position of centre of gravity of the corresponding correcting area in distorted region is calculated, the first position of centre of gravity and second position of centre of gravity are weighed Close, correcting area is fused in the picture of finding a view that the camera of terminal is photographed using the position of centre of gravity after coincidence as center. So as to which the human face region after correction is preferably mounted in original distorted position.
What the embodiment of the present invention was photographed to the camera of terminal find a view, and picture carries out Face datection;If detecting described take There is M face in scape picture, judge to be more than the distorted region of predetermined threshold value in the M face with the presence or absence of distortion factor, Wherein, M is the integer more than or equal to 1;If so, carrying out distortion correction to the distorted region;Determine the people after distortion correction The size in face region;Determine the center of gravity position of the corresponding correcting area of position of centre of gravity and the distorted region of the distorted region Put, both are overlapped, the correcting area is fused to the shooting of the terminal as center by the position of centre of gravity after coincidence In the picture of finding a view that head is photographed.Face in the picture of finding a view that can be photographed using the embodiment of the present invention to camera is examined Survey, and distortion correction is carried out to the face detected, so that, reduce the distortion degree for the face that distorted in wide-angle camera, meanwhile, On the position for the face that the face after distortion correction can be placed on before non-distortion correction.
Referring to Fig. 3, Fig. 3 is a kind of 3rd embodiment of the method for face distortion correction provided in an embodiment of the present invention Schematic flow sheet.The method of face distortion correction described in the present embodiment, including step:
What S301, the camera to terminal were photographed find a view, and picture carries out Face datection.
Wherein, terminal can carry out Face datection to the picture of finding a view that the camera of the terminal is shot.Face datection can basis The face mask of people, face feature (such as nose, eyes, face, eyebrow), current human face detection tech is more ripe.
If S302, detecting in the picture of finding a view and there is M face, judge to whether there is in the M face and distort Coefficient is more than the distorted region of predetermined threshold value, wherein, M is the integer more than or equal to 1.
Wherein, if terminal, which is detected, has M face in picture of finding a view, it can determine whether whether deposited in the M face It is more than the distortion factor of predetermined threshold value in distortion factor.Because face occupies certain in the picture of finding a view that camera is photographed Area, thus, distortion factor of the face on diverse location, the position is different.
S303, if so, obtain user input distortion threshold value.
Wherein, if terminal, which is detected, has the distortion factor that distortion factor is more than predetermined threshold value in M face, use can be obtained The distortion threshold value of family input, the threshold value is adjusted for user, and terminal can be adjusted to the human face region more than the threshold value, And the human face region less than or equal to the threshold value is not processed.
S304, determine that distortion factor in the distorted region is more than the target area of the distortion threshold value.
Wherein, terminal determines that distortion factor in distorted region is more than the target area of the distortion threshold value, i.e., in human face region Distorted region in distortion factor be more than distortion threshold coefficient pixel may make up target area.
S305, to the target area carry out distortion correction.
Wherein, terminal only can carry out distortion correction to target area, so that, the fault image of some entertaining can be produced, because For the corresponding different fault image of different distortion factors.
What the embodiment of the present invention was photographed to the camera of terminal find a view, and picture carries out Face datection;If detecting described take There is M face in scape picture, judge to be more than the distorted region of predetermined threshold value in the M face with the presence or absence of distortion factor, Wherein, M is the integer more than or equal to 1;If so, obtaining the distortion threshold value of user's input;Determine to distort in the distorted region Coefficient is more than the target area of the distortion threshold value;Distortion correction is carried out to the target area.In this way, can be for user's input Distortion threshold value, in face distorted region carry out distortion correction so that, reduce wide-angle camera in distort face distortion Degree, while having interest.
Fig. 4 a are referred to, Fig. 4 a are a kind of schematic flow sheets of the first embodiment of terminal provided in an embodiment of the present invention. The method of terminal described in the present embodiment, including step:
Detection unit 401, Face datection is carried out for the picture of finding a view that the camera to terminal is photographed.
Wherein, detection unit 401 can carry out Face datection to the picture of finding a view that the camera of the terminal is shot.Face datection Face mask that can be according to people, face feature (such as nose, eyes, face, eyebrow), current human face detection tech is more It is ripe.
As a kind of possible embodiment, the terminal described by the embodiment of the present invention can also include determining unit (in figure Do not mark), it is used to that the terminal can be determined before the picture of finding a view for photographing the camera of terminal carries out Face datection The pre- photo angle scope of camera, user can adjust according to the scenery for wanting to take pictures and clap when the camera of terminal is started The angular range taken the photograph, pre- photo angle scope is exactly that user is determined according to the size in region shared by scenery in scene.Terminal The touching instruction of the photo angle scope of user's selection can be first obtained, the pre- angle of taking pictures of the camera of terminal is determined according to the instruction Spend scope.For example, if the scenery scope in scene is smaller, pre- photo angle scope can be adjusted to the camera lens of common camera Scope, in this case, obtained photo distortion very little of taking pictures, it is believed that undistorted;If the scenery scope in scene is larger, The camera lens scope of common camera is had been over, the image of pre- photo angle scope may carry out distortion correction.
As a kind of possible embodiment, the camera of terminal can be the front camera of terminal or rearmounted shooting Head;Or, the camera of terminal can for terminal wirelessly or wired mode control camera.
, there is M face if being detected for the detection unit 401 in the picture of finding a view, judge in judging unit 402 It is more than the distorted region of predetermined threshold value in the M face with the presence or absence of distortion factor, wherein, M is whole more than or equal to 1 Number.
Wherein, if detection unit 401, which is detected, has M face in picture of finding a view, judging unit 402 can determine whether It is more than the distortion factor of predetermined threshold value in the M face with the presence or absence of distortion factor.Because face is in taking that camera is photographed Occupy certain area in scape picture, thus, distortion factor of the face on diverse location, the position is different.Need explanation Be, it is generally the case that due to the characteristic of wide-angle camera itself, thus, what the distortion of wide-angle camera existed always, and extensively Angle camera has symmetry characteristic under normal circumstances, and with the center of wide-angle camera to both sides, distortion factor presents symmetrical Distribution, distortion factor occurred in the prior art, did not made excessive description herein.Distortion factor represents that wide-angle camera is clapped The distortion degree for the image taken the photograph, the distortion factor of wide-angle camera is bigger, illustrates that distortion is bigger, and the distortion system of wide-angle camera Within the specific limits, i.e., distortion factor is less than the situation of a certain predetermined threshold value to number, then it is believed that distortion factor is less than a certain preset The corresponding region of threshold value is orthoscopic zone, and its corresponding photo angle scope may be defined as undistorted photo angle scope.
As a kind of possible embodiment, as shown in Figure 4 b, terminal in Fig. 4 a described by the embodiment of the present invention is sentenced Disconnected unit 402 may also include:First determining unit 4021 and judgment sub-unit 4022, it is specific as follows:
First determining unit 4021, for determining to photograph less than or equal to the corresponding camera of the predetermined threshold value Picture of finding a view corresponding angle scope;
Judgment sub-unit 4022, for the corresponding angles for judging to determine with the presence or absence of the determining unit in the M face The region spent outside scope.
Unit 403 is corrected, for judging that there is distortion factor in the M face is more than in the judging unit 402 The distorted region of predetermined threshold value, distortion correction is carried out to the distorted region.
Wherein, if judging unit 402 judges there is the distorted region that distortion factor is more than predetermined threshold value in M face, Correct unit 403 and distortion correction then is carried out to the distorted region.Further, according to the big I of distortion factor by human face region The distorted region that distortion factor is more than predetermined threshold value less than or equal to the region of predetermined threshold value and distortion factor is divided into, can be to abnormal The region that variable coefficient is more than predetermined threshold value carries out distortion correction, and the distorted region less than or equal to predetermined threshold value is kept not Become.
It is used as a kind of possible embodiment, as illustrated in fig. 4 c, the school of the terminal in Fig. 4 a described by the embodiment of the present invention Positive unit 403 may also include:First acquisition unit 4031 and first corrects subelement 4032, specific as follows:
First acquisition unit 4031, the distortion correction coefficient of the distorted region i is directed to for obtaining user.
First correction subelement 4032, for entering line distortion school to the distorted region i according to the distortion correction coefficient Just.
In the specific implementation, assuming that distorted region includes distorted region i, first acquisition unit 4031 can obtain user for being somebody's turn to do Distorted region i distortion correction coefficient;First correction subelement 4032 is according to the distortion correction coefficient to the distorted region i Carry out distortion correction.That is, user can be corrected to any face distorted region using same distortion correction coefficient.
It is used as a kind of possible embodiment, as shown in figure 4d, the school of the terminal in Fig. 4 a described by the embodiment of the present invention Positive unit 403 may include:Second acquisition unit 4041, the 3rd determining unit 4042 and the second correction subelement 4043, specifically such as Under:
Second acquisition unit 4041, the distortion threshold value for obtaining user's input.
Wherein, if detection unit 402, which is detected, has the distortion factor that distortion factor is more than predetermined threshold value in M face, Second acquisition unit 4041 can obtain the distortion threshold value of user's input, and the threshold value is adjusted for user, terminal can to more than The human face region of the threshold value is adjusted, and the human face region less than or equal to the threshold value is not processed.
3rd determining unit 4042, for determining that distortion factor is more than the second acquisition unit in the distorted region The target area of the 4041 distortion threshold values got.
Wherein, the 3rd determining unit 4042 can determine that target area of the distortion factor more than the distortion threshold value in distorted region Distortion factor may make up target area more than distortion threshold coefficient pixel in distorted region in domain, i.e. human face region.
Second correction subelement 4043, distortion correction is carried out to the target area that the 3rd determining unit 4042 is determined.
Wherein, the second correction subelement 4043 only can carry out distortion correction to target area, so that, some entertaining can be produced Fault image because the corresponding different fault image of different distortion factor.
As a kind of possible embodiment, as shown in fig 4e, the terminal in Fig. 4 a described by the embodiment of the present invention may be used also Including:Second determining unit 404 and integrated unit 405, it is specific as follows:
Second determining unit 404, the size for determining the human face region after the correction element distortion correction;
Integrated unit 405, for determining the distorted region according to the size of the human face region after the distortion correction Second position of centre of gravity of the first position of centre of gravity correcting area corresponding with the distorted region is calculated, by first position of centre of gravity Overlapped, be fused to the correcting area using the position of centre of gravity after coincidence as center described with second position of centre of gravity In what the camera of terminal was photographed find a view picture.
The picture of finding a view that terminal described by the embodiment of the present invention is photographed by the camera to terminal carries out face inspection Survey;There is M face if detecting in the picture of finding a view, judge in the M face with the presence or absence of distortion factor more than pre- If the distorted region of threshold value, wherein, M is the integer more than or equal to 1;If so, carrying out distortion correction to the distorted region.Adopt Face in the picture of finding a view that can be photographed with the embodiment of the present invention to camera is detected, and the face detected is carried out Distortion correction, so that, reduce the distortion degree for the face that distorted in wide-angle camera.
Referring to Fig. 5, Fig. 5 is a kind of structural representation of the second embodiment of terminal provided in an embodiment of the present invention.This Terminal described in embodiment includes:At least one input equipment 1000;At least one output equipment 2000;At at least one Manage device 3000, such as CPU;With memory 4000, above-mentioned input equipment 1000, output equipment 2000, processor 3000 and storage Device 4000 is connected by bus 5000.
Wherein, above-mentioned input equipment 1000 can be contact panel, common PC, liquid crystal display, touch screen, push button etc..
Above-mentioned memory 4000 can be high-speed RAM memory, or non-labile memory (non-volatile Memory), such as magnetic disk storage.Above-mentioned memory 4000 is used to store batch processing code, above-mentioned input equipment 1000, defeated Going out equipment 2000 and processor 3000 is used to call the program code stored in memory 4000, performs following operation:
Above-mentioned processor 3000, is used for:
The picture of finding a view photographed to the camera of terminal carries out Face datection;
If detecting in the picture of finding a view and there is M face, judge big with the presence or absence of distortion factor in the M face In the distorted region of predetermined threshold value, wherein, M is the integer more than or equal to 1;
If so, carrying out distortion correction to the distorted region.
As a kind of possible implementation, above-mentioned processor 3000 is judged in the M face with the presence or absence of distortion system Number is more than the distorted region of predetermined threshold value, is specially:
It is determined that the corresponding angle for the picture of finding a view that the camera corresponding less than or equal to the predetermined threshold value is photographed Scope;
Judge to whether there is the region outside the corresponding angle scope in the M face.
As a kind of possible implementation, above-mentioned 3000 pairs of the processor distorted region is carried out after distortion correction, Also particularly useful for:
Determine the size of the human face region after distortion correction;
The first position of centre of gravity and meter of the distorted region are determined according to the size of the human face region after the distortion correction The second position of centre of gravity of the corresponding correcting area in the distorted region is calculated, by first position of centre of gravity and second center of gravity position Put and overlapped, the camera that the correcting area is fused into the terminal using the position of centre of gravity after coincidence as center is shot To picture of finding a view in.
As a kind of possible implementation, the distorted region includes distorted region i, described in above-mentioned 3000 pairs of processor Distorted region carries out distortion correction, is specially:
Obtain the distortion correction coefficient that user is directed to the distorted region i;
Distortion correction is carried out to the distorted region i according to the distortion correction coefficient.
As a kind of possible implementation, above-mentioned 3000 pairs of the processor distorted region carries out distortion correction, specifically For:
Obtain the distortion threshold value of user's input;
Determine target area of the distortion factor more than the distortion threshold value in the distorted region;
Distortion correction is carried out to the target area.
The picture of finding a view that terminal described by the embodiment of the present invention is photographed by the camera to terminal carries out face inspection Survey;There is M face if detecting in the picture of finding a view, judge in the M face with the presence or absence of distortion factor more than pre- If the distorted region of threshold value, wherein, M is the integer more than or equal to 1;If so, carrying out distortion correction to the distorted region.Adopt Face in the picture of finding a view that can be photographed with the embodiment of the present invention to camera is detected, and the face detected is carried out Distortion correction, so that, reduce the distortion degree for the face that distorted in wide-angle camera.
The embodiment of the present invention also provides a kind of computer-readable storage medium, wherein, the computer-readable storage medium can be stored with journey Sequence, the part or all of step including any one signal processing method described in the above method embodiment when program is performed Suddenly.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiment.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement because According to the present invention, some steps be able to may be carried out using other orders or simultaneously.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily this hair Necessary to bright.
, can be by another way in several embodiments provided herein, it should be understood that disclosed device Realize.For example, device embodiment described above is only schematical, the division of such as said units is only one kind Division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can combine or can To be integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed each other Coupling direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit, Can be electrical or other forms.
The above-mentioned unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in various embodiments of the present invention can be integrated in a processing unit or Unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated unit Both it can be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If above-mentioned integrated unit is realized using in the form of SFU software functional unit and as independent production marketing or used When, it can be stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially The part contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are to cause a computer Equipment (can be personal computer, server or network equipment etc., can be specifically the processor in computer equipment) is held The all or part of step of each embodiment above method of the row present invention.Wherein, foregoing storage medium may include:USB flash disk, shifting Dynamic hard disk, magnetic disc, CD, read-only storage (English:Read-Only Memory, abbreviation:) or random access memory ROM (English:Random Access Memory, abbreviation:RAM it is) etc. various can be with the medium of store program codes.
Described above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Embodiment is stated the present invention is described in detail, it will be understood by those within the art that:It still can be to preceding State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (8)

1. a kind of method of face distortion correction, it is characterised in that including:
The picture of finding a view photographed to the camera of terminal carries out Face datection;
There is M face if detecting in the picture of finding a view, judge in the M face with the presence or absence of distortion factor more than pre- If the distorted region of threshold value, wherein, M is the integer more than or equal to 1;
If so, carrying out distortion correction to the distorted region;
Determine the size of the human face region after distortion correction;
First position of centre of gravity of the distorted region is determined according to the size of the human face region after the distortion correction and institute is calculated The second position of centre of gravity of the corresponding correcting area in distorted region is stated, first position of centre of gravity and second position of centre of gravity are entered Row is overlapped, what the camera that the correcting area is fused into the terminal using the position of centre of gravity after coincidence as center was photographed Find a view in picture.
2. the method as described in claim 1, it is characterised in that whether there is distortion factor in the judgement M face More than the distorted region of predetermined threshold value, including:
It is determined that the corresponding angle scope for the picture of finding a view that the camera corresponding less than or equal to the predetermined threshold value is photographed;
Judge to whether there is the region outside the corresponding angle scope in the M face.
3. the method as described in any one of claim 1 or 2, it is characterised in that the distorted region includes distorted region i, institute State and distortion correction is carried out to the distorted region, including:
Obtain the distortion correction coefficient that user is directed to the distorted region i;
Distortion correction is carried out to the distorted region i according to the distortion correction coefficient.
4. the method as described in any one of claim 1 or 2, it is characterised in that described that line distortion school is entered to the distorted region Just, including:
Obtain the distortion threshold value of user's input;
Determine target area of the distortion factor more than the distortion threshold value in the distorted region;
Distortion correction is carried out to the target area.
5. a kind of terminal, it is characterised in that including:
Detection unit, Face datection is carried out for the picture of finding a view that the camera to terminal is photographed;
, there is M face if being detected for the detection unit in the picture of finding a view, judge the M people in judging unit It is more than the distorted region of predetermined threshold value in face with the presence or absence of distortion factor, wherein, M is the integer more than or equal to 1;
Unit is corrected, for there is distortion factor in judging the M face in the judging unit more than predetermined threshold value Distorted region, distortion correction is carried out to the distorted region;
Second determining unit, the size for determining the human face region after the correction element distortion correction;
Integrated unit, the first center of gravity for determining the distorted region according to the size of the human face region after the distortion correction Second position of centre of gravity of position correcting area corresponding with the distorted region is calculated, by first position of centre of gravity and described the Two position of centre of gravitys are overlapped, and the correcting area is fused into taking the photograph for the terminal using the position of centre of gravity after coincidence as center In the picture of finding a view photographed as head.
6. terminal as claimed in claim 5, it is characterised in that the judging unit includes:
First determining unit, for determining to be less than or equal to the picture of finding a view that the corresponding camera of the predetermined threshold value is photographed The corresponding angle scope in face;
Judgment sub-unit, for judge in the M face with the presence or absence of the determining unit determine corresponding angle scope it Outer region.
7. the terminal as described in any one of claim 5 or 6, it is characterised in that the distorted region includes distorted region i, institute Stating correction unit includes:
First acquisition unit, the distortion correction coefficient of the distorted region i is directed to for obtaining user;
First correction subelement, for carrying out distortion correction to the distorted region i according to the distortion correction coefficient.
8. the terminal as described in any one of claim 5 or 6, it is characterised in that the correction unit includes:
Second acquisition unit, the distortion threshold value for obtaining user's input;
3rd determining unit, for determining that distortion factor is abnormal more than what the second acquisition unit was got in the distorted region Become the target area of threshold value;
Second correction subelement, distortion correction is carried out to the target area that the 3rd determining unit is determined.
CN201510378947.0A 2015-06-30 2015-06-30 A kind of method and terminal of face distortion correction Expired - Fee Related CN104994281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510378947.0A CN104994281B (en) 2015-06-30 2015-06-30 A kind of method and terminal of face distortion correction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510378947.0A CN104994281B (en) 2015-06-30 2015-06-30 A kind of method and terminal of face distortion correction

Publications (2)

Publication Number Publication Date
CN104994281A CN104994281A (en) 2015-10-21
CN104994281B true CN104994281B (en) 2017-09-19

Family

ID=54306031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510378947.0A Expired - Fee Related CN104994281B (en) 2015-06-30 2015-06-30 A kind of method and terminal of face distortion correction

Country Status (1)

Country Link
CN (1) CN104994281B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4071707A4 (en) * 2019-12-09 2023-05-24 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and apparatus for correcting face distortion, electronic device, and storage medium
EP4064177A4 (en) * 2019-12-09 2023-05-24 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image correction method and apparatus, and terminal device and storage medium

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6723512B2 (en) * 2015-12-22 2020-07-15 カシオ計算機株式会社 Image processing apparatus, image processing method and program
US10440307B2 (en) 2015-12-22 2019-10-08 Casio Computer Co., Ltd. Image processing device, image processing method and medium
CN105611161B (en) * 2015-12-24 2019-03-12 Oppo广东移动通信有限公司 Camera control method, photographing control device and camera system
CN105554403B (en) * 2016-02-29 2018-12-04 广东欧珀移动通信有限公司 Control method, control device and electronic device
CN108932698B (en) * 2017-11-17 2021-07-23 北京猎户星空科技有限公司 Image distortion correction method, device, electronic equipment and storage medium
JP6688277B2 (en) * 2017-12-27 2020-04-28 本田技研工業株式会社 Program, learning processing method, learning model, data structure, learning device, and object recognition device
CN108803011A (en) * 2018-03-15 2018-11-13 成都理想境界科技有限公司 A kind of image correction method and optical fiber scanning imaging device
CN111093022A (en) * 2018-10-24 2020-05-01 西安中兴新软件有限责任公司 Image shooting method, device, terminal and computer storage medium
CN111144182B (en) * 2018-11-06 2023-04-07 天地融科技股份有限公司 Method and system for detecting face risk in video
CN112312056A (en) * 2019-08-01 2021-02-02 普兰特龙尼斯公司 Video conferencing with adaptive lens distortion correction and image distortion reduction
CN110751602B (en) * 2019-09-20 2022-09-30 北京迈格威科技有限公司 Conformal distortion correction method and device based on face detection
CN110660034B (en) * 2019-10-08 2023-03-31 北京迈格威科技有限公司 Image correction method and device and electronic equipment
CN111008605B (en) * 2019-12-09 2023-08-11 Oppo广东移动通信有限公司 Linear processing method and device in face image, terminal equipment and storage medium
CN111080545B (en) * 2019-12-09 2024-03-12 Oppo广东移动通信有限公司 Face distortion correction method, device, terminal equipment and storage medium
CN110971827B (en) * 2019-12-09 2022-02-18 Oppo广东移动通信有限公司 Portrait mode shooting method and device, terminal equipment and storage medium
CN111401223B (en) * 2020-03-13 2023-09-19 北京新氧科技有限公司 Face shape comparison method, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007119712A1 (en) * 2006-04-13 2007-10-25 Opt Corporation Camera apparatus, and image processing apparatus and image processing method
CN103247031A (en) * 2013-04-19 2013-08-14 华为技术有限公司 Method, terminal and system for correcting aberrant image
CN103283214A (en) * 2011-01-06 2013-09-04 松下电器产业株式会社 Camera, distortion correction device and distortion correction method
CN104469137A (en) * 2013-09-20 2015-03-25 卡西欧计算机株式会社 Image Processing Apparatus and Image Processing Method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007119712A1 (en) * 2006-04-13 2007-10-25 Opt Corporation Camera apparatus, and image processing apparatus and image processing method
CN103283214A (en) * 2011-01-06 2013-09-04 松下电器产业株式会社 Camera, distortion correction device and distortion correction method
CN103247031A (en) * 2013-04-19 2013-08-14 华为技术有限公司 Method, terminal and system for correcting aberrant image
CN104469137A (en) * 2013-09-20 2015-03-25 卡西欧计算机株式会社 Image Processing Apparatus and Image Processing Method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4071707A4 (en) * 2019-12-09 2023-05-24 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and apparatus for correcting face distortion, electronic device, and storage medium
EP4064177A4 (en) * 2019-12-09 2023-05-24 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image correction method and apparatus, and terminal device and storage medium

Also Published As

Publication number Publication date
CN104994281A (en) 2015-10-21

Similar Documents

Publication Publication Date Title
CN104994281B (en) A kind of method and terminal of face distortion correction
CN108305236B (en) Image enhancement processing method and device
KR101916355B1 (en) Photographing method of dual-lens device, and dual-lens device
CN107509037B (en) The method and terminal taken pictures using different field angle cameras
CN109064390B (en) Image processing method, image processing device and mobile terminal
CN105141827B (en) Distortion correction method and terminal
US9940087B2 (en) Method for displaying image and electronic device thereof
CN105141826B (en) A kind of distortion correction method and terminal
KR20180070264A (en) Obtaining method for Panning shot image and Electronic device supporting the same
CN107395958A (en) Image processing method and device, electronic equipment and storage medium
CN104468995A (en) Method for controlling cameras and mobile terminal
CN110648296B (en) Pupil color correction method, correction device, terminal device and storage medium
KR102610542B1 (en) Electronic device and method for adjusting color of image data using infrared sensor
US10339672B2 (en) Method and electronic device for verifying light source of images
CN108134903B (en) Shooting method and related product
WO2015018297A1 (en) Image processing method and apparatus and terminal device
CN106646822A (en) Lens assembly and electronic device with the same
CN108052407A (en) A kind of application crash means of defence, device, equipment and storage medium
KR20200094500A (en) Electronic device and method for processing line data included in image frame data into multiple intervals
CN104994286B (en) The method and terminal of a kind of distortion correction
EP3300352B1 (en) Method and electronic device for detecting wavelength spectrum of incident light
EP3979624A1 (en) Method for determining semi-synchronous exposure parameters and electronic device
CN112351271A (en) Camera shielding detection method and device, storage medium and electronic equipment
CN108196676B (en) Tracking identification method and system
CN116092176A (en) Method and system for detecting gestures, and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170919

CF01 Termination of patent right due to non-payment of annual fee