WO2020082827A1 - Photographing method, device, terminal, and computer storage medium - Google Patents

Photographing method, device, terminal, and computer storage medium Download PDF

Info

Publication number
WO2020082827A1
WO2020082827A1 PCT/CN2019/097352 CN2019097352W WO2020082827A1 WO 2020082827 A1 WO2020082827 A1 WO 2020082827A1 CN 2019097352 W CN2019097352 W CN 2019097352W WO 2020082827 A1 WO2020082827 A1 WO 2020082827A1
Authority
WO
WIPO (PCT)
Prior art keywords
person
face
target object
position information
distortion
Prior art date
Application number
PCT/CN2019/097352
Other languages
French (fr)
Chinese (zh)
Inventor
钮晨霄
姜万泉
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020082827A1 publication Critical patent/WO2020082827A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Definitions

  • the present invention requires the priority of a Chinese patent application filed on October 24, 2018, with the application number 201811243683.8, and the invention titled “Image Capture Method, Device, Terminal, and Computer Storage Medium,” and the entire content of the application is passed The reference is incorporated in the present invention.
  • the present invention relates to the field of images, and in particular, to an image capturing method, device, terminal, and computer storage medium.
  • the field of view of cameras of terminal products such as mobile phones and cameras are basically greater than 90 degrees, which makes it easy for the subject to be distorted in the edge area of the viewfinder during the process of taking photos or videos.
  • portraits in the edge area of the framing frame are prone to face distortions such as distortions and unbalanced facial proportions.
  • non-professional photographers are prone to problems such as disproportion in the image, such as portrait distortion or portrait distortion due to the shooting angle and other reasons due to reasons such as low number of photographs and poor shooting experience.
  • the embodiments of the present invention provide an image shooting method, device, terminal, and computer storage medium that can effectively solve posture distortion and thereby improve the image shooting quality.
  • an embodiment of the present invention provides an image capturing method, and the method includes:
  • an embodiment of the present invention provides an image capturing device, the device including:
  • the obtaining module is used to obtain the position information of the target object in the current image in the framing frame in the shooting mode;
  • the processing module is used to obtain target parameters characterizing whether the target object has posture distortion according to the position information of the target object;
  • the judging module is used to determine that the target object has the set posture distortion when the target parameter satisfies the set posture distortion condition;
  • the prompt module is used to issue a prompt message;
  • the prompt message is used to prompt adjustment of the target Object shooting.
  • an embodiment of the present invention provides a terminal, the terminal includes a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, The steps of the image capturing method described in the first aspect are performed.
  • an embodiment of the present invention provides a computer storage medium in which a computer program is stored.
  • the computer program is executed by a processor, the steps of the image capturing method of the first aspect are implemented.
  • FIG. 1 is a schematic flowchart of an image capturing method in an embodiment of the invention
  • FIG. 2 is a schematic diagram of a person's face in an image in an embodiment of the invention.
  • FIG. 3 is a schematic diagram of a person's face in an image in another embodiment of the invention.
  • FIG. 4 is a schematic diagram of a person in an image in an embodiment of the invention.
  • FIG. 5 is a schematic diagram of a person in an image in another embodiment of the invention.
  • FIG. 6 is a schematic diagram of a person in an image in another embodiment of the invention.
  • FIG. 7 is a schematic structural diagram of an image capturing device according to an embodiment of the invention.
  • FIG. 8 is a schematic structural diagram of a terminal in an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of an image capture device in a specific embodiment of the present invention.
  • an image capturing method provided by an embodiment of the present invention, which is applied to a terminal includes the following steps:
  • Step S101 Obtain the position information of the target object in the current image in the framing frame in the shooting mode
  • the shooting mode may be a photographing mode or a camera mode.
  • the viewfinder frame is located on the terminal and is used to display the captured image and the like. Before the terminal turns on the camera or activates the camera module to take a picture and does not receive a shooting instruction, an image composed of the object such as the target object is displayed in the viewfinder.
  • the target object may be a person or an object, or a certain part of the person or a certain part of the object.
  • the position information of the target object is used to indicate the position of the target object in the current image. It should be noted that when the target object is a person's face, since the shape of the person region image obtained by performing face detection on the image is a rectangle, the actual image of the person's face is located within the rectangle.
  • the position information of a person's face can be represented by coordinates corresponding to the four vertices of the rectangle.
  • the position information of the person can also be obtained according to the face position information of the person. As shown in FIG. 2, suppose that the four vertices of the rectangle abcd corresponding to the face image of the person obtained by recognizing the image are a, b, c, and d. Since the coordinates of each point in the image are fixed, then The coordinates of the four points a, b, c, and d can be used to represent the facial position information of the person.
  • Step S102 Acquire target parameters characterizing whether the target object has posture distortion according to the position information of the target object
  • the posture distortion can be set according to actual needs. If the target object is a person's face, the corresponding posture distortion can be a face distortion; if the target object is a person, the corresponding The distortion of posture can be distortion of portrait ratio, distortion of character composition and so on. Correspondingly, for different posture distortions, the correspondingly characterized target parameters may be different.
  • the corresponding target parameter may be the ratio between the area occupied by the face of the person in the set warning area and the area of the face of the person.
  • the corresponding target parameter may be the ratio between the height of the face of the person and the height of the person. Since there may be multiple posture distortions set, the obtaining of the target parameter used to characterize whether the target object has posture distortion according to the position information of the target object may be obtaining the target object according to the position information of the target object There are target parameters corresponding to each posture distortion respectively.
  • Step S103 when it is determined that the target parameter satisfies the set posture distortion condition, it is determined that the target object has the set posture distortion, and a prompt message is issued; the prompt message is used to prompt adjustment of shooting of the target object.
  • the target parameter acquired in step S102 by matching the target parameter acquired in step S102 with the posture distortion condition that needs to be satisfied when the target object has posture distortion, it is detected whether the target object has the set posture distortion.
  • the posture distortion condition may be set according to the corresponding posture distortion, the posture distortion is different, and the corresponding posture distortion condition may also be different. If the target parameter satisfies the posture distortion condition corresponding to the posture distortion, it indicates that the target object has a corresponding posture distortion. If the target parameter does not satisfy the posture distortion condition corresponding to the posture distortion, it means that there is no corresponding posture distortion for the target object.
  • a message prompting to adjust the shooting of the target object is issued to eliminate the target object by adjusting the shooting of the target object Existing posture distortion improves the quality of image capture.
  • the prompt message may be a text message displayed on the current image in the framing frame, or may be prompted by vibration.
  • the target parameters used to characterize whether the target object has posture distortion are acquired according to the acquired position information of the target object in the current image in the viewfinder in the shooting mode to determine the target
  • the parameter satisfies the set posture distortion condition it is determined that the target object has the set posture distortion, and a prompt message is issued to remind the adjustment of the shooting of the target object.
  • a message prompting to adjust the shooting of the target object is promptly issued, which effectively solves the problem of posture distortion in image shooting Image quality.
  • the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
  • the acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
  • determining that the target object has the set posture distortion includes:
  • the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained.
  • the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices. After the face position information of the person is determined, the face area of the person can be directly obtained according to the face position information of the person. Please refer to FIG.
  • the facial position information of the person can be represented by four points a, b, c, and d
  • the distance between point a and point b or the distance between point c and point d can be used as The width of the face of a person, using the distance between point a and point c or the distance between point b and point d as the height of the face of the person, to obtain the face area of the person, that is, the width of the face of the person and the person The product of the height of the face.
  • the warning area is used to warn the area where face distortion may occur, and the shape and size of the warning area can be set according to actual needs.
  • the area in the framing frame is divided into a warning area and a non-warning area.
  • the shape of the non-warning area may be rectangular, square, or oval, etc.
  • the warning area is divided into the framing frame.
  • the area other than the non-warning area is the area between the edge of the framing frame and the non-warning area. Since the position of the warning area is known, the area occupied by the face of the person in the set warning area can be known according to the position information of the face of the person. Referring to FIG. 3, assume that the shape of the non-alert area is a rectangle efgh, and the four vertices corresponding to the rectangle are e, f, g, and h.
  • the alert area is an area other than the rectangular efgh.
  • the location information of the face is represented by four points a, b, c, d, then according to the coordinates of the eight points a, b, c, d, e, f, g, h, the person can be known
  • the coordinates of the critical points i and j between the warning area and the non-alert area, so that the area of the rectangle aijc can be obtained according to the coordinates of the four points a, i, j, and c, that is, the person The area occupied by the face in the warning area.
  • the first threshold may be set according to actual needs, such as 0.5 or 0.75.
  • the ratio of the area of the face of the person in the set warning area to the area of the face of the person is greater than the set first threshold, it means that the face of the person occupies in the warning area
  • the area of is larger, and there will be face distortion in the image taken at this time, and it is necessary to adjust the shooting of the face of the person.
  • the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
  • the acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
  • determining that the target object has the set posture distortion includes:
  • the target object has a portrait distortion.
  • the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained. It should be noted that when performing face detection, the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices.
  • the acquiring the depth of field of the person in the current image in the framing frame in the shooting mode may be calculating the depth of field of the face of the person in the current image in the framing frame in the shooting mode using an existing single-shot algorithm or a dual-shot algorithm.
  • the acquiring the position information of the person according to the face position information of the person and the depth of field may be based on the face position information of the person, acquiring the same or similar pixels of the person's face and the depth of field In the same area, the position information of the person is determined according to the area. It should be noted that, when detecting the human region, the shape of the detected human region image is a rectangle, and the actual image of the human is within the rectangle.
  • the position information of the human can be represented by the coordinates of the four vertices corresponding to the rectangle. After the face position information of the person is determined, the face height of the person can be directly obtained according to the face position information of the person. After the position information of the person is determined, the height of the person can be directly obtained according to the position information of the person. Referring to FIG.
  • the face position information of the person is represented by four points a, b, c, and d, and the person is determined according to the face position information of the person and the depth of field of the person Is the area corresponding to the rectangular klmn, the distance between point a and point c or the distance between point b and point d can be used as the face height of the person, and the distance between point k and point m or The distance between point l and point n is taken as the height of the character.
  • the second threshold can be set according to actual needs, such as 0.125 or 0.2.
  • the third threshold is greater than the second threshold, and may also be set according to actual needs, such as 0.25 or 0.3.
  • the ratio between the height of the face of the person and the height of the person is greater than the set second threshold and less than the set third threshold, it means that the height of the face of the person is divided by the face of the person The heights of the parts other than the part are close, and the person photographed in this way may not meet the aesthetic requirements, so it is determined that the target object has a portrait distortion.
  • the ratio between the height of the face of the person and the height of the person is greater than the set third threshold, it means that the shot may be a half-length shot or a head shot, etc. At this time, whether the target object is There is a portrait distortion to judge.
  • the height of the face of the person and the height of the person are obtained, and the person ’s height is determined.
  • the ratio between the height of the face and the height of the person satisfies the set portrait distortion condition, it is determined that there is a portrait distortion, and a message prompting to adjust the shooting of the person is promptly issued, thereby effectively solving the problem of image shooting
  • the problem of portrait distortion occurs, which improves the quality of image shooting, and the operation is simple and convenient.
  • the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
  • the acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
  • determining that the target object has the set posture distortion includes:
  • the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained. It should be noted that when performing face detection, the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices.
  • the acquiring the depth of field of the person in the current image in the framing frame in the shooting mode may be calculating the depth of field of the face of the person in the current image in the framing frame in the shooting mode using an existing single-shot algorithm or a dual-shot algorithm.
  • the acquiring the position information of the person according to the face position information of the person and the depth of field may be based on the face position information of the person, acquiring the same or similar pixels of the person's face and the depth of field In the same area, the position information of the person is determined according to the area. It should be noted that, when detecting the human region, the shape of the detected human region image is a rectangle, and the actual image of the human is within the rectangle.
  • the position information of the human can be represented by the coordinates of the four vertices corresponding to the rectangle.
  • the center position of the person can be directly determined according to the position information of the person.
  • the four vertices characterizing the position information of the person are diagonally connected, and the intersection of the diagonal lines is the center position of the person. Since the center position of the current image is known, the acquiring the distance of the person in the current image relative to the center position of the current image may be acquiring the center position of the person and the current The vector value between the center positions of the image. Referring to FIG.
  • the center position of the current image is point o
  • the position information of the person is the area corresponding to the rectangle klmn
  • the center position of the person is point p
  • the person is relative to the current image
  • the distance of the center position of can be expressed by the modulus
  • the fourth threshold can be set according to actual needs, for example, it can be set to 2.5 cm or 3 cm.
  • the character composition usually requires that the person should be near the center position of the framing frame.
  • the distance between the center position of the person and the center position of the current image is greater than the set fourth threshold, it means that the person is not It is in the vicinity of the center position of the framing frame, that is, the person has a positional deviation, which does not correspond to the person's composition, so it is determined that the target object has a person's composition distortion.
  • the center position of the person is obtained, and the person relative to the position in the current image is determined
  • the distance between the center position of the current image meets the set character composition distortion condition, it is determined that there is a character composition distortion, and a message prompting to adjust the shooting of the character is promptly issued, thereby effectively solving the character composition distortion that occurs in image shooting Problem, improve the quality of image shooting, and the operation is simple and convenient.
  • the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
  • the acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
  • determining that the target object has the set posture distortion includes:
  • the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained. It should be noted that when performing face detection, the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices.
  • the acquiring the depth of field of the person in the current image in the framing frame in the shooting mode may be calculating the depth of field of the face of the person in the current image in the framing frame in the shooting mode using an existing single-shot algorithm or a dual-shot algorithm.
  • the acquiring the position information of the person according to the face position information of the person and the depth of field may be based on the face position information of the person, acquiring the same or similar pixels of the person's face and the depth of field In the same area, the position information of the person is determined according to the area. It should be noted that, when detecting the human region, the shape of the detected human region image is a rectangle, and the actual image of the human is within the rectangle.
  • the position information of the human can be represented by the coordinates of four vertices corresponding to the rectangle.
  • the area of the person can be directly determined according to the position information of the person. Please refer to FIG. 5 again, assuming that the position information of the person is the area corresponding to the rectangle klmn, the distance between point k and point m or the distance between point l and point n can be taken as the height of the person, The distance between the point l or the distance between the point m and the point n is taken as the width of the character, thereby obtaining the area of the character, that is, the product of the width of the character and the height of the character.
  • the fifth threshold can be set according to actual needs, such as 0.3 or 0.4.
  • the ratio between the area of the character and the area of the current preview image is less than the set fifth threshold, it means that the area occupied by the character in the current image is small, and it can be considered that the current image It is difficult to see the person clearly in the image.
  • the image captured at this time may have distortion of the person's composition, and the shooting of the person needs to be adjusted.
  • the area of the person is obtained, and the area of the person in the current image is determined relative to
  • the area of the current image satisfies the set character composition distortion condition, it is determined that there is a character composition distortion, and a message prompting to adjust the shooting of the character is promptly issued, so as to effectively solve the problem of character composition distortion that occurs in image shooting, Improve the quality of image shooting, and the operation is simple and convenient.
  • the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
  • the acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
  • determining that the target object has the set posture distortion includes:
  • the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained. It should be noted that when performing face detection, the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices.
  • the acquiring the depth of field of the person in the current image in the framing frame in the shooting mode may be calculating the depth of field of the face of the person in the current image in the framing frame in the shooting mode using an existing single-shot algorithm or a dual-shot algorithm.
  • the acquiring the position information of the person according to the face position information of the person and the depth of field may be based on the face position information of the person, acquiring the same or similar pixels of the person's face and the depth of field In the same area, the position information of the person is determined according to the area. It should be noted that, when detecting the human region, the shape of the detected human region image is a rectangle, and the actual image of the human is within the rectangle.
  • the position information of the human can be represented by the coordinates of the four vertices corresponding to the rectangle.
  • the center position of the face of the person can be directly determined according to the face position information of the person.
  • the four vertices representing the position information of the face of the person are diagonally connected, and the intersection of the diagonal lines is the center position of the face of the person.
  • the center position of the person can be directly determined according to the position information of the person.
  • the four vertices characterizing the position information of the person are diagonally connected, and the intersection of the diagonal lines is the center position of the person.
  • the posture angle of the person in the current image relative to the current image can be directly determined.
  • the angle formed between the line between the center position of the face of the person and the center position of the person, and the horizontal line in the current image is taken as the pose of the person relative to the current image angle.
  • the position information of the person is the area corresponding to the rectangle klmn
  • the position information of the face of the person is the area corresponding to the rectangle abcd
  • the center position of the person is the point p
  • the face of the person The center position of is the point q
  • the posture angle of the person in the current image relative to the current image is the angle ⁇ between the line between the point p and the point q and the horizontal line of the current image.
  • the terminal When shooting images normally, the terminal is usually in a horizontal or vertical state, that is, the posture angle of the terminal is equal to or greater than the set tilt angle threshold, and the posture angle of the person relative to the current image should generally be greater than the set A tilt angle threshold, the tilt angle threshold may be set to 80 degrees, 85 degrees, or the like. If the posture angle of the person relative to the current image is less than the set tilt angle threshold, it may indicate that the terminal is tilted in viewfinder or the terminal has jitter. If it is determined that the posture angle of the terminal is also less than the set tilt angle threshold, There is a pose framing distortion on the person, and if it is determined that the terminal is only shaking, it means that there is no pose framing distortion on the person.
  • the posture angle of the terminal when it is determined that the posture angle of the terminal is also smaller than the set tilt angle threshold, the posture angle of the terminal may be equal to the posture angle of the person relative to the current image.
  • the posture angle of the terminal and whether there is jitter in the terminal can be obtained by analyzing the terminal's own gyroscope data.
  • the center position of the face of the person and the center position of the person are obtained, and the current image is determined.
  • the posture angle of the person with respect to the current image satisfies the set posture distortion condition, it is determined that there is posture distortion, and a message prompting to adjust the shooting of the person is sent out in time to effectively solve the problem of image shooting
  • the problem of posture distortion appears, which improves the quality of image shooting, and the operation is simple and convenient.
  • the issuing of the prompt message includes:
  • the target object with posture distortion is identified by the set identification method, and a moving direction for the target object is prompted.
  • the identification method can be set according to actual needs, for example, it can be set as a solid line frame or a dotted line frame, etc., or it can be set as a solid line frame or a dotted line frame of different colors.
  • the target object is a person's face and there is facial distortion
  • the target object with posture distortion is identified by the set identification method, and the direction of movement of the target object is prompted, including:
  • the face of the person is identified by the set identification method, and it is suggested that the non-alert area of the viewfinder should be moved toward the target object.
  • the target object with posture distortion is identified by the set identification method, and a movement direction for the target object is prompted , Including: identifying the person with the set identification method, and prompting that the framing frame should be far away from the person or prompting to move the framing frame down and photographing the person from bottom to top.
  • the target object When the target object is a person and the distance between the person in the current image and the center position of the current image is too large, that is, there is a person's composition distortion, the target object that will have a posture distortion adopts the set
  • the identification method identifies and prompts the moving direction of the target object, which includes: identifying the person using the set identification method, and prompting that the center area of the framing frame should be moved toward the target object.
  • the target object that will have posture distortion adopts the set identification method
  • Marking and prompting the moving direction of the target object include: marking the person using the set mark mode, and prompting that the framing frame should be close to the person.
  • the target object with posture distortion is identified by using the set identification method, and the direction of movement of the target object is prompted, including: Use the set marking method to mark, and prompt that the viewfinder should not be tilted.
  • the method further includes:
  • the target object After it is determined that the target object has the set posture distortion, if a shooting instruction is received, it will refuse to respond to the shooting instruction, that is, the target object will not be photographed until the target object is not detected again After the set posture is distorted, it will respond to the shooting instruction.
  • the terminal is a device such as a camera or a video camera
  • the refusal to respond to the received shooting instruction may be to lock the shutter.
  • an image capturing device is also provided corresponding to an embodiment of the present invention. As shown in FIG. 7, the device includes:
  • the obtaining module 10 is used to obtain the position information of the target object in the current image in the framing frame in the shooting mode;
  • the processing module 11 is configured to acquire, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion;
  • the determining module 12 is configured to determine that the target object has the set posture distortion when the target parameter meets the set posture distortion condition
  • the prompting module 13 is used to issue a prompting message; the prompting message is used to prompt to adjust the shooting of the target object.
  • the target parameters for characterizing whether the target object has posture distortion are acquired according to the acquired position information of the target object in the current image in the framing frame in the shooting mode to determine the target
  • the parameter satisfies the set posture distortion condition it is determined that the target object has the set posture distortion, and a prompt message is issued to remind the adjustment of the shooting of the target object.
  • a message prompting to adjust the shooting of the target object is promptly issued, which effectively solves the problem of posture distortion in image shooting and improves Image quality.
  • the obtaining module 10 is specifically used to obtain the position information of the face of the person in the current image in the viewfinder in the shooting mode;
  • the processing module 11 is specifically configured to determine the area of the face of the person and the area occupied by the face of the person in the set warning area according to the position information of the face of the person; and, according to the The area of the face of the person and the area occupied by the face of the person in the set warning area, determine the ratio between the area occupied by the face of the person in the set warning area and the area of the face of the person ;
  • the judging module 12 is specifically configured to determine the target when the ratio between the area occupied by the face of the person in the set warning area and the face area of the person is greater than the set first threshold Subject has facial distortion.
  • the acquiring module 10 is specifically configured to: acquire the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
  • the processing module 11 is specifically configured to: determine the face height of the person according to the face position information of the person;
  • the judgment module 12 is specifically configured to determine that the target object has a portrait when the ratio between the height of the face of the person and the height of the person is greater than the set second threshold and less than the set third threshold Proportional distortion.
  • the height of the face of the person and the height of the person are obtained, and the person ’s height is determined.
  • the ratio between the height of the face and the height of the person satisfies the set portrait distortion condition, it is determined that there is a portrait distortion, and a message prompting to adjust the shooting of the person is promptly issued, thereby effectively solving the problem of image shooting
  • the problem of portrait distortion occurs, which improves the quality of image shooting, and the operation is simple and convenient.
  • the acquiring module 10 is specifically configured to: acquire the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the face of the person;
  • the processing module 11 is specifically configured to: determine the center position of the person according to the position information of the person;
  • the judging module 12 is specifically configured to: when it is determined that the distance is greater than the set fourth threshold, determine that the target object has distortion of the human composition.
  • the center position of the person is obtained, and the person relative to the position in the current image is determined
  • the distance between the center position of the current image meets the set character composition distortion condition, it is determined that there is a character composition distortion, and a message prompting to adjust the shooting of the character is promptly issued, thereby effectively solving the character composition distortion that occurs in image shooting Problem, improve the quality of image shooting, and the operation is simple and convenient.
  • the acquiring module 10 is specifically configured to: acquire the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
  • the processing module 11 is specifically configured to determine the center position of the person according to the position information of the person;
  • the judging module 12 is specifically configured to: when the ratio between the area of the person and the area of the current preview image is less than the set fifth threshold, determine that there is a person composition distortion in the target object.
  • the area of the person is obtained, and the area of the person in the current image is determined relative to
  • the area of the current image satisfies the set character composition distortion condition, it is determined that there is a character composition distortion, and a message prompting to adjust the shooting of the character is promptly issued, so as to effectively solve the problem of character composition distortion that occurs in image shooting, Improve the quality of image shooting, and the operation is simple and convenient.
  • the acquiring module 10 is specifically configured to: acquire the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
  • the processing module 11 is specifically configured to: determine the center position of the face of the person according to the face position information of the person;
  • the judging module 12 is specifically configured to determine that when the posture angle of the person with respect to the current image is less than the set tilt angle threshold and the posture angle of the terminal is less than the tilt angle threshold, it is determined that the target object has a pose framing distortion.
  • the center position of the face of the person and the center position of the person are obtained, and the current image is determined.
  • the posture angle of the person with respect to the current image satisfies the set posture distortion condition, it is determined that there is posture distortion, and a message prompting to adjust the shooting of the person is sent out in time to effectively solve the problem of image shooting
  • the problem of posture distortion appears, which improves the quality of image shooting, and the operation is simple and convenient.
  • processing module 11 is further configured to: refuse to respond to the received shooting instruction until it is detected that there is no set posture distortion of the target object.
  • the prompting module 12 is specifically configured to: mark the target object with posture distortion using the set identification method, and prompt the moving direction for the target object.
  • the image capturing apparatus provided in the above embodiments implements the image capturing method
  • only the above-mentioned division of each program module is used as an example for illustration.
  • the above-mentioned processing may be allocated by different program modules according to needs. That is, the internal structure of the image capturing device is divided into different program modules to complete all or part of the processing described above.
  • the image capturing device provided in the above embodiment and the corresponding image capturing method embodiment belong to the same concept. For the specific implementation process, see the method embodiment, and details are not described here.
  • the terminal includes: a processor 310 and a memory 311 for storing a computer program that can run on the processor 310; wherein, the processor illustrated in FIG. 8 310 is not used to refer to the number of processors 310 as one, but only used to refer to the positional relationship of the processor 310 relative to other devices. In actual applications, the number of processors 310 may be one or more; Similarly, the memory 311 illustrated in FIG. 8 has the same meaning, that is, it is only used to refer to the positional relationship of the memory 311 relative to other devices. In actual applications, the number of the memory 311 may be one or more.
  • the target parameter When it is determined that the target parameter satisfies the set posture distortion condition, it is determined that the target object has the set posture distortion, and a prompt message is issued; the prompt message is used to prompt adjustment of the shooting of the target object.
  • processor 310 when the processor 310 is further used to run the computer program, the following steps are performed:
  • processor 310 when the processor 310 is further used to run the computer program, the following steps are performed:
  • the target object has a portrait distortion.
  • processor 310 when the processor 310 is further used to run the computer program, the following steps are performed:
  • processor 310 when the processor 310 is further used to run the computer program, the following steps are performed:
  • processor 310 when the processor 310 is further used to run the computer program, the following steps are performed:
  • processor 310 when the processor 310 is further used to run the computer program, the following steps are performed:
  • processor 310 when the processor 310 is further used to run the computer program, the following steps are performed:
  • the target object with posture distortion is identified by the set identification method, and a moving direction for the target object is prompted.
  • the terminal also includes: at least one network interface 312.
  • the various components in the terminal are coupled together via the bus system 313.
  • the bus system 313 is used to implement connection and communication between these components.
  • the bus system 313 also includes a power bus, a control bus, and a status signal bus.
  • various buses are marked as the bus system 313 in FIG. 8.
  • the memory 311 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read- Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, Ferromagnetic Random Access Memory), Flash Memory (Flash) Memory, Magnetic Surface Memory , Compact disc, or read-only compact disc (CD-ROM, Compact, Read-Only Memory); the magnetic surface memory can be a disk storage or a tape storage.
  • the volatile memory may be a random access memory (RAM, Random Access Memory), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • SSRAM synchronous static random access memory
  • DRAM Dynamic Random Access Memory
  • SDRAM Synchronous Dynamic Random Access Memory
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • ESDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • ESDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • ESDRAM Enhanced Synchronous Dynamic Random Access Memory
  • SLDRAM SyncLink Dynamic Random Access Memory
  • DRRAM Direct Rambus Random Access Random Access Memory
  • the memory 311 described in this embodiment of the present invention is intended to include, but is not limited to, these and any other suitable types of memories.
  • the memory 311 in the embodiment of the present invention is used to store various types of data to support the operation of the terminal.
  • Examples of these data include: any computer programs used to operate on the terminal, such as operating systems and applications; contact data; phone book data; messages; pictures; videos, etc.
  • the operating system contains various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks.
  • the application program may include various application programs, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services.
  • the program for implementing the method of the embodiment of the present invention may be included in the application program.
  • the computer storage medium may be a magnetic random access memory (FRAM, ferromagnetic random access memory), a read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory), electrically erasable programmable read-only memory (EEPROM, Electrically Erasable Programmable Read-Only Memory, Flash Memory, Magnetic Surface Memory, CD-ROM, or CD-ROM (Compact Disc Read-Only Memory), etc .; can also include one of the above-mentioned memories or Any combination of various devices, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
  • FRAM magnetic random access memory
  • ROM read-only memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • Flash Memory Magnetic Surface Memory
  • a computer storage medium in which a computer program is stored, and when the computer program is executed by a processor, the following steps are performed:
  • the target parameter When it is determined that the target parameter satisfies the set posture distortion condition, it is determined that the target object has the set posture distortion, and a prompt message is issued; the prompt message is used to prompt adjustment of the shooting of the target object.
  • the target object has a portrait distortion.
  • the target object with posture distortion is identified by the set identification method, and a moving direction for the target object is prompted.
  • the target object is a person.
  • FIG. 9 it is an image capturing device provided by a specific embodiment of the present invention, including: a camera module 20, a main control module 21, a display module 22, a sound effect module 23, and a feedback module 24; wherein, the camera module 20 is used to obtain Framing image; the main control module 21 is mainly responsible for the overall process control, including acquiring the image obtained by the camera module and processing the image, and then outputting to the display module 22, at the same time can control the sound effect module 23 and the feedback module 24 to provide corresponding feedback ; The display module 22, sound effect module 23 and feedback module 24 are used to output corresponding feedback signals according to the control of the main control module 21.
  • some suspected undesirable distortions can be actively reminded when taking pictures, mainly including: facial distortion reminder, portrait proportion distortion reminder, character composition distortion reminder, posture distortion distortion reminder, etc.
  • the warning area is defined in this embodiment.
  • the image is transmitted to the display module 22 through the main control module 21.
  • the range of each face within the framing range can be obtained.
  • the defined warning threshold is A, for example, 75%.
  • the proportion of a certain face in the warning area exceeds A, it is considered that the warning is triggered.
  • a red frame can be used to identify a human face, and the sound control module 23 and the display module 22 can be controlled by the main control module 21 to alert the user of the risk of facial distortion.
  • the face is first detected by a face detection-related algorithm; then the dual-shot algorithm can be used to calculate the depth of field characteristics, and the body in the same plane as the face is selected to obtain the face height L and the person height H.
  • the set body ratio is M
  • the optional base M is 8, which is the so-called 8 head body.
  • the reminder function for portrait distortion When the reminder function for portrait distortion is turned on, it is possible to take a full-length photo instead of a full-length photo.
  • the ratio of the head and the range of the framed portrait in the image coincide with the lower edge of the framing frame, it is decided whether to trigger the reminder function of portrait distortion. If the head-to-head ratio is too large, such as 1: 3 or 1: 4, it will be considered as a half-length photo, and the reminder function of portrait distortion will not be triggered at this time. If the detected lower edge of the body coincides with the lower edge of the framing frame, it will be determined that the body is beyond the range of the framing, not a full-body portrait, and the reminder function of portrait distortion will not be triggered at this time.
  • the main control module 21 After the main control module 21 obtains the portrait range, it can further obtain the center position of the entire human body, and calculate the vector position of the center position of the human body and the center position of the image. If the vector value is too large, it may be considered that the portrait position shifts seriously. The following situations may occur: the position of the person is too high, which is higher than the center horizontal line of the image; the position of the person is too low, which is far lower than the center horizontal line of the image; the portrait is too far away from the position of reasonable composition. In addition, if the size of the obtained portrait is significantly smaller than the size of the image scene, it can be considered that the portrait is difficult to see in the image, and a warning such as "the portrait is too small" will be prompted.
  • the main control module 21 Through the main control module 21, the range of the person's face and the whole range of the person can be obtained, and their centers are respectively taken, and the central axis is obtained by connecting these two points, and then the portrait posture clip is obtained according to the center horizontal line of the image Angle ⁇ . Assuming that the posture tilt threshold ⁇ is set to 85 degrees, when ⁇ is smaller than ⁇ , it is considered that there is a case of excessive tilt of the portrait. At this time, additional gyroscope attitude data in the terminal can be obtained for confirmation. If the gyroscope status is stable and the tilt data of the two are basically the same, a warning of "Tilt tilt" will be displayed on the viewfinder interface. When the gyroscope data shows that the mobile phone has jitter, it is determined that the terminal holder did not stabilize the terminal during shooting, and it will prompt: "There is jitter in the picture, please hold it steady.”
  • the target parameter characterizing whether the target object has posture distortion is acquired, and the When the target parameter satisfies the set posture distortion condition, it is determined that the target posture has a set posture distortion, and a prompt message is issued to remind the user to adjust the shooting of the target target.
  • a message prompting to adjust the shooting of the target object is promptly issued, which effectively solves the problem of posture distortion in image shooting and improves Image quality.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

Disclosed is a photographing method, comprising: acquiring location information of a target object in a current image in a viewfinder in a photographing mode; acquiring, on the basis of the location information of the target object, a target parameter used for expressing whether the target object has a posture distortion; when the target parameter is determined as satisfying a set posture distortion criterion, determining that the target object has a set posture distortion and issuing a prompt message; the prompt message being used for promoting an adjustment to the photographing of the target object. Also disclosed are a photographing device, a terminal, and a computer storage medium.

Description

图像拍摄方法、装置、终端及计算机存储介质Image shooting method, device, terminal and computer storage medium
交叉引用cross reference
本发明要求在2018年10月24日提交中国专利局、申请号为201811243683.8、发明名称为“图像拍摄方法、装置、终端及计算机存储介质”的中国专利申请的优先权,该申请的全部内容通过引用结合在本发明中。The present invention requires the priority of a Chinese patent application filed on October 24, 2018, with the application number 201811243683.8, and the invention titled "Image Capture Method, Device, Terminal, and Computer Storage Medium," and the entire content of the application is passed The reference is incorporated in the present invention.
技术领域Technical field
本发明涉及图像领域,尤其涉及一种图像拍摄方法、装置、终端及计算机存储介质。The present invention relates to the field of images, and in particular, to an image capturing method, device, terminal, and computer storage medium.
背景技术Background technique
目前,手机、照相机等终端产品的摄像头的视场角基本都大于90度,使得在拍摄照片或者录像等过程中,被拍摄对象在取景框边缘区域容易出现姿态畸变。例如,在室外拍摄时,在取景框边缘区域的人像容易出现扭曲、脸部比例失调等脸部畸变。此外,非专业拍摄人员由于拍照次数较少、拍摄经验欠佳等原因,容易因拍摄角度等原因导致被拍摄对象在图像中出现比例失调等人像比例畸变或人物构图畸变等问题。At present, the field of view of cameras of terminal products such as mobile phones and cameras are basically greater than 90 degrees, which makes it easy for the subject to be distorted in the edge area of the viewfinder during the process of taking photos or videos. For example, when shooting outdoors, portraits in the edge area of the framing frame are prone to face distortions such as distortions and unbalanced facial proportions. In addition, non-professional photographers are prone to problems such as disproportion in the image, such as portrait distortion or portrait distortion due to the shooting angle and other reasons due to reasons such as low number of photographs and poor shooting experience.
发明内容Summary of the invention
为解决现有存在的技术问题,本发明实施例提供一种能够有效解决姿态畸变,从而提升图像拍摄质量的图像拍摄方法、装置、终端及计算机存储介质。In order to solve the existing technical problems, the embodiments of the present invention provide an image shooting method, device, terminal, and computer storage medium that can effectively solve posture distortion and thereby improve the image shooting quality.
为达到上述目的,本发明实施例的技术方案是这样实现的:To achieve the above objective, the technical solutions of the embodiments of the present invention are implemented as follows:
第一方面,本发明实施例提供了一种图像拍摄方法,所述方法包括:In a first aspect, an embodiment of the present invention provides an image capturing method, and the method includes:
获取拍摄模式下取景框内当前图像中目标对象的位置信息;根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数;确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,并发出提示消息;所述提示消息用于提示调整对所述目标对象的拍摄。Obtain the position information of the target object in the current image in the framing frame in the shooting mode; obtain the target parameter characterizing whether the target object has posture distortion according to the position information of the target object; determine that the target parameter satisfies the set posture distortion In the condition, it is determined that the target object has a set posture distortion, and a prompt message is issued; the prompt message is used to prompt adjustment of the shooting of the target object.
第二方面,本发明实施例提供了一种图像拍摄装置,所述装置包括:In a second aspect, an embodiment of the present invention provides an image capturing device, the device including:
获取模块,用于获取拍摄模式下取景框内当前图像中目标对象的位置信息;处理模块,用于根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数;判断模块,用于确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变;提示模块,用于发出提示消息;所述提示消息用于提示调整对所述目标对象的拍摄。The obtaining module is used to obtain the position information of the target object in the current image in the framing frame in the shooting mode; the processing module is used to obtain target parameters characterizing whether the target object has posture distortion according to the position information of the target object; The judging module is used to determine that the target object has the set posture distortion when the target parameter satisfies the set posture distortion condition; the prompt module is used to issue a prompt message; the prompt message is used to prompt adjustment of the target Object shooting.
第三方面,本发明实施例提供了一种终端,所述终端包括处理器和用于存储能够在处理器上运行的计算机程序的存储器;其中,所述处理器用于运行所述计算机程序时,执行第一方面所述图像拍摄方法的步骤。In a third aspect, an embodiment of the present invention provides a terminal, the terminal includes a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, The steps of the image capturing method described in the first aspect are performed.
第四方面,本发明实施例提供了一种计算机存储介质,所述计算机存储介质中存储有计算机程序,所述计算机程序被处理器执行时实现第一方面所述图像拍摄方法的步骤。According to a fourth aspect, an embodiment of the present invention provides a computer storage medium in which a computer program is stored. When the computer program is executed by a processor, the steps of the image capturing method of the first aspect are implemented.
附图说明BRIEF DESCRIPTION
图1为本发明一实施例中图像拍摄方法的流程示意图;1 is a schematic flowchart of an image capturing method in an embodiment of the invention;
图2为本发明一实施例中图像中人物的脸部的示意图;2 is a schematic diagram of a person's face in an image in an embodiment of the invention;
图3为本发明另一实施例中图像中人物的脸部的示意图;3 is a schematic diagram of a person's face in an image in another embodiment of the invention;
图4为本发明一实施例中图像中人物的示意图;4 is a schematic diagram of a person in an image in an embodiment of the invention;
图5为本发明另一实施例中图像中人物的示意图;5 is a schematic diagram of a person in an image in another embodiment of the invention;
图6为本发明又一实施例中图像中人物的示意图;6 is a schematic diagram of a person in an image in another embodiment of the invention;
图7为本发明一实施例中图像拍摄装置的结构示意图;7 is a schematic structural diagram of an image capturing device according to an embodiment of the invention;
图8为本发明一实施例中终端的结构示意图;8 is a schematic structural diagram of a terminal in an embodiment of the present invention;
图9为本发明一具体实施例中图像拍摄装置的结构示意图。9 is a schematic structural diagram of an image capture device in a specific embodiment of the present invention.
具体实施方式detailed description
以下结合说明书附图及具体实施例对本发明技术方案做进一步的详细阐述。除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“和/或”包括一个或多个相关的所列项目的任意的和所有的组合。The technical solution of the present invention will be further elaborated below with reference to the drawings and specific embodiments of the specification. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the present invention. The terminology used in the description of the present invention herein is for the purpose of describing specific embodiments, and is not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more related listed items.
参见图1,为本发明实施例提供的一种图像拍摄方法,应用于终端,包括以下步骤:Referring to FIG. 1, an image capturing method provided by an embodiment of the present invention, which is applied to a terminal, includes the following steps:
步骤S101:获取拍摄模式下取景框内当前图像中目标对象的位置信息;Step S101: Obtain the position information of the target object in the current image in the framing frame in the shooting mode;
这里,所述拍摄模式可以是拍照模式或摄像模式等。所述取景框位于终端上,用于显示拍摄的图像等。当终端开启照相机或启动摄像模组进行拍摄且未接收到拍摄指令之前,取景框内会显示由目标对象等被拍摄对象组成的图像。所述目标对象可以是人物或物体等,也可以是人物的某一部位或物体的某一部位。所述目标对象的位置信息用于指示所述目标对象在所述当前图像中所处位置。需要说明的是,当所述目标对象为人物的脸部时,由于对图像进行人脸检测所获得的人物区域图像的形状为矩形,人物的脸部实际图像位于该矩形内,因此,所述人物的脸部位置信息可用该矩形的四个顶点对应的坐标表示。此外,根据所述人物的脸部位置信息还可获取所述人物的位置信息。如图2所示,假设对图像进行识别所获得的人物的脸部图像对应的矩形abcd的四个顶点分别为a、b、c、d,由于图像中每个点的坐标是固定的, 则可用a、b、c、d四个点的坐标表示人物的脸部位置信息。Here, the shooting mode may be a photographing mode or a camera mode. The viewfinder frame is located on the terminal and is used to display the captured image and the like. Before the terminal turns on the camera or activates the camera module to take a picture and does not receive a shooting instruction, an image composed of the object such as the target object is displayed in the viewfinder. The target object may be a person or an object, or a certain part of the person or a certain part of the object. The position information of the target object is used to indicate the position of the target object in the current image. It should be noted that when the target object is a person's face, since the shape of the person region image obtained by performing face detection on the image is a rectangle, the actual image of the person's face is located within the rectangle. Therefore, the The position information of a person's face can be represented by coordinates corresponding to the four vertices of the rectangle. In addition, the position information of the person can also be obtained according to the face position information of the person. As shown in FIG. 2, suppose that the four vertices of the rectangle abcd corresponding to the face image of the person obtained by recognizing the image are a, b, c, and d. Since the coordinates of each point in the image are fixed, then The coordinates of the four points a, b, c, and d can be used to represent the facial position information of the person.
步骤S102:根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数;Step S102: Acquire target parameters characterizing whether the target object has posture distortion according to the position information of the target object;
这里,在确定所述目标对象的位置信息后,能够获知所述目标对象的面积大小、高度、宽度以及所述目标对象相对于所述当前图像的姿态角度等信息,从而进一步获知用于表征所述目标对象是否存在姿态畸变的目标参数。需要说明的是,所述姿态畸变可以根据实际情况需要进行设置,若所述目标对象为人物的脸部,则对应的姿态畸变可以是脸部畸变;若所述目标对象为人物,则对应的姿态畸变可以是人像比例畸变、人物构图畸变等。相应的,对于不同的姿态畸变,对应表征的目标参数可能不同。例如,对于脸部畸变而言,对应的目标参数可以是所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值。对于人像比例畸变而言,对应的目标参数可以是所述人物的脸部高度与所述人物的高度之间的比值。由于设置的姿态畸变可能有多种,所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数可以是根据所述目标对象的位置信息获取所述目标对象存在每一种姿态畸变分别对应的目标参数。Here, after determining the position information of the target object, information such as the area size, height, width, and posture angle of the target object relative to the current image can be obtained, so as to further know the character Describe whether the target object has the target parameter of posture distortion. It should be noted that the posture distortion can be set according to actual needs. If the target object is a person's face, the corresponding posture distortion can be a face distortion; if the target object is a person, the corresponding The distortion of posture can be distortion of portrait ratio, distortion of character composition and so on. Correspondingly, for different posture distortions, the correspondingly characterized target parameters may be different. For example, for facial distortion, the corresponding target parameter may be the ratio between the area occupied by the face of the person in the set warning area and the area of the face of the person. For portrait distortion, the corresponding target parameter may be the ratio between the height of the face of the person and the height of the person. Since there may be multiple posture distortions set, the obtaining of the target parameter used to characterize whether the target object has posture distortion according to the position information of the target object may be obtaining the target object according to the position information of the target object There are target parameters corresponding to each posture distortion respectively.
步骤S103:确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,并发出提示消息;所述提示消息用于提示调整对所述目标对象的拍摄。Step S103: when it is determined that the target parameter satisfies the set posture distortion condition, it is determined that the target object has the set posture distortion, and a prompt message is issued; the prompt message is used to prompt adjustment of shooting of the target object.
这里,通过将步骤S102中获取的所述目标参数与所述目标对象存在姿态畸变时对应需要满足的姿态畸变条件进行匹配,从而检测所述目标对象是否存在设置的姿态畸变。所述姿态畸变条件可以根据对应的姿态畸变进行设置,姿态畸变不同,对应的姿态畸变条件可能也不相同。若所述目标参数满足姿态畸变对应的姿态畸变条件,说明所述目标对象存在对应的姿态畸变。若所述目标参数不满足姿态畸变对应的姿态畸变条件,说明所述目标对象不存在 对应的姿态畸变。并且,根据所述目标参数确定所述目标对象存在设置的姿态畸变时,发出用于提示调整对所述目标对象的拍摄的消息,以通过调整对所述目标对象的拍摄而消除所述目标对象存在的姿态畸变,提高图像拍摄的质量。Here, by matching the target parameter acquired in step S102 with the posture distortion condition that needs to be satisfied when the target object has posture distortion, it is detected whether the target object has the set posture distortion. The posture distortion condition may be set according to the corresponding posture distortion, the posture distortion is different, and the corresponding posture distortion condition may also be different. If the target parameter satisfies the posture distortion condition corresponding to the posture distortion, it indicates that the target object has a corresponding posture distortion. If the target parameter does not satisfy the posture distortion condition corresponding to the posture distortion, it means that there is no corresponding posture distortion for the target object. In addition, when it is determined that the target object has the set posture distortion according to the target parameter, a message prompting to adjust the shooting of the target object is issued to eliminate the target object by adjusting the shooting of the target object Existing posture distortion improves the quality of image capture.
需要说明的是,所述发出提示消息可以是在取景框中当前图像上显示文字消息,也可以是通过震动方式进行提示。It should be noted that, the prompt message may be a text message displayed on the current image in the framing frame, or may be prompted by vibration.
综上,上述实施例提供的图像拍摄方法中,根据获取的拍摄模式下取景框内当前图像中目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,并发出提示消息,以提醒调整对所述目标对象的拍摄。如此,确定拍摄模式下取景框内当前图像中目标对象存在设置的姿态畸变后,及时发出用于提示调整对所述目标对象的拍摄的消息,有效解决了图像拍摄中出现的姿态畸变问题,提升了图像拍摄质量。In summary, in the image shooting method provided in the above embodiment, the target parameters used to characterize whether the target object has posture distortion are acquired according to the acquired position information of the target object in the current image in the viewfinder in the shooting mode to determine the target When the parameter satisfies the set posture distortion condition, it is determined that the target object has the set posture distortion, and a prompt message is issued to remind the adjustment of the shooting of the target object. In this way, after it is determined that the target object in the current image in the viewfinder in the shooting mode has the posture distortion set, a message prompting to adjust the shooting of the target object is promptly issued, which effectively solves the problem of posture distortion in image shooting Image quality.
在一个可选的实施例中,所述获取拍摄模式下取景框内当前图像中目标对象的位置信息,包括:In an optional embodiment, the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息;Obtain the face position information of the person in the current image in the framing frame in shooting mode;
所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
根据所述人物的脸部位置信息,确定所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积;Determine the area of the face of the person and the area occupied by the face of the person in the set warning area according to the position information of the face of the person;
根据所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积,确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值;According to the area of the face of the person and the area occupied by the face of the person in the set warning area, determine the area between the area occupied by the face of the person in the set warning area and the area of the face of the person Ratio
所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值大于设置的第一阈值时,判定所述目标对象存在脸部畸变。When it is determined that the ratio between the area occupied by the face of the person in the set warning area and the face area of the person is greater than the set first threshold, it is determined that the target object has facial distortion.
这里,所述获取拍摄模式下取景框内当前图像中人物的脸部位置信息,可以是采用现有的人脸识别算法对拍摄模式下取景框内当前图像进行人脸检测,获取人脸区域,并根据人脸区域的点坐标,获得人物的脸部位置信息。需要说明的是,在进行人脸检测时,检测出的人脸区域图像的形状为矩形,人物实际脸部区域图像位于该矩形内,因此,人物的脸部位置信息可以用该矩形对应的四个顶点的坐标表示。当所述人物的脸部位置信息确定后,可直接根据所述人物的脸部位置信息获取所述人物的脸部面积。请再次参阅图2,假设所述人物的脸部位置信息可用a、b、c、d四个点表示,可将点a与点b之间的距离或者点c与点d之间的距离作为人物的脸部宽度,将点a与点c之间的距离或者点b与点d之间的距离作为人物的脸部高度,从而获得所述人物的脸部面积即人物的脸部宽度与人物的脸部高度之积。所述警示区域用于警示可能出现脸部畸变所在的区域,所述警示区域的形状和大小等可以根据实际情况需要进行设置。本实施例中,将所述取景框内的区域划分为警示区域和非警示区域,所述非警示区域的形状可以是矩形、正方形或椭圆形等,所述警示区域为所述取景框内除所述非警示区域以外的区域即取景框边缘与非警示区域之间的区域。由于所述警示区域的位置是已知的,因此,根据所述人物的脸部位置信息可获知所述人物的脸部在设置的警示区域所占的面积。请参阅图3,假设所述非警示区域的形状为矩形efgh,且该矩形对应的四个顶点分别为e、f、g、h,所述警示区域为矩形efgh以外的区域,若所述人物的脸部位置信息是用a、b、c、d四个点表示的,那么根据a、b、c、d、e、f、g、h等八个点的坐标,可以分别获知所述人物的脸部在所述警示区域与所述非警示区域之间的临界点i和j的坐标,从而根据a、i、j、c四个点的坐标可获得矩形aijc的面积,即所述人物的脸部在设置的警示区域所占的面积。所述第一阈值可以根据实际情况需要进行设置,比如可以设置为0.5或0.75等。 当所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值大于设置的第一阈值时,说明所述人物的脸部在所述警示区域所占的面积较大,此时拍摄出的图像会存在脸部畸变,需要调整对所述人物的脸部的拍摄。Here, the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained. It should be noted that when performing face detection, the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices. After the face position information of the person is determined, the face area of the person can be directly obtained according to the face position information of the person. Please refer to FIG. 2 again, assuming that the facial position information of the person can be represented by four points a, b, c, and d, and the distance between point a and point b or the distance between point c and point d can be used as The width of the face of a person, using the distance between point a and point c or the distance between point b and point d as the height of the face of the person, to obtain the face area of the person, that is, the width of the face of the person and the person The product of the height of the face. The warning area is used to warn the area where face distortion may occur, and the shape and size of the warning area can be set according to actual needs. In this embodiment, the area in the framing frame is divided into a warning area and a non-warning area. The shape of the non-warning area may be rectangular, square, or oval, etc. The warning area is divided into the framing frame. The area other than the non-warning area is the area between the edge of the framing frame and the non-warning area. Since the position of the warning area is known, the area occupied by the face of the person in the set warning area can be known according to the position information of the face of the person. Referring to FIG. 3, assume that the shape of the non-alert area is a rectangle efgh, and the four vertices corresponding to the rectangle are e, f, g, and h. The alert area is an area other than the rectangular efgh. The location information of the face is represented by four points a, b, c, d, then according to the coordinates of the eight points a, b, c, d, e, f, g, h, the person can be known The coordinates of the critical points i and j between the warning area and the non-alert area, so that the area of the rectangle aijc can be obtained according to the coordinates of the four points a, i, j, and c, that is, the person The area occupied by the face in the warning area. The first threshold may be set according to actual needs, such as 0.5 or 0.75. When the ratio of the area of the face of the person in the set warning area to the area of the face of the person is greater than the set first threshold, it means that the face of the person occupies in the warning area The area of is larger, and there will be face distortion in the image taken at this time, and it is necessary to adjust the shooting of the face of the person.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息,确定所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积,并在确定所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积满足设置的脸部畸变条件时,判定存在脸部畸变,以及时发出用于提示调整对所述人物的脸部的拍摄的消息,从而有效解决图像拍摄中出现的脸部畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the framing frame in the shooting mode, determine the area of the face of the person and the area occupied by the face of the person in the set warning area, and then determine the person Area of the face and the area occupied by the face of the person in the set warning area meet the set face distortion conditions, it is determined that there is face distortion, and a prompt is issued to prompt adjustment of the face of the person The news of shooting, so as to effectively solve the problem of face distortion in image shooting, improve the quality of image shooting, and the operation is simple and convenient.
在一个可选的实施例中,所述获取拍摄模式下取景框内当前图像中目标对象的位置信息,包括:In an optional embodiment, the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the face of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
根据所述人物的脸部位置信息确定所述人物的脸部高度;Determine the face height of the person according to the face position information of the person;
根据所述人物的位置信息获取所述人物的高度;Acquiring the height of the person according to the position information of the person;
根据所述人物的脸部高度和所述人物的高度确定所述人物的脸部高度与所述人物的高度之间的比值;Determining the ratio between the height of the face of the person and the height of the person according to the height of the face of the person and the height of the person;
所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
确定所述人物的脸部高度与所述人物的高度之间的比值大于设置的第二 阈值且小于设置的第三阈值时,判定所述目标对象存在人像比例畸变。When it is determined that the ratio between the height of the face of the person and the height of the person is greater than the set second threshold and less than the set third threshold, it is determined that the target object has a portrait distortion.
这里,所述获取拍摄模式下取景框内当前图像中人物的脸部位置信息,可以是采用现有的人脸识别算法对拍摄模式下取景框内当前图像进行人脸检测,获取人脸区域,并根据人脸区域的点坐标,获得人物的脸部位置信息。需要说明的是,在进行人脸检测时,检测出的人脸区域图像的形状为矩形,人物实际脸部区域图像位于该矩形内,因此,人物的脸部位置信息可以用该矩形对应的四个顶点的坐标表示。所述获取拍摄模式下取景框内当前图像中所述人物的景深,可以是采用现有的单摄算法或双摄算法计算拍摄模式下取景框内当前图像中所述人物的脸部的景深。所述根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息,可以是基于所述人物的脸部位置信息,获取与所述人物的脸部的像素相同或相近且景深相同的区域,根据该区域确定所述人物的位置信息。需要说明的是,在进行人物区域检测时,检测出的人物区域图像的形状为矩形,人物实际图像位于该矩形内,因此,人物的位置信息可以用该矩形对应的四个顶点坐标表示。当所述人物的脸部位置信息确定后,可直接根据所述人物的脸部位置信息获取所述人物的脸部高度。而当所述人物的位置信息确定后,可直接根据所述人物的位置信息获取所述人物的高度。请参阅图4,假设所述人物的脸部位置信息是用a、b、c、d四个点表示的,而根据所述人物的脸部位置信息以及所述人物的景深确定的所述人物的位置信息为矩形klmn对应的区域,可将点a与点c之间的距离或者点b与点d之间的距离作为人物的脸部高度,而将点k与点m之间的距离或者点l与点n之间的距离作为人物的高度。所述第二阈值可以根据实际情况需要进行设置,比如可以设置为0.125或0.2等。所述第三阈值大于所述第二阈值,也可以根据实际情况需要进行设置,比如可以设置为0.25或0.3等。当所述人物的脸部高度与所述人物的高度之间的比值大于设置的第二阈值且小于设置的第三阈值时,说明所述人物的脸部高度与所述人物中除所述脸部之外的部分的高度接近,这样拍摄出的人物可能不符合美观要求,因此 判定所述目标对象存在人像比例畸变。当所述人物的脸部高度与所述人物的高度之间的比值大于设置的第三阈值时,说明此时拍摄的可能是半身照或者是头部照等,此时不对所述目标对象是否存在人像比例畸变进行判断。Here, the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained. It should be noted that when performing face detection, the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices. The acquiring the depth of field of the person in the current image in the framing frame in the shooting mode may be calculating the depth of field of the face of the person in the current image in the framing frame in the shooting mode using an existing single-shot algorithm or a dual-shot algorithm. The acquiring the position information of the person according to the face position information of the person and the depth of field may be based on the face position information of the person, acquiring the same or similar pixels of the person's face and the depth of field In the same area, the position information of the person is determined according to the area. It should be noted that, when detecting the human region, the shape of the detected human region image is a rectangle, and the actual image of the human is within the rectangle. Therefore, the position information of the human can be represented by the coordinates of the four vertices corresponding to the rectangle. After the face position information of the person is determined, the face height of the person can be directly obtained according to the face position information of the person. After the position information of the person is determined, the height of the person can be directly obtained according to the position information of the person. Referring to FIG. 4, it is assumed that the face position information of the person is represented by four points a, b, c, and d, and the person is determined according to the face position information of the person and the depth of field of the person Is the area corresponding to the rectangular klmn, the distance between point a and point c or the distance between point b and point d can be used as the face height of the person, and the distance between point k and point m or The distance between point l and point n is taken as the height of the character. The second threshold can be set according to actual needs, such as 0.125 or 0.2. The third threshold is greater than the second threshold, and may also be set according to actual needs, such as 0.25 or 0.3. When the ratio between the height of the face of the person and the height of the person is greater than the set second threshold and less than the set third threshold, it means that the height of the face of the person is divided by the face of the person The heights of the parts other than the part are close, and the person photographed in this way may not meet the aesthetic requirements, so it is determined that the target object has a portrait distortion. When the ratio between the height of the face of the person and the height of the person is greater than the set third threshold, it means that the shot may be a half-length shot or a head shot, etc. At this time, whether the target object is There is a portrait distortion to judge.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深,获取所述人物的脸部高度以及所述人物的高度,并在确定所述人物的脸部高度与所述人物的高度之间的比值满足设置的人像比例畸变条件时,判定存在人像比例畸变,以及时发出用于提示调整对所述人物的拍摄的消息,从而有效解决图像拍摄中出现的人像比例畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the face of the person, the height of the face of the person and the height of the person are obtained, and the person ’s height is determined When the ratio between the height of the face and the height of the person satisfies the set portrait distortion condition, it is determined that there is a portrait distortion, and a message prompting to adjust the shooting of the person is promptly issued, thereby effectively solving the problem of image shooting The problem of portrait distortion occurs, which improves the quality of image shooting, and the operation is simple and convenient.
在一个可选的实施例中,所述获取拍摄模式下取景框内当前图像中目标对象的位置信息,包括:In an optional embodiment, the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
根据所述人物的位置信息确定所述人物的中心位置;Determine the center position of the person according to the position information of the person;
根据所述人物的中心位置和所述当前图像的中心位置,获取在所述当前图像中所述人物相对于所述当前图像的中心位置的距离;Acquiring the distance of the person in the current image relative to the center position of the current image according to the center position of the person and the center position of the current image;
所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
确定所述距离大于设置的第四阈值时,判定所述目标对象存在人物构图畸变。When it is determined that the distance is greater than the set fourth threshold, it is determined that the target object has distortion of the human composition.
这里,所述获取拍摄模式下取景框内当前图像中人物的脸部位置信息, 可以是采用现有的人脸识别算法对拍摄模式下取景框内当前图像进行人脸检测,获取人脸区域,并根据人脸区域的点坐标,获得人物的脸部位置信息。需要说明的是,在进行人脸检测时,检测出的人脸区域图像的形状为矩形,人物实际脸部区域图像位于该矩形内,因此,人物的脸部位置信息可以用该矩形对应的四个顶点的坐标表示。所述获取拍摄模式下取景框内当前图像中所述人物的景深,可以是采用现有的单摄算法或双摄算法计算拍摄模式下取景框内当前图像中所述人物的脸部的景深。所述根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息,可以是基于所述人物的脸部位置信息,获取与所述人物的脸部的像素相同或相近且景深相同的区域,根据该区域确定所述人物的位置信息。需要说明的是,在进行人物区域检测时,检测出的人物区域图像的形状为矩形,人物实际图像位于该矩形内,因此,人物的位置信息可以用该矩形对应的四个顶点坐标表示。当所述人物的位置信息确定后,可以根据所述人物的位置信息直接确定所述人物的中心位置。比如,将表征所述人物的位置信息的四个顶点进行对角连线,对角线的交点即为所述人物的中心位置。由于所述当前图像的中心位置是已知的,所述获取在所述当前图像中所述人物相对于所述当前图像的中心位置的距离,可以是获取所述人物的中心位置与所述当前图像的中心位置之间的向量值。请参阅图5,假设所述当前图像的中心位置为点o,所述人物的位置信息为矩形klmn对应的区域,所述人物的中心位置为点p,则所述人物相对于所述当前图像的中心位置的距离可以用向量op的模|op|表示。所述第四阈值可以根据实际情况需要进行设置,比如可以设置为2.5厘米或3厘米等。在拍摄图像时,人物构图通常要求人物应处于取景框的中心位置附近,若所述人物的中心位置与所述当前图像的中心位置之间的距离大于设置的第四阈值,说明所述人物不处于取景框的中心位置附近,即人物存在位置偏移,不符合人物构图,因此判定所述目标对象存在人物构图畸变。Here, the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained. It should be noted that when performing face detection, the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices. The acquiring the depth of field of the person in the current image in the framing frame in the shooting mode may be calculating the depth of field of the face of the person in the current image in the framing frame in the shooting mode using an existing single-shot algorithm or a dual-shot algorithm. The acquiring the position information of the person according to the face position information of the person and the depth of field may be based on the face position information of the person, acquiring the same or similar pixels of the person's face and the depth of field In the same area, the position information of the person is determined according to the area. It should be noted that, when detecting the human region, the shape of the detected human region image is a rectangle, and the actual image of the human is within the rectangle. Therefore, the position information of the human can be represented by the coordinates of the four vertices corresponding to the rectangle. After the position information of the person is determined, the center position of the person can be directly determined according to the position information of the person. For example, the four vertices characterizing the position information of the person are diagonally connected, and the intersection of the diagonal lines is the center position of the person. Since the center position of the current image is known, the acquiring the distance of the person in the current image relative to the center position of the current image may be acquiring the center position of the person and the current The vector value between the center positions of the image. Referring to FIG. 5, assuming that the center position of the current image is point o, the position information of the person is the area corresponding to the rectangle klmn, and the center position of the person is point p, then the person is relative to the current image The distance of the center position of can be expressed by the modulus | op | of the vector op. The fourth threshold can be set according to actual needs, for example, it can be set to 2.5 cm or 3 cm. When photographing an image, the character composition usually requires that the person should be near the center position of the framing frame. If the distance between the center position of the person and the center position of the current image is greater than the set fourth threshold, it means that the person is not It is in the vicinity of the center position of the framing frame, that is, the person has a positional deviation, which does not correspond to the person's composition, so it is determined that the target object has a person's composition distortion.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息以及所 述人物的脸部的景深,获取所述人物的中心位置,并在确定所述当前图像中所述人物相对于所述当前图像的中心位置的距离满足设置的人物构图畸变条件时,判定存在人物构图畸变,以及时发出用于提示调整对所述人物的拍摄的消息,从而有效解决图像拍摄中出现的人物构图畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the framing frame and the depth of field of the face of the person in the shooting mode, the center position of the person is obtained, and the person relative to the position in the current image is determined When the distance between the center position of the current image meets the set character composition distortion condition, it is determined that there is a character composition distortion, and a message prompting to adjust the shooting of the character is promptly issued, thereby effectively solving the character composition distortion that occurs in image shooting Problem, improve the quality of image shooting, and the operation is simple and convenient.
在一个可选的实施例中,所述获取拍摄模式下取景框内当前图像中目标对象的位置信息,包括:In an optional embodiment, the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the face of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
根据所述人物的位置信息确定所述人物的面积;Determine the area of the person according to the position information of the person;
根据所述人物的面积获取所述人物的面积与所述当前预览图像的面积之间的比值;Obtaining the ratio between the area of the person and the area of the current preview image according to the area of the person;
所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
确定所述人物的面积与所述当前预览图像的面积之间的比值小于设置的第五阈值时,判定所述目标对象存在人物构图畸变。When it is determined that the ratio between the area of the person and the area of the current preview image is less than the set fifth threshold, it is determined that there is a person composition distortion in the target object.
这里,所述获取拍摄模式下取景框内当前图像中人物的脸部位置信息,可以是采用现有的人脸识别算法对拍摄模式下取景框内当前图像进行人脸检测,获取人脸区域,并根据人脸区域的点坐标,获得人物的脸部位置信息。需要说明的是,在进行人脸检测时,检测出的人脸区域图像的形状为矩形,人物实际脸部区域图像位于该矩形内,因此,人物的脸部位置信息可以用该 矩形对应的四个顶点的坐标表示。所述获取拍摄模式下取景框内当前图像中所述人物的景深,可以是采用现有的单摄算法或双摄算法计算拍摄模式下取景框内当前图像中所述人物的脸部的景深。所述根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息,可以是基于所述人物的脸部位置信息,获取与所述人物的脸部的像素相同或相近且景深相同的区域,根据该区域确定所述人物的位置信息。需要说明的是,在进行人物区域检测时,检测出的人物区域图像的形状为矩形,人物实际图像位于该矩形内,因此,人物的位置信息可以用该矩形对应的四个顶点坐标表示。当所述人物的位置信息确定后,可以根据所述人物的位置信息直接确定所述人物的面积。请再次参阅图5,假设所述人物的位置信息为矩形klmn对应的区域,可将点k与点m之间的距离或者点l与点n之间的距离作为人物的高度,将点k与点l之间的距离或者点m与点n之间的距离作为人物的宽度,从而获得所述人物的面积即人物的宽度与人物的高度之积。由于所述当前图像的面积是已知的,则可确定所述人物的面积与所述当前预览图像的面积之间的比值。所述第五阈值可以根据实际情况需要进行设置,比如可以设置为0.3或0.4等。当所述人物的面积与所述当前预览图像的面积之间的比值小于设置的第五阈值时,说明所述人物在所述当前图像中所占的面积较小,可以认为在所述当前图像中很难看清楚所述人物,此时拍摄出的图像会存在人物构图畸变,需要调整对所述人物的拍摄。Here, the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained. It should be noted that when performing face detection, the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices. The acquiring the depth of field of the person in the current image in the framing frame in the shooting mode may be calculating the depth of field of the face of the person in the current image in the framing frame in the shooting mode using an existing single-shot algorithm or a dual-shot algorithm. The acquiring the position information of the person according to the face position information of the person and the depth of field may be based on the face position information of the person, acquiring the same or similar pixels of the person's face and the depth of field In the same area, the position information of the person is determined according to the area. It should be noted that, when detecting the human region, the shape of the detected human region image is a rectangle, and the actual image of the human is within the rectangle. Therefore, the position information of the human can be represented by the coordinates of four vertices corresponding to the rectangle. After the position information of the person is determined, the area of the person can be directly determined according to the position information of the person. Please refer to FIG. 5 again, assuming that the position information of the person is the area corresponding to the rectangle klmn, the distance between point k and point m or the distance between point l and point n can be taken as the height of the person, The distance between the point l or the distance between the point m and the point n is taken as the width of the character, thereby obtaining the area of the character, that is, the product of the width of the character and the height of the character. Since the area of the current image is known, the ratio between the area of the person and the area of the current preview image can be determined. The fifth threshold can be set according to actual needs, such as 0.3 or 0.4. When the ratio between the area of the character and the area of the current preview image is less than the set fifth threshold, it means that the area occupied by the character in the current image is small, and it can be considered that the current image It is difficult to see the person clearly in the image. The image captured at this time may have distortion of the person's composition, and the shooting of the person needs to be adjusted.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深,获取所述人物的面积,并在确定所述当前图像中所述人物的面积相对于所述当前图像的面积满足设置的人物构图畸变条件时,判定存在人物构图畸变,以及时发出用于提示调整对所述人物的拍摄的消息,从而有效解决图像拍摄中出现的人物构图畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the shooting frame and the depth of field of the face of the person in the shooting mode, the area of the person is obtained, and the area of the person in the current image is determined relative to When the area of the current image satisfies the set character composition distortion condition, it is determined that there is a character composition distortion, and a message prompting to adjust the shooting of the character is promptly issued, so as to effectively solve the problem of character composition distortion that occurs in image shooting, Improve the quality of image shooting, and the operation is simple and convenient.
在一个可选的实施例中,所述获取拍摄模式下取景框内当前图像中目标 对象的位置信息,包括:In an optional embodiment, the acquiring the position information of the target object in the current image in the viewfinder in the shooting mode includes:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
根据所述人物的脸部位置信息确定所述人物的脸部中心位置;Determine the center position of the face of the person according to the face position information of the person;
根据所述人物的位置信息确定所述人物的中心位置;Determine the center position of the person according to the position information of the person;
根据所述人物的中心位置和所述人物的脸部中心位置,获取在所述当前图像中所述人物相对于所述当前图像的姿态角度;Acquiring the posture angle of the person relative to the current image in the current image according to the center position of the person and the center position of the face of the person;
所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
确定所述人物相对于所述当前图像的姿态角度小于设置的倾斜角度阈值且终端的姿态角度小于所述倾斜角度阈值时,判定所述目标对象存在姿态取景畸变。When it is determined that the posture angle of the person relative to the current image is less than the set tilt angle threshold and the posture angle of the terminal is less than the tilt angle threshold, it is determined that the target object has posture distortion.
这里,所述获取拍摄模式下取景框内当前图像中人物的脸部位置信息,可以是采用现有的人脸识别算法对拍摄模式下取景框内当前图像进行人脸检测,获取人脸区域,并根据人脸区域的点坐标,获得人物的脸部位置信息。需要说明的是,在进行人脸检测时,检测出的人脸区域图像的形状为矩形,人物实际脸部区域图像位于该矩形内,因此,人物的脸部位置信息可以用该矩形对应的四个顶点的坐标表示。所述获取拍摄模式下取景框内当前图像中所述人物的景深,可以是采用现有的单摄算法或双摄算法计算拍摄模式下取景框内当前图像中所述人物的脸部的景深。所述根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息,可以是基于所述人物的脸部位置 信息,获取与所述人物的脸部的像素相同或相近且景深相同的区域,根据该区域确定所述人物的位置信息。需要说明的是,在进行人物区域检测时,检测出的人物区域图像的形状为矩形,人物实际图像位于该矩形内,因此,人物的位置信息可以用该矩形对应的四个顶点坐标表示。当所述人物的脸部位置信息确定后,可以根据所述人物的脸部位置信息直接确定所述人物的脸部中心位置。比如,将表征所述人物的脸部位置信息的四个顶点进行对角连线,对角线的交点即为所述人物的脸部中心位置。当所述人物的位置信息确定后,可以根据所述人物的位置信息直接确定所述人物的中心位置。比如,将表征所述人物的位置信息的四个顶点进行对角连线,对角线的交点即为所述人物的中心位置。根据所述人物的脸部中心位置和所述人物的中心位置,可直接确定所述在所述当前图像中所述人物相对于所述当前图像的姿态角度。比如,将所述人物的脸部中心位置与所述人物的中心位置之间的连线、与所述当前图像中的水平线之间形成的夹角作为所述人物相对于所述当前图像的姿态角度。请参阅图6,假设所述人物的位置信息为矩形klmn对应的区域,所述人物的脸部位置信息为矩形abcd对应的区域,所述人物的中心位置为点p,所述人物的脸部的中心位置为点q,则所述当前图像中所述人物相对于所述当前图像的姿态角度为点p与点q之间的连线与所述当前图像的水平线之间的夹角θ。在正常拍摄图像时,终端通常处于水平或竖直状态即所述终端的姿态角度等于或大于设置的倾斜角度阈值,此时所述人物相对于所述当前图像的姿态角度通常也应大于设置的倾斜角度阈值,所述倾斜角度阈值可以设置为80度或85度等。若所述人物相对于所述当前图像的姿态角度小于设置的倾斜角度阈值,说明可能是终端取景倾斜或者终端存在抖动,此时若确定所述终端的姿态角度也小于设置的倾斜角度阈值,说明对所述人物存在姿态取景畸变,而此时若确定所述终端只是存在抖动,则说明不是对所述人物存在姿态取景畸变。这里,确定所述终端的姿态角度也小于设置的倾斜角度阈值时,所述终端的姿态角度可能与所述人物相对于所述当前图像的姿态角度相 等。所述终端的姿态角度以及所述终端是否存在抖动可以通过分析终端自身的陀螺仪数据获得。Here, the acquiring the face position information of the person in the current image in the framing frame in the shooting mode may use an existing face recognition algorithm to perform face detection on the current image in the framing frame in the shooting mode to obtain a face area, According to the point coordinates of the face area of the person, the face position information of the person is obtained. It should be noted that when performing face detection, the shape of the detected face area image is a rectangle, and the actual face area image of the person is located within the rectangle. Therefore, the position information of the face of the person can be The coordinates of the vertices. The acquiring the depth of field of the person in the current image in the framing frame in the shooting mode may be calculating the depth of field of the face of the person in the current image in the framing frame in the shooting mode using an existing single-shot algorithm or a dual-shot algorithm. The acquiring the position information of the person according to the face position information of the person and the depth of field may be based on the face position information of the person, acquiring the same or similar pixels of the person's face and the depth of field In the same area, the position information of the person is determined according to the area. It should be noted that, when detecting the human region, the shape of the detected human region image is a rectangle, and the actual image of the human is within the rectangle. Therefore, the position information of the human can be represented by the coordinates of the four vertices corresponding to the rectangle. After the face position information of the person is determined, the center position of the face of the person can be directly determined according to the face position information of the person. For example, the four vertices representing the position information of the face of the person are diagonally connected, and the intersection of the diagonal lines is the center position of the face of the person. After the position information of the person is determined, the center position of the person can be directly determined according to the position information of the person. For example, the four vertices characterizing the position information of the person are diagonally connected, and the intersection of the diagonal lines is the center position of the person. According to the center position of the face of the person and the center position of the person, the posture angle of the person in the current image relative to the current image can be directly determined. For example, the angle formed between the line between the center position of the face of the person and the center position of the person, and the horizontal line in the current image is taken as the pose of the person relative to the current image angle. Referring to FIG. 6, it is assumed that the position information of the person is the area corresponding to the rectangle klmn, the position information of the face of the person is the area corresponding to the rectangle abcd, the center position of the person is the point p, and the face of the person The center position of is the point q, and the posture angle of the person in the current image relative to the current image is the angle θ between the line between the point p and the point q and the horizontal line of the current image. When shooting images normally, the terminal is usually in a horizontal or vertical state, that is, the posture angle of the terminal is equal to or greater than the set tilt angle threshold, and the posture angle of the person relative to the current image should generally be greater than the set A tilt angle threshold, the tilt angle threshold may be set to 80 degrees, 85 degrees, or the like. If the posture angle of the person relative to the current image is less than the set tilt angle threshold, it may indicate that the terminal is tilted in viewfinder or the terminal has jitter. If it is determined that the posture angle of the terminal is also less than the set tilt angle threshold, There is a pose framing distortion on the person, and if it is determined that the terminal is only shaking, it means that there is no pose framing distortion on the person. Here, when it is determined that the posture angle of the terminal is also smaller than the set tilt angle threshold, the posture angle of the terminal may be equal to the posture angle of the person relative to the current image. The posture angle of the terminal and whether there is jitter in the terminal can be obtained by analyzing the terminal's own gyroscope data.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深,获取所述人物的脸部中心位置和所述人物的中心位置,并在确定当前图像中所述人物相对于所述当前图像的姿态角度满足设置的姿态取景畸变条件时,判定存在姿态取景畸变,以及时发出用于提示调整对所述人物的拍摄的消息,从而有效解决图像拍摄中出现的姿态取景畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the framing frame and the depth of field of the face of the person in the shooting mode, the center position of the face of the person and the center position of the person are obtained, and the current image is determined When the posture angle of the person with respect to the current image satisfies the set posture distortion condition, it is determined that there is posture distortion, and a message prompting to adjust the shooting of the person is sent out in time to effectively solve the problem of image shooting The problem of posture distortion appears, which improves the quality of image shooting, and the operation is simple and convenient.
在一个可选的实施例中,所述发出提示消息,包括:In an optional embodiment, the issuing of the prompt message includes:
将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向。The target object with posture distortion is identified by the set identification method, and a moving direction for the target object is prompted.
这里,所述标识方式可以根据实际情况需要进行设置,比如可以设置为实线框或虚线框等,也可以设置为不同颜色的实线框或虚线框。当所述目标对象为人物的脸部且存在脸部畸变时,所述将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向,包括:将所述人物的脸部采用设置的标识方式进行标识,并提示应将所述取景框的非警示区域向所述目标对象移动。当所述目标对象为人物的脸部以及所述人物且存在人像比例畸变时,所述将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向,包括:将所述人物采用设置的标识方式进行标识,并提示取景框应远离所述人物或者提示将取景框往下移动并从下往上拍摄人物。当所述目标对象为人物且所述当前图像中所述人物相对于所述当前图像的中心位置的距离过大即存在人物构图畸变时,所述将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向,包括:将所述人物采用设置的标识方式进行标识,并提示应将所述取景框的中心区域向所述目标对象移动。当所 述目标对象为人物且所述人物的面积与所述当前预览图像的面积之间的比值过小即存在人物构图畸变时,所述将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向,包括:将所述人物采用设置的标识方式进行标识,并提示应将取景框靠近所述人物。当所述目标对象为人物且存在姿态取景畸变时,所述将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向,包括:将所述人物采用设置的标识方式进行标识,并提示应保持取景框不倾斜。Here, the identification method can be set according to actual needs, for example, it can be set as a solid line frame or a dotted line frame, etc., or it can be set as a solid line frame or a dotted line frame of different colors. When the target object is a person's face and there is facial distortion, the target object with posture distortion is identified by the set identification method, and the direction of movement of the target object is prompted, including: The face of the person is identified by the set identification method, and it is suggested that the non-alert area of the viewfinder should be moved toward the target object. When the target object is a person's face and the person and there is a portrait distortion, the target object with posture distortion is identified by the set identification method, and a movement direction for the target object is prompted , Including: identifying the person with the set identification method, and prompting that the framing frame should be far away from the person or prompting to move the framing frame down and photographing the person from bottom to top. When the target object is a person and the distance between the person in the current image and the center position of the current image is too large, that is, there is a person's composition distortion, the target object that will have a posture distortion adopts the set The identification method identifies and prompts the moving direction of the target object, which includes: identifying the person using the set identification method, and prompting that the center area of the framing frame should be moved toward the target object. When the target object is a person and the ratio between the area of the person and the area of the current preview image is too small, that is, there is distortion of the person's composition, the target object that will have posture distortion adopts the set identification method Marking and prompting the moving direction of the target object include: marking the person using the set mark mode, and prompting that the framing frame should be close to the person. When the target object is a person and there is posture distortion, the target object with posture distortion is identified by using the set identification method, and the direction of movement of the target object is prompted, including: Use the set marking method to mark, and prompt that the viewfinder should not be tilted.
如此,通过对存在姿态畸变的所述目标对象进行标识,并提示针对所述目标对象的移动方向,实现了自动对姿态畸变进行校正的提示,进一步提升了图像拍摄质量。此外,通过自动提示,使非专业拍摄者也能够获得质量好的图像。In this way, by identifying the target object with posture distortion and prompting the moving direction of the target object, a prompt to automatically correct posture distortion is realized, and the image shooting quality is further improved. In addition, through automatic prompting, non-professional photographers can also obtain good quality images.
在一个可选的实施例中,所述判定所述目标对象存在设置的姿态畸变之后,还包括:In an optional embodiment, after determining that the target object has a set posture distortion, the method further includes:
拒绝响应接收到的拍摄指令,直至检测到所述目标对象不存在设置的姿态畸变。Refusing to respond to the received shooting instruction until it is detected that there is no set posture distortion of the target object.
这里,在确定所述目标对象存在设置的姿态畸变时之后,若接收到拍摄指令,则会拒绝对所述拍摄指令进行响应,即不对目标对象进行拍摄,直至重新检测到所述目标对象不存在设置的姿态畸变后,才会响应拍摄指令。当所述终端为照相机或摄像机等设备时,所述拒绝响应接收到的拍摄指令,可以是锁死快门。Here, after it is determined that the target object has the set posture distortion, if a shooting instruction is received, it will refuse to respond to the shooting instruction, that is, the target object will not be photographed until the target object is not detected again After the set posture is distorted, it will respond to the shooting instruction. When the terminal is a device such as a camera or a video camera, the refusal to respond to the received shooting instruction may be to lock the shutter.
如此,通过在确定所述目标对象存在设置的姿态畸变时,直接拒绝响应接收到的拍摄指令,能够有效确保拍摄出的图像中不存在姿态畸变问题,进一步提升了图像拍摄质量。In this way, by directly refusing to respond to the received shooting instruction when it is determined that the target object has the set posture distortion, it can effectively ensure that there is no posture distortion problem in the captured image, which further improves the image shooting quality.
为实现上述方法,对应本发明实施例还提供了一种图像拍摄装置,如图7所示,所述装置包括:To implement the above method, an image capturing device is also provided corresponding to an embodiment of the present invention. As shown in FIG. 7, the device includes:
获取模块10,用于获取拍摄模式下取景框内当前图像中目标对象的位置信息;The obtaining module 10 is used to obtain the position information of the target object in the current image in the framing frame in the shooting mode;
处理模块11,用于根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数;The processing module 11 is configured to acquire, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion;
判断模块12,用于确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变;The determining module 12 is configured to determine that the target object has the set posture distortion when the target parameter meets the set posture distortion condition;
提示模块13,用于发出提示消息;所述提示消息用于提示调整对所述目标对象的拍摄。The prompting module 13 is used to issue a prompting message; the prompting message is used to prompt to adjust the shooting of the target object.
综上,上述实施例提供的图像拍摄装置中,根据获取的拍摄模式下取景框内当前图像中目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,并发出提示消息,以提醒调整对所述目标对象的拍摄。如此,确定拍摄模式下取景框内当前图像中目标对象存在设置的姿态畸变后,及时发出用于提示调整对所述目标对象的拍摄的消息,有效解决了图像拍摄中出现的姿态畸变问题,提升了图像拍摄质量。In summary, in the image shooting device provided in the above embodiment, the target parameters for characterizing whether the target object has posture distortion are acquired according to the acquired position information of the target object in the current image in the framing frame in the shooting mode to determine the target When the parameter satisfies the set posture distortion condition, it is determined that the target object has the set posture distortion, and a prompt message is issued to remind the adjustment of the shooting of the target object. In this way, after it is determined that the target object in the current image in the viewfinder in the shooting mode has the posture distortion set, a message prompting to adjust the shooting of the target object is promptly issued, which effectively solves the problem of posture distortion in image shooting and improves Image quality.
在一可选的实施例中,In an alternative embodiment,
所述获取模块10,具体用于:获取拍摄模式下取景框内当前图像中人物的脸部位置信息;The obtaining module 10 is specifically used to obtain the position information of the face of the person in the current image in the viewfinder in the shooting mode;
所述处理模块11,具体用于:根据所述人物的脸部位置信息,确定所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积;以及,根据所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积,确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值;The processing module 11 is specifically configured to determine the area of the face of the person and the area occupied by the face of the person in the set warning area according to the position information of the face of the person; and, according to the The area of the face of the person and the area occupied by the face of the person in the set warning area, determine the ratio between the area occupied by the face of the person in the set warning area and the area of the face of the person ;
所述判断模块12,具体用于:确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值大于设置的第一阈值时,判定所述目标对象存在脸部畸变。The judging module 12 is specifically configured to determine the target when the ratio between the area occupied by the face of the person in the set warning area and the face area of the person is greater than the set first threshold Subject has facial distortion.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息,确定所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积,并在确定所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积满足设置的脸部畸变条件时,判定存在脸部畸变,以及时发出用于提示调整对所述人物的脸部的拍摄的消息,从而有效解决图像拍摄中出现的脸部畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the framing frame in the shooting mode, determine the area of the face of the person and the area occupied by the face of the person in the set warning area, and then determine the person Area of the face and the area occupied by the face of the person in the set warning area meet the set face distortion conditions, it is determined that there is face distortion, and a prompt is issued to prompt adjustment of the face of the person The news of shooting, so as to effectively solve the problem of face distortion in image shooting, improve the quality of image shooting, and the operation is simple and convenient.
在一可选的实施例中,In an alternative embodiment,
所述获取模块10,具体用于:获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;The acquiring module 10 is specifically configured to: acquire the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
所述处理模块11,具体用于:根据所述人物的脸部位置信息确定所述人物的脸部高度;The processing module 11 is specifically configured to: determine the face height of the person according to the face position information of the person;
根据所述人物的位置信息获取所述人物的高度;Acquiring the height of the person according to the position information of the person;
根据所述人物的脸部高度和所述人物的高度确定所述人物的脸部高度与所述人物的高度之间的比值;Determining the ratio between the height of the face of the person and the height of the person according to the height of the face of the person and the height of the person;
所述判断模块12,具体用于:确定所述人物的脸部高度与所述人物的高度之间的比值大于设置的第二阈值且小于设置的第三阈值时,判定所述目标对象存在人像比例畸变。The judgment module 12 is specifically configured to determine that the target object has a portrait when the ratio between the height of the face of the person and the height of the person is greater than the set second threshold and less than the set third threshold Proportional distortion.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深,获取所述人物的脸部高度以及所述人物的高度,并在确定所述人物的脸部高度与所述人物的高度之间的比值满足设置的人像比例 畸变条件时,判定存在人像比例畸变,以及时发出用于提示调整对所述人物的拍摄的消息,从而有效解决图像拍摄中出现的人像比例畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the face of the person, the height of the face of the person and the height of the person are obtained, and the person ’s height is determined When the ratio between the height of the face and the height of the person satisfies the set portrait distortion condition, it is determined that there is a portrait distortion, and a message prompting to adjust the shooting of the person is promptly issued, thereby effectively solving the problem of image shooting The problem of portrait distortion occurs, which improves the quality of image shooting, and the operation is simple and convenient.
在一可选的实施例中,In an alternative embodiment,
所述获取模块10,具体用于:获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深;The acquiring module 10 is specifically configured to: acquire the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the face of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
所述处理模块11,具体用于:根据所述人物的位置信息确定所述人物的中心位置;The processing module 11 is specifically configured to: determine the center position of the person according to the position information of the person;
根据所述人物的中心位置和所述当前图像的中心位置,获取在所述当前图像中所述人物相对于所述当前图像的中心位置的距离;Acquiring the distance of the person in the current image relative to the center position of the current image according to the center position of the person and the center position of the current image;
所述判断模块12,具体用于:确定所述距离大于设置的第四阈值时,判定所述目标对象存在人物构图畸变。The judging module 12 is specifically configured to: when it is determined that the distance is greater than the set fourth threshold, determine that the target object has distortion of the human composition.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深,获取所述人物的中心位置,并在确定所述当前图像中所述人物相对于所述当前图像的中心位置的距离满足设置的人物构图畸变条件时,判定存在人物构图畸变,以及时发出用于提示调整对所述人物的拍摄的消息,从而有效解决图像拍摄中出现的人物构图畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the framing frame and the depth of field of the face of the person in the shooting mode, the center position of the person is obtained, and the person relative to the position in the current image is determined When the distance between the center position of the current image meets the set character composition distortion condition, it is determined that there is a character composition distortion, and a message prompting to adjust the shooting of the character is promptly issued, thereby effectively solving the character composition distortion that occurs in image shooting Problem, improve the quality of image shooting, and the operation is simple and convenient.
在一可选的实施例中,In an alternative embodiment,
所述获取模块10,具体用于:获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;The acquiring module 10 is specifically configured to: acquire the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
所述处理模块11,具体用于:根据所述人物的位置信息确定所述人物的 中心位置;The processing module 11 is specifically configured to determine the center position of the person according to the position information of the person;
根据所述人物的位置信息确定所述人物的面积;Determine the area of the person according to the position information of the person;
根据所述人物的面积获取所述人物的面积与所述当前预览图像的面积之间的比值;Obtaining the ratio between the area of the person and the area of the current preview image according to the area of the person;
所述判断模块12,具体用于:确定所述人物的面积与所述当前预览图像的面积之间的比值小于设置的第五阈值时,判定所述目标对象存在人物构图畸变。The judging module 12 is specifically configured to: when the ratio between the area of the person and the area of the current preview image is less than the set fifth threshold, determine that there is a person composition distortion in the target object.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深,获取所述人物的面积,并在确定所述当前图像中所述人物的面积相对于所述当前图像的面积满足设置的人物构图畸变条件时,判定存在人物构图畸变,以及时发出用于提示调整对所述人物的拍摄的消息,从而有效解决图像拍摄中出现的人物构图畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the shooting frame and the depth of field of the face of the person in the shooting mode, the area of the person is obtained, and the area of the person in the current image is determined relative to When the area of the current image satisfies the set character composition distortion condition, it is determined that there is a character composition distortion, and a message prompting to adjust the shooting of the character is promptly issued, so as to effectively solve the problem of character composition distortion that occurs in image shooting, Improve the quality of image shooting, and the operation is simple and convenient.
在一可选的实施例中,In an alternative embodiment,
所述获取模块10,具体用于:获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;The acquiring module 10 is specifically configured to: acquire the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
所述处理模块11,具体用于:根据所述人物的脸部位置信息确定所述人物的脸部中心位置;The processing module 11 is specifically configured to: determine the center position of the face of the person according to the face position information of the person;
根据所述人物的位置信息确定所述人物的中心位置;Determine the center position of the person according to the position information of the person;
根据所述人物的中心位置和所述人物的脸部中心位置,获取在所述当前图像中所述人物相对于所述当前图像的姿态角度;Acquiring the posture angle of the person relative to the current image in the current image according to the center position of the person and the center position of the face of the person;
所述判断模块12,具体用于:确定所述人物相对于所述当前图像的姿态角度小于设置的倾斜角度阈值且终端的姿态角度小于所述倾斜角度阈值时, 判定所述目标对象存在姿态取景畸变。The judging module 12 is specifically configured to determine that when the posture angle of the person with respect to the current image is less than the set tilt angle threshold and the posture angle of the terminal is less than the tilt angle threshold, it is determined that the target object has a pose framing distortion.
如此,根据拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深,获取所述人物的脸部中心位置和所述人物的中心位置,并在确定当前图像中所述人物相对于所述当前图像的姿态角度满足设置的姿态取景畸变条件时,判定存在姿态取景畸变,以及时发出用于提示调整对所述人物的拍摄的消息,从而有效解决图像拍摄中出现的姿态取景畸变问题,提升图像拍摄质量,并且操作简单方便。In this way, according to the position information of the face of the person in the current image in the framing frame and the depth of field of the face of the person in the shooting mode, the center position of the face of the person and the center position of the person are obtained, and the current image is determined When the posture angle of the person with respect to the current image satisfies the set posture distortion condition, it is determined that there is posture distortion, and a message prompting to adjust the shooting of the person is sent out in time to effectively solve the problem of image shooting The problem of posture distortion appears, which improves the quality of image shooting, and the operation is simple and convenient.
在一可选的实施例中,所述处理模块11,还用于:拒绝响应接收到的拍摄指令,直至检测到所述目标对象不存在设置的姿态畸变。In an optional embodiment, the processing module 11 is further configured to: refuse to respond to the received shooting instruction until it is detected that there is no set posture distortion of the target object.
如此,通过在确定所述目标对象存在设置的姿态畸变时,直接拒绝响应接收到的拍摄指令,能够有效确保拍摄出的图像中不存在姿态畸变问题,进一步提升了图像拍摄质量。In this way, by directly refusing to respond to the received shooting instruction when it is determined that the target object has the set posture distortion, it can effectively ensure that there is no posture distortion problem in the captured image, which further improves the image shooting quality.
在一可选的实施例中,所述提示模块12,具体用于:将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向。In an alternative embodiment, the prompting module 12 is specifically configured to: mark the target object with posture distortion using the set identification method, and prompt the moving direction for the target object.
如此,通过对存在姿态畸变的所述目标对象进行标识,并提示针对所述目标对象的移动方向,实现了自动对姿态畸变进行校正的提示,进一步提升了图像拍摄质量。In this way, by identifying the target object with posture distortion and prompting the moving direction of the target object, a prompt to automatically correct posture distortion is realized, and the image shooting quality is further improved.
需要说明的是:上述实施例提供的图像拍摄装置在实现图像拍摄方法时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将图像拍摄装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的图像拍摄装置与对应的图像拍摄方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the image capturing apparatus provided in the above embodiments implements the image capturing method, only the above-mentioned division of each program module is used as an example for illustration. In practical applications, the above-mentioned processing may be allocated by different program modules according to needs. That is, the internal structure of the image capturing device is divided into different program modules to complete all or part of the processing described above. In addition, the image capturing device provided in the above embodiment and the corresponding image capturing method embodiment belong to the same concept. For the specific implementation process, see the method embodiment, and details are not described here.
本发明实施例提供了一种终端,如图8所示,该终端包括:处理器310和用于存储能够在处理器310上运行的计算机程序的存储器311;其中,图8中示意的处理器310并非用于指代处理器310的个数为一个,而是仅用于指代处理器310相对其他器件的位置关系,在实际应用中,处理器310的个数可以为一个或多个;同样,图8中示意的存储器311也是同样的含义,即仅用于指代存储器311相对其他器件的位置关系,在实际应用中,存储器311的个数可以为一个或多个。An embodiment of the present invention provides a terminal. As shown in FIG. 8, the terminal includes: a processor 310 and a memory 311 for storing a computer program that can run on the processor 310; wherein, the processor illustrated in FIG. 8 310 is not used to refer to the number of processors 310 as one, but only used to refer to the positional relationship of the processor 310 relative to other devices. In actual applications, the number of processors 310 may be one or more; Similarly, the memory 311 illustrated in FIG. 8 has the same meaning, that is, it is only used to refer to the positional relationship of the memory 311 relative to other devices. In actual applications, the number of the memory 311 may be one or more.
所述处理器310用于运行所述计算机程序时,执行如下步骤:When the processor 310 is used to run the computer program, the following steps are performed:
获取拍摄模式下取景框内当前图像中目标对象的位置信息;Obtain the position information of the target object in the current image in the framing frame in shooting mode;
根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数;;Acquiring target parameters characterizing whether the target object has posture distortion according to the position information of the target object;
确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,并发出提示消息;所述提示消息用于提示调整对所述目标对象的拍摄。When it is determined that the target parameter satisfies the set posture distortion condition, it is determined that the target object has the set posture distortion, and a prompt message is issued; the prompt message is used to prompt adjustment of the shooting of the target object.
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:In an alternative embodiment, when the processor 310 is further used to run the computer program, the following steps are performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息;Obtain the face position information of the person in the current image in the framing frame in shooting mode;
根据所述人物的脸部位置信息,确定所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积;Determine the area of the face of the person and the area occupied by the face of the person in the set warning area according to the position information of the face of the person;
根据所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积,确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值;According to the area of the face of the person and the area occupied by the face of the person in the set warning area, determine the area between the area occupied by the face of the person in the set warning area and the area of the face of the person Ratio
确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值大于设置的第一阈值时,判定所述目标对象存在脸部畸变。When it is determined that the ratio between the area occupied by the face of the person in the set warning area and the face area of the person is greater than the set first threshold, it is determined that the target object has facial distortion.
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:In an alternative embodiment, when the processor 310 is further used to run the computer program, the following steps are performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
根据所述人物的脸部位置信息确定所述人物的脸部高度;Determine the face height of the person according to the face position information of the person;
根据所述人物的位置信息获取所述人物的高度;Acquiring the height of the person according to the position information of the person;
根据所述人物的脸部高度和所述人物的高度确定所述人物的脸部高度与所述人物的高度之间的比值;Determining the ratio between the height of the face of the person and the height of the person according to the height of the face of the person and the height of the person;
确定所述人物的脸部高度与所述人物的高度之间的比值大于设置的第二阈值且小于设置的第三阈值时,判定所述目标对象存在人像比例畸变。When it is determined that the ratio between the height of the face of the person and the height of the person is greater than the set second threshold and less than the set third threshold, it is determined that the target object has a portrait distortion.
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:In an alternative embodiment, when the processor 310 is further used to run the computer program, the following steps are performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the face of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
根据所述人物的位置信息确定所述人物的中心位置;Determine the center position of the person according to the position information of the person;
根据所述人物的中心位置和所述当前图像的中心位置,获取在所述当前图像中所述人物相对于所述当前图像的中心位置的距离;Acquiring the distance of the person in the current image relative to the center position of the current image according to the center position of the person and the center position of the current image;
确定所述距离大于设置的第四阈值时,判定所述目标对象存在人物构图畸变。When it is determined that the distance is greater than the set fourth threshold, it is determined that the target object has distortion of the human composition.
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:In an alternative embodiment, when the processor 310 is further used to run the computer program, the following steps are performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
根据所述人物的位置信息确定所述人物的面积;Determine the area of the person according to the position information of the person;
根据所述人物的面积获取所述人物的面积与所述当前预览图像的面积之间的比值;Obtaining the ratio between the area of the person and the area of the current preview image according to the area of the person;
确定所述人物的面积与所述当前预览图像的面积之间的比值小于设置的第五阈值时,判定所述目标对象存在人物构图畸变。When it is determined that the ratio between the area of the person and the area of the current preview image is less than the set fifth threshold, it is determined that there is a person composition distortion in the target object.
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:In an alternative embodiment, when the processor 310 is further used to run the computer program, the following steps are performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
根据所述人物的脸部位置信息确定所述人物的脸部中心位置;Determine the center position of the face of the person according to the face position information of the person;
根据所述人物的位置信息确定所述人物的中心位置;Determine the center position of the person according to the position information of the person;
根据所述人物的中心位置和所述人物的脸部中心位置,获取在所述当前图像中所述人物相对于所述当前图像的姿态角度;Acquiring the posture angle of the person relative to the current image in the current image according to the center position of the person and the center position of the face of the person;
确定所述人物相对于所述当前图像的姿态角度小于设置的倾斜角度阈值且终端的姿态角度小于所述倾斜角度阈值时,判定所述目标对象存在姿态取景畸变。When it is determined that the posture angle of the person relative to the current image is less than the set tilt angle threshold and the posture angle of the terminal is less than the tilt angle threshold, it is determined that the target object has posture distortion.
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:In an alternative embodiment, when the processor 310 is further used to run the computer program, the following steps are performed:
拒绝响应接收到的拍摄指令,直至检测到所述目标对象不存在设置的姿态畸变。Refusing to respond to the received shooting instruction until it is detected that there is no set posture distortion of the target object.
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:In an alternative embodiment, when the processor 310 is further used to run the computer program, the following steps are performed:
将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向。The target object with posture distortion is identified by the set identification method, and a moving direction for the target object is prompted.
该终端还包括:至少一个网络接口312。该终端中的各个组件通过总线系统313耦合在一起。可理解,总线系统313用于实现这些组件之间的连接通信。总线系统313除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图8中将各种总线都标为总线系统313。The terminal also includes: at least one network interface 312. The various components in the terminal are coupled together via the bus system 313. It can be understood that the bus system 313 is used to implement connection and communication between these components. In addition to the data bus, the bus system 313 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are marked as the bus system 313 in FIG. 8.
其中,存储器311可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced  Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本发明实施例描述的存储器311旨在包括但不限于这些和任意其它适合类型的存储器。Among them, the memory 311 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read- Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, Ferromagnetic Random Access Memory), Flash Memory (Flash) Memory, Magnetic Surface Memory , Compact disc, or read-only compact disc (CD-ROM, Compact, Read-Only Memory); the magnetic surface memory can be a disk storage or a tape storage. The volatile memory may be a random access memory (RAM, Random Access Memory), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM, Static Random Access Memory), synchronous static random access memory (SSRAM, Synchronous Static Random Access Memory), dynamic random access Memory (DRAM, Dynamic Random Access), Synchronous Dynamic Random Access Memory (SDRAM, Synchronous Dynamic Random Access Memory), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data Rate, Synchronous Dynamic Random Access Random Access Memory), enhanced Type synchronous dynamic random access memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), synchronous connection dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), direct memory bus random access memory (DRRAM, Direct Rambus Random Access Random Access Memory ). The memory 311 described in this embodiment of the present invention is intended to include, but is not limited to, these and any other suitable types of memories.
本发明实施例中的存储器311用于存储各种类型的数据以支持该终端的操作。这些数据的示例包括:用于在该终端上操作的任何计算机程序,如操作系统和应用程序;联系人数据;电话簿数据;消息;图片;视频等。其中,操作系统包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序可以包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。这里,实现本发明实施例方法的程序可以包含在应用程序中。The memory 311 in the embodiment of the present invention is used to store various types of data to support the operation of the terminal. Examples of these data include: any computer programs used to operate on the terminal, such as operating systems and applications; contact data; phone book data; messages; pictures; videos, etc. Among them, the operating system contains various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application program may include various application programs, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. Here, the program for implementing the method of the embodiment of the present invention may be included in the application program.
本实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机程序,计算机存储介质可以是磁性随机存取存储器(FRAM,ferromagnetic random access memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory)等存储器;也可以是包括上述存储器之一或任意组合的各种设备,如移动电话、计算机、平板设备、个人数字助理等。This embodiment also provides a computer storage medium in which a computer program is stored. The computer storage medium may be a magnetic random access memory (FRAM, ferromagnetic random access memory), a read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory), electrically erasable programmable read-only memory (EEPROM, Electrically Erasable Programmable Read-Only Memory, Flash Memory, Magnetic Surface Memory, CD-ROM, or CD-ROM (Compact Disc Read-Only Memory), etc .; can also include one of the above-mentioned memories or Any combination of various devices, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
一种计算机存储介质,所述计算机存储介质中存储有计算机程序,所述计算机程被处理器运行时,执行如下步骤:A computer storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the following steps are performed:
获取拍摄模式下取景框内当前图像中目标对象的位置信息;Obtain the position information of the target object in the current image in the framing frame in shooting mode;
根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数;Acquiring target parameters characterizing whether the target object has posture distortion according to the position information of the target object;
确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,并发出提示消息;所述提示消息用于提示调整对所述目标对象的拍摄。When it is determined that the target parameter satisfies the set posture distortion condition, it is determined that the target object has the set posture distortion, and a prompt message is issued; the prompt message is used to prompt adjustment of the shooting of the target object.
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:In an alternative embodiment, when the computer program is run by the processor, the following steps are also performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息;Obtain the face position information of the person in the current image in the framing frame in shooting mode;
根据所述人物的脸部位置信息,确定所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积;Determine the area of the face of the person and the area occupied by the face of the person in the set warning area according to the position information of the face of the person;
根据所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积,确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值;According to the area of the face of the person and the area occupied by the face of the person in the set warning area, determine the area between the area occupied by the face of the person in the set warning area and the area of the face of the person Ratio
确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值大于设置的第一阈值时,判定所述目标对象存在脸部畸变。When it is determined that the ratio between the area occupied by the face of the person in the set warning area and the face area of the person is greater than the set first threshold, it is determined that the target object has facial distortion.
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:In an alternative embodiment, when the computer program is run by the processor, the following steps are also performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
根据所述人物的脸部位置信息确定所述人物的脸部高度;Determine the face height of the person according to the face position information of the person;
根据所述人物的位置信息获取所述人物的高度;Acquiring the height of the person according to the position information of the person;
根据所述人物的脸部高度和所述人物的高度确定所述人物的脸部高度与 所述人物的高度之间的比值;Determining the ratio between the height of the face of the person and the height of the person according to the height of the face of the person and the height of the person;
确定所述人物的脸部高度与所述人物的高度之间的比值大于设置的第二阈值且小于设置的第三阈值时,判定所述目标对象存在人像比例畸变。When it is determined that the ratio between the height of the face of the person and the height of the person is greater than the set second threshold and less than the set third threshold, it is determined that the target object has a portrait distortion.
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:In an alternative embodiment, when the computer program is run by the processor, the following steps are also performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the face of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
根据所述人物的位置信息确定所述人物的中心位置;Determine the center position of the person according to the position information of the person;
根据所述人物的中心位置和所述当前图像的中心位置,获取在所述当前图像中所述人物相对于所述当前图像的中心位置的距离;Acquiring the distance of the person in the current image relative to the center position of the current image according to the center position of the person and the center position of the current image;
确定所述距离大于设置的第四阈值时,判定所述目标对象存在人物构图畸变。When it is determined that the distance is greater than the set fourth threshold, it is determined that the target object has distortion of the human composition.
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:In an alternative embodiment, when the computer program is run by the processor, the following steps are also performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
根据所述人物的位置信息确定所述人物的面积;Determine the area of the person according to the position information of the person;
根据所述人物的面积获取所述人物的面积与所述当前预览图像的面积之间的比值;Obtaining the ratio between the area of the person and the area of the current preview image according to the area of the person;
确定所述人物的面积与所述当前预览图像的面积之间的比值小于设置的第五阈值时,判定所述目标对象存在人物构图畸变。When it is determined that the ratio between the area of the person and the area of the current preview image is less than the set fifth threshold, it is determined that there is a person composition distortion in the target object.
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:In an alternative embodiment, when the computer program is run by the processor, the following steps are also performed:
获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
根据所述人物的脸部位置信息确定所述人物的脸部中心位置;Determine the center position of the face of the person according to the face position information of the person;
根据所述人物的位置信息确定所述人物的中心位置;Determine the center position of the person according to the position information of the person;
根据所述人物的中心位置和所述人物的脸部中心位置,获取在所述当前图像中所述人物相对于所述当前图像的姿态角度;Acquiring the posture angle of the person relative to the current image in the current image according to the center position of the person and the center position of the face of the person;
确定所述人物相对于所述当前图像的姿态角度小于设置的倾斜角度阈值且终端的姿态角度小于所述倾斜角度阈值时,判定所述目标对象存在姿态取景畸变。When it is determined that the posture angle of the person relative to the current image is less than the set tilt angle threshold and the posture angle of the terminal is less than the tilt angle threshold, it is determined that the target object has posture distortion.
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:In an alternative embodiment, when the computer program is run by the processor, the following steps are also performed:
拒绝响应接收到的拍摄指令,直至检测到所述目标对象不存在设置的姿态畸变。Refusing to respond to the received shooting instruction until it is detected that there is no set posture distortion of the target object.
在一可选的实施例中,在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:In an alternative embodiment, in an alternative embodiment, when the computer program is executed by the processor, the following steps are also performed:
将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向。The target object with posture distortion is identified by the set identification method, and a moving direction for the target object is prompted.
下面通过一具体示例对本发明实施例作进一步详细说明,本示例中以所述目标对象为人为例。如图9所示,为本发明一具体实施例提供的图像拍摄装置,包括:摄像模块20、主控模块21、显示模块22、声效模块23和反馈 模块24;其中,摄像模块20用于获取取景图像;主控模块21主要负责整体的流程控制,包括获取摄像模块所获取的图像并对图像进行处理计算,再输出到显示模块22,同时可以控制声效模块23和反馈模块24提供相应的反馈;显示模块22、声效模块23和反馈模块24用于根据主控模块21的控制输出对应的反馈信号。The following further describes the embodiment of the present invention in detail through a specific example. In this example, the target object is a person. As shown in FIG. 9, it is an image capturing device provided by a specific embodiment of the present invention, including: a camera module 20, a main control module 21, a display module 22, a sound effect module 23, and a feedback module 24; wherein, the camera module 20 is used to obtain Framing image; the main control module 21 is mainly responsible for the overall process control, including acquiring the image obtained by the camera module and processing the image, and then outputting to the display module 22, at the same time can control the sound effect module 23 and the feedback module 24 to provide corresponding feedback ; The display module 22, sound effect module 23 and feedback module 24 are used to output corresponding feedback signals according to the control of the main control module 21.
基于上述图像拍摄装置,可以在拍照时对一些疑似不良畸变进行主动提示,主要包括:脸部畸变提醒、人像比例畸变提醒、人物构图畸变提醒、姿态取景畸变提醒等。Based on the above image shooting device, some suspected undesirable distortions can be actively reminded when taking pictures, mainly including: facial distortion reminder, portrait proportion distortion reminder, character composition distortion reminder, posture distortion distortion reminder, etc.
1)脸部畸变提醒1) Reminder for facial distortion
在拍摄人像尤其是自拍过程中,当脸部区域过于接近取景框边缘时,容易导致脸部扭曲变形即存在脸部畸变。在取景范围内,本实施例中定义了警示区域。利用摄像模块20获取预览图像后,并将图像通过主控模块21传输给显示模块22。利用基础的人脸检测算法,可以获得取景范围内的各个人脸的范围。假设定义警示阈值为A比如取75%,当获得的某个人脸在警示区域的比例超过A时,认为触发了警示。此时,可以用红框标识人脸,并通过主控模块21控制声效模块23和显示模块22,以提示用户存在脸部畸变风险。In shooting portraits, especially self-portraits, when the face area is too close to the edge of the frame, it is easy to cause distortion and distortion of the face, that is, face distortion. In the viewfinder range, the warning area is defined in this embodiment. After obtaining the preview image by the camera module 20, the image is transmitted to the display module 22 through the main control module 21. Using the basic face detection algorithm, the range of each face within the framing range can be obtained. Suppose that the defined warning threshold is A, for example, 75%. When the proportion of a certain face in the warning area exceeds A, it is considered that the warning is triggered. At this time, a red frame can be used to identify a human face, and the sound control module 23 and the display module 22 can be controlled by the main control module 21 to alert the user of the risk of facial distortion.
除了在多人合照容易出现脸部畸变外,自拍也时常会出现脸部区域太过边缘的情况。但是,由于自拍时脸部面积比较大,畸变只是小部分的存在,导致用户自拍时可能会忽略那些细节。为此,在自拍情况下,也相应建立一个警示区域,当人脸在警示区域占比过大时,将发出畸变警报。In addition to being prone to facial distortions when taking photos with multiple people, self-portraits often show that the face area is too marginal. However, because the face area is relatively large when taking selfies, the distortion is only a small part, which may cause users to ignore those details when taking selfies. For this reason, in the case of self-portraits, a warning area is also established accordingly. When a human face accounts for a large proportion in the warning area, a distortion alarm will be issued.
2)人像比例畸变提醒2) Reminder of portrait distortion
在进行全身拍摄时,没有经验的摄影者往往会将被拍摄者拍的比例失调,然而很多女性用户对照片中身材比例有较高的要求。When taking full-body shots, inexperienced photographers tend to disproportionately capture the proportion of the person being photographed. However, many female users have higher requirements for the proportion of the figure in the photo.
这里,首先将人脸通过人脸检测相关算法检测出来;然后利用双摄算法可以计算景深的特点,将与脸部处于同一平面的身体筛选出来,从而获取脸 部高度L和人的高度H。假设设定的身头比为M,计算L/H与M的大小。这里,可选用基础的M为8,也就是所谓的8头身。如果获取的L/H小于M,取景界面将提示用户“身材比例不满足预设标准”,在人周围显示红色提示框,并提示用户将取景位置往下移动从下往上拍摄人像,并锁死快门。当L/H大于M时,快门释放,无提示框显示。Here, the face is first detected by a face detection-related algorithm; then the dual-shot algorithm can be used to calculate the depth of field characteristics, and the body in the same plane as the face is selected to obtain the face height L and the person height H. Assuming that the set body ratio is M, calculate the size of L / H and M. Here, the optional base M is 8, which is the so-called 8 head body. If the acquired L / H is less than M, the framing interface will prompt the user that “the body proportion does not meet the preset standard”, display a red prompt frame around the person, and prompt the user to move the framing position down to take a portrait from the bottom and lock Dead shutter. When L / H is greater than M, the shutter is released and no prompt box is displayed.
由于在人像比例畸变提醒功能开启状态下,可能拍摄的不是全身照片,而是半身照。通过检测人头比例和图像中框选的人像范围是不是与取景框下边缘重合,以决定是否触发人像比例畸变提醒功能。若人头比过大,如为1:3或1:4时,会认定属于半身照片,此时不触发人像比例畸变提醒功能。若被检查到的躯体下缘和取景框下边缘重合时,将判定为身体超出了取景范围,不是全身像,此时不触发人像比例畸变提醒功能。When the reminder function for portrait distortion is turned on, it is possible to take a full-length photo instead of a full-length photo. By detecting whether the ratio of the head and the range of the framed portrait in the image coincide with the lower edge of the framing frame, it is decided whether to trigger the reminder function of portrait distortion. If the head-to-head ratio is too large, such as 1: 3 or 1: 4, it will be considered as a half-length photo, and the reminder function of portrait distortion will not be triggered at this time. If the detected lower edge of the body coincides with the lower edge of the framing frame, it will be determined that the body is beyond the range of the framing, not a full-body portrait, and the reminder function of portrait distortion will not be triggered at this time.
3)人物构图畸变提醒3) Reminder of distortion of character composition
在拍摄大场景时,很多提供的构图工具对于大部分人来说毫无用处,容易出现人物偏离中心、人物和场景比例不对等情况,甚至出现镜头倾斜等错误。When shooting large scenes, many of the provided composition tools are useless to most people, and it is easy to cause people to deviate from the center, the ratio of people and scenes is not correct, and even errors such as lens tilt.
当主控模块21获取到人像范围后,可以进一步得到整个人体的中心位置,将人体的中心位置与图像的中心位置进行向量计算,如果向量值偏大,可能认定为人像位置偏移严重。可能出现以下情况:人物的位置过高,高于图像的中心水平线;人物的位置过低,远低于图像的中心水平线;人像距离合理构图的位置过远等。此外,如果获取的人像大小明显小于图像场景大小,可以认为人像很难在图像中看清,将会提示“人像过小”等警告。After the main control module 21 obtains the portrait range, it can further obtain the center position of the entire human body, and calculate the vector position of the center position of the human body and the center position of the image. If the vector value is too large, it may be considered that the portrait position shifts seriously. The following situations may occur: the position of the person is too high, which is higher than the center horizontal line of the image; the position of the person is too low, which is far lower than the center horizontal line of the image; the portrait is too far away from the position of reasonable composition. In addition, if the size of the obtained portrait is significantly smaller than the size of the image scene, it can be considered that the portrait is difficult to see in the image, and a warning such as "the portrait is too small" will be prompted.
4)姿态取景畸变提醒4) Reminder for posture distortion
没有经验的拍摄者在使用照相机等终端时,经常会存在取景出现倾斜的情况。通过主控模块21可以获取人的脸部的范围和人的整个范围,分别取它们的中心,利用这两个点连线后获取中轴线,再根据图像的中心水平线,从 而获得人像的姿态夹角α。假设设定姿态倾斜阈值β为85度,当α小于β时,认为人像存在倾斜过度的情况。此时,可额外获取终端中陀螺仪姿态数据进行确认。如果陀螺仪状态稳定,并且两者的倾斜数据基本一致时,将在取景界面提示“取景倾斜”的警告。当陀螺仪数据显示手机存在抖动时,判定是在拍摄时终端持有者没有稳定住终端造成,将提示:“画面存在抖动,请拿稳”。Inexperienced photographers often have tilted framing when using terminals such as cameras. Through the main control module 21, the range of the person's face and the whole range of the person can be obtained, and their centers are respectively taken, and the central axis is obtained by connecting these two points, and then the portrait posture clip is obtained according to the center horizontal line of the image Angle α. Assuming that the posture tilt threshold β is set to 85 degrees, when α is smaller than β, it is considered that there is a case of excessive tilt of the portrait. At this time, additional gyroscope attitude data in the terminal can be obtained for confirmation. If the gyroscope status is stable and the tilt data of the two are basically the same, a warning of "Tilt tilt" will be displayed on the viewfinder interface. When the gyroscope data shows that the mobile phone has jitter, it is determined that the terminal holder did not stabilize the terminal during shooting, and it will prompt: "There is jitter in the picture, please hold it steady."
上述实施例所提供的方法、装置及计算机存储介质,根据获取的拍摄模式下取景框内当前图像中目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,并发出提示消息,以提醒调整对所述目标对象的拍摄。如此,确定拍摄模式下取景框内当前图像中目标对象存在设置的姿态畸变后,及时发出用于提示调整对所述目标对象的拍摄的消息,有效解决了图像拍摄中出现的姿态畸变问题,提升了图像拍摄质量。According to the method, device and computer storage medium provided in the above embodiments, according to the acquired location information of the target object in the current image in the framing frame in the shooting mode, the target parameter characterizing whether the target object has posture distortion is acquired, and the When the target parameter satisfies the set posture distortion condition, it is determined that the target posture has a set posture distortion, and a prompt message is issued to remind the user to adjust the shooting of the target target. In this way, after it is determined that the target object in the current image in the viewfinder in the shooting mode has the posture distortion set, a message prompting to adjust the shooting of the target object is promptly issued, which effectively solves the problem of posture distortion in image shooting and improves Image quality.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。本发明的保护范围应以所述权利要求的保护范围以准。The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present invention. It should be covered by the protection scope of the present invention. The protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

  1. 一种图像拍摄方法,应用于终端,其特征在于,所述方法包括:An image shooting method applied to a terminal, characterized in that the method includes:
    获取拍摄模式下取景框内当前图像中目标对象的位置信息;Obtain the position information of the target object in the current image in the framing frame in shooting mode;
    根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数;Acquiring target parameters characterizing whether the target object has posture distortion according to the position information of the target object;
    确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,并发出提示消息;所述提示消息用于提示调整对所述目标对象的拍摄。When it is determined that the target parameter satisfies the set posture distortion condition, it is determined that the target object has the set posture distortion, and a prompt message is issued; the prompt message is used to prompt adjustment of the shooting of the target object.
  2. 根据权利要求1所述的方法,其特征在于,所述获取拍摄模式下取景框内当前图像中目标对象的位置信息,包括:The method according to claim 1, wherein the acquiring position information of the target object in the current image in the framing frame in the shooting mode includes:
    获取拍摄模式下取景框内当前图像中人物的脸部位置信息;Obtain the face position information of the person in the current image in the framing frame in shooting mode;
    所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
    根据所述人物的脸部位置信息,确定所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积;Determine the area of the face of the person and the area occupied by the face of the person in the set warning area according to the position information of the face of the person;
    根据所述人物的脸部面积以及所述人物的脸部在设置的警示区域所占的面积,确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值;According to the area of the face of the person and the area occupied by the face of the person in the set warning area, determine the area between the area occupied by the face of the person in the set warning area and the area of the face of the person Ratio
    所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
    确定所述人物的脸部在设置的警示区域所占的面积与所述人物的脸部面积之间的比值大于设置的第一阈值时,判定所述目标对象存在脸部畸变。When it is determined that the ratio between the area occupied by the face of the person in the set warning area and the face area of the person is greater than the set first threshold, it is determined that the target object has facial distortion.
  3. 根据权利要求1所述的方法,其特征在于,所述获取拍摄模式下取景 框内当前图像中目标对象的位置信息,包括:The method according to claim 1, wherein the acquiring the position information of the target object in the current image in the framing frame in the shooting mode includes:
    获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
    根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
    所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
    根据所述人物的脸部位置信息确定所述人物的脸部高度;Determine the face height of the person according to the face position information of the person;
    根据所述人物的位置信息获取所述人物的高度;Acquiring the height of the person according to the position information of the person;
    根据所述人物的脸部高度和所述人物的高度确定所述人物的脸部高度与所述人物的高度之间的比值;Determining the ratio between the height of the face of the person and the height of the person according to the height of the face of the person and the height of the person;
    所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
    确定所述人物的脸部高度与所述人物的高度之间的比值大于设置的第二阈值且小于设置的第三阈值时,判定所述目标对象存在人像比例畸变。When it is determined that the ratio between the height of the face of the person and the height of the person is greater than the set second threshold and less than the set third threshold, it is determined that the target object has a portrait distortion.
  4. 根据权利要求1所述的方法,其特征在于,所述获取拍摄模式下取景框内当前图像中目标对象的位置信息,包括:The method according to claim 1, wherein the acquiring position information of the target object in the current image in the framing frame in the shooting mode includes:
    获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的脸部的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the face of the person;
    根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
    所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
    根据所述人物的位置信息确定所述人物的中心位置;Determine the center position of the person according to the position information of the person;
    根据所述人物的中心位置和所述当前图像的中心位置,获取在所述当前 图像中所述人物相对于所述当前图像的中心位置的距离;Obtaining the distance of the person in the current image relative to the center position of the current image according to the center position of the person and the center position of the current image;
    所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
    确定所述距离大于设置的第四阈值时,判定所述目标对象存在人物构图畸变。When it is determined that the distance is greater than the set fourth threshold, it is determined that the target object has distortion of the human composition.
  5. 根据权利要求1所述的方法,其特征在于,所述获取拍摄模式下取景框内当前图像中目标对象的位置信息,包括:The method according to claim 1, wherein the acquiring position information of the target object in the current image in the framing frame in the shooting mode includes:
    获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
    根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
    所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
    根据所述人物的位置信息确定所述人物的面积;Determine the area of the person according to the position information of the person;
    根据所述人物的面积获取所述人物的面积与所述当前预览图像的面积之间的比值;Obtaining the ratio between the area of the person and the area of the current preview image according to the area of the person;
    所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
    确定所述人物的面积与所述当前预览图像的面积之间的比值小于设置的第五阈值时,判定所述目标对象存在人物构图畸变。When it is determined that the ratio between the area of the person and the area of the current preview image is less than the set fifth threshold, it is determined that there is a person composition distortion in the target object.
  6. 根据权利要求1所述的方法,其特征在于,所述获取拍摄模式下取景框内当前图像中目标对象的位置信息,包括:The method according to claim 1, wherein the acquiring position information of the target object in the current image in the framing frame in the shooting mode includes:
    获取拍摄模式下取景框内当前图像中人物的脸部位置信息以及所述人物的景深;Acquiring the position information of the face of the person in the current image in the framing frame in the shooting mode and the depth of field of the person;
    根据所述人物的脸部位置信息以及所述景深获取所述人物的位置信息;Acquiring the position information of the person according to the position information of the face of the person and the depth of field;
    所述根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数,包括:The acquiring, according to the position information of the target object, target parameters characterizing whether the target object has posture distortion includes:
    根据所述人物的脸部位置信息确定所述人物的脸部中心位置;Determine the center position of the face of the person according to the face position information of the person;
    根据所述人物的位置信息确定所述人物的中心位置;Determine the center position of the person according to the position information of the person;
    根据所述人物的中心位置和所述人物的脸部中心位置,获取在所述当前图像中所述人物相对于所述当前图像的姿态角度;Acquiring the posture angle of the person relative to the current image in the current image according to the center position of the person and the center position of the face of the person;
    所述确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变,包括:When it is determined that the target parameter satisfies the set posture distortion condition, determining that the target object has the set posture distortion includes:
    确定所述人物相对于所述当前图像的姿态角度小于设置的倾斜角度阈值且终端的姿态角度小于所述倾斜角度阈值时,判定所述目标对象存在姿态取景畸变。When it is determined that the posture angle of the person relative to the current image is less than the set tilt angle threshold and the posture angle of the terminal is less than the tilt angle threshold, it is determined that the target object has posture distortion.
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述判定所述目标对象存在设置的姿态畸变之后,还包括:The method according to any one of claims 1 to 6, wherein after determining that the target object has a set posture distortion, the method further includes:
    拒绝响应接收到的拍摄指令,直至检测到所述目标对象不存在设置的姿态畸变。Refusing to respond to the received shooting instruction until it is detected that there is no set posture distortion of the target object.
  8. 根据权利要求1至6任一项所述的方法,其特征在于,所述发出提示消息,包括:The method according to any one of claims 1 to 6, wherein the issuing of the prompt message includes:
    将存在姿态畸变的所述目标对象采用设置的标识方式进行标识,并提示针对所述目标对象的移动方向。The target object with posture distortion is identified by the set identification method, and a moving direction for the target object is prompted.
  9. 一种图像拍摄装置,其特征在于,包括:An image shooting device, characterized in that it includes:
    获取模块,用于获取拍摄模式下取景框内当前图像中目标对象的位置信息;The acquisition module is used to acquire the position information of the target object in the current image in the framing frame in the shooting mode;
    处理模块,用于根据所述目标对象的位置信息获取用于表征所述目标对象是否存在姿态畸变的目标参数;A processing module, configured to acquire target parameters characterizing whether the target object has posture distortion according to the position information of the target object;
    判断模块,用于确定所述目标参数满足设置的姿态畸变条件时,判定所述目标对象存在设置的姿态畸变;The judging module is used to determine that the target object has the set posture distortion when the target parameter satisfies the set posture distortion condition;
    提示模块,用于发出提示消息;所述提示消息用于提示调整对所述目标对象的拍摄。The prompting module is used to issue a prompting message; the prompting message is used to prompt to adjust the shooting of the target object.
  10. 一种终端,其特征在于,所述终端包括处理器和用于存储能够在处理器上运行的计算机程序的存储器;其中,A terminal, characterized in that the terminal includes a processor and a memory for storing a computer program that can run on the processor; wherein,
    所述处理器用于运行所述计算机程序时,执行权利要求1至8中任一项所述图像拍摄方法的步骤。When the processor is used to run the computer program, it executes the steps of the image capturing method according to any one of claims 1 to 8.
  11. 一种计算机存储介质,其特征在于,所述计算机存储介质中存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至8中任一项所述图像拍摄方法的步骤。A computer storage medium, characterized in that a computer program is stored in the computer storage medium, and when the computer program is executed by a processor, the steps of the image capturing method according to any one of claims 1 to 8 are realized.
