CN110348419B - Method and device for photographing - Google Patents
Method and device for photographing Download PDFInfo
- Publication number
- CN110348419B CN110348419B CN201910649435.1A CN201910649435A CN110348419B CN 110348419 B CN110348419 B CN 110348419B CN 201910649435 A CN201910649435 A CN 201910649435A CN 110348419 B CN110348419 B CN 110348419B
- Authority
- CN
- China
- Prior art keywords
- person
- adjustment information
- face area
- position adjustment
- key point
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/174—Facial expression recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/20—Movements or behaviour, e.g. gesture recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Life Sciences & Earth Sciences (AREA)
- Human Computer Interaction (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Multimedia (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Psychiatry (AREA)
- Social Psychology (AREA)
- User Interface Of Digital Computer (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the disclosure discloses a method and a device for taking a picture. One embodiment of the method comprises: obtaining a photograph including at least one person; carrying out edge detection on the photo to obtain the outline characteristics of at least one person; carrying out face recognition based on the outline characteristics of at least one person to obtain a face area of the at least one person; inputting the outline characteristics and the face area of at least one person into a pre-trained neural network model to obtain position adjustment information; and outputting the position adjustment information. According to the embodiment, when a plurality of persons take a picture, the face area (expression and sight line) of the person is used as a main characteristic, the target characteristics such as standing position and posture are used as auxiliary characteristics, pre-analysis is carried out, and the face area, the standing position and the posture which affect the shooting effect are prompted to be adjusted by the person to be shot in a voice mode according to the analysis result, so that the aims of shortening the shooting time and improving the shooting quality are achieved.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a method and a device for photographing.
Background
With the development of science and technology, intelligent equipment with a camera becomes mainstream terminal equipment in the current era, and becomes a main tool for taking pictures. When many people shoot simultaneously, often can because some people are sheltered from, or facial expression and sight can not reach the satisfied effect of person of shooing, perhaps can not reach the satisfied effect of person of shooing to limbs and trunk movement to lead to taking a picture again many times, influence the efficiency of shooing, reduced user's experience.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for photographing.
In a first aspect, an embodiment of the present disclosure provides a method for taking a picture, including: obtaining a photograph including at least one person; carrying out edge detection on the photo to obtain the outline characteristics of at least one person; carrying out face recognition based on the outline characteristics of at least one person to obtain a face area of the at least one person; inputting the outline characteristics and the face area of at least one person into a pre-trained neural network model to obtain position adjustment information; and outputting the position adjustment information.
In some embodiments, the method further comprises: performing key point identification based on the face area of at least one person to obtain key point characteristics of the at least one person; inputting the contour feature, the face area and the key point feature of at least one person into a neural network model to obtain position adjustment information and/or expression adjustment information; and outputting the position adjustment information and/or the expression adjustment information.
In some embodiments, the method further comprises: performing key point identification based on the face area of at least one person to obtain key point characteristics of the at least one person; inputting the contour feature, the face area and the key point feature of at least one person into a neural network model to obtain position adjustment information and/or sight line adjustment information; and outputting the position adjustment information and/or the sight line adjustment information.
In some embodiments, the gaze adjustment information includes the sequential position of the person to be adjusted in the photograph and the direction and angle of head rotation.
In some embodiments, the position adjustment information includes the sequential position of the person to be adjusted in the photograph and the direction and distance to be moved.
In a second aspect, embodiments of the present disclosure provide an apparatus for taking a picture, comprising: an acquisition unit configured to acquire a photograph including at least one person; the first detection unit is configured to perform edge detection on the photo to obtain the outline characteristics of at least one person; the second detection unit is configured to perform face recognition based on the outline characteristics of at least one person to obtain a face area of the at least one person; an adjusting unit configured to input the contour feature and the face region of at least one person into a pre-trained neural network model, resulting in position adjustment information; an output unit configured to output the position adjustment information.
In some embodiments, the apparatus further comprises a third detection unit configured to: performing key point identification based on the face area of at least one person to obtain key point characteristics of the at least one person; and the adjusting unit is further configured to input the contour feature, the face area and the key point feature of at least one person into the neural network model to obtain position adjusting information and/or expression adjusting information; and the output unit is further configured to output the position adjustment information and/or the expression adjustment information.
In some embodiments, the apparatus further comprises a fourth detection unit configured to: performing key point identification based on the face area of at least one person to obtain key point characteristics of the at least one person; and the adjusting unit is further configured to input the contour feature, the face area and the key point feature of at least one person into the neural network model to obtain position adjusting information and/or sight line adjusting information; and outputting the position adjustment information and/or the sight line adjustment information.
In some embodiments, the gaze adjustment information includes the sequential position of the person to be adjusted in the photograph and the direction and angle of head rotation.
In some embodiments, the position adjustment information includes the sequential position of the person to be adjusted in the photograph and the direction and distance to be moved.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method according to any one of the first aspects.
In a fourth aspect, embodiments of the disclosure provide a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements a method as in any one of the first aspect.
According to the method and the device for photographing, when a plurality of persons photograph according to the trained neural network model, the face area (expression and sight line) of the person is taken as the main characteristic, the target characteristics such as the standing position and the posture are taken as the auxiliary characteristics, pre-analysis is carried out, and the person to be photographed is prompted to adjust the face area, the standing position and the posture which affect the photographing effect in a voice mode according to the analysis result, so that the purposes of shortening the photographing time and improving the photographing quality are achieved.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a method for taking a picture according to the present disclosure;
3a-3e are schematic diagrams of one application scenario of a method for taking a picture according to the present disclosure;
FIG. 4 is a flow chart of another embodiment of a method for taking a picture according to the present disclosure;
FIG. 5 is a schematic block diagram of one embodiment of an apparatus for taking pictures according to the present disclosure;
FIG. 6 is a schematic block diagram of a computer system suitable for use with an electronic device implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the disclosed method for taking a picture or apparatus for taking a picture may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a photographing application, a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they may be various electronic devices with cameras, including but not limited to cameras, smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, motion Picture Experts Group Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, motion Picture Experts Group Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a background adjustment server providing support for photos taken on the terminal devices 101, 102, 103. The background adjusting server can analyze and process the received data such as the photos, feed back the processing result (such as information for prompting the adjustment of the position or the expression of the human body) to the terminal equipment, and output the processing result in the form of voice or characters by the terminal equipment.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for taking a picture provided by the embodiment of the present disclosure may be executed by the terminal devices 101, 102, and 103, or may be executed by the server 105. Accordingly, the means for taking a picture may be provided in the terminal devices 101, 102, 103, or in the server 105. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for taking a picture according to the present disclosure is shown. The method for taking the picture comprises the following steps:
in step 201, a photograph including at least one person is obtained.
In the present embodiment, an execution subject (e.g., a server or a terminal device shown in fig. 1) of the method for photographing may receive a photograph including at least one person from a terminal with which a user takes a photograph by means of a wired connection or a wireless connection. A person may also be obscured by other items. Collective photographs of multiple people are more likely to be occluded by other people.
In this embodiment, the person is separated from the background by an edge detection algorithm, and feature information such as the position and the posture of the person is extracted to obtain the contour feature of each person. Edge detection algorithms known in the art, such as multi-scale edge detection algorithms based on wavelet transforms, etc., may be employed. After edge detection, the outline of each person in the photograph can be determined, as shown in figure 3 a.
In this embodiment, face recognition is further performed based on the contour features determined in step 202, and a face area of each person is obtained. The contour is determined first, so that the recognized area can be reduced, and the face recognition speed is improved. The face region can be identified by using the existing face identification technology. Identity verification is not required, so a high-speed but coarse-grained neural network model can be adopted for face recognition.
In this embodiment, the implementation is shown in fig. 3 b. If the detected target is only not shielded, the feature of the key point does not need to be extracted, and only the contour feature and the face area are needed. The neural network model may be supervised training of a photograph including at least one person labeled with contour features, face regions, position adjustment information as a training sample. The input of the neural network model is the outline feature and the face area of the person in the photo, and the expected output is the position adjustment information. The output of the neural network model achieves the effect of expected output by continuously adjusting the parameters of the neural network model. The basic principle is to identify which person has an incomplete, i.e. occluded, face area and then calculate in which direction to move by how much to not occlude. The output result of the neural network model can be that the sheltered person moves, or the person blocking others moves, and finally all the persons are not sheltered. Alternatively, the movement amplitudes of the two movement modes can be calculated, and the person with the small movement amplitude is selected to move. For example, a is occluded by B, if a is moved, it needs to be moved by 10cm to be not occluded by B or others, but not occluded by a or others, but if B is moved, it needs to be moved by 5 cm. The scheme of letting B move may eventually be taken as the optimal adjustment scheme. Alternatively, both schemes can be informed to the photographed person, and the photographed person can choose who to move. Alternatively, it is also possible to output only who is blocked and which portion is blocked, and the photographed person is notified of the movement by the photographed person without calculating the movement distance.
In this embodiment, the position adjustment information may be output by voice or text. As shown in fig. 3c, the feedback is in the form of voice to all persons being photographed. If the execution main body of the present disclosure is the terminal device, the position adjustment information can be directly output through voice or text. If the execution subject of the present disclosure is a server, the position adjustment information needs to be sent to the terminal device, and the terminal device outputs the position adjustment information.
With continuing reference to fig. 3d, fig. 3d is a schematic diagram of an application scenario of the method for taking a picture according to the present embodiment. In the application scenario of fig. 3d, when multiple persons take a picture, the face of the person to be photographed is partially occluded. The specific process is as follows:
step S01: starting the camera to enter a photographing mode
Step S02: and separating the character from the background through an edge detection algorithm, and extracting characteristic information such as the position, the posture and the like of the character.
Step S03: the face area of each subject is recognized by a face recognition algorithm.
Step S04: inputting trained neural network according to position, posture and face area of person
Step S05: the neural network analyzes the feature information, as shown in fig. 3d, it can be known that the face area of the photographed person is blocked through the face area and the key feature point information, and it can be known that the face of the photographed person at the 3 rd position from the right is blocked by combining the position information of the person obtained in step S02, and it can be known that the face of the photographed person at the 3 rd position from the right is blocked by combining the person obtained in step S02 and the background information, so that the adjustment information can be obtained, for example, "the face of the photographed person at the 3 rd position from the right is blocked, please move a little to the right".
Step S06: the adjustment information is fed back to the photographed person in the form of voice.
Step S07: and (4) repeating the step (S02) to the step (S06), and finishing photographing when all the adjustments meet the requirements.
The method provided by the embodiment of the disclosure judges whether the face is shielded by detecting the outline and the face area of the photographed person, and if the face is shielded, the photographed person is reminded to change the position. Therefore, the aims of shortening the shooting time and improving the shooting quality are fulfilled.
With further reference to fig. 4, a flow 400 of yet another embodiment of a method for taking a picture is shown. The process 400 of the method for taking a picture includes the steps of:
And 403, performing face recognition based on the outline features of at least one person to obtain a face area of the at least one person.
Steps 401-403 are substantially the same as steps 201-203 and are therefore not described in detail.
And step 404, performing key point identification based on the face area of at least one person to obtain key point characteristics of at least one person.
In this embodiment, by using a facial feature point detection technology, a facial region is identified according to the previous part, and key feature points of the facial region, such as contour points of each part of the human face, such as eyes, nose tip, mouth corner points, and the like, are automatically located.
In this embodiment, the input to the model includes keypoint features in addition to contour features, face regions. Therefore, the model can judge whether the face is blocked or not and can also judge whether the expression is not in place (for example, the photographed person is not smiling through key points such as the mouth corner and the like), whether the sight of the photographed person looks at the camera and the like. Thereby generating adjustment information, the adjustment information comprising at least one of: position adjustment information, expression adjustment information, and sight adjustment information. The adjustment information includes the position of the person to be adjusted, for example, the third on the left side of the second row, and also includes the content to be adjusted. The position adjustment information includes the sequential position of the person to be adjusted in the photograph and the direction and distance to be moved. The sight line adjustment information includes the sequential position of the person to be adjusted in the photograph and the direction and angle of head rotation. The expression adjustment information includes the sequential position of the person to be adjusted in the photograph and the adjustment target, such as smiling, frowning, or the like.
And step 406, outputting the position adjustment information and/or the expression adjustment information and/or the sight line adjustment information.
In the present embodiment, if adjustment is necessary, at least one of the following pieces of adjustment information is output: position adjustment information, expression adjustment information, and sight adjustment information.
Fig. 3e is an application scenario in which the line of sight of the photographed person needs to be adjusted when a plurality of persons take a picture. The specific process is as follows:
step S01: and starting the camera and entering a photographing mode.
Step S02: and separating the character from the background through an edge detection algorithm, and extracting characteristic information such as the position, the posture and the like of the character.
Step S03: the face area of each subject is recognized by a face recognition algorithm.
Step S04: by means of the facial feature point detection technology, the facial region is identified according to the previous part, key feature points of the facial region, such as contour points of each part of the human face, such as eyes, nose tips, corner points of the mouth and the like, are automatically positioned, and sight line judgment is carried out through position distribution information of the feature points of the eyes.
Step S05: and inputting the trained neural network according to the position, posture, facial features and key feature point information of the person.
Step S06: the neural network analyzes the feature information, as shown in fig. 3e, it can be known that the line of sight of the photographed person needs to be adjusted through the facial features and the key feature point information, and it can be known that the line of sight of the photographed person 3 rd from the right needs to be adjusted by combining the position information of the person obtained in step 2, and then adjustment information can be obtained, for example, "the photographed person 3 rd from the right requests to see here".
Step S07: the adjustment information is fed back to the photographed person in the form of voice
Step S08: and (4) repeating the step S02 to the step S07, and finishing photographing when all the adjustments meet the requirements.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for taking a picture in the present embodiment represents the steps of detecting the performance and the line of sight. Therefore, the scheme described in the embodiment can further help to take high-quality photos.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an apparatus for taking a picture, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the apparatus 500 for photographing of the present embodiment includes: an acquisition unit 501, a first detection unit 502, a second detection unit 503, and an output unit 505. An acquisition unit 501 configured to acquire a photograph including at least one person; a first detection unit 502 configured to perform edge detection on the photo to obtain an outline feature of at least one person; a second detection unit 503 configured to perform face recognition based on the contour features of at least one person, and obtain a face region of the at least one person; an adjusting unit 504 configured to input the contour feature and the face region of at least one person into a pre-trained neural network model, resulting in position adjustment information; an output unit 505 configured to output the position adjustment information.
In the present embodiment, specific processing of the acquisition unit 501, the first detection unit 502, the second detection unit 503 and the output unit 505 of the apparatus for taking a picture 500 may refer to step 201, step 202, step 203, step 204 and step 205 in the corresponding embodiment of fig. 2.
In some optional implementations of this embodiment, the apparatus 500 further comprises a third detection unit (not shown in the drawings) configured to: performing key point identification based on the face area of at least one person to obtain key point characteristics of the at least one person; and the adjusting unit is further configured to input the contour feature, the face area and the key point feature of at least one person into the neural network model to obtain position adjusting information and/or expression adjusting information; and the output unit is further configured to output the position adjustment information and/or the expression adjustment information.
In some optional implementations of this embodiment, the apparatus 500 further comprises a fourth detection unit (not shown in the drawings) configured to: performing key point identification based on the face area of at least one person to obtain key point characteristics of the at least one person; and the adjusting unit is further configured to input the contour feature, the face area and the key point feature of at least one person into the neural network model to obtain position adjusting information and/or sight line adjusting information; and outputting the position adjustment information and/or the sight line adjustment information.
In some optional implementations of the present embodiment, the gaze adjustment information includes the sequential position of the person to be adjusted in the photograph and the direction and angle of rotation of the head.
In some optional implementations of this embodiment, the position adjustment information includes the sequential position of the person to be adjusted in the photograph and the direction and distance to be moved.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., the server or terminal device of fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a camera, a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The terminal device/server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be alternatively implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or installed from the storage means 608, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: obtaining a photograph including at least one person; carrying out edge detection on the photo to obtain the outline characteristics of at least one person; carrying out face recognition based on the outline characteristics of at least one person to obtain a face area of the at least one person; inputting the outline characteristics and the face area of at least one person into a pre-trained neural network model to obtain position adjustment information; and outputting the position adjustment information.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a first detection unit, a second detection unit, an adjustment unit, and an output unit. Where the names of these elements do not in some cases constitute a limitation on the elements themselves, for example, the capturing element may also be described as a "capturing element of a photograph including at least one person".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions are replaced with each other to form the technical solution.
Claims (12)
1. A method for taking a photograph, comprising:
obtaining a photograph including at least one person;
carrying out edge detection on the photo to obtain the outline characteristics of the at least one person;
performing face recognition based on the outline characteristics of the at least one person to obtain a face area of the at least one person;
inputting the contour feature and the face area of the at least one person into a pre-trained neural network model to obtain position adjustment information, wherein the position adjustment information comprises: the person being blocked and the location being blocked;
and outputting the position adjustment information.
2. The method of claim 1, wherein the method further comprises:
performing key point identification on the basis of the face area of the at least one person to obtain key point characteristics of the at least one person;
inputting the contour feature, the face area and the key point feature of the at least one figure into the neural network model to obtain position adjustment information and/or expression adjustment information;
and outputting the position adjustment information and/or the expression adjustment information.
3. The method of claim 1, wherein the method further comprises:
performing key point identification on the basis of the face area of the at least one person to obtain key point characteristics of the at least one person;
inputting the contour feature, the face area and the key point feature of the at least one person into the neural network model to obtain position adjustment information and/or sight line adjustment information;
and outputting the position adjustment information and/or the sight line adjustment information.
4. The method according to claim 3, wherein the sight line adjustment information includes a sequential position of the person to be adjusted in the photograph and a direction and angle of head rotation.
5. The method according to one of claims 1 to 4, wherein the position adjustment information comprises the sequential position of the person to be adjusted in the photograph and the direction and distance to be moved.
6. An apparatus for taking a picture, comprising:
an acquisition unit configured to acquire a photograph including at least one person;
a first detection unit configured to perform edge detection on the photo to obtain an outline feature of the at least one person;
a second detection unit configured to perform face recognition based on the contour feature of the at least one person to obtain a face region of the at least one person;
an adjusting unit configured to input the contour feature and the face region of the at least one person into a pre-trained neural network model to obtain position adjustment information, wherein the position adjustment information includes: the person being blocked and the location being blocked;
an output unit configured to output the position adjustment information.
7. The apparatus of claim 6, wherein the apparatus further comprises a third detection unit configured to:
performing key point identification on the basis of the face area of the at least one person to obtain key point characteristics of the at least one person; and
the adjusting unit is further configured to input the contour feature, the face area and the key point feature of the at least one person into the neural network model, so as to obtain position adjusting information and/or expression adjusting information; and
the output unit is further configured to output the position adjustment information and/or the expression adjustment information.
8. The apparatus of claim 6, wherein the apparatus further comprises a fourth detection unit configured to:
performing key point identification on the basis of the face area of the at least one person to obtain key point characteristics of the at least one person; and
the adjusting unit is further configured to input the contour feature, the face area and the key point feature of the at least one person into the neural network model, so as to obtain position adjusting information and/or sight line adjusting information;
and outputting the position adjustment information and/or the sight line adjustment information.
9. The apparatus according to claim 8, wherein the sight line adjustment information includes a sequential position of the person to be adjusted in the photograph and a direction and angle of head rotation.
10. The apparatus according to one of claims 6 to 9, wherein the position adjustment information comprises the sequential position of the person to be adjusted in the photograph and the direction and distance to be moved.
11. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910649435.1A CN110348419B (en) | 2019-07-18 | 2019-07-18 | Method and device for photographing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910649435.1A CN110348419B (en) | 2019-07-18 | 2019-07-18 | Method and device for photographing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110348419A CN110348419A (en) | 2019-10-18 |
CN110348419B true CN110348419B (en) | 2023-03-24 |
Family
ID=68178705
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910649435.1A Active CN110348419B (en) | 2019-07-18 | 2019-07-18 | Method and device for photographing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110348419B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113012042B (en) * | 2019-12-20 | 2023-01-20 | 海信集团有限公司 | Display device, virtual photo generation method, and storage medium |
CN111444555B (en) * | 2020-03-23 | 2024-03-26 | 深圳云天励飞技术有限公司 | Temperature measurement information display method and device and terminal equipment |
CN112235459B (en) * | 2020-09-30 | 2022-03-04 | 咪咕音乐有限公司 | Volume adjustment method, electronic device, and computer-readable storage medium |
WO2022077229A1 (en) * | 2020-10-13 | 2022-04-21 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Electric device, method of controlling electric device, and computer readable storage medium |
CN112714259B (en) * | 2020-12-30 | 2022-12-27 | 广州极飞科技股份有限公司 | State adjustment method and device for object to be shot |
CN113033506A (en) * | 2021-05-20 | 2021-06-25 | 杭州宇泛智能科技有限公司 | Portrait identification interaction method and device and electronic equipment |
CN113240695A (en) * | 2021-06-02 | 2021-08-10 | 四川轻化工大学 | Electric power operation personnel wearing identification method based on posture perception |
CN114598817B (en) * | 2022-03-04 | 2024-06-18 | 无锡乐骐科技股份有限公司 | Man-machine interaction judgment method and device based on multi-man interaction judgment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105933607A (en) * | 2016-05-26 | 2016-09-07 | 维沃移动通信有限公司 | Photographing effect adjusting method of mobile terminal and mobile terminal |
CN106131393A (en) * | 2016-06-15 | 2016-11-16 | 北京小米移动软件有限公司 | Take pictures reminding method and device |
CN108462826A (en) * | 2018-01-23 | 2018-08-28 | 维沃移动通信有限公司 | A kind of method and mobile terminal of auxiliary photo-taking |
CN109348135A (en) * | 2018-11-21 | 2019-02-15 | Oppo广东移动通信有限公司 | Photographic method, device, storage medium and terminal device |
CN109660719A (en) * | 2018-12-11 | 2019-04-19 | 维沃移动通信有限公司 | A kind of information cuing method and mobile terminal |
-
2019
- 2019-07-18 CN CN201910649435.1A patent/CN110348419B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105933607A (en) * | 2016-05-26 | 2016-09-07 | 维沃移动通信有限公司 | Photographing effect adjusting method of mobile terminal and mobile terminal |
CN106131393A (en) * | 2016-06-15 | 2016-11-16 | 北京小米移动软件有限公司 | Take pictures reminding method and device |
CN108462826A (en) * | 2018-01-23 | 2018-08-28 | 维沃移动通信有限公司 | A kind of method and mobile terminal of auxiliary photo-taking |
CN109348135A (en) * | 2018-11-21 | 2019-02-15 | Oppo广东移动通信有限公司 | Photographic method, device, storage medium and terminal device |
CN109660719A (en) * | 2018-12-11 | 2019-04-19 | 维沃移动通信有限公司 | A kind of information cuing method and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN110348419A (en) | 2019-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110348419B (en) | Method and device for photographing | |
CN111368685B (en) | Method and device for identifying key points, readable medium and electronic equipment | |
US10346605B2 (en) | Visual data processing of response images for authentication | |
CN110162670B (en) | Method and device for generating expression package | |
CN111476871B (en) | Method and device for generating video | |
CN109993150B (en) | Method and device for identifying age | |
CN108171204B (en) | Detection method and device | |
CN106415664A (en) | System and methods of generating user facial expression library for messaging and social networking applications | |
CN110458218B (en) | Image classification method and device and classification network training method and device | |
CN111369427A (en) | Image processing method, image processing device, readable medium and electronic equipment | |
CN110033423B (en) | Method and apparatus for processing image | |
CN110059623B (en) | Method and apparatus for generating information | |
US20160086088A1 (en) | Facilitating dynamic affect-based adaptive representation and reasoning of user behavior on computing devices | |
CN108509994B (en) | Method and device for clustering character images | |
CN109977839A (en) | Information processing method and device | |
CN109934191A (en) | Information processing method and device | |
WO2021190625A1 (en) | Image capture method and device | |
CN108521516A (en) | Control method and device for terminal device | |
CN109934142A (en) | Method and apparatus for generating the feature vector of video | |
CN110188660B (en) | Method and device for identifying age | |
CN110097004B (en) | Facial expression recognition method and device | |
WO2021057644A1 (en) | Photographing method and apparatus | |
CN107729886B (en) | Method and device for processing face image | |
CN109919220A (en) | Method and apparatus for generating the feature vector of video | |
CN110545386B (en) | Method and apparatus for photographing image |
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 |