Detailed Description
The invention provides a photographic method and a photographic device, which detect target parameters input into an image and determine position adjustment information of a person to be photographed according to the detection result of the target parameters; and outputting corresponding prompt information to the photographed person for position adjustment according to the position adjustment information, and photographing the photographed person. The target parameters include: a human face; the target parameters may also include one or more of the following parameters: the actual size of the face, the actual position of the face, and the positions of the two eyes of the face in the image.
The technical scheme of the invention is described in detail by combining the attached drawings of the specification:
a first embodiment of the present invention provides a photographing method, as shown in fig. 1, including:
and S100, inputting the acquired image of the photographed person.
The collected image of the photographed person may be in YUV color format, where Y refers to the brightness of the image, U and V refer to the color tone of the image, and the image represented by the format is clear and easy to compress, and may be in other formats (such as RGB format);
and inputting the acquired images in a certain format by taking a frame as a unit.
S200, detecting whether each frame of input image contains a human face, and if the image does not contain the human face, indicating that the person to be photographed is not in the photographing range, executing a step S300; if the image contains a human face, which indicates that the person to be photographed is within the range in which the camera can photograph, step S400 is performed, i.e., direct photographing is performed.
In this step, the input image is dynamically detected in real time, that is, every time an image is input, the input image is detected once.
S300, determining the position where the photographed person needs to correct the person, and outputting prompting information that the face is not in the image to the photographed person through an output device.
The output unit outputs the received prompt information in other forms such as voice or analog image, prompts the person to be photographed to correct his or her own position based on the output prompt information, and continues to detect the image after correcting the position from S100.
The step S400 may notify the corresponding hardware to take a picture in a register configuration manner or a command manner.
If a better photo is desired, such as a photo on a certificate such as an identification card, the image including the face can be continuously detected to obtain specific information of the face of the person to be photographed, correction processing is performed according to the detected specific information, and S400, that is, photographing is performed after the correction is completed. The correction processing includes: a distance correction process, and/or a posture correction process, and/or a horizontal position correction process.
When detecting the specific information of the face, the specific information of the face in each frame of the input image may be detected using any existing face detection and recognition technology (e.g., AdaBoost face detection technology). The specific information may be the actual size of the face, the actual position of the face, or the positions of 2 eyes of the face in the image. The actual size of the face can be represented by a rectangular area, the long side of the rectangular area is represented by the longest dimension of the detected face, and the wide side of the rectangular area is represented by the widest dimension of the detected face; the actual position of the face can be represented by coordinates of the position of a point in a rectangular area representing the actual size of the face in the image; the positions of the 2 eyes of the face in the image can be represented by coordinates of the positions of the 2 eyes of the face in the image.
The correction processing procedure is described in detail below with reference to the drawings of the specification:
distance correction processing:
the correction processing is to compare the actual size of the detected human face with a set size threshold, if the actual size of the detected human face is not in the set size threshold interval, the fact that the photographed person needs to correct the distance from the camera is determined, and relevant prompt information is output to the photographed person through an output device; if the actual size of the detected human face is within the set size threshold interval, the camera can be directly used.
Before the step is carried out, an expected size and a size threshold value of the human face are set in the system in advance, wherein the expected size of the human face is set according to the size of an input image and the distance between a photographed person and a camera, the sizes of the longest and widest places of different human faces are estimated to obtain an average value of the length and the width, the obtained average value of the length and the width is used as the long side and the wide side of a rectangular area, and the rectangular area is set as the expected size of the human face; the size threshold of the human face is obtained by subtracting a fixed deviation from the long side and the wide side of the obtained rectangular area representing the expected size of the human face respectively to obtain a smaller rectangular area, setting the obtained rectangular area as the minimum value of the size threshold, adding a fixed deviation to the long side and the wide side of the obtained rectangular area representing the expected size of the human face respectively to obtain a larger rectangular area, and setting the obtained rectangular area as the maximum value of the size threshold, wherein the fixed deviation is determined according to the precision required by the system for photographing the human face.
The preset size of the face and the size threshold of the face can be modified regularly, and the preset size of the face and the size threshold of the face can be adjusted according to the specific situation of the face.
The following describes the specific process of the distance correction process in detail with reference to the flowchart of fig. 2:
s201, detecting the actual size of the human face.
S202, comparing the actual size of the detected face with a set size threshold, and if the actual size of the detected face is larger than the maximum value of the set size threshold, indicating that the position of the person is too close to the camera, executing S203; if the actual size of the detected face is smaller than the minimum value of the set size threshold, which indicates that the person is too far away from the position of the camera, S204 is executed; if the actual size of the detected face is within the set size threshold interval, indicating that the person is in a proper distance from the camera, S205, i.e., taking a picture directly, is performed.
S203, determining that the person to be photographed is far away from the camera, and outputting the related prompt information to the person to be photographed through an output device.
S204, determining that the person to be photographed is close to the camera, and outputting related prompt information to the person to be photographed through an output device.
When comparing the actual size of the face with the set size threshold, the following is specific:
when the size of the long side of the rectangular area representing the actual size of the face is larger than the maximum value of the size of the long side of the rectangular area representing the size threshold, or when the size of the wide side of the rectangular area representing the actual size of the face is larger than the maximum value of the size of the wide side of the rectangular area representing the size threshold, determining that the actual size of the face is larger than the maximum value of the set size threshold;
when the size of the long side of the rectangular region representing the actual size of the face is smaller than the minimum value of the sizes of the long sides of the rectangular region representing the size threshold, and when the size of the wide side of the rectangular region representing the actual size of the face is smaller than the minimum value of the sizes of the wide sides of the rectangular region representing the size threshold, determining that the actual size of the face is smaller than the set size threshold;
and when the long side size and the wide side size of the rectangular area representing the actual size of the face are respectively between the maximum value and the minimum value of the long side size and the wide side size of the rectangular area representing the size threshold, determining that the actual size of the face is within the set size threshold interval.
Posture correction processing:
the correction processing is to compare the length of a connecting line between the center point of a rectangular area where the actual position of the detected human face is located and the expected position of the set human face with the radius of a circle where a set position threshold value is located, if the length of the connecting line between the center point of the rectangular area where the actual position of the detected human face is located and the expected position of the set human face is greater than the radius of the circle where the set position threshold value is located, the situation that the photographer needs to correct the posture of photographing is determined, and relevant prompt information is output to the photographer through an output device; if the length of a connecting line between the center point of the rectangular area where the actual position of the detected face is located and the expected position of the set face is smaller than or equal to the radius of the circle where the set position threshold is located, direct photographing can be performed.
Before the step is carried out, an expected position and a position threshold value of the face are set in the system in advance, wherein the expected position of the face is set according to the position of the person to be photographed, the center point of a rectangular area where the position of the face, which is possibly displayed in the image, is located is taken, the obtained center point is set as the expected position of the face of the person to be photographed, and the coordinates of the obtained center point in the image are set as the coordinates of the expected position; the position threshold of the face is a circle with the expected position of the obtained face as a circular point and a fixed length as a radius, wherein the fixed length is determined according to the accuracy required by the system for photographing the face.
The set expected position of the face and the position threshold of the face can be modified regularly, and the set expected position of the face and the position threshold of the face can also be adjusted according to the specific situation of the face.
The specific procedure of the posture correction processing will be described in detail below with reference to the flowchart of fig. 3:
s301, detecting the actual position of the human face.
S302, comparing the length of a connecting line between the center point of the rectangular area where the actual position of the detected human face is located and the expected position of the set human face with the radius of a circle where a set position threshold value is located, and if the length of the connecting line between the center point of the rectangular area where the actual position of the detected human face is located and the expected position is greater than the radius of the circle where the position threshold value is located, indicating that the posture of the photographed person needs to be corrected, executing S303 to S306; if the length of the connecting line between the center point of the rectangular area where the actual position of the detected human face is located and the expected position is less than or equal to the radius of the circle where the position threshold is located, which indicates that the posture of the person to be photographed is appropriate, S307 is executed, that is, direct photographing is performed.
When the posture of the person to be photographed needs to be corrected, the embodiment can output the related prompt information to the output device by comparing the acute angle included angle between the connecting line of the central point of the rectangular area where the actual position of the face is located and the expected position of the face with the horizontal line and the acute angle included angle between the connecting line and the vertical line, and according to the comparison result and the area where the central point of the rectangular area where the actual position of the person to be photographed is located, the person to be photographed is prompted to correct the posture of the person to be photographed according to the prompt information. For convenience of description, the following description will be made as shown in fig. 4:
the expected position of the face is taken as the origin of a coordinate system, and horizontal lines and vertical lines passing through the origin divide the image into four areas. And connecting the central point of the rectangular area where the actual position of the detected face is located with the set expected position of the face, and determining that the acute included angle between the straight line and the horizontal line is H and the acute included angle between the straight line and the vertical line is V.
S303, comparing the sizes of H and V, and if V is equal to H, namely when the distance from the center point of the rectangular area where the actual position of the face is located to the horizontal line passing through the expected position is equal to the distance from the center point of the rectangular area where the actual position is located to the vertical line passing through the expected position, executing S304; if V is greater than H, that is, when the distance from the center point of the rectangular region where the actual position of the face is located to the horizontal line passing through the expected position is less than the distance from the center point of the rectangular region where the actual position is located to the vertical line passing through the expected position, S305 is executed; if V is smaller than H, that is, when the distance from the center point of the rectangular region where the actual position of the face is located to the horizontal line passing through the expected position is greater than the distance from the center point of the rectangular region where the actual position is located to the vertical line passing through the expected position, S306 is executed.
S304, determining the area of the central point of the rectangular area where the actual position of the human face is located in the image, outputting related prompt information to the photographed person according to the area where the human face is located, and prompting the photographed person to correct the posture of the photographed person according to the prompt information. The method comprises the following specific steps:
if the center point of the rectangular area where the actual position of the face is located is in the first area, the face is shown to be inclined to the upper right, the fact that the face of the person to be photographed moves towards the lower right is determined, and relevant prompt information is output to the person to be photographed through an output device;
if the center point of the rectangular area where the actual position of the face is located is in the second area, the fact that the face is right below is indicated, the fact that the face of the person to be photographed needs to be corrected to move right above is determined, and relevant prompt information is output to the person to be photographed through an output device;
if the center point of the rectangular area where the actual position of the face is located is in the third area, the fact that the face is located at the lower left side is indicated, it is determined that the person to be photographed needs to correct the face to move towards the upper left side, and relevant prompt information is output to the person to be photographed through an output device;
if the center point of the rectangular area where the actual position of the face is located is in the fourth area, the fact that the face is on the upper left side is indicated, it is determined that the person to be photographed needs to correct the face to move towards the lower left side, and relevant prompt information is output to the person to be photographed through an output device.
S305, determining the area of the central point of the rectangular area where the actual position of the human face is located in the image, outputting related prompt information to the photographed person according to the area where the human face is located, and prompting the photographed person to correct the posture of the photographed person according to the prompt information. The method comprises the following specific steps:
if the center point of the rectangular area where the actual position of the face is located is in the first area or the second area, the fact that the face is deviated to the right is indicated, the fact that the face of the person to be photographed moves to the left is determined, and relevant prompt information is output to the person to be photographed through an output device;
if the center point of the rectangular area where the actual position of the face is located is in the third area or the fourth area, the fact that the face is deviated to the left is indicated, the fact that the face of the person to be photographed moves to the right is determined, and relevant prompt information is output to the person to be photographed through an output device.
S306, determining the area of the central point of the rectangular area where the actual position of the human face is located in the image, outputting related prompt information to the photographed person according to the area where the human face is located, and prompting the photographed person to correct the posture of the photographed person according to the prompt information. The method comprises the following specific steps:
if the center point of the rectangular area where the actual position of the face is located is in the first area or the fourth area, the fact that the face is over is indicated, the fact that the face of the person to be photographed moves downwards is determined, and relevant prompt information is output to the person to be photographed through an output device;
if the center point of the rectangular area where the actual position of the face is located is in the second area or the third area, the fact that the face is slightly below is indicated, the fact that the person to be photographed needs to correct the face to move upwards is determined, and relevant prompt information is output to the person to be photographed through an output device.
In the above-described posture correction processing, when setting the expected position of the face, it is not limited to take the center point of the rectangular region where the position where the face is likely to be displayed in the image is located, and set the obtained center point as the expected position of the face of the person to be photographed, or may take any one point in the rectangular region where the position where the face is likely to be displayed in the image and set the taken point as the expected position of the face of the person to be photographed. It should be noted that when a point in the rectangular area where the actual position of the face is located is taken, it is necessary to correspond to the position where the set expected position is located in the rectangular area, for example, if a center point of the rectangular area where the position that the face may display in the image is located is taken, and coordinates of the center point in the image are taken as coordinates of the expected position, then the center point of the rectangular area where the actual position of the face is located is also taken, and coordinates of the center point in the image are taken as coordinates of the actual position.
Horizontal position correction processing:
the correction processing comprises the steps of firstly determining the acute angle included angle between the connecting line of the positions of two eyes of a detected human face in an image and a horizontal line, comparing the obtained acute angle included angle with a set angle threshold value, and if the acute angle included angle is larger than the angle threshold value, determining that a photographer needs to correct the horizontal position of the photographer, and outputting related prompt information to the photographer through an output device; if the acute included angle is smaller than or equal to the angle threshold value, direct photographing can be performed.
Before this step is performed, an angle threshold is set in the system in advance, and the angle threshold is determined according to the accuracy required by the system for photographing the human face.
For convenience, the left eye of the human face is taken as the intersection point of the eye connecting line and the horizontal line, and the process is described in detail with reference to the flow chart of fig. 5:
s501, detecting the positions of two eyes of the human face in the image.
S502, comparing an acute angle between a connecting line of positions of two eyes of the detected human face in the image and a horizontal line with a set angle threshold, and if the angle between the connecting line of the human eyes and the horizontal line is greater than the angle threshold, indicating that the horizontal position of the photographed person needs to be corrected, executing S503 to S505; if the angle between the eye contact and the horizontal line is less than or equal to the angle threshold, which indicates that the horizontal position of the person to be photographed is appropriate, S506 is executed, i.e. direct photographing is performed.
S503, judging the position of the right eye relative to a horizontal line passing through the left eye, and if the right eye is above the horizontal line, indicating that the right eye is higher than the left eye, executing S504; if the right eye is below the horizontal line, indicating that the right eye is lower than the left eye, S505 is performed.
S504, the photographer is determined to need to correct the photographer to be higher on the left side and lower on the right side, and relevant prompt information is output to the photographer through an output device.
And S505, determining that the person to be photographed needs to correct the person to be photographed to be lower on the left side and higher on the right side, and outputting related prompt information to the person to be photographed through an output device.
It should be noted that, by sequentially performing the distance correction process, the posture correction process, and the horizontal position correction process on the image including the face detected in S200, a photograph with better effect can be obtained, and the method is particularly suitable for a certificate photograph such as an identification card, and of course, the method may also perform the correction process on the image including the face detected in S200 by using only any one or a combination of the three correction processes.
In addition, the method is not only suitable for taking pictures of one face, such as identity card and other certificates; it is also suitable for taking pictures of multiple human faces, such as marriage pictures and other memorial pictures. When taking a picture of a face, a set of expected sizes, size thresholds, expected locations, location thresholds, angle thresholds, etc. may be set; when a plurality of faces are photographed, a plurality of groups of expected sizes, size thresholds, expected positions, position thresholds, angle thresholds, etc. may be set for each person, or only one group of expected sizes, size thresholds, angle thresholds may be set for each person, and a plurality of groups of expected positions and position thresholds may be set for each person, as the case may be when specifically setting. Meanwhile, when the prompting information is output, if a plurality of persons take pictures, a plurality of persons to be photographed are distinguished, and corresponding persons to be photographed are prompted according to the specific setting condition and the result of the distance correction processing, the posture correction processing and/or the horizontal position correction processing.
A second embodiment of the present invention provides a photographic apparatus, as shown in fig. 6, including: a target parameter detection unit, a position adjustment information determination unit, an outputter, and a photographing unit. Further, if a more effective photograph is desired, the photographing apparatus may further include: a parameter setting unit;
the target parameter detection unit is used for detecting a target parameter in an input image;
a position adjustment information determination unit for determining position adjustment information of the person to be photographed based on a detection result of the target parameter;
the output device is used for outputting corresponding prompt information to the photographed person for position adjustment according to the position adjustment information;
and a photographing unit for photographing a subject.
The target parameter detection unit is specifically used for detecting whether an input image contains a human face;
the position adjustment information determining unit is specifically configured to determine the position of the person to be photographed to be adjusted when the input image does not include a human face according to the detection result of the target parameter detecting unit; otherwise, it is determined that the position of the subject does not need to be adjusted.
If it is desired to obtain a more effective photograph and continue to detect an image including a human face, the camera apparatus provided in this embodiment further includes a parameter setting unit for setting a desired size based on the size of the input image and the average distance from the subject to the camera; and the size threshold is set according to the set expected size and the requirement of the system on the human face photo time precision.
Correspondingly, the target parameter detection unit is also used for detecting the actual size of the human face in the image.
Correspondingly, the position adjustment information determining unit is further configured to compare the actual size of the detected face with a set size threshold, and if the actual size of the face is greater than the maximum value of the size threshold, determine that the person to be photographed is too close to the camera and the position of the person to be photographed needs to be adjusted; if the actual size of the face is smaller than the minimum value of the size threshold, determining that the photographed person is too far away from the camera and the position of the photographed person needs to be adjusted; and if the actual size of the face is within the size threshold interval, determining that the position of the photographed person does not need to be adjusted.
Accordingly, the output unit is specifically configured to output the relevant prompt information to the person to be photographed when the position adjustment information determination unit determines that the person to be photographed is too close to the camera; or, when the position adjustment information determination unit determines that the person to be photographed is too far from the camera, the relevant prompt information is output to the person to be photographed.
Accordingly, the photographing unit is specifically configured to take a photograph when the position adjustment information determination unit determines that the position of the person to be photographed does not need to be adjusted.
If a better photo is desired and the image including the human face is detected continuously, the camera device provided by the embodiment further includes a parameter setting unit, specifically configured to set an expected position according to a position where the person to be photographed may be in the photo; and is also used for setting a position threshold according to the set expected position and the requirement of the system on the human face photographing time precision.
Correspondingly, the target parameter detection unit is also used for detecting the actual position of the human face in the image.
Correspondingly, the position adjustment information determining unit is further configured to compare the length of a connecting line between the set point of the rectangular area where the actual position of the detected face is located and the expected position of the set face with the radius of the circle where the position threshold is located, and if the length of a connecting line between the set point of the rectangular area where the actual position of the face is located and the expected position of the set face is greater than the radius of the circle where the position threshold is located, determine that the photographer needs to correct the posture of the photographer; and if the length of a connecting line between the set point of the rectangular area where the actual position of the face is located and the expected position is smaller than or equal to the radius of the circle where the position threshold value is located, determining that the position of the person to be photographed does not need to be adjusted.
Accordingly, the outputter is specifically configured to output the relevant prompt information to the subject when the position adjustment information determination unit determines that the subject needs to correct his posture.
Accordingly, the photographing unit is specifically configured to take a photograph when the position adjustment information determination unit determines that the position of the person to be photographed does not need to be adjusted.
In order to determine specific prompt information that the person to be photographed needs to correct his posture, the photographing apparatus further includes: the region dividing unit is used for dividing the region of the image into an upper right region, a lower left region and an upper left region by using horizontal lines and vertical lines passing through the expected position of the face;
the position adjustment determination unit includes:
a position adjustment information first determination subunit, configured to determine that the photographer is required to correct the face of the photographer to move to the lower right when a distance from a set point of a rectangular region where the actual position of the face is located to a horizontal line passing through the expected position is equal to a distance from the set point of the rectangular region where the actual position is located to a vertical line passing through the expected position, and the set point of the rectangular region where the actual position of the face is located is in an upper right region;
or,
a second position adjustment information determining subunit, configured to determine that the photographer is required to correct the face of the photographer to move to the upper right when a distance from a set point of a rectangular region where the actual position of the face is located to a horizontal line passing through the expected position is equal to a distance from the set point of the rectangular region where the actual position is located to a vertical line passing through the expected position, and the set point of the rectangular region where the actual position of the face is located is in a lower right region;
or,
a third determining subunit of position adjustment information, configured to determine that the photographer needs to correct the face of the photographer to move to the upper left when a distance from a set point of a rectangular region where the actual position of the face is located to a horizontal line passing through the expected position is equal to a distance from the set point of the rectangular region where the actual position is located to a vertical line passing through the expected position, and the set point of the rectangular region where the actual position of the face is located is in a lower left region;
or,
a position adjustment information fourth determination subunit, configured to determine that the photographer is required to correct the face of the photographer to move to the lower left when a distance from a set point of a rectangular region where the actual position of the face is located to a horizontal line passing through the expected position is equal to a distance from the set point of the rectangular region where the actual position is located to a vertical line passing through the expected position, and the set point of the rectangular region where the actual position of the face is located is in the upper left region;
or,
a position adjustment information fifth determination subunit, configured to determine that the person to be photographed needs to correct the movement of his or her face to the left when a distance from a set point of a rectangular region where the actual position of the face is located to a horizontal line passing through the expected position is smaller than a distance from the set point of the rectangular region where the actual position is located to a vertical line passing through the expected position, and the set point of the rectangular region where the actual position of the face is located is in an upper right region or a lower right region;
or,
a position adjustment information sixth determining subunit, configured to determine that the person to be photographed needs to correct the movement of his or her face to the right when a distance between a set point of a rectangular area where the actual position of the face is located and a horizontal line passing through the expected position is smaller than a distance between the set point of the rectangular area where the actual position is located and a vertical line passing through the expected position, and the set point of the rectangular area where the actual position of the face is located is in an upper left area or a lower left area;
or,
a seventh determining subunit of position adjustment information, configured to determine that the person to be photographed needs to correct the downward movement of the face of the person to be photographed when a distance between a set point of a rectangular area where the actual position of the face is located and a horizontal line passing through the expected position is greater than a distance between the set point of the rectangular area where the actual position is located and a vertical line passing through the expected position, and the set point of the rectangular area where the actual position of the face is located is in an upper right area or an upper left area;
or,
the position adjustment information eighth determination subunit is configured to determine that the person to be photographed needs to correct the upward movement of the face of the person when a distance between a set point of a rectangular region where the actual position of the person face is located and a horizontal line passing through the expected position is greater than a distance between the set point of the rectangular region where the actual position is located and a vertical line passing through the expected position, and the set point of the rectangular region where the actual position of the person face is located in a lower right region or a lower left region.
If it is desired to obtain a better photo and continue to detect the image containing the human face, the camera apparatus provided in this embodiment further includes a parameter setting unit, specifically configured to set the angle threshold according to the requirement of the system on the accuracy of taking the human face.
Correspondingly, the target parameter detection unit is further configured to detect positions of two eyes of a human face in the image.
Correspondingly, the position adjustment information determining unit is further configured to compare an acute angle included angle between a connecting line of positions of the two detected eyes in the image and a horizontal line with a set angle threshold, and if the acute angle included angle is greater than the set angle threshold, determine that the horizontal position of the face of the person to be photographed needs to be corrected; and if the acute included angle is smaller than or equal to the set angle threshold value, determining that the position of the photographed person does not need to be adjusted.
Accordingly, the output unit is specifically configured to output the relevant prompt information to the person to be photographed when the position adjustment information determination unit determines that the person to be photographed needs to correct the horizontal position of the face thereof.
Accordingly, the photographing unit is specifically configured to take a photograph when the position adjustment information determination unit determines that the position of the person to be photographed does not need to be adjusted.
In order to determine specific prompt information that requires the person to be photographed to correct the horizontal position of the face thereof, the position adjustment information determination unit includes:
a horizontal position first syndrome subunit, configured to determine that the acute included angle is greater than a set angle threshold, and when the position of one eye is above a horizontal line passing through the position of the other eye, it is determined that the height of the face on the side where the one eye is located needs to be reduced by the person to be photographed;
or,
and the horizontal position second correction subunit is used for determining that the acute included angle is larger than the set angle threshold value, and when the position of one eye is below a horizontal line passing through the position of the other eye, the height of the face of the person on the side of the eye to be raised by the photographer is determined.
The parameter setting unit is used for setting a group of expected size, size threshold, expected position, position threshold, angle threshold and the like when a person takes a picture; when a plurality of faces are photographed, the method is used for setting a plurality of groups of expected sizes, size thresholds, expected positions, position thresholds, angle thresholds and the like for each person, and also can be used for setting a group of expected sizes, size thresholds, angle thresholds for each person, and the plurality of groups of expected positions and position thresholds are set for each person, as the case may be.
Through the technical scheme, the embodiment of the invention detects the target parameters in the input image; determining position adjustment information of the photographed person according to the detection result of the target parameter; outputting corresponding prompt information to the photographed person for position adjustment according to the position adjustment information; or according to the position adjusting information, corresponding hardware is informed to take a picture of the person to be photographed, so that automatic photographing is realized. The technical scheme provided by the embodiment of the invention is particularly suitable for taking pictures of identity cards and other certificates.
In addition, the actual size of the detected human face is compared with a set size threshold, and the photographed person is reminded to correct the distance between the photographed person and the camera through the comparison result so as to obtain a picture with better effect.
In addition, the length of a connecting line of a set point of a rectangular area where the actual position of the detected face is located and a set position threshold is compared with the radius of a circle where the set position threshold is located, and the photographed person is reminded to correct the posture of the person according to the comparison result, so that a picture with a better effect is obtained.
In addition, the detected included angle between the connecting line of the human eyes and the horizontal line is compared with a set angle threshold value, and the photographed person is reminded to correct the horizontal position of the photographed person through the comparison result so as to obtain a picture with better effect.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.