PCT/CN2019/097352 2018-10-24 2019-07-23 Photographing method, device, terminal, and computer storage medium WO2020082827A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811243683.8 2018-10-24
CN201811243683.8A CN111093022A (en) 2018-10-24 2018-10-24 Image shooting method, device, terminal and computer storage medium

Publications (1)

Publication Number Publication Date
WO2020082827A1 true WO2020082827A1 (en) 2020-04-30

Family

ID=70330934

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/097352 WO2020082827A1 (en) 2018-10-24 2019-07-23 Photographing method, device, terminal, and computer storage medium

Country Status (2)

Country Link
CN (1) CN111093022A (en)
WO (1) WO2020082827A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112836656A (en) * 2021-02-07 2021-05-25 北京迈格威科技有限公司 Equipment control method and device and image acquisition system

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113487670A (en) * 2020-10-26 2021-10-08 青岛海信电子产业控股股份有限公司 Cosmetic mirror and state adjusting method
CN113627290A (en) * 2021-07-27 2021-11-09 歌尔科技有限公司 Sound box control method and device, sound box and readable storage medium
CN113747011B (en) * 2021-08-31 2023-10-24 网易(杭州)网络有限公司 Auxiliary shooting method and device, electronic equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120236180A1 (en) * 2011-03-15 2012-09-20 Zhao-Yuan Lin Image adjustment method and electronics system using the same
CN104994280A (en) * 2015-06-30 2015-10-21 广东欧珀移动通信有限公司 Method for processing preview image and user terminal
CN104994281A (en) * 2015-06-30 2015-10-21 广东欧珀移动通信有限公司 Method for correcting face distortion and terminal
CN105025209A (en) * 2015-06-30 2015-11-04 广东欧珀移动通信有限公司 Image preview method and device
CN105049716A (en) * 2015-06-30 2015-11-11 广东欧珀移动通信有限公司 Preview image processing method and user terminal
US20160065856A1 (en) * 2014-08-29 2016-03-03 Samsung Electronics Co., Ltd. Photographing method and electronic device
CN105554403A (en) * 2016-02-29 2016-05-04 广东欧珀移动通信有限公司 Control method, control device and electronic device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103929596B (en) * 2014-04-30 2016-09-14 努比亚技术有限公司 Guide the method and device of shooting composition
CN105872349A (en) * 2015-01-23 2016-08-17 中兴通讯股份有限公司 Photographing method, photographing device and mobile terminal
CN105049714B (en) * 2015-06-30 2019-02-05 Oppo广东移动通信有限公司 A kind of character image method for previewing and device
CN105100625B (en) * 2015-08-27 2018-06-12 华南理工大学 A kind of character image auxiliary shooting method and system based on image aesthetics
CN105208271A (en) * 2015-09-21 2015-12-30 努比亚技术有限公司 Shooting angle prompt device and method
CN107707833A (en) * 2017-09-11 2018-02-16 广东欧珀移动通信有限公司 Image processing method and device, electronic installation and computer-readable recording medium
CN107959799A (en) * 2017-12-18 2018-04-24 信利光电股份有限公司 A kind of quick focusing method, device, equipment and computer-readable recording medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120236180A1 (en) * 2011-03-15 2012-09-20 Zhao-Yuan Lin Image adjustment method and electronics system using the same
US20160065856A1 (en) * 2014-08-29 2016-03-03 Samsung Electronics Co., Ltd. Photographing method and electronic device
CN104994280A (en) * 2015-06-30 2015-10-21 广东欧珀移动通信有限公司 Method for processing preview image and user terminal
CN104994281A (en) * 2015-06-30 2015-10-21 广东欧珀移动通信有限公司 Method for correcting face distortion and terminal
CN105025209A (en) * 2015-06-30 2015-11-04 广东欧珀移动通信有限公司 Image preview method and device
CN105049716A (en) * 2015-06-30 2015-11-11 广东欧珀移动通信有限公司 Preview image processing method and user terminal
CN105554403A (en) * 2016-02-29 2016-05-04 广东欧珀移动通信有限公司 Control method, control device and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112836656A (en) * 2021-02-07 2021-05-25 北京迈格威科技有限公司 Equipment control method and device and image acquisition system

