CN107948522B - Method, device, terminal and storage medium for selecting shot person head portrait by camera - Google Patents

Method, device, terminal and storage medium for selecting shot person head portrait by camera Download PDF

Info

Publication number
CN107948522B
CN107948522B CN201711261941.0A CN201711261941A CN107948522B CN 107948522 B CN107948522 B CN 107948522B CN 201711261941 A CN201711261941 A CN 201711261941A CN 107948522 B CN107948522 B CN 107948522B
Authority
CN
China
Prior art keywords
camera
head portrait
shot
person
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711261941.0A
Other languages
Chinese (zh)
Other versions
CN107948522A (en
Inventor
陈伟东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xibeisi Intelligent Technology Co ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201711261941.0A priority Critical patent/CN107948522B/en
Publication of CN107948522A publication Critical patent/CN107948522A/en
Application granted granted Critical
Publication of CN107948522B publication Critical patent/CN107948522B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Exposure Control For Cameras (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a method, a device, a terminal and a storage medium for selecting a shot character head portrait by a camera, wherein when the current shooting mode of the camera is determined to be a single shooting mode, picture information of the camera at each scanning moment is obtained, the character head portrait with the largest number of pixel points in the number of pixel points corresponding to the character head portrait in all the picture information is used as a first character head portrait to be shot, so that the selected character head portrait is more accurate, and when the method, the device, the terminal and the storage medium are applied to scenes in which the camera is used for shooting pictures and videos or performing video chat and online network live broadcast, the camera can always select a correct shot object, so that the terminal user including the camera experiences better.

Description

Method, device, terminal and storage medium for selecting shot person head portrait by camera
Technical Field
The embodiment of the invention relates to the technical field of cameras, in particular to a method, a device, a terminal and a storage medium for selecting a shot person portrait by a camera.
Background
With the rise of mobile internet, terminals such as smart phones and tablets are generally equipped with cameras.
When a camera is used for shooting, video chatting or live broadcasting, which character portrait or which character portraits in the visual field of the camera is the needed target character portrait is not well distinguished from one or more character portraits in the visual field of the camera by the existing shooting method.
Disclosure of Invention
The invention provides a method, a device, a terminal and a storage medium for selecting a shot person head portrait by a camera, which aim to solve the problem that the existing camera is difficult to correctly select the shot person head portrait from a shooting visual field.
In a first aspect, an embodiment of the present invention provides a method for selecting a shot person portrait by a camera, including:
if the current shooting mode of the camera is confirmed to be a single shooting mode, controlling the camera to shoot picture information in the camera view field at each scanning moment within the scanning range of the camera;
calculating the number of pixel points corresponding to each character head portrait in the picture information;
and taking the figure head portrait with the maximum number of the pixel points as a first figure head portrait to be shot.
In a second aspect, an embodiment of the present invention further provides an apparatus for selecting a shot person portrait by a camera, where the apparatus includes:
the first scanning module is used for controlling the camera to shoot picture information in the camera view field at each scanning moment in the scanning range if the current shooting mode of the camera is determined to be a single shooting mode; the pixel point calculating module is used for calculating the number of pixel points corresponding to each character head portrait in the picture information;
and the first shooting object determining module is used for taking the person head portrait with the largest number of the pixel points as the first person head portrait to be shot.
In a third aspect, an embodiment of the present invention further provides a terminal, where the terminal includes:
one or more processors;
storage means for storing one or more programs;
the camera is used for shooting pictures;
the motor module is used for controlling the camera to scan or move;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for selecting the shot character avatar described above.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the above-mentioned method for selecting a captured character avatar.
The invention provides a method for selecting a shot character head portrait by a camera, which is characterized in that when the current shooting mode of the camera is determined to be a single shooting mode, picture information of the camera at each scanning moment is obtained, the character head portrait with the largest number of pixel points in the number of pixel points corresponding to the character head portrait in all the picture information is taken as a first character head portrait to be shot, so that the selected and obtained character head portrait is more accurate.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for selecting a shot person avatar by a camera according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a method for selecting a shot person avatar by a camera according to a second embodiment of the present invention;
fig. 3 is a block diagram of a device for selecting a shot person avatar by a camera according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of steps of a method for selecting a captured portrait of a person by a camera according to an embodiment of the present invention, where the embodiment is applicable to a situation where a camera is used to capture a photo and a video or where the camera is used to perform video chat and online live broadcast, the method may be executed by a mobile phone with a camera, a tablet, and other terminals, and specifically may include the following steps:
step 101, if the current shooting mode of the camera is confirmed to be a single shooting mode, controlling the camera to shoot picture information in the camera view field at each scanning moment within the scanning range of the camera.
Specifically, the shooting modes of the camera may include a single shooting mode and a multi-person shooting mode, the single shooting mode is a mode in which the camera takes one portrait as a shooting object, and the multi-person shooting mode is a mode in which the camera takes a plurality of portraits as shooting objects.
The camera is installed at the cell-phone, on the terminal such as flat board, this camera of installing on these terminals can receive the motor control of installing on the terminal and scan, wherein, the scanning can be divided into translation scanning and rotatory scanning, and translation scanning can include from a left side to right translation scanning, from last down translation scanning, rotatory scanning can include the camera from a left side to right rotation scanning, from last down rotation scanning, scan to any position at the camera translation promptly, the camera all can accomplish rotatory scanning in this position, consequently, the scanning range of camera has included the horizontal scanning scope and the rotatory scanning scope of camera.
When the camera starts scanning, the camera scans in a scanning range according to a certain scanning sequence (for example, firstly, the camera performs left-to-right translation scanning, and completes rotation scanning at each position, and then performs up-and-down translation scanning) and a scanning speed, wherein the scanning sequence is preset on a terminal by a technician, a user can select the scanning sequence by himself, after the scanning sequence is determined, each scanning time corresponds to the current position of the camera and the current angle of rotation of the camera, correspondingly, each scanning time also corresponds to the number of steps of rotation of the motor due to the fact that the camera scanning is controlled by the rotation of the motor, namely, the motor rotates the corresponding number of rotation steps from an initial state, and the camera also moves and rotates to the position and the rotation angle of the camera corresponding to the scanning time from the initial position and the angle.
In the embodiment of the invention, the terminal can firstly judge the current shooting mode of the camera, and if the current shooting mode of the camera is confirmed to be the single shooting mode, the camera can be controlled within the scanning range of the terminal to shoot the picture information in the camera view field at each scanning moment, so that the target character head image can be screened from the character head images in the picture information in the camera view field.
And 102, calculating the number of pixel points corresponding to each character head portrait in the picture information.
In the embodiment of the invention, after the picture information in the camera view field at each scanning moment is shot, the person head portrait in the picture information can be identified through a face identification technology, and then the number of pixel points corresponding to each person head portrait is calculated.
And 103, taking the person head portrait with the largest number of pixel points as a first person head portrait to be shot.
In the embodiment of the present invention, after the number of pixels corresponding to each person avatar is obtained, the person avatar with the largest number of pixels is used as the first person avatar to be photographed, and the person avatar closest to the focus of the camera is used as the first person avatar to be photographed, so that the accuracy of selecting a target person avatar from a plurality of person avatars is improved, and the selection manner better meets the user requirements.
In a preferred embodiment of the present invention, sometimes the person avatar with the largest number of pixels selected from all the image information is not the person avatar to be photographed that best meets the user's requirements, because at different scanning times, the person avatar with the largest number of pixels is supposed to be, and because the photographing angles at different scanning times are different, other person avatars close to the person avatar become the person avatar with the largest number of pixels, which causes the occurrence of inaccurate judgment, in order to cope with this situation, step 103 may include the following sub-steps:
and S11, calculating an included angle between a connecting line of the camera focus and each person head portrait eye and the horizontal direction as a person head portrait offset angle.
In the embodiment of the present invention, after the picture information at each scanning time is taken, an included angle between a connecting line of a camera focus and each person avatar eye in the picture information and the horizontal direction can be calculated as a deviation angle of each person avatar, and after the deviation angle of the person avatar is calculated, the deviation angle of the person avatar is used as a basis for the person avatar to deviate from the horizontal direction.
And S12, acquiring the weight value of each character avatar based on the size of the pixel point of each character avatar.
In the embodiment of the present invention, in order to calculate the degree of the overall deviation of the character avatar in the picture information from the horizontal direction, the weight value of each character avatar may be obtained based on the size of the pixel point of each character avatar, for example, a character avatar with a large pixel point may be set, and the weight value is large, so that the accuracy of the finally selected character avatar meeting the user requirements is higher. Preferably, the size of the pixel point of each character avatar can be directly used as the weight value of each character avatar.
And S13, calculating a weighted offset angle according to the character avatar offset angle and each character avatar weight value.
In the embodiment of the invention, after determining the deviation angle of each character avatar and the corresponding weight value of the character avatar, the weight deviation angle can be calculated according to a preset weight algorithm so as to reflect the character avatar deviation condition in the picture information as a whole.
And S14, taking the scanning time at which the included angle between the optical axis of the camera and the horizontal direction is closest to the weighted deviation angle as the target scanning time.
In the embodiment of the present invention, after the weighted offset angle is calculated, an included angle between the optical axis of the camera and the horizontal direction at each scanning time may be compared with the weighted offset angle, a scanning time at which the included angle between the optical axis of the camera and the horizontal direction is closest to the weighted offset angle is taken as a target scanning time, and a head image of a person with a largest pixel point is selected from image information taken at the target scanning time.
And S15, taking the person head portrait with the largest number of pixel points in the picture information of the target scanning time as the first person head portrait to be shot.
In the embodiment of the invention, after the target scanning time is determined, the character head portrait with the largest number of pixel points is taken as the first character head portrait to be shot in the picture information of the target scanning time, so that when the character head portrait with the largest number of pixel points is taken as the first character head portrait to be shot, the whole deviation condition of the character head portrait in the picture information is combined, and the selected first character head portrait to be shot meets the user requirements as much as possible.
Through the steps of step 101 and step 103, when it is determined that the current shooting mode of the camera is the single shooting mode, the image information of the camera at each scanning moment is obtained, and the character portrait with the largest number of pixels in the number of pixels corresponding to the character portrait in all the image information is taken as the first character portrait to be shot, so that the selected and obtained character portrait is more accurate.
On the basis of the foregoing step 101-103, in a preferred embodiment of the present invention, the method for selecting a shot portrait according to an embodiment of the present invention may further include:
and 104, recording the rotation step number of the motor corresponding to each scanning moment.
In the embodiment of the present invention, as described above, each scanning time also corresponds to the number of steps of the motor rotation, and therefore, the number of steps of the motor rotation corresponding to each scanning time can be recorded.
And 105, controlling the motor to rotate to the number of motor rotation steps corresponding to the scanning time corresponding to the picture information to which the character head image with the largest number of pixel points belongs.
In the embodiment of the invention, after the motor rotation step number corresponding to each scanning moment is recorded, the motor can be controlled to rotate to the motor rotation step number corresponding to the scanning moment corresponding to the picture information to which the figure head portrait with the largest pixel number belongs, so that the camera returns to the position and the rotation angle of the camera at the scanning moment corresponding to the picture information to which the figure head portrait with the largest pixel number belongs, and the camera is in a better shooting position and rotation angle.
And 106, controlling the camera to shoot only the first person head portrait to be shot.
In the embodiment of the present invention, after the camera returns to the position and the rotation angle of the camera at the scanning time corresponding to the picture information to which the person avatar with the largest number of pixels belongs, the camera may be controlled to shoot only the first person avatar to be shot, for example, the focal length may be adjusted, so that only the first person avatar to be shot is in the field of view of the camera, or the focal length may be adjusted, so that only the first person avatar to be shot is in the field of view of the camera, and background blurring is performed on other areas in the field of view of the camera.
And 107, adjusting the camera to enable the first person head portrait to be shot to be located at the center of the camera view.
In the embodiment of the invention, after the control is carried out to shoot the first person head portrait to be shot, the camera can be adjusted to obtain the first person head portrait to be shot in the central position of the visual field of the camera, so that the shooting effect is improved.
In a preferred embodiment of the present invention, step 107 may specifically include the following sub-steps:
and S21, controlling the camera to move, and shooting the picture of the first person head portrait to be shot.
As described in step 105, since the camera has returned to the position and the rotation angle of the camera at the scanning time corresponding to the picture information to which the person portrait with the largest number of pixels belongs, the camera is already at a better shooting position and shooting angle, but it cannot be guaranteed that the person portrait shot by the camera is located at the center of the field of view of the camera.
And S22, controlling the camera to stop moving when the geometric center of the outline of the first person avatar to be shot is coincident with the geometric center of the visual field of the camera in the picture of the first person avatar to be shot.
In the embodiment of the invention, when the geometric center of the outline of the first person head portrait to be shot is coincident with the geometric center of the visual field of the camera in the process of shooting the picture in the moving process of the camera, the first person head portrait to be shot is considered to be in the center position of the picture, and the camera is controlled to stop moving at the moment, so that the information of the person head portrait shot by the camera is ensured to be in the center position of the picture.
Example two
In the technical solution of the present invention, the step 101-107 is directed to a case that the shooting mode of the camera is a single shooting mode, in a second embodiment, when the shooting mode of the camera is a multi-user shooting mode, referring to fig. 2, and fig. 2 is a flowchart of steps of a method for selecting a shot portrait by the camera according to the second embodiment of the present invention, the technical solution of the present invention may include the following steps:
step 201, judging the current shooting mode of the camera.
Specifically, the shooting mode of the camera may include a single shooting mode and a multi-person shooting mode, the single shooting mode is a mode in which the camera takes one portrait as a shooting object, the multi-person shooting mode is a mode in which the camera takes a plurality of portraits as shooting objects, and the shooting mode of the camera is preset by a technician in the configuration information of the camera.
In the embodiment of the present invention, the terminal may determine the current shooting mode of the camera by reading the configuration information of the camera, although the means for determining the current shooting mode of the camera is not limited thereto, and various methods in the prior art are feasible.
Step 202, if the current shooting mode of the camera is confirmed to be the single shooting mode, controlling the camera to shoot picture information in the camera view field at each scanning moment in the scanning range of the camera.
And 203, calculating the number of pixel points corresponding to each character head portrait in the picture information.
And step 204, taking the person head portrait with the largest number of pixel points as the first person head portrait to be shot. The steps 202-204 refer to the steps 101-103, and the embodiment of the present invention is not described herein again.
And step 205, if the current shooting mode of the camera is determined to be a multi-person shooting mode, controlling the camera to shoot picture information in the camera view field at each scanning moment within the scanning range of the camera.
In the embodiment of the invention, if the terminal confirms that the current shooting mode of the camera is the multi-person shooting mode, the camera can be controlled to shoot the picture information in the camera view field at each scanning moment in the scanning range of the camera, so that the target person head image can be screened from the person head images in the picture information in the camera view field.
And step 206, calculating the number of the character avatars in the picture information.
In the embodiment of the invention, after the picture information in the camera view field at each scanning moment is shot, the person head portrait in the picture information can be identified through a face recognition technology, and then the number of the person head portrait in the picture information is calculated.
It should be noted that, in the scanning range of the camera, there may be some person avatars that are not complete in the picture information, the number of person avatars in step 206 is the number of complete person avatars, and the number of person avatars that are not completely captured is not counted.
And step 207, taking the person avatar in the picture information with the largest number of person avatars as the second person avatar to be shot.
Generally, in the case of the same camera, the maximum value of the number of the person avatars that can be accommodated in the camera view field is constant, and therefore, in the camera scanning range, when the number of the person avatars in the picture information captured by the camera is considered to be the largest, all the person avatars in the picture information are the person avatars desired to be captured by the user.
According to the embodiment of the invention, the picture information with the largest number of the character avatars can be identified from all the picture information, and the character avatars in the picture information are used as the second character avatars to be shot, so that the accuracy of character avatar selection is improved.
In a preferred embodiment of the present invention, the person avatar with the largest number of person avatars selected from all the picture information is not the person avatar to be photographed that best meets the user's requirement, because the number of person avatars in the camera's field of view is different at different scanning times, and the camera may capture the largest number of person avatars at a certain scanning time, but at the scanning time, the number of person avatars may be too much considered, and the shooting angle is ignored, and the person avatar at the scanning time is not the person avatar to be photographed that the user needs, in order to cope with this, step 207 may include the following sub-steps:
and S31, calculating an included angle between a connecting line of the camera focus and each person head portrait eye and the horizontal direction as a person head portrait offset angle.
And S32, acquiring the weight value of each character avatar based on the size of the pixel point of each character avatar.
And S33, calculating a weighted offset angle according to the character avatar offset angle and each character avatar weight value.
And S34, taking the scanning time at which the included angle between the optical axis of the camera and the horizontal direction is closest to the weighted deviation angle as the target scanning time.
The steps S31-S34 can refer to the steps S11-S14, and the embodiment of the invention is not described herein again
S35, the person avatar in the picture information with the largest number of person avatars among the picture information at the target scanning time is set as the second person avatar to be captured.
In the embodiment of the invention, after the target scanning time is determined, the character avatar in the picture information with the maximum number of character avatars in the picture information with the target scanning time is taken as the second character avatar to be shot, so that when the character avatar in the picture information with the maximum number of character avatars is taken as the second character avatar to be shot, the whole deviation condition of the character avatar in the picture information is combined, and the selected second character avatar to be shot can meet the user requirement as much as possible.
Similar to the step 104-107, in the embodiment of the present invention, when the camera is in the multi-user shooting mode, in a preferred embodiment of the present invention, the method for selecting the shot portrait of the person in the embodiment of the present invention may further include:
and step 208, recording the rotation step number of the motor corresponding to each scanning moment.
In the embodiment of the present invention, as described above, each scanning time also corresponds to the number of steps of the motor rotation, and therefore, the number of steps of the motor rotation corresponding to each scanning time can be recorded.
And step 209, controlling the motor to rotate to reach the motor rotation step number corresponding to the scanning time corresponding to the picture information with the largest number of the character avatars.
In the embodiment of the invention, after the motor rotation step number corresponding to each scanning time is recorded, the motor can be controlled to rotate to the motor rotation step number corresponding to the scanning time corresponding to the picture information with the largest number of the character avatars, so that the camera returns to the position and the rotation angle of the camera at the scanning time corresponding to the picture information with the largest number of the character avatars, and the camera is positioned at a better shooting position and rotation angle.
And step 210, controlling the camera to shoot only the second person head portrait to be shot.
In the embodiment of the present invention, after the camera returns to the position and the rotation angle of the camera at the scanning time corresponding to the picture information with the largest number of the person avatars, the camera may be controlled to only shoot the second person avatar to be shot, for example, the focal length may be adjusted, so that only the second person avatar to be shot is shot in the field of view of the camera, or the focal length may be adjusted, so that only the second person avatar to be shot is shot in the field of view of the camera, and the background blurring is performed on other areas in the field of view of the camera.
And step 211, adjusting the camera to enable the second person head portrait to be shot to be located at the center of the camera view.
In the embodiment of the invention, after the control is performed to shoot only the second person head portrait to be shot, the camera can be adjusted to obtain the second person head portrait to be shot in the center position of the camera visual field, so that the shooting effect is improved.
In a preferred embodiment of the present invention, step 211 may specifically include the following sub-steps:
and S41, controlling the camera to move, and shooting the picture of the second person portrait to be shot.
As described in step 209, since the camera has returned to the position and the rotation angle of the camera at the scanning time corresponding to the picture information with the largest number of the person avatars, at this time, the camera is already at a better shooting position and shooting angle, but it cannot be guaranteed that the person avatar shot by the camera is located at the center of the field of view of the camera, in the embodiment of the present invention, it is further necessary to control the camera to move, and shoot the picture of the second person avatar to be shot during the moving process.
And S42, when the geometric center of the overall outline of the second person avatar to be shot is coincident with the geometric center of the camera view field in the picture of the second person avatar to be shot, controlling the camera to stop moving.
Specifically, the overall contour of the second avatar to be photographed may be an overall contour including each avatar, which is mathematically fitted by a person skilled in the art according to the contour of each avatar, for example, assuming that each avatar uses an ellipse as its contour, the overall contour may be a union of all elliptical contours, and an overall contour ellipse is constructed on the basis of the union, and the above-mentioned ellipse fitting method is merely an example, and the person skilled in the art may adopt various fitting methods to establish the overall contour of the second avatar to be photographed.
In the embodiment of the invention, when the geometric center of the overall outline of the second person avatar to be shot is coincident with the geometric center of the visual field of the camera in the process of shooting the picture in the moving process of the camera, the second person avatar to be shot is considered to be in the center position of the picture, and the camera is controlled to stop moving at the moment, so that the information of the person avatar shot by the camera is ensured to be in the center position of the picture.
EXAMPLE III
Fig. 3 is a block diagram of a structure of a device for selecting a shot person avatar by a camera according to a second embodiment of the present invention, where the device may specifically include:
the first scanning module 301, if the current shooting mode of the camera is determined to be the single shooting mode, controls the camera to shoot the picture information in the camera view field at each scanning moment within the scanning range;
the pixel point calculating module 302 is used for calculating the number of pixel points corresponding to each character head portrait in the picture information;
the first shooting object determining module 303 is configured to use the person avatar with the largest number of pixel points as the first person avatar to be shot.
In a preferred embodiment of the present invention, the first photographic subject determining module 303 may include:
the first deviation angle calculation submodule is used for calculating an included angle between a connecting line of the focal point of the camera and eyes of each character head portrait and the horizontal direction to serve as a character head portrait deviation angle;
the first weight value obtaining submodule is used for obtaining the weight value of each character avatar based on the size of the pixel point of each character avatar;
the first weighted offset angle calculation submodule is used for calculating a weighted offset angle according to the character avatar offset angle and each character avatar weight value;
a first target scanning time determining submodule, configured to use a scanning time at which an included angle between the optical axis of the camera and the horizontal direction is closest to the weighted offset angle as a target scanning time;
and the first person head portrait to be shot determining submodule is used for taking the person head portrait with the largest pixel number as the first person head portrait to be shot in the picture information at the target scanning moment.
In a preferred embodiment of the present invention, the apparatus may further include:
the first motor rotation recording module is used for recording the rotation step number of the motor corresponding to each scanning moment;
the first motor control module is used for controlling the motor to rotate to the number of motor rotation steps corresponding to the scanning time corresponding to the picture information to which the figure head image with the largest number of pixel points belongs;
the first shooting module is used for controlling the camera to shoot the head portrait of the first person to be shot only;
the first adjusting module is used for adjusting the camera so that the first person head portrait to be shot is positioned at the center of the camera view.
In a preferred embodiment of the present invention, the first adjusting module may include:
the first control submodule is used for controlling the camera to move and shooting the picture of the first person head portrait to be shot;
the first centering submodule is used for controlling the camera to stop moving when the geometric center of the outline of the first person head portrait to be shot is coincident with the geometric center of the visual field of the camera in the picture of the first person head portrait to be shot.
In a preferred embodiment of the present invention, the apparatus may further include:
the second scanning module is used for controlling the camera to shoot picture information in the camera view field at each scanning moment in the scanning range if the current shooting mode of the camera is determined to be a multi-person shooting mode;
the figure head portrait calculation module is used for calculating the number of the figure head portraits in the picture information;
and the second shooting object determining module is used for taking the person head portrait in the picture information with the maximum number of the person head portraits as a second person head portrait to be shot.
In a preferred embodiment of the present invention, the second photographic subject determination module may include:
the second deviation angle calculation submodule is used for calculating an included angle between a connecting line of the focal point of the camera and the eyes of each character head portrait and the horizontal direction to be used as a character head portrait deviation angle;
the second weight value obtaining submodule is used for obtaining the weight value of each character avatar based on the size of the pixel point of each character avatar;
the second weighted offset angle calculation submodule is used for calculating a weighted offset angle according to the character avatar offset angle and each character avatar weight value;
a second target scanning time determining submodule, configured to use a scanning time at which an included angle between the optical axis of the camera and the horizontal direction is closest to the weighted offset angle as a target scanning time;
and the second person avatar to be shot determining submodule is used for taking the person avatar in the picture information with the largest number of person avatars as the second person avatar to be shot in the picture information at the target scanning moment.
In a preferred embodiment of the present invention, the apparatus may further include:
the second motor rotation recording module is used for recording the rotation step number of the motor corresponding to each scanning moment;
the second motor control module is used for controlling the motor to rotate to the number of motor rotation steps corresponding to the scanning time corresponding to the picture information with the largest number of character head portraits;
the second shooting module is used for controlling the camera to only shoot the head portrait of the second person to be shot;
and the second adjusting module is used for adjusting the camera so that the second person head portrait to be shot is positioned at the center of the visual field of the camera.
In a preferred embodiment of the present invention, the second adjusting module may include:
the second control submodule is used for controlling the camera to move and shooting a picture of the head portrait of the second person to be shot;
and the second centering submodule is used for controlling the camera to stop moving when the geometric center of the overall outline of the second person head portrait to be shot is coincident with the geometric center of the visual field of the camera in the picture of the second person head portrait to be shot.
The device for selecting the shot person head portrait by the camera provided by the embodiment of the invention can execute the method for selecting the shot person head portrait by the camera provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a terminal according to a fourth embodiment of the present invention, as shown in fig. 4, the terminal includes a processor 40, a memory 41, an input device 42, and an output device 43; the number of the processors 40 in the terminal may be one or more, and one processor 40 is taken as an example in fig. 4; the processor 40, the memory 41, the input device 42 and the output device 43 in the terminal may be connected by a bus or other means, as exemplified by the bus connection in fig. 4.
The memory 41 serves as a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the method for selecting and shooting the head portrait by the camera in the embodiment of the present invention (for example, the first scanning module 201, the pixel point calculating module 202, and the first shooting object determining module 203 in the apparatus). The processor 40 executes various functional applications and data processing of the terminal by running software programs, instructions and modules stored in the memory 41, namely, the method for selecting the shot person head portrait by the camera is realized.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal. The output device 43 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a method for selecting a shot portrait by a camera, where the method includes:
if the current shooting mode of the camera is confirmed to be a single shooting mode, controlling the camera to shoot picture information in the camera view field at each scanning moment within the scanning range of the camera; calculating the number of pixel points corresponding to each character head portrait in the picture information;
and taking the figure head portrait with the maximum number of the pixel points as a first figure head portrait to be shot.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the above-described method operations, and may also perform related operations in the method for selecting and shooting the portrait of the person by the camera provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the apparatus for selecting and shooting a portrait of a person, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. A method for selecting a shot person head portrait by a camera is characterized by comprising the following steps:
if the current shooting mode of the camera is confirmed to be a single shooting mode, controlling the camera to shoot picture information in the camera view field at each scanning moment within the scanning range of the camera;
calculating the number of pixel points corresponding to each character head portrait in the picture information;
taking the figure head portrait with the largest number of pixel points as a first figure head portrait to be shot;
the method for taking the figure head portrait with the largest number of the pixel points as the first figure head portrait to be shot specifically comprises the following steps:
calculating an included angle between a connecting line of the focal point of the camera and the eyes of each character head portrait and the horizontal direction as a character head portrait offset angle;
acquiring the weight value of each character avatar based on the size of the pixel point of each character avatar;
calculating a weighted offset angle according to the character head portrait offset angle and each character head portrait weight value;
taking the scanning moment at which the included angle between the optical axis of the camera and the horizontal direction is closest to the weighted deviation angle as the target scanning moment;
and in the picture information at the target scanning moment, taking the figure head portrait with the maximum number of pixel points as the first figure head portrait to be shot.
2. The method of claim 1, further comprising:
recording the rotation step number of the motor corresponding to each scanning moment;
controlling the motor to rotate to the number of motor rotation steps corresponding to the scanning time corresponding to the picture information to which the figure head image with the largest number of pixel points belongs;
controlling the camera to shoot only the first person head portrait to be shot;
and adjusting the camera to enable the first person head portrait to be shot to be located at the center of the visual field of the camera.
3. The method according to claim 2, wherein the adjusting the camera so that the first person to be photographed is positioned at a center position of a camera view field specifically comprises:
controlling the camera to move, and shooting a picture of the first person head portrait to be shot;
and when the geometric center of the outline of the first person head portrait to be shot is coincident with the geometric center of the visual field of the camera in the picture of the first person head portrait to be shot, controlling the camera to stop moving.
4. The method of claim 1, further comprising:
if the current shooting mode of the camera is confirmed to be a multi-user shooting mode, controlling the camera to shoot picture information in the camera view field at each scanning moment within the scanning range of the camera;
calculating the number of character head portraits in the picture information;
taking the figure avatar in the picture information with the maximum number of figure avatars as a second figure avatar to be shot;
the taking of the person avatar in the picture information with the largest number of person avatars as the second person avatar to be shot specifically includes:
calculating an included angle between a connecting line of the focal point of the camera and the eyes of each character head portrait and the horizontal direction as a character head portrait offset angle;
acquiring the weight value of each character avatar based on the size of the pixel point of each character avatar;
calculating a weighted offset angle according to the character head portrait offset angle and each character head portrait weight value;
taking the scanning moment at which the included angle between the optical axis of the camera and the horizontal direction is closest to the weighted deviation angle as the target scanning moment;
and in the picture information at the target scanning time, the person head portrait in the picture information with the largest number of person head portraits is taken as the second person head portrait to be shot.
5. The method of claim 4, further comprising:
recording the rotation step number of the motor corresponding to each scanning moment;
controlling the motor to rotate to the motor rotation step number corresponding to the scanning time corresponding to the picture information with the largest number of character head portraits;
controlling the camera to shoot only the head portrait of the second person to be shot;
and adjusting the camera to enable the second person head portrait to be shot to be located at the center of the camera view.
6. The utility model provides a device that camera chose to shoot personage's head portrait which characterized in that includes:
the first scanning module is used for controlling the camera to shoot picture information in the camera view field at each scanning moment in the scanning range if the current shooting mode of the camera is determined to be a single shooting mode; the pixel point calculating module is used for calculating the number of pixel points corresponding to each character head portrait in the picture information;
the first shot object determining module is used for taking the character head portrait with the largest number of pixel points as a first character head portrait to be shot;
the method for taking the figure head portrait with the largest number of the pixel points as the first figure head portrait to be shot specifically comprises the following steps:
calculating an included angle between a connecting line of the focal point of the camera and the eyes of each character head portrait and the horizontal direction as a character head portrait offset angle;
acquiring the weight value of each character avatar based on the size of the pixel point of each character avatar;
calculating a weighted offset angle according to the character head portrait offset angle and each character head portrait weight value;
taking the scanning moment at which the included angle between the optical axis of the camera and the horizontal direction is closest to the weighted deviation angle as the target scanning moment;
and in the picture information at the target scanning moment, taking the figure head portrait with the maximum number of pixel points as the first figure head portrait to be shot.
7. A terminal, characterized in that the terminal comprises:
one or more processors;
storage means for storing one or more programs;
the camera is used for shooting pictures;
the motor module is used for controlling the camera to scan or move;
when executed by the one or more processors, cause the one or more processors to implement the method of selecting a captured character avatar of any of claims 1-5.
8. A storage medium containing computer-executable instructions for performing the method of selecting a photographed person avatar according to any one of claims 1-5 when executed by a computer processor.
CN201711261941.0A 2017-12-04 2017-12-04 Method, device, terminal and storage medium for selecting shot person head portrait by camera Active CN107948522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711261941.0A CN107948522B (en) 2017-12-04 2017-12-04 Method, device, terminal and storage medium for selecting shot person head portrait by camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711261941.0A CN107948522B (en) 2017-12-04 2017-12-04 Method, device, terminal and storage medium for selecting shot person head portrait by camera

Publications (2)

Publication Number Publication Date
CN107948522A CN107948522A (en) 2018-04-20
CN107948522B true CN107948522B (en) 2020-06-26

Family

ID=61947564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711261941.0A Active CN107948522B (en) 2017-12-04 2017-12-04 Method, device, terminal and storage medium for selecting shot person head portrait by camera

Country Status (1)

Country Link
CN (1) CN107948522B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1823298A (en) * 2003-07-15 2006-08-23 欧姆龙株式会社 Object decision device and imaging device
CN1967566A (en) * 2005-11-14 2007-05-23 索尼株式会社 Image processing apparatus and method
CN101472071A (en) * 2007-12-25 2009-07-01 奥林巴斯映像株式会社 Image pickup apparatus and focus detection apparatus
CN104883498A (en) * 2015-04-30 2015-09-02 广东欧珀移动通信有限公司 Shooting method based on rotary camera, and terminal
CN106101448A (en) * 2016-08-08 2016-11-09 北京奇虎科技有限公司 A kind of photographic method based on terminal and device
CN106303029A (en) * 2016-08-15 2017-01-04 广东欧珀移动通信有限公司 The method of controlling rotation of a kind of picture, device and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4478093B2 (en) * 2005-10-17 2010-06-09 富士フイルム株式会社 Object image retrieval apparatus, digital camera, and control method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1823298A (en) * 2003-07-15 2006-08-23 欧姆龙株式会社 Object decision device and imaging device
CN1967566A (en) * 2005-11-14 2007-05-23 索尼株式会社 Image processing apparatus and method
CN101472071A (en) * 2007-12-25 2009-07-01 奥林巴斯映像株式会社 Image pickup apparatus and focus detection apparatus
CN104883498A (en) * 2015-04-30 2015-09-02 广东欧珀移动通信有限公司 Shooting method based on rotary camera, and terminal
CN106101448A (en) * 2016-08-08 2016-11-09 北京奇虎科技有限公司 A kind of photographic method based on terminal and device
CN106303029A (en) * 2016-08-15 2017-01-04 广东欧珀移动通信有限公司 The method of controlling rotation of a kind of picture, device and mobile terminal

Also Published As

Publication number Publication date
CN107948522A (en) 2018-04-20

Similar Documents

Publication Publication Date Title
CN106331508B (en) Method and device for shooting composition
WO2018201809A1 (en) Double cameras-based image processing device and method
CN107770452B (en) Photographing method, terminal and related medium product
CN113973190A (en) Video virtual background image processing method and device and computer equipment
CN110602400B (en) Video shooting method and device and computer readable storage medium
CN107395957B (en) Photographing method and device, storage medium and electronic equipment
WO2021169686A1 (en) Photo capture control method and apparatus and computer readable storage medium
CN107623819B (en) A kind of method taken pictures and mobile terminal and related media production
CN112261292B (en) Image acquisition method, terminal, chip and storage medium
CN103402058A (en) Shot image processing method and device
CN111654624B (en) Shooting prompting method and device and electronic equipment
CN105007415B (en) A kind of image preview method and apparatus
CN110225243A (en) Filming control method, device, storage medium and mobile terminal based on Folding screen
CN110933297B (en) Photographing control method and device of intelligent photographing system, storage medium and system
CN109361850B (en) Image processing method, image processing device, terminal equipment and storage medium
CN114363522A (en) Photographing method and related device
JP6283329B2 (en) Augmented Reality Object Recognition Device
CN105467741A (en) Panoramic shooting method and terminal
CN103929585B (en) A kind of control method of polaroid, electronic equipment and system
CN112887610A (en) Shooting method, shooting device, electronic equipment and storage medium
CN108833786A (en) One mode control method and electronic equipment
JP6483661B2 (en) Imaging control apparatus, imaging control method, and program
CN107948522B (en) Method, device, terminal and storage medium for selecting shot person head portrait by camera
CN110809117A (en) Shooting mode triggering method and device and electronic equipment
CN112991175B (en) Panoramic picture generation method and device based on single PTZ camera

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20231122

Address after: Room 1102, 11/F, Building (1), No. 6, Yunpu 4th Road, Huangpu District, Guangzhou City, Guangdong Province, 510530

Patentee after: Guangzhou Xibeisi Intelligent Technology Co.,Ltd.

Address before: 510530 No. 6, Yunpu Fourth Road, Yunpu Industrial Park, Huangpu District, Guangzhou City, Guangdong Province

Patentee before: Guangzhou Shiyuan Electronic Technology Company Limited

Patentee before: Guangzhou Shirui Electronic Technology Company Limited.

TR01 Transfer of patent right