Guiding camera positioning during image capture in an electronic device
An electronic device, a method and a computer program product for guiding positioning of the electronic device during image capturing. The method includes, while an electronic device is in an image capturing mode using a camera, determining if a first preview image contains a face of a subject whose image is to be captured. In response to determining the preview image contains the face of the subject, the method includes calculating a deviation angle based on an eye level of the target subject and a projection line of a lens of the camera and determining if the deviation angle is within a deviation angle range. In response to determining the deviation angle is not within the deviation angle range, the method includes determining a first direction to move the electronic device to reduce the deviation angle and outputting an indication to move the electronic device in the first direction.
1 . An electronic device comprising:
at least one camera, including a first camera that has a first projection line from a lens of the first camera, based on an elevation level of the first camera relative to a surface of the earth;
at least one display, including a first display;
a memory having stored thereon a camera guiding and positioning (CGP) module for guiding positioning of the electronic device during image capturing; and
at least one processor communicatively coupled to the at least one camera, the at least one display, and the memory, and which executes program code of the CGP module, the at least one processor configured to cause the electronic device to:
while the electronic device is in a first image capturing mode using the first camera, extract a first preview image from a first preview image stream being captured via the first camera;
determine if the first preview image contains a face of at least one first subject whose image is to be captured, the at least one first subject having a first eye level;
in response to determining the first preview image contains the face of the at least one first subject, calculate a first deviation angle based on the first eye level and the first projection line of the lens of the first camera;
determine if the first deviation angle is within a deviation angle range; and
in response to determining the first deviation angle is not within the deviation angle range:
determine a first direction to move the electronic device to reduce the first deviation angle such that, after being moved in the first direction, the electronic device is in an improved alignment with the face of the at least one first subject; and
output an indication to a user of the electronic device to move the electronic device in the first direction.
2 . The electronic device of claim 1 , wherein the at least one processor is configured to cause the electronic device to:
in response to determining the first deviation angle is within the deviation angle range, output the indication to the user of the electronic device that the electronic device is in an optimal alignment, with the face of the at least one first subject, to capture a first persistent image.
3 . The electronic device of claim 1 , wherein the at least one processor is configured to cause the electronic device to:
in response to determining the first deviation angle is within the deviation angle range:
autonomously capture a first persistent image, via the first camera; and
store the first persistent image to the memory.
4 . The electronic device of claim 1 , wherein to output the indication to the user of the electronic device to move the electronic device in the first direction, the at least one processor is configured to cause the electronic device to:
present a first graphical user interface (GUI) on the first display, the first GUI including at least a portion of the first preview image stream captured via the first camera and a first directional indicator indicating the first direction to move the electronic device to reduce the first deviation angle.
5 . The electronic device of claim 4 , wherein the at least one processor is configured to cause the electronic device to:
determine a first distance to move the electronic device in the first direction to reduce the first deviation angle; and
output the indication to the user of the electronic device to move the electronic device the first distance in the first direction.
6 . The electronic device of claim 1 , further comprising:
at least one audio output device that is communicatively coupled to the at least one processor, and wherein to output the indication to the user of the electronic device to move the electronic device in the first direction, the at least one processor is configured to cause the electronic device to:
output, via the at least one audio output device, a first audio directional indicator indicating the first direction to move the electronic device to reduce the first deviation angle.
7 . The electronic device of claim 1 , further comprising:
at least one motion sensor that is communicatively coupled to the at least one processor, and wherein to calculate the first deviation angle, the at least one processor is configured to cause the electronic device to:
receive first motion data from the least one motion sensor;
determine the first projection line based on the first motion data; and
determine an angle difference between the first eye level and the first projection line to obtain the first deviation angle.
8 . The electronic device of claim 1 , further comprising:
at least one motion sensor that is communicatively coupled to the at least one processor, the at least one processor configured to cause the electronic device to:
in response to detecting movement of the electronic device:
extract a second preview image from a second preview image stream being captured via the first camera;
determine a second eye level based on the second preview image;
receive second motion data from the least one motion sensor;
determine a second projection line based on the second motion data;
calculate a second deviation angle based on the second eye level and the second projection line;
determine if the second deviation angle is within the deviation angle range; and
in response to determining the second deviation angle is not within the deviation angle range:
determine a second direction to move the electronic device to reduce the second deviation angle; and
output an indication to a user of the electronic device to move the electronic device in the second direction.
9 . The electronic device of claim 1 , wherein the at least one processor is configured to cause the electronic device to:
determine if the first preview image contains the face of a second subject whose image is to be captured, the second subject having a second eye level;
determine an average eye level based on the first eye level and the second eye level;
calculate a third deviation angle based on the average eye level and the first projection line of the first camera;
determine if the third deviation angle is within the deviation angle range; and
in response to determining the third deviation angle is not within the deviation angle range:
determine a third direction to move the electronic device to reduce the third deviation angle; and
output an indication to a user of the electronic device to move the electronic device in the third direction.
10 . The electronic device of claim 1 , wherein the first direction is in a vertical direction relative to the earth such that, after being moved in the first direction, the electronic device is in an improved alignment with the face of the at least one first subject, prior to capturing a first persistent image.
11 . The electronic device of claim 1 , wherein the first projection line is a substantially horizontal virtual projection line that is substantially parallel to the surface of the earth and the first eye level is determined relative to the surface of the earth.
12 . A method comprising:
while an electronic device is in a first image capturing mode using a first camera:
extracting, via at least one processor, a first preview image from a first preview image stream being captured via the first camera;
determining if the first preview image contains a face of at least one first subject whose image is to be captured, the at least one first subject having a first eye level;
in response to determining the first preview image contains the face of the at least one first subject, calculating a first deviation angle based on the first eye level and a first projection line of a lens of the first camera;
determining if the first deviation angle is within a deviation angle range; and
in response to determining the first deviation angle is not within the deviation angle range:
determining a first direction to move the electronic device to reduce the first deviation angle such that, after being moved in the first direction, the electronic device is in an improved alignment with the face of the at least one first subject; and
outputting an indication to a user of the electronic device to move the electronic device in the first direction.
13 . The method of claim 12 , further comprising:
in response to determining the first deviation angle is within the deviation angle range, outputting the indication to the user of the electronic device that the electronic device is in an optimal alignment, with the face of the at least one first subject, to capture a first persistent image.
14 . The method of claim 12 , further comprising:
in response to determining the first deviation angle is within the deviation angle range:
autonomously capturing a first persistent image, via the first camera; and
storing the first persistent image to a memory.
15 . The method of claim 12 , wherein to output the indication to the user of the electronic device to move the electronic device in the first direction, the method further comprises:
presenting a first graphical user interface (GUI) on a first display, the first GUI including at least a portion of the first preview image stream captured via the first camera and a first directional indicator indicating the first direction to move the electronic device to reduce the first deviation angle.
16 . The method of claim 15 , further comprising:
determining a first distance to move the electronic device in the first direction to reduce the first deviation angle; and
outputting the indication to the user of the electronic device to move the electronic device the first distance in the first direction.
17 . The method of claim 12 , further comprising:
outputting, via at least one audio output device, a first audio directional indicator indicating the first direction to move the electronic device to reduce the first deviation angle.
18 . The method of claim 12 , wherein to calculate the first deviation angle, the method further comprises:
receiving first motion data from at least one motion sensor;
determining the first projection line based on the first motion data; and
determining an angle difference between the first eye level and the first projection line to obtain the first deviation angle.
19 . The method of claim 12 , further comprising:
in response to detecting movement of the electronic device:
extracting a second preview image from a second preview image stream being captured via the first camera;
determining a second eye level based on the second preview image;
receiving second motion data from at least one motion sensor;
determining a second projection line based on the second motion data;
calculating a second deviation angle based on the second eye level and the second projection line;
determining if the second deviation angle is within the deviation angle range; and
in response to determining the second deviation angle is not within the deviation angle range:
determining a second direction to move the electronic device to reduce the second deviation angle; and
outputting the indication to the user of the electronic device to move the electronic device in the second direction.
20 . A computer program product comprising:
a computer readable storage device having stored thereon program code which, when executed by at least one processor of an electronic device having at least one camera and at least one display, configures the electronic device to complete the functionality of:
while an electronic device is in a first image capturing mode using a first camera:
extracting a first preview image from a first preview image stream being captured via a first camera;
determining if the first preview image contains a face of at least one first subject whose image is to be captured, the at least one first subject having a first eye level;
in response to determining the first preview image contains the face of the at least one first subject, calculating a first deviation angle based on the first eye level and a first projection line of a lens of the first camera;
determining if the first deviation angle is within a deviation angle range; and
in response to determining the first deviation angle is not within the deviation angle range:
determining a first direction to move the electronic device to reduce the first deviation angle such that, after being moved in the first direction, the electronic device is in an improved alignment with the face of the at least one first subject; and
outputting an indication to a user of the electronic device to move the electronic device in the first direction.