Also Published As

Publication number Publication date
CN111093022A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
WO2020082827A1 (en) Photographing method, device, terminal, and computer storage medium
US7706579B2 (en) Image orientation for display
US9712751B2 (en) Camera field of view effects based on device orientation and scene content
US11210796B2 (en) Imaging method and imaging control apparatus
JP6942940B2 (en) Image processing equipment, image processing methods and programs
CN109981972B (en) Target tracking method of robot, robot and storage medium
WO2018121385A1 (en) Information processing method and apparatus, and computer storage medium
CN104754216A (en) Photographing method and device
WO2019011091A1 (en) Photographing reminding method and device, terminal and computer storage medium
CN103873693A (en) Method and mobile terminal for automatically correcting photo shooting angle according to gravitational acceleration
WO2018094648A1 (en) Guiding method and device for photography composition
TW201337641A (en) Method and system for prompting self-catch
TW201801516A (en) Image capturing apparatus and photo composition method thereof
US20170046813A1 (en) An apparatus and associated methods for image capture
WO2022001806A1 (en) Image transformation method and apparatus
WO2017128750A1 (en) Image collection method and image collection device
WO2022160748A1 (en) Video processing method and apparatus
TWI676113B (en) Preview method and device in iris recognition process
US10212341B2 (en) Mobile electronic device with multiple cameras
WO2018196854A1 (en) Photographing method, photographing apparatus and mobile terminal
WO2022141271A1 (en) Control method and control device for platform system, platform system, and storage medium
CN110365910B (en) Self-photographing method and device and electronic equipment
EP4080446A1 (en) Cinematic image framing for wide field of view (fov) cameras
CN203225796U (en) Terminal
JP2012070302A (en) Image capturing apparatus and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19876055

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08.09.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19876055

Country of ref document: EP

Kind code of ref document: A1