CN111967431A - Angle correction method and device - Google Patents
Angle correction method and device Download PDFInfo
- Publication number
- CN111967431A CN111967431A CN202010892961.3A CN202010892961A CN111967431A CN 111967431 A CN111967431 A CN 111967431A CN 202010892961 A CN202010892961 A CN 202010892961A CN 111967431 A CN111967431 A CN 111967431A
- Authority
- CN
- China
- Prior art keywords
- face
- angle
- image
- deflection
- acquisition device
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/59—Context or environment of the image inside of a vehicle, e.g. relating to seat occupancy, driver state or inner lighting conditions
- G06V20/597—Recognising the driver's state or behaviour, e.g. attention or drowsiness
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- 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/161—Detection; Localisation; Normalisation
- G06V40/166—Detection; Localisation; Normalisation using acquisition arrangements
-
- 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/172—Classification, e.g. identification
-
- 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
- G06N3/045—Combinations of networks
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Oral & Maxillofacial Surgery (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
- Studio Devices (AREA)
Abstract
The embodiment of the disclosure discloses an angle correction method and device. One embodiment of the method comprises: collecting a face image; inputting the face image into a pre-trained face angle recognition model to obtain face angle information of a face presented by the face image, wherein the face angle information comprises a face deflection angle and a face deflection direction; and correcting the installation angle of an image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction. According to the embodiment, the face angle recognition is carried out on the face image collected by the image collecting device, the mounting angle of the image collecting device can be automatically adjusted based on the face deflection angle and the face deflection direction obtained through recognition, the mounting angle of the image collecting device can be rapidly and accurately adjusted, and the efficiency of adjusting the mounting angle of the image collecting device is improved.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to an angle correction method and device.
Background
The Driver Monitoring System (DMS) can effectively Monitor some behaviors of the Driver that endanger driving safety, such as dozing, lowering head, sideways, smoking, making a call, not fastening a seat belt, and the like. In order to enable the DMS to fully monitor the face and the peripheral area of the driver, when the DMS device is installed, an installation angle of an image capturing device of the DMS device generally needs to be adjusted, so that the face of the driver can be aligned with an imaging center of the image capturing device as much as possible. Since the DMS device usually does not have a display screen, in the related art, the face image collected by the image collecting device is usually transmitted to an Application (APP) on a terminal such as a Personal Computer (PC) or a mobile phone through a data transmission method such as a Universal Serial Bus (USB), a mobile hotspot (Wi-Fi) or a BlueTooth (BT). Therefore, the user can be guided to adjust the installation angle of the image acquisition device through the face image presented by the APP.
Among the correlation technique, present face image through the APP, guide the user to adjust image acquisition device's installation angle, need install the APP in advance, and need remove to select data transmission mode etc. according to the suggestion of APP, complex operation if unfamiliar with the operation, causes the operation unsuccessful easily, lets the user suspect equipment problem itself even. Therefore, in the related art, there is a need to improve the efficiency of adjusting the installation angle of the image capturing apparatus.
Disclosure of Invention
The embodiment of the disclosure provides an angle correction method and device.
In a first aspect, an embodiment of the present disclosure provides an angle correction method, including: collecting a face image; inputting the face image into a pre-trained face angle recognition model to obtain face angle information of a face presented by the face image, wherein the face angle information comprises a face deflection angle and a face deflection direction; and correcting the installation angle of an image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction.
In some embodiments, the image capturing device includes a motor that rotates the image capturing device; and correcting the installation angle of an image acquisition device for acquiring a human face image according to the human face deflection angle and the human face deflection direction, wherein the installation angle comprises the following steps: generating a first control instruction for controlling a motor to rotate a first target angle along a first target direction, wherein the first target direction is a direction opposite to the human face deflection direction, and the first target angle is an angle the same as the human face deflection angle; and sending a first control instruction to the motor, so that the motor drives the image acquisition device to rotate by a first target angle along a first target direction, and the installation angle of the image acquisition device is corrected.
In some embodiments, the image capturing device includes a motor that rotates the image capturing device; and correcting the installation angle of an image acquisition device for acquiring a human face image according to the human face deflection angle and the human face deflection direction, wherein the installation angle comprises the following steps: determining a relative deflection angle between a human face deflection angle and a preset deflection angle, and determining a relative deflection direction between a human face deflection direction and a preset deflection direction; generating a second control instruction for controlling the motor to rotate a second target angle along a second target direction, wherein the second target direction is a direction opposite to the relative deflection direction, and the second target angle is an angle same as the relative deflection angle; and sending a second control instruction to the motor, so that the motor drives the image acquisition device to rotate a second target angle along a second target direction, and the mounting angle of the image acquisition device is corrected.
In some embodiments, correcting the installation angle of the image capturing device for capturing the face image according to the face deflection angle and the face deflection direction includes: generating voice prompt information according to the face deflection angle and the face deflection direction; and outputting voice prompt information to prompt a user to correct the installation angle of the image acquisition device according to the voice prompt information.
In some embodiments, acquiring a facial image comprises: and collecting the face image in response to the preset angle correction condition being met.
In some embodiments, the preset angle correction condition includes at least one of: detecting the starting of an image acquisition device; correction starting information input by a user is received.
In some embodiments, the face angle recognition model is obtained by training as follows: acquiring a training sample set, wherein the training sample comprises a sample face image and sample face angle information corresponding to the sample face image, and the sample face angle information comprises a sample face deflection angle and a sample face deflection direction; and taking the sample face image of the training sample in the training sample set as input, taking the sample face angle information corresponding to the input sample face image as expected output, and training to obtain a face angle recognition model.
In a second aspect, embodiments of the present disclosure provide an angle correction apparatus, including: an image acquisition unit configured to acquire a face image; the angle recognition unit is configured to input the face image into a pre-trained face angle recognition model to obtain face angle information of a face presented by the face image, wherein the face angle information comprises a face deflection angle and a face deflection direction; and the correction execution unit is configured to correct the installation angle of the image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction.
In some embodiments, the correction execution unit is further configured to generate a first control instruction for controlling the motor to rotate by a first target angle in a first target direction, wherein the first target direction is a direction opposite to the face deflection direction, and the first target angle is the same angle as the face deflection angle; and sending a first control instruction to the motor, so that the motor drives the image acquisition device to rotate by a first target angle along a first target direction, and the installation angle of the image acquisition device is corrected.
In some embodiments, the correction execution unit is further configured to determine a relative deflection angle between the human face deflection angle and a preset deflection angle, and determine a relative deflection direction between the human face deflection direction and the preset deflection direction; generating a second control instruction for controlling the motor to rotate a second target angle along a second target direction, wherein the second target direction is a direction opposite to the relative deflection direction, and the second target angle is an angle same as the relative deflection angle; and sending a second control instruction to the motor, so that the motor drives the image acquisition device to rotate a second target angle along a second target direction, and the mounting angle of the image acquisition device is corrected.
In some embodiments, the correction execution unit is further configured to generate voice prompt information according to the face deflection angle and the face deflection direction; and outputting voice prompt information to prompt a user to correct the installation angle of the image acquisition device according to the voice prompt information.
In some embodiments, acquiring a facial image comprises: and collecting the face image in response to the preset angle correction condition being met.
In some embodiments, the preset angle correction condition includes at least one of: detecting the starting of an image acquisition device; correction starting information input by a user is received.
In some embodiments, the face angle recognition model is obtained by training as follows: acquiring a training sample set, wherein the training sample comprises a sample face image and sample face angle information corresponding to the sample face image, and the sample face angle information comprises a sample face deflection angle and a sample face deflection direction; and taking the sample face image of the training sample in the training sample set as input, taking the sample face angle information corresponding to the input sample face image as expected output, and training to obtain a face angle recognition model.
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; when executed by the one or more processors, cause the one or more processors to implement a method as described in any implementation of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, which when executed by a processor implements the method as described in any of the implementations of the first aspect.
The angle correction method and device provided by the embodiment of the disclosure can be used for collecting face images. Then, the face image is input into a pre-trained face angle recognition model, and face angle information of a face presented by the face image is obtained, wherein the face angle information comprises a face deflection angle and a face deflection direction. And finally, correcting the installation angle of the image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction. According to the method and the device provided by the embodiment of the disclosure, the face angle of the face image acquired by the image acquisition device is identified, the installation angle of the image acquisition device is automatically adjusted based on the face deflection angle and the face deflection direction obtained by identification, the installation angle of the image acquisition device can be quickly and accurately adjusted, and the efficiency of adjusting the installation angle of the image acquisition device is improved.
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 a flow chart diagram of one embodiment of an angle correction method according to the present disclosure;
FIG. 2 is a flow chart of one implementation for correcting the mounting angle of an image capture device provided by an embodiment of the present disclosure;
fig. 3 is a flowchart of another implementation manner for correcting the installation angle of the image capturing device according to the embodiment of the disclosure;
FIG. 4 is a flow chart of yet another implementation manner for correcting the installation angle of the image capturing device provided by the embodiment of the present disclosure;
FIG. 5 is a flow chart diagram of another embodiment of an angle correction method according to the present disclosure;
FIG. 6 is a schematic structural diagram of one embodiment of an angle correction apparatus according to the present disclosure;
FIG. 7 is a schematic structural diagram of an electronic device suitable for use in 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 shows a flow chart of one embodiment of an angle correction method according to the present disclosure. The angle correction method comprises the following steps:
In the present embodiment, the execution subject of the above-described angle correction method may be a DMS device.
The face image is generally an image in which a face is presented. The execution main body can adopt a self-contained image acquisition device to acquire a human face image.
The face angle recognition model can be used for analyzing the corresponding relation between the face image and the face angle information. Specifically, the face angle recognition model may be a correspondence table generated based on statistics of a large number of face images and storing correspondence between a plurality of face images and face angle information, or may be a model obtained by training an initial model (for example, a Convolutional Neural Network (CNN), a residual error Network (ResNet), or the like) by using a machine learning method based on a training sample.
In some optional implementation manners of this embodiment, the face angle recognition model may be obtained by training through the following steps: firstly, a training sample set is obtained, wherein the training sample comprises a sample face image and sample face angle information corresponding to the sample face image, and the sample face angle information comprises a sample face deflection angle and a sample face deflection direction. Then, taking the sample face image of the training sample in the training sample set as input, taking the sample face angle information corresponding to the input sample face image as expected output, and training to obtain a face angle recognition model.
Optionally, the initial Network of the face angle recognition model is a Fine-Grained Structure Aggregation Network (FSA-Net). It should be noted that the trained FSA-Net is generally used for recognizing the angle of the face represented by the face image, and the accurate recognition of the face angle can be realized.
And 103, correcting the installation angle of the image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction.
In this embodiment, after obtaining the face deflection angle and the face deflection direction, the execution main body may correct the installation angle of the image capturing device in various ways. As an example, the execution subject may directly present the obtained face deflection angle and face deflection direction to the user by means of voice. Therefore, the user can manually adjust the installation angle of the image acquisition device based on the voice, so that the installation angle of the image acquisition device for acquiring the face image is corrected.
The method provided by the embodiment of the disclosure can be used for collecting the face image. Then, inputting the face image into a pre-trained face angle recognition model to obtain face angle information of a face represented by the face image, wherein the face angle information comprises a face deflection angle and a face deflection direction. And finally, correcting the installation angle of an image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction. According to the method provided by the embodiment of the disclosure, the face angle of the face image acquired by the image acquisition device is identified, so that the installation angle of the image acquisition device can be automatically adjusted based on the face deflection angle and the face deflection direction obtained by identification, the installation angle of the image acquisition device can be quickly and accurately adjusted, and the efficiency of adjusting the installation angle of the image acquisition device is improved.
In some optional implementations of this embodiment, if the image capturing device includes a motor that can drive the image capturing device to rotate. At this time, the correction of the installation angle of the image capturing device for capturing the face image according to the face deflection angle and the face deflection direction can be implemented through step 201 and step 202.
Referring to fig. 2, fig. 2 is a flowchart of an implementation manner for correcting an installation angle of an image capturing device according to an embodiment of the present disclosure. As shown in fig. 2, the step 201 and the step 202 may be implemented to correct the installation angle of the image capturing device.
The first target direction is the direction opposite to the human face deflection direction, and the first target angle is the same as the human face deflection angle.
Here, the execution body may generate the first control instruction according to a preset rule. As an example, the preset rule may be: and combining the information for representing the first target direction and the information for representing the first target angle, and taking the combined information as a first control instruction. As another example, the preset rule may be: and combining the information for identifying the motor, the information for representing the first target direction and the information for representing the first target angle, and taking the combined information as a first control command.
Here, the execution main body may transmit the first control command to the motor. Therefore, the first control instruction can be executed through the motor, the image acquisition device is driven to move, and the installation angle of the image acquisition device is corrected.
For example, if the face deflection angle of the face represented by the acquired face image is 30 degrees, and the face deflection direction is leftward deflection. The executing body may send a control command to the motor for controlling the motor to rotate 30 degrees to the right, so as to correct the installation angle of the image capturing device.
In the implementation mode, the image acquisition device is driven to move through the rotation of the motor, the installation angle of the image acquisition device is automatically corrected, and the accuracy of correcting the installation angle of the image acquisition device is further facilitated.
In some optional implementations of this embodiment, if the image capturing device includes a motor that can drive the image capturing device to rotate. At this time, the correction of the installation angle of the image capturing device for capturing the face image according to the face deflection angle and the face deflection direction can be implemented through step 301 and step 303.
Referring to fig. 3, fig. 3 is a flowchart of another implementation manner for correcting an installation angle of an image capturing device according to an embodiment of the present disclosure. As shown in fig. 3, the correction of the installation angle of the image capturing device may be achieved through steps 301-303.
Here, the preset deflection angle may be a preset angle, for example, 90 degrees. The preset deflecting direction may be a preset direction, for example, to the right.
It should be noted that the image capturing device may not be mounted directly in front of the driver, for example, may be mounted on the right side of the driver. When the angle of the image capturing device is corrected, a correction reference needs to be set in advance, so that the image capturing device is corrected based on the correction reference. Here, the calibration reference is the preset deflection angle and the preset deflection direction.
Here, the execution body may take a difference between the face deflection angle and a preset deflection angle as the relative deflection angle. And taking the difference value of the azimuth angle of the human face deflection direction and the azimuth angle of the preset deflection direction as the relative deflection direction.
The second target direction is a direction opposite to the relative deflection direction, and the second target angle is an angle the same as the relative deflection angle.
Here, the operation of generating the second control instruction is basically the same as the operation of generating the first control instruction, and is not described herein again.
Here, the execution main body may transmit the second control command to the motor. Therefore, the second control instruction can be executed through the motor to drive the image acquisition device to move, so that the installation angle of the image acquisition device is corrected.
In the implementation mode, the image acquisition device is driven to move through the rotation of the motor, the installation angle of the image acquisition device is automatically corrected, and the accuracy of correcting the installation angle of the image acquisition device is further facilitated.
In some optional implementation manners of this embodiment, the correcting the installation angle of the image acquisition device acquiring the face image according to the face deflection angle and the face deflection direction may be implemented by steps 401 and 402.
Referring to fig. 4, fig. 4 is a flowchart of another implementation manner for correcting an installation angle of an image capturing device according to an embodiment of the present disclosure. As shown in fig. 4, the correction of the installation angle of the image capturing device may be implemented through steps 401-402.
The voice prompt information may be information for prompting a user to perform a correction operation.
As an example, the execution body may generate the voice guidance information by: and directly embedding the human face deflection angle and the human face deflection direction into a preset sentence to obtain the voice prompt information. For example, the execution subject may embed the face deflection angle and the face deflection direction into a preset statement, "the face deflection angle of the currently acquired image is ____, and the face deflection of the currently acquired image is ____The direction of rotation is ____ ". If the current human face deflection angle is 45 degrees and the human face deflection direction is the left front direction. Then the voice prompt information can be obtained as follows: "the face deflection angle of the currently acquired image is45 Degree of rotationThe face deflection direction of the current collected image isFront left”。
As another example, the execution subject may also generate the voice guidance information by: and embedding preset sentences in the opposite directions of the human face deflection angle and the human face deflection direction to obtain voice prompt information. For example, the execution body may embed a preset sentence "please rotate the camera ____ towards ____" in the opposite direction of the face deflection angle and the face deflection direction. If the current human face deflection angle is 45 degrees and the human face deflection direction is the left front direction. Then the voice prompt information can be obtained as follows: please turn the camera toLower right sideRotate45 degree”。
And 402, outputting voice prompt information to prompt a user to correct the installation angle of the image acquisition device according to the voice prompt information.
Here, the DMS is provided with a voice player. Therefore, the execution main body can output voice prompt information through a self-contained voice player. Thus, the user can correct the installation angle of the image acquisition device according to the voice prompt information. The efficiency of adjusting the installation angle of the image acquisition device is facilitated to be improved.
It should be noted that, the method provided by each embodiment of the present disclosure does not need to transmit the face image acquired by the image acquisition device to the APP of the terminal through a data transmission manner such as USB, Wi-Fi, or BT. Therefore, hardware for realizing each data transmission mode, such as a USB interface, a Wi-Fi module, a BT module and the like, does not need to be added on the basis of the original DMS equipment, and hardware cost is saved. It should be noted that, a USB interface is not added to the original DMS device, so that the appearance of the device is more beautiful and the waterproof effect is better.
With continued reference to FIG. 5, a flow chart of another embodiment of an angle correction method is shown. The angle correction method comprises the following steps:
The preset angle correction condition may be various preset conditions.
In this embodiment, the face image acquisition is performed only when the current situation meets the preset angle correction condition, so that unnecessary consumption of computing resources can be reduced, and the saving of computing resources is facilitated.
Alternatively, the preset angle correction condition may include, but is not limited to, at least one of the following conditions one and two.
And under the condition one, the starting of the image acquisition device is detected.
Here, when the image capturing apparatus starts up, a level change usually occurs in an Input/Output Interface (I/O Interface) of the image capturing apparatus. Therefore, the execution main body can detect the starting of the image acquisition device by detecting the level change of the input/output interface of the image acquisition device.
And secondly, receiving correction starting information input by a user.
The correction start information may be information for instructing start of correction. As an example, the correction start information may be "open" or "start". The present disclosure does not specifically limit the specific form of the correction start information.
In the present embodiment, the specific operations of steps 502-503 are substantially the same as the operations of steps 102-103 in the embodiment shown in fig. 1, and are not repeated herein.
This implementation can realize satisfying when predetermineeing the angle correction condition, automatic acquisition human face image to rectify image acquisition device's installation angle, help further improving the efficiency of adjusting image acquisition device's installation angle.
With further reference to fig. 6, as an implementation of the method shown in fig. 1, the present disclosure provides an embodiment of an angle correction apparatus, which corresponds to the embodiment of the method shown in fig. 1, and which may be applied in various electronic devices in particular.
As shown in fig. 6, the angle correction device of the present embodiment includes: an image acquisition unit 601 configured to acquire a face image; an angle recognition unit 602 configured to input a face image into a pre-trained face angle recognition model to obtain face angle information of a face represented by the face image, where the face angle information includes a face deflection angle and a face deflection direction; and a correction execution unit 603 configured to correct a mounting angle of an image capture device capturing a face image according to the face deflection angle and the face deflection direction.
In some optional implementations of this embodiment, the correction performing unit 603 may be further configured to: first, a first control instruction for controlling a motor to rotate a first target angle along a first target direction is generated, wherein the first target direction is a direction opposite to a human face deflection direction, and the first target angle is an angle the same as the human face deflection angle. And then, sending a first control instruction to the motor, so that the motor drives the image acquisition device to rotate by a first target angle along a first target direction, and the installation angle of the image acquisition device is corrected.
In some optional implementations of this embodiment, the correction performing unit 603 may be further configured to: firstly, determining a relative deflection angle between a human face deflection angle and a preset deflection angle, and determining a relative deflection direction between a human face deflection direction and a preset deflection direction. Then, a second control command for controlling the motor to rotate in a second target direction by a second target angle is generated. The second target direction is a direction opposite to the relative deflection direction, and the second target angle is an angle the same as the relative deflection angle. And finally, sending a second control instruction to the motor, so that the motor drives the image acquisition device to rotate a second target angle along a second target direction, and the mounting angle of the image acquisition device is corrected.
In some optional implementations of this embodiment, the correction performing unit 603 may be further configured to: firstly, voice prompt information is generated according to the face deflection angle and the face deflection direction. And then, outputting voice prompt information to prompt a user to correct the installation angle of the image acquisition device according to the voice prompt information.
In some optional implementations of this embodiment, acquiring a face image includes: and collecting the face image in response to the preset angle correction condition being met.
In some optional implementations of the embodiment, the angle correction condition includes at least one of: and detecting the starting of the image acquisition device. Correction starting information input by a user is received.
In some optional implementations of this embodiment, the face angle recognition model is obtained by training through the following steps: firstly, a training sample set is obtained, wherein the training sample comprises a sample face image and sample face angle information corresponding to the sample face image, and the sample face angle information comprises a sample face deflection angle and a sample face deflection direction. Then, taking the sample face image of the training sample in the training sample set as input, taking the sample face angle information corresponding to the input sample face image as expected output, and training to obtain a face angle recognition model.
In the apparatus provided by the above embodiment of the present disclosure, the image acquisition unit 601 acquires a face image. Then, the angle recognition unit 602 inputs the face image into a pre-trained face angle recognition model to obtain face angle information of a face represented by the face image, where the face angle information includes a face deflection angle and a face deflection direction. Finally, the correction execution unit 603 corrects the installation angle of the image acquisition device that acquires the face image according to the face deflection angle and the face deflection direction. The device of this embodiment, through carrying out face angle identification to the face image that image acquisition device gathered, realize automatically adjusting image acquisition device's installation angle based on face deflection angle and the face direction of deflection that the discernment obtained, can realize adjusting image acquisition device's installation angle fast accurately, help improving the efficiency of adjusting image acquisition device's installation angle.
Referring now to fig. 7, a schematic structural diagram of an electronic device (e.g., DMS device) suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 7 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. 7, the electronic device may include a processing device (e.g., Central Processing Unit (CPU), graphics processor, etc.) 701, which may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage device 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Generally, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, image capture device, microphone, accelerometer, gyroscope, etc.; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 708 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device 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 alternatively be implemented or provided. Each block shown in fig. 7 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. 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 embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium of 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 many 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 perform the steps of: collecting a face image; inputting the face image into a pre-trained face angle recognition model to obtain face angle information of a face presented by the face image, wherein the face angle information comprises a face deflection angle and a face deflection direction;
and correcting the installation angle of an image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction.
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 image acquisition unit, an angle recognition unit, and a correction execution unit. The names of these units do not in some cases constitute a limitation on the unit itself, and for example, the image capturing unit may also be described as a "unit that captures a face image".
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 as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Claims (10)
1. An angle correction method, wherein the method comprises:
collecting a face image;
inputting the face image into a pre-trained face angle recognition model to obtain face angle information of a face presented by the face image, wherein the face angle information comprises a face deflection angle and a face deflection direction;
and correcting the installation angle of an image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction.
2. The method of claim 1, wherein the image capturing device includes a motor that rotates the image capturing device; and
the correcting the installation angle of the image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction comprises the following steps:
generating a first control instruction for controlling the motor to rotate by a first target angle along a first target direction, wherein the first target direction is a direction opposite to the human face deflection direction, and the first target angle is an angle the same as the human face deflection angle;
and sending the first control instruction to the motor, so that the motor drives the image acquisition device to rotate by a first target angle along a first target direction, and the installation angle of the image acquisition device is corrected.
3. The method of claim 1, wherein the image capturing device includes a motor that rotates the image capturing device; and
the correcting the installation angle of the image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction comprises the following steps:
determining a relative deflection angle between the human face deflection angle and a preset deflection angle, and determining a relative deflection direction between the human face deflection direction and a preset deflection direction;
generating a second control instruction for controlling the motor to rotate by a second target angle along a second target direction, wherein the second target direction is a direction opposite to the relative deflection direction, and the second target angle is the same angle as the relative deflection angle;
and sending the second control instruction to the motor, so that the motor drives the image acquisition device to rotate by a second target angle along a second target direction, and the mounting angle of the image acquisition device is corrected.
4. The method according to claim 1, wherein the correcting the installation angle of an image capturing device capturing the face image according to the face deflection angle and the face deflection direction comprises:
generating voice prompt information according to the face deflection angle and the face deflection direction;
and outputting the voice prompt information to prompt a user to correct the installation angle of the image acquisition device according to the voice prompt information.
5. The method of claim 1, wherein the acquiring a face image comprises:
and collecting the face image in response to the preset angle correction condition being met.
6. The method of claim 5, wherein the preset angle correction condition comprises at least one of:
detecting the starting of an image acquisition device;
correction starting information input by a user is received.
7. The method according to one of claims 1 to 6, wherein the face angle recognition model is trained by:
acquiring a training sample set, wherein the training sample comprises a sample face image and sample face angle information corresponding to the sample face image, and the sample face angle information comprises a sample face deflection angle and a sample face deflection direction;
and taking the sample face image of the training sample in the training sample set as input, taking the sample face angle information corresponding to the input sample face image as expected output, and training to obtain the face angle recognition model.
8. An angle correction apparatus, wherein the apparatus comprises:
an image acquisition unit configured to acquire a face image;
the angle recognition unit is configured to input the face image into a pre-trained face angle recognition model to obtain face angle information of a face presented by the face image, wherein the face angle information comprises a face deflection angle and a face deflection direction;
and the correction execution unit is configured to correct the installation angle of an image acquisition device for acquiring the face image according to the face deflection angle and the face deflection direction.
9. 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-7.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010892961.3A CN111967431A (en) | 2020-08-31 | 2020-08-31 | Angle correction method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010892961.3A CN111967431A (en) | 2020-08-31 | 2020-08-31 | Angle correction method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111967431A true CN111967431A (en) | 2020-11-20 |
Family
ID=73399925
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010892961.3A Pending CN111967431A (en) | 2020-08-31 | 2020-08-31 | Angle correction method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111967431A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113657379A (en) * | 2021-08-09 | 2021-11-16 | 杭州华橙软件技术有限公司 | Image processing method, image processing device, computer-readable storage medium and processor |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101815174A (en) * | 2010-01-11 | 2010-08-25 | 北京中星微电子有限公司 | Control method and control device for camera shooting |
CN202008670U (en) * | 2011-04-25 | 2011-10-12 | 汉王科技股份有限公司 | Angle-adjustable face recognition equipment |
CN108363995A (en) * | 2018-03-19 | 2018-08-03 | 百度在线网络技术(北京)有限公司 | Method and apparatus for generating data |
CN108447159A (en) * | 2018-03-28 | 2018-08-24 | 百度在线网络技术(北京)有限公司 | Man face image acquiring method, apparatus and access management system |
CN109145790A (en) * | 2018-08-09 | 2019-01-04 | 宁波工程学院 | Detection method towards real-time body |
CN110162138A (en) * | 2019-04-10 | 2019-08-23 | 北京迈格威科技有限公司 | Folding angles adjusting method, device and collapsible terminal |
CN110175518A (en) * | 2019-04-19 | 2019-08-27 | 阿里巴巴集团控股有限公司 | Camera angle method of adjustment, device, equipment and the system of photographic device |
CN110460772A (en) * | 2019-08-14 | 2019-11-15 | 广州织点智能科技有限公司 | Camera Automatic adjustment method, device, equipment and storage medium |
CN110769148A (en) * | 2018-07-27 | 2020-02-07 | 北京蜂盒科技有限公司 | Camera automatic control method and device based on face recognition |
CN111107304A (en) * | 2018-10-25 | 2020-05-05 | 上海博泰悦臻电子设备制造有限公司 | Vehicle-mounted support, mobile terminal, vehicle and mobile terminal face tracking method |
-
2020
- 2020-08-31 CN CN202010892961.3A patent/CN111967431A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101815174A (en) * | 2010-01-11 | 2010-08-25 | 北京中星微电子有限公司 | Control method and control device for camera shooting |
CN202008670U (en) * | 2011-04-25 | 2011-10-12 | 汉王科技股份有限公司 | Angle-adjustable face recognition equipment |
CN108363995A (en) * | 2018-03-19 | 2018-08-03 | 百度在线网络技术(北京)有限公司 | Method and apparatus for generating data |
CN108447159A (en) * | 2018-03-28 | 2018-08-24 | 百度在线网络技术(北京)有限公司 | Man face image acquiring method, apparatus and access management system |
CN110769148A (en) * | 2018-07-27 | 2020-02-07 | 北京蜂盒科技有限公司 | Camera automatic control method and device based on face recognition |
CN109145790A (en) * | 2018-08-09 | 2019-01-04 | 宁波工程学院 | Detection method towards real-time body |
CN111107304A (en) * | 2018-10-25 | 2020-05-05 | 上海博泰悦臻电子设备制造有限公司 | Vehicle-mounted support, mobile terminal, vehicle and mobile terminal face tracking method |
CN110162138A (en) * | 2019-04-10 | 2019-08-23 | 北京迈格威科技有限公司 | Folding angles adjusting method, device and collapsible terminal |
CN110175518A (en) * | 2019-04-19 | 2019-08-27 | 阿里巴巴集团控股有限公司 | Camera angle method of adjustment, device, equipment and the system of photographic device |
CN110460772A (en) * | 2019-08-14 | 2019-11-15 | 广州织点智能科技有限公司 | Camera Automatic adjustment method, device, equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113657379A (en) * | 2021-08-09 | 2021-11-16 | 杭州华橙软件技术有限公司 | Image processing method, image processing device, computer-readable storage medium and processor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11861264B2 (en) | Portable terminal device and information processing system | |
KR102597680B1 (en) | Electronic device for providing customized quality image and method for controlling thereof | |
CN109993150B (en) | Method and device for identifying age | |
KR102150890B1 (en) | Method for displaying focus of image and apparatus to be applied to the same | |
CN109670444B (en) | Attitude detection model generation method, attitude detection device, attitude detection equipment and attitude detection medium | |
EP3584740A1 (en) | Method for detecting biological feature data, biological feature recognition apparatus and electronic terminal | |
CN110059623B (en) | Method and apparatus for generating information | |
US10473467B2 (en) | Method for determining at which level a vehicle is when the vehicle is in a multi-level road system | |
US10073671B2 (en) | Detecting noise or object interruption in audio video viewing and altering presentation based thereon | |
KR20200076169A (en) | Electronic device for recommending a play content and operating method thereof | |
CN110427849B (en) | Face pose determination method and device, storage medium and electronic equipment | |
KR102498545B1 (en) | a method for biometric authenticating and an electronic apparatus thereof | |
CN111967431A (en) | Angle correction method and device | |
CN104090657A (en) | Method and device for controlling page turning | |
CN112424744A (en) | Electronic device and volume adjusting method of electronic device | |
US20180126561A1 (en) | Generation device, control method, robot device, call system, and computer-readable recording medium | |
US20220245403A1 (en) | Method and apparatus for upgrading intelligent model, electronic device and non-transitory computer readable storage medium | |
CN109903054B (en) | Operation confirmation method and device, electronic equipment and storage medium | |
US9681054B2 (en) | Imaging apparatus, imaging system, imaging method, and computer-readable recording medium | |
CN110333903B (en) | Method and device for determining page loading duration | |
CN109040457B (en) | Screen brightness adjusting method and mobile terminal | |
CN113432620B (en) | Error estimation method and device, vehicle-mounted terminal and storage medium | |
CN110941344B (en) | Method for obtaining gazing point data and related device | |
KR20220164222A (en) | Electronic apparatus and the method thereof | |
CN113450627A (en) | Experiment project operation method and device, electronic equipment and storage medium |
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 |