Camera angle adjustment method and system for camera device

By obtaining the position information of the face in the image, the correct shooting angle of the camera is solved, and the offline face recognition terminal camera cannot adapt to the height differences of people in different regions is realized, and the camera is automatically adjusted to improve the success rate of face recognition.

CN116132786BActive Publication Date: 2025-08-12ADVANCED NEW TECHNOLOGIES CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310138438.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-19
Publication Date
2025-08-12
Estimated Expiration
2039-04-19

AI Technical Summary

Technical Problem

In the prior art, the camera configuration height and shooting angle of the offline face recognition terminal cannot adapt to the height differences of people in different regions, resulting in the face images of some people being unable to be effectively collected, affecting the accuracy of face recognition.

Method used

By obtaining the position information of the faces in the image, the correct shooting angle of the camera is calculated, and the angle of the camera is adjusted using the support to ensure that the camera can collect face images of most people in the area.

Benefits of technology

The camera automatically adjusts the shooting angle in different regions, ensuring that the face images of most people can be effectively collected, and the success rate of face recognition is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116132786B_ABST
    Figure CN116132786B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a camera angle adjustment method and system for a camera device. This embodiment obtains position information of a face in an image. Since the image includes an image captured by the camera device at an existing initial shooting angle, the corrected shooting angle of the camera can be calculated based on the position information of the face in the image. The support part is controlled according to the corrected shooting angle to adjust the shooting angle of the camera to the corrected initial shooting angle, thereby automatically adjusting the shooting angle of the camera so that the adjusted camera can capture facial images of most people in the area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of control technology, and in particular to a method and system for adjusting the angle of a camera of a camera device. Background Art

[0002] For devices that use facial recognition, in addition to the accuracy and security requirements of the facial recognition software algorithm, the angle of the camera on the device also has a significant impact on the success rate of facial recognition. This is because the camera angle directly affects the first step in facial recognition, namely the facial data collection stage. How to collect a high-quality facial image is one of the key links in the entire facial recognition process. For offline facial recognition terminals, the camera height and shooting angle are often uniformly configured. However, people in different regions may have different heights. Therefore, the facial images of some people may not be captured by the uniformly configured camera, or the user may need to bend down or stand on tiptoe to get their face into the camera's collection range. Summary of the Invention

[0003] To overcome the problems existing in the related art, this specification provides a camera angle adjustment method and system for a camera device.

[0004] According to a first aspect of an embodiment of this specification, a method for adjusting the angle of a camera of a camera device is provided. The camera device includes a support portion and a camera, wherein the camera is movably connected to the support portion. The method includes:

[0005] Obtaining position information of a face in an image, wherein the image includes an image captured by the camera at an existing initial shooting angle;

[0006] Calculating a corrected shooting angle of the camera based on position information of the face in the image;

[0007] The supporting portion is controlled according to the corrected shooting angle to adjust the shooting angle of the camera to the corrected initial shooting angle.

[0008] In one embodiment, the images include at least images captured by the camera device during the period from the last correction of the initial shooting angle to the current time.

[0009] In one embodiment, a face recognition device connected to the camera device is used to perform face recognition on the image captured by the camera device, and determine the position information of the face in the image during the recognition process. The position information of the face in the image is obtained and recorded from the face recognition device.

[0010] In one embodiment, the obtaining of the position information of the face in the image includes: obtaining the position information of the face in the image when a preset adjustment condition is satisfied;

[0011] The preset adjustment conditions include one or more of the following conditions:

[0012] The number of face recognition failures reaches the preset failure threshold;

[0013] The preset angle adjustment time is reached;

[0014] Face recognition is performed on the images captured by the camera device.

[0015] In one embodiment, the method further comprises:

[0016] When the camera device is first activated, the height of the camera in the camera device from the ground, the preset height range of the crowd, the average length of the human face, and the distance between the person and the vertical plane where the camera is located are obtained to determine the initial shooting angle of the camera;

[0017] The supporting part is controlled to adjust the shooting angle of the camera to the initial shooting angle.

[0018] In one embodiment, the method further comprises:

[0019] Acquire images captured by the camera device in a preset camera test mode;

[0020] If there is a face in the image and the face is within the specified area of the image, output a prompt message indicating that the test is successful; or,

[0021] If there is a partial face in the image, the adjustment direction is determined according to the position of the face in the image, and the support portion is controlled to fine-tune the shooting angle of the camera along the adjustment direction according to a first preset angle step; if the adjusted camera device captures an image containing a complete face, the existing initial shooting angle is updated using the current shooting angle of the camera; or,

[0022] If there is no human face in the image, the control support part adjusts the shooting angle of the camera along the preset adjustment direction and according to the second preset angle step, so that the human face in the image captured by the camera device is within the specified area of the image; if the human face in the image captured by the camera device is within the specified area of the image, the existing initial shooting angle is updated using the current shooting angle of the camera; if the number of adjustments reaches the preset number threshold, a warning message is output.

[0023] In one embodiment, the method further comprises:

[0024] Obtain the image currently captured by the camera device;

[0025] When there is no complete face in the image, the support part is controlled to adjust the shooting angle of the camera according to the position information of the face in the image, so that the camera device captures an image containing the face of the current person being photographed.

[0026] In one embodiment, acquiring the image currently captured by the camera device includes: acquiring the image currently captured by the camera device after a specified time interval from when the camera device is awakened.

[0027] In one embodiment, the method further includes: after the face recognition is completed, the control support unit adjusts the shooting angle of the camera back to the initial shooting angle.

[0028] According to a second aspect of the embodiments of this specification, a method for adjusting the angle of a camera of a camera device is provided. The camera device includes a support portion and a camera, wherein the camera is movably connected to the support portion. The method includes:

[0029] Acquire an image captured by the camera at an initial shooting angle;

[0030] Obtaining a face recognition result of the image;

[0031] If the face recognition result shows that the face is incomplete, the support unit is controlled to adjust the shooting angle of the camera so that the camera captures an image containing a complete face.

[0032] According to a third aspect of the embodiments of this specification, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the program.

[0033] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:

[0034] This embodiment obtains the position information of the face in the image. Since the image includes an image captured by the camera device at an existing initial shooting angle, the corrected shooting angle of the camera can be calculated based on the position information of the face in the image, and the support part is controlled to adjust the shooting angle of the camera to the corrected initial shooting angle according to the corrected shooting angle, thereby automatically adjusting the shooting angle of the camera so that the adjusted camera can capture facial images of most people in the area.

[0035] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.

[0037] Figure 1 , which is an application scenario diagram of a camera angle adjustment method of a camera device according to an exemplary embodiment of this specification.

[0038] Figure 2 FIG. 1 is a flowchart of a method for adjusting the camera angle of a camera device according to an exemplary embodiment of the present specification.

[0039] Figure 3A This is a schematic diagram of the relationship between the positions of a user and a camera according to an exemplary embodiment of this specification.

[0040] Figure 3B This is a schematic diagram of determining a shooting angle according to an exemplary embodiment of the present specification.

[0041] Figure 4 This is a schematic diagram of a shooting angle adjustment method according to an exemplary embodiment of this specification.

[0042] Figure 5 This is a hardware structure diagram of a computer device where a camera angle adjustment device of a camera device is located according to an exemplary embodiment of this specification.

[0043] Figure 6 This is a block diagram of a camera angle adjustment device of a camera device according to an exemplary embodiment of the present specification.

[0044] Figure 7 This is a block diagram of a face recognition system according to an exemplary embodiment of the present specification. DETAILED DESCRIPTION

[0045] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with this specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of this specification, as detailed in the appended claims.

[0046] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. As used in this specification and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0047] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, such information should not be limited to these terms. These terms are merely used to distinguish information of the same type from one another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information without departing from the scope of this specification. Depending on the context, the term "if" as used herein may be interpreted as "when," "when," or "in response to determining."

[0048] Applicants have discovered that the height of a crowd has regional and local characteristics. For example, people in southern China may be generally shorter than those in northern China, and primary and secondary school students may be generally shorter than adults. However, if cameras in different cities or regions are configured with the same shooting angle, the facial images of some people may not be captured by cameras with uniform shooting angles. For example, in stores near primary and secondary schools, more primary and secondary school students are used for identity authentication, while fewer adults are used. If a camera is used with a shooting angle appropriate for adult height, the facial images of most people will not be captured by the camera.

[0049] To this end, an embodiment of this specification provides a camera angle adjustment method for a camera device, which can automatically adjust the shooting angle of a camera so that the adjusted camera can capture facial images of most people in the area.

[0050] The camera angle adjustment method for a camera device provided in this embodiment can be implemented through software, a combination of software and hardware, or hardware execution. The hardware involved can be composed of two or more physical entities, or a single physical entity. The method of this embodiment can be applied to electronic devices. The electronic devices can include tablet computers, laptop computers, desktop computers, PDAs (Personal Digital Assistants), and other devices.

[0051] Embodiments of the present invention can be applied in facial recognition scenarios, such as scenarios involving identity verification based on facial recognition. Facial recognition scenarios may involve a camera, a facial recognition device, and an angle adjustment device. The angle adjustment device can be used to perform a method for adjusting the camera angle of a camera. The camera includes a support and a camera movably connected to the support. The facial recognition device is used to perform facial recognition on images captured by the camera. Facial recognition devices are often used for identity verification. In one example, based on recognition speed requirements and hardware support, the camera and facial recognition device can be installed in the same terminal. This terminal can be installed in an offline environment, such as an offline store or shopping mall, where facial recognition is required. In another example, the camera and facial recognition device are separate devices, and the camera is installed in an offline environment, such as an offline facial recognition terminal. The facial recognition terminal may include a camera and a display screen. The facial recognition device can be installed in a backend server. Accordingly, the angle adjustment device and the facial recognition device can be installed in the same device or in different devices, and can be configured as needed.

[0052] In one embodiment, an example is given for explanation of one application scenario. Figure 1 The figure shows an application scenario of a camera angle adjustment method for a camera device according to an exemplary embodiment of this specification. This application scenario may include an angle adjustment device, a facial recognition server, and a facial recognition terminal. The angle adjustment device and the facial recognition server can be configured on different devices. The camera device is configured on the facial recognition terminal, which may also include a display screen to display the captured facial image. The facial recognition terminal can be installed in offline stores, shopping malls, subways, and other places where facial recognition is required.

[0053] The camera device described in the embodiments of the present invention can be used to capture facial images in offline scenarios. The camera device includes a camera and a support unit. The camera is movably connected to the support unit, and the support unit is used to adjust the camera's shooting angle. For example, the support unit can be a motorized pan / tilt head (PTZ). The motorized pan / tilt head (PTZ) can expand the camera's monitoring range. The motorized pan / tilt head can receive signals from a controller for precise positioning. In response to the control signals, the camera on the pan / tilt head can adjust its shooting angle.

[0054] like Figure 2 FIG2 is a flowchart of a method for adjusting the camera angle of a camera device according to an exemplary embodiment of the present specification. The camera device includes a support portion and a camera, the camera being movably connected to the support portion. The camera device is used to capture a facial image. The method includes:

[0055] In step 202, position information of a face in an image is obtained, where the image is captured by a camera device;

[0056] In step 204, the corrected shooting angle of the camera is calculated based on the position information of the face in the image;

[0057] In step 206, the support portion is controlled to adjust the shooting angle of the camera to the corrected initial shooting angle according to the corrected shooting angle.

[0058] Regarding the image, the image is acquired by the camera device. For example, the image includes the image acquired by the camera device at the existing initial shooting angle. The number of images can be one or more. The position information of the face in the image is data used to assist in adjusting the shooting angle. Therefore, the more data of the referenced image, the more accurate the correction result. In addition, in order to improve the accuracy of the correction result, the image can be an image acquired in the most recent period, such as acquiring multiple images in chronological order. In one example, the image includes at least: an image acquired by the camera device from the last correction of the initial shooting angle to the current time. Using at least the face position information in the image acquired from the last correction to the present as a reference factor for correcting the initial shooting angle can improve the correction accuracy. For example, each time an image is acquired, the position information of the face in the image can be recorded. Step 202 can acquire the position information of the face in the image from the historical records.

[0059] The position information of the face in the image can be the position of the face in the image. For example, the face location information can be obtained by determining the face region in the image using a face positioning method. The position of the face in the image is used as an adjustment basis to calculate a corrected shooting angle of the camera. The control support unit adjusts the camera shooting angle to the corrected initial shooting angle based on the corrected shooting angle, thereby achieving a shooting angle suitable for the height of local users.

[0060] Regarding the location information of a face, in one example, an image can be directly captured from a camera. The execution terminal detects the position of the face in the image to obtain the location information of the face in the image. After each recognition is completed, the location information of the face is identified and stored in the database.

[0061] In another example, the image may be an image on which a face recognition device performs face recognition. Since the face recognition device performs face position detection when performing face recognition based on the image, the position information of the face in the image can be obtained and recorded from the face recognition device. For example, after each recognition operation is completed by the face recognition device, the position information of the face in the image can be sent to the execution end, or the execution end can actively obtain the position information of the face from the face recognition device. After the execution end obtains the position information of the face in the image, the position information of the face can be recorded. In this embodiment, the position information of the face is directly obtained from the face recognition device, which can avoid wasting resources to calculate the face position information. Among them, the face recognition device is connected to the camera device for performing face recognition on the image captured by the camera device. The face recognition device can be a functional module for realizing face recognition.

[0062] Regarding the timing of obtaining the position information of the face, in one embodiment, obtaining the position information of the face in the image includes: obtaining the position information of the face in the image when a preset adjustment condition is met. The preset adjustment condition may be a pre-set condition for triggering adjustment of the shooting angle. For example, the preset adjustment condition includes one or more of the following conditions:

[0063] The number of face recognition failures reaches the preset failure threshold;

[0064] The preset angle adjustment time is reached;

[0065] Face recognition is performed on the images captured by the camera device.

[0066] Among them, the failure of face recognition may be caused by the failure to capture an image containing a face, such as the camera's shooting area not covering the facial area of the person being photographed; it may also be caused by the difficulty of recognizing the face of the person being photographed. Therefore, a preset failure threshold is set. The preset failure threshold can be greater than 2, and the shooting angle adjustment is triggered only after multiple failures. The preset failure threshold can also be configured in combination with the requirements for recognition accuracy, which are not listed here one by one. In this embodiment, when the number of face recognition failures reaches the preset threshold, steps 202 to 206 are triggered to adjust the camera shooting angle.

[0067] The preset angle adjustment time may be a preset time for adjusting the shooting angle. The preset angle adjustment time may be a certain time in an idle time period, and the so-called idle time period may be a time period when a small number of objects to be identified appear in front of the camera device. For example, from 1:00 to 5:00. For example, the preset angle adjustment time may be 2:00 in the morning at every specified period, etc. The specified period of the preset angle adjustment time may also be flexibly adjusted. For example, if the number of images not containing faces collected reaches a preset number, or the number of face recognition failures reaches a preset failure threshold, the specified period of the preset angle adjustment time may be shortened. For example, if the current period is one week, if it is found that the number of images not containing faces collected reaches a preset number, or the number of face recognition failures reaches a preset failure threshold, the period of the preset angle adjustment time will be updated to two days.

[0068] In another example, the preset adjustment condition can be the completion of facial recognition on an image captured by a camera. Facial recognition completion can include both successful and unsuccessful facial recognition. In some scenarios, there may be a high demand for the camera's shooting angle. In this case, after each facial recognition is completed, the camera position can be adjusted using the facial position information in the image used for facial recognition to ensure a high probability of correct recognition the next time. For example, using facial recognition for payment authentication as an example, after each facial payment is completed, the camera position can be adjusted based on the recognition results.

[0069] It is understood that the above-mentioned preset adjustment conditions can be combined as long as there are no conflicts. For example, if either of the following conditions is met, the execution of steps 202 to 206 will be triggered. For example, when the number of facial recognition failures reaches the preset failure threshold, the angle adjustment time period can be adjusted. In addition, the preset adjustment conditions include but are not limited to the above-mentioned conditions, and can also be other conditions for triggering the execution of shooting angle adjustment, which are not detailed here.

[0070] After obtaining the position information of the face in the image, the corrected shooting angle of the camera can be calculated based on the position information of the face in the image.

[0071] Regarding the shooting angle, the shooting angle can be a horizontal angle and a pitch angle (vertical angle). In another example, since the left and right deviation angles of the face are not large, they are usually within the shooting range of the camera, and the left and right deviations can easily cause other faces to be recognized. Therefore, only the pitch angle is corrected each time.

[0072] Regarding the corrected shooting angle of the camera, it can be an angle change amount / angle adjustment amount, and the camera set to the existing initial shooting angle is adjusted according to the corrected shooting angle to adjust the shooting angle of the camera to the corrected initial shooting angle.

[0073] This embodiment can modify the existing initial shooting angle to achieve a probability that the camera captures an image containing a face at the modified initial shooting angle is greater than the probability that the camera captures an image containing a face at the initial shooting angle before the modification. In other words, the goal of calculating the modified shooting angle can be to achieve a probability that the camera captures an image containing a face at the modified initial shooting angle (a modified shooting angle based on the modified shooting angle) is greater than the probability that the camera captures an image containing a face at the initial shooting angle before the modification.

[0074] For example, whether the probability of the camera capturing an image containing a face at the revised initial shooting angle is greater than the probability of the camera capturing an image containing a face at the initial shooting angle before the revision can be determined by predicting the position information of the faces in all acquired images. For example, for ease of description, the faces in the position information of the faces in the images acquired in step 202 are defined as the faces of historical users in the historical user set. Based on whether the position information of all faces falls within a designated preferred area in the image, and with the goal of ensuring that the faces fall within the camera's preferred shooting area, the revised shooting angle is calculated. The goal is to ensure that, when the camera captures images at the revised initial shooting angle, the ratio of the number of historical users whose faces fall within the preferred shooting area to the total number of users in the historical user set meets a preset ratio requirement, or the number of historical users whose faces fall within the preferred shooting area meets a preset threshold. In this embodiment, whether the ratio meets the preset ratio requirement or the number meets the quantity requirement can be used to achieve the goal of ensuring that the probability of the camera capturing an image containing a face at the revised initial shooting angle is greater than the probability of the camera capturing an image containing a face at the initial shooting angle before the revision.

[0075] In one embodiment, the camera angle is modified based on all acquired facial position information to ensure that the adjusted camera's shooting range covers the largest number of faces in the recorded image. To avoid problems caused by large-scale adjustments, each adjustment can be controlled within a range of plus or minus p degrees (e.g., 1 degree). The camera angle is only adjusted when the number of faces in the recorded image that can be covered by the newly calculated shooting angle's shooting range exceeds NUM / (the ratio of the number of faces in the recorded image to the total number of faces covered) and reaches a preset threshold.

[0076] Taking the example of triggering the correction of the shooting angle at each specified interval, at least the position information of the face in the image captured by the camera device within the specified period is recorded. At the specified interval, based on the position information of the face in the image and the shooting angle corresponding to the image (the existing shooting angle), the correction shooting angle is calculated with the goal of controlling the face within a preferred area (such as the middle area) of the shooting area, and the shooting angle of the camera is adjusted to the corrected initial shooting angle based on the correction shooting angle. Similarly, the data within each period can be used as a basis for adjusting the shooting angle so that the adjusted shooting angle can be suitable for the height of the applicable population of the device. This embodiment uses the initial value correction method to count the height characteristics of the population using the face recognition terminal and adjust the optimal recognition angle of the camera to ensure that the facial images of most users can be captured.

[0077] The initial shooting angle set for the first time may be a default value, but during transportation, the angle may change and may not be correctly aligned with the face angle. For this reason, the initial shooting angle of the camera can also be adjusted and tested when the camera device is installed. In one embodiment, the initial shooting angle of the camera is determined based on the type of camera device and the height of the camera in the camera device from the ground. For example, the mapping relationship between the type of camera device and the height of the camera in the camera device from the ground and the initial shooting angle can be pre-stored. After obtaining the type of camera device and the height of the camera in the camera device from the ground, the initial shooting angle can be determined. Among them, when the angle is adjusted for the first time when the camera is turned on, the initial shooting angle includes the horizontal angle and the vertical angle.

[0078] In actual applications, the initial shooting angle obtained based on the type of camera device and the height of the camera in the camera device above the ground may have little correlation with the height of the local population. Therefore, in another embodiment, the method further includes:

[0079] When the camera device is first activated, the height of the camera in the camera device from the ground, the preset height range of the crowd, the average length of the human face, and the distance between the person and the vertical plane where the camera is located are obtained to determine the initial shooting angle of the camera;

[0080] The supporting part is controlled to adjust the shooting angle of the camera to the initial shooting angle.

[0081] Among them, the height of the camera from the ground can be derived from the height of the upper edge of the face recognition terminal screen from the ground and the relative distance between the camera and the upper edge of the screen, and the height of the upper edge of the screen from the ground can be input by the installer during installation.

[0082] Regarding the preset crowd height range, in one embodiment, the preset crowd height range can be a height range determined based on the height of users of facial recognition terminals in the area. For example, it can be a height range input by the installer, or it can be a height range of people in the area obtained online. In another embodiment, the preset crowd height range can also be a preset universal height range.

[0083] The average length of a human face may be a preset value, such as 27 cm.

[0084] Regarding the vertical distance between a person and the camera, for example, if the camera is set on the same plane as the screen, the vertical distance between the person and the screen can be the horizontal distance between the person and the screen. Therefore, this distance can be determined by the installation scenario. The vertical distance between the person and the camera can be a specific value or a range, and can be entered by the installer or left as a default value.

[0085] For example, by designating an area where the subject to be identified is standing on-site, the vertical distance between the subject and the camera can be determined. Another example is the range of vertical distances between the subject and the camera, as estimated based on historical records. For example, the horizontal distance between the user's standing position and the camera in front of a desktop device (facial recognition terminal) is different from that in front of a stand-mounted device (facial recognition terminal). Given the varying user habits of different demographics, the actual distance between the subject and the screen can be calculated by calculating the screen area occupied by the face. For example, when the facial recognition terminal is first powered on, an initial setup page can be provided where the administrator can enter information such as the height of the screen's top edge from the ground, a preset crowd height range, the average length of a person's face, and the vertical distance between the subject and the camera. The device then automatically calculates the camera's initial horizontal and vertical angles and adjusts the camera to those angles using the motorized pan / tilt system.

[0086] like Figure 3A As shown in FIG, this specification shows a schematic diagram of the relationship between the user and the camera position according to an exemplary embodiment. Figure 3B FIG. 1 is a schematic diagram of determining a shooting angle according to an exemplary embodiment of the present specification. max , the camera height H from the ground and the horizontal distance L between the person and the screen determine the angle α, for example, According to the lower limit value S in the crowd height range min , the camera height H from the ground, the average length of the face m and the horizontal distance L between the person and the screen determine the angle β, for example, Therefore, the camera's shooting angle can be determined based on (α-β). In one example, the adjustment target of the camera's shooting angle is that the camera's shooting area can cover the area corresponding to the angle (α-β). For example, the camera's shooting angle γ can be determined based on the middle value of (α-β), for example, Correspondingly, the horizontal shooting angle can also be determined, which will not be described in detail here.

[0087] It is understandable that other calculation formulas can also be used to determine the shooting angle of the camera, as long as the shooting area of the camera is targeted to include the area corresponding to the angle (α-β) as much as possible. I will not go into details here.

[0088] After determining the initial camera shooting angle, to ensure the accuracy of the adjustment, a camera test mode can be configured to allow a tester to test the camera shooting angle. The tester can be one or more. For example, the tester can be a person whose height characteristics are representative of the population in the area. For example, the method further includes:

[0089] Acquire images captured by the camera device in a preset camera test mode;

[0090] If there is a face in the image and the face is within the specified area of the image, output a prompt message indicating that the test is successful; or,

[0091] If there is a partial face in the image, the adjustment direction is determined according to the position of the face in the image, and the support portion is controlled to fine-tune the shooting angle of the camera along the adjustment direction according to a first preset angle step; if the adjusted camera device captures an image containing a complete face, the existing initial shooting angle is updated using the current shooting angle of the camera; or,

[0092] If there is no human face in the image, the control support part adjusts the shooting angle of the camera along the preset adjustment direction and according to the second preset angle step, so that the human face in the image captured by the camera device is within the specified area of the image; if the human face in the image captured by the camera device is within the specified area of the image, the existing initial shooting angle is updated using the current shooting angle of the camera; if the number of adjustments reaches the preset number threshold, a warning message is output.

[0093] For example, a camera test interface may be provided, and the tester looks at the camera so that the camera can recognize whether the face range is within the camera's shooting range.

[0094] The designated area can be the middle area of the image to indicate that the face is within the camera's shooting range. If there is a face in the image and the face is within the designated area in the image, it means that the camera's shooting angle is appropriate and the test ends.

[0095] The presence of a partial face in the image indicates that only part of the face is within the camera's capture range, such as within the upper or lower limits of the capture area. Based on the face's position in the image, an adjustment direction can be determined, and the support unit can be controlled to fine-tune the camera's capture angle along the adjustment direction, according to a first preset angle step size. For example, if the face appears in the upper area of the image, it indicates that the camera's capture range is desired to shift upwards; therefore, the adjustment direction can be upwards. The first preset angle step size can be set as needed, for example, to 1 degree, 5 degrees, etc., and can be determined based on the initial value initially calculated. For example, if the initial capture angle is determined by the camera's height above the ground, a preset crowd height range, the average length of a face, and the distance between the person and the vertical plane of the camera, the camera's capture angle is relatively accurate. Therefore, the preset angle step size can be set to a smaller angle, such as 1 degree. If the adjusted camera device captures an image containing a complete face, the camera's current capture angle is used to update the existing initial capture angle.

[0096] If no face is recognized, the support portion is controlled to fine-tune the shooting angle of the camera along the preset adjustment direction and according to the second preset angle step, so that the face in the image captured by the camera device is within the specified area of the image. The preset adjustment direction can be a preset direction, and the preset adjustment direction is often more than one direction, which can be adjusted upward several times and then adjusted downward several times. The second preset angle step can be a preset larger angle value, such as 10 degrees. For example, if no face is recognized, the camera first moves vertically downward continuously by 10 degrees. If the face is still not recognized, it moves vertically upward continuously by 20 degrees. If the face is recognized after adjusting the angle, the normal working state is entered. If the face is still not recognized, the test ends and the pre-alarm state can be entered.

[0097] In one embodiment, the second preset angle is updated based on the number of adjustments or the adjustment time, so that the updated preset angle is greater than the preset angle before the update. For example, if a face is still not recognized after two adjustments or 10 seconds, the second preset angle can be increased to recognize the face more quickly.

[0098] During the pre-warning phase, the camera indicates that the current camera has failed verification and is at risk of failure. In this state, the angle adjustment range for recognition will be increased. If no face is recognized within s seconds after the recognition begins, the camera will move downward by 20 degrees, attempting recognition as it moves. If no face is recognized, the camera will move upward by 40 degrees. If no face is recognized, the camera will move left by 10 degrees. If no face is recognized, the camera will move right by 10 degrees. If no face is recognized, the camera will fail.

[0099] During the test, if the recognition succeeds n times in a row, the machine enters normal operation. If the recognition fails m times in a row, an alarm is issued. Otherwise, it returns to the pre-alarm state. When the machine enters the alarm state, facial recognition authentication functions (such as facial recognition payment) are stopped and a maintenance warning is issued to maintenance personnel.

[0100] In one embodiment, each time the camera is powered on, the current shooting angle of the camera can be compared with the stored initial shooting angle. If the comparison fails, the camera is adjusted to the stored initial shooting angle. In one example, a camera test mode can be entered. If the comparison is successful, the camera can enter normal operation.

[0101] In actual applications, there may be some tall or short objects to be identified. For example, there may be objects with abnormal heights that are not within the height range of the local population. In order to perform face recognition in such special cases, in one embodiment, a solution for adjusting the camera shooting angle in real time is also provided. The method also includes:

[0102] Obtain the image currently captured by the camera device;

[0103] When there is no complete face in the image, the support part is controlled to adjust the shooting angle of the camera according to the position information of the face in the image, so that the camera device captures an image containing the face of the current person being photographed.

[0104] In this embodiment, after obtaining an image captured by the camera device, the camera's shooting angle can be adjusted in real time and gradually based on whether a complete face is present in the image, until the camera device captures an image containing the face of the current subject, enabling the recognition module to perform facial recognition. This embodiment allows for dynamic adjustment of the camera's shooting angle based on the camera device's usage scenario, enabling the capture of facial images of users of unusual heights.

[0105] Face recognition has high real-time requirements. At the same time, in most cases during the normal recognition process, it is not necessary to adjust the camera angle. Therefore, considering that the user may not have aimed the camera at the beginning, resulting in recognition failure, a delayed adjustment strategy can be set. For example, the acquisition of the image currently captured by the shooting device includes: acquiring the image currently captured by the camera device after a specified time interval from the start of waking up the camera device. The specified time can be T, and after a delay of T time, if a qualified face has not been detected, adjustments are started. The adjustment is mainly for users who are too tall or too short. Therefore, by adjusting the camera in real time, faces that were not originally within the shooting range corresponding to the initial shooting angle can be captured.

[0106] For example, during the delay adjustment process, in order to ensure the recognition speed, a one-step adjustment strategy can be adopted, which is to adjust the first specified angle downward (such as 10 degrees) at a time. If the face is still not recognized, the second specified angle is adjusted upward (such as 20 degrees).

[0107] This embodiment can improve the recognition rate and reduce erroneous movement through the delay adjustment solution.

[0108] Since the situations that trigger real-time adjustment are often special cases, in view of this, after the camera's shooting angle is adjusted in real time and face recognition is completed, the support part can be controlled to adjust the camera's shooting angle back to the initial shooting angle to ensure that the camera can capture the faces of most people.

[0109] Facial recognition can be used in a variety of applications. For example, facial recognition can be used for identity authentication. For example, after identity authentication based on facial recognition, payment can be made. For example, after each facial recognition, if the recognition fails, the facial payment function will not be directly exited. Instead, the user will be redirected to the terminal payment page based on the personal information entered by the user (such as mobile phone number), and a prompt message indicating recognition failure will be displayed on the facial recognition device, reducing the need for users to re-scan the QR code after recognition failure.

[0110] The various technical features in the above embodiments can be combined arbitrarily as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, the arbitrary combination of the various technical features in the above embodiments also falls within the scope of disclosure of this specification.

[0111] The following is an example of one of the combinations.

[0112] like Figure 4The figure shows a schematic diagram of a method for adjusting the shooting angle according to an exemplary embodiment of this specification. When installing a facial recognition terminal that includes a camera, the installer enters the type of facial recognition terminal and the height of the upper edge of the terminal screen from the ground. This embodiment determines the camera's initial horizontal and vertical shooting angles based on the type of facial recognition terminal and the height of the upper edge of the terminal screen from the ground, adjusts to these angles, and then tests these angles. The testing methods are the same as those in the above-mentioned embodiments and are not described in detail here. If the camera test succeeds, it enters normal operation; if the test fails, it enters a pre-alarm phase. During the pre-alarm phase, the captured image is recognized. If the recognition is correct continuously, it enters normal operation. If the recognition fails continuously, it enters an alarm state, issues an alarm prompt, and the camera undergoes manual inspection, or remains in the pre-alarm state. A self-calibration can be performed each time the device is powered on to verify whether the current shooting angle is consistent with the initial shooting angle. If not, an automatic adjustment is performed. During normal operation, to accommodate users of unusual heights, fine-tuning of the vertical range can be performed based on the currently detected face. After facial recognition is complete, the control support unit returns the camera's shooting angle to its initial shooting angle. When a preset adjustment condition is met, the position information of the face in the image is obtained, the corrected shooting angle of the camera is calculated based on the position information of the face in the image, and the support unit is controlled to adjust the shooting angle of the camera to the corrected initial shooting angle according to the corrected shooting angle. The support unit can be an electric pan / tilt head, etc.

[0113] By adding a support portion, this embodiment enables the camera in the facial recognition terminal to automatically adjust its angle, ensuring accurate initial camera position setting and detection, as well as the detection of users with unusual heights. Using an initial value correction method, the height characteristics of the terminal's users can be calculated and the camera's optimal recognition angle adjusted. By adjusting the shooting angle in real time, facial images of users with unusual heights can be captured.

[0114] Corresponding to the embodiment of the camera angle adjustment method of the aforementioned camera device, this specification also provides an embodiment of a camera angle adjustment device of a camera device and an electronic device used therein.

[0115] The embodiment of the camera angle adjustment device of the camera device of this specification can be applied to computer equipment. The embodiment of the device can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the computer device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running it. From the hardware level, if Figure 5 The figure shows a hardware structure diagram of the computer device where the camera angle adjustment device of the camera device of this manual is located. Figure 5In addition to the processor 510, network interface 520, memory 530, and non-volatile memory 540 shown, the computer device where the camera angle adjustment device 531 of the camera device in the embodiment is located can generally include other hardware according to the actual function of the device, which will not be repeated here.

[0116] like Figure 6 FIG2 is a block diagram of a camera angle adjustment device for a camera device according to an exemplary embodiment of the present specification. The camera angle adjustment device for a camera device includes a support portion and a camera, the camera being movably connected to the support portion. The camera device is used to capture facial images. The camera angle adjustment device for the camera device includes:

[0117] The information acquisition module 62 is used to: acquire position information of a face in an image, wherein the image includes an image captured by a camera device at an existing initial shooting angle;

[0118] Angle correction module 64, used to calculate the corrected shooting angle of the camera according to the position information of the face in the image;

[0119] The angle adjustment module 66 is configured to control the support portion to adjust the camera's shooting angle to a corrected initial shooting angle according to the corrected shooting angle.

[0120] In one embodiment, the images include at least images captured by the camera device during the period from the last correction of the initial shooting angle to the current time.

[0121] In one embodiment, a face recognition device connected to the camera device is used to perform face recognition on the image captured by the camera device, and determine the position information of the face in the image during the recognition process. The position information of the face in the image is obtained and recorded from the face recognition device.

[0122] In one embodiment, the information acquisition module 62 is used to: acquire the position information of the face in the image when the preset adjustment condition is met;

[0123] The preset adjustment conditions include one or more of the following conditions:

[0124] The number of face recognition failures reaches the preset failure threshold;

[0125] The preset angle adjustment time is reached;

[0126] Face recognition is performed on the images captured by the camera device.

[0127] In one embodiment, the device further comprises an angle initialization module ( Figure 6 not shown) for:

[0128] When the camera device is first activated, the height of the camera in the camera device from the ground, the preset height range of the crowd, the average length of the human face, and the distance between the person and the vertical plane where the camera is located are obtained to determine the initial shooting angle of the camera;

[0129] The supporting part is controlled to adjust the shooting angle of the camera to the initial shooting angle.

[0130] In one embodiment, the device further comprises a testing module ( Figure 6 not shown), for:

[0131] Acquire images captured by the camera device in a preset camera test mode;

[0132] If there is a face in the image and the face is within the specified area of the image, output a prompt message indicating that the test is successful; or,

[0133] If there is a partial face in the image, the adjustment direction is determined according to the position of the face in the image, and the support portion is controlled to fine-tune the shooting angle of the camera along the adjustment direction according to a first preset angle step; if the adjusted camera device captures an image containing a complete face, the existing initial shooting angle is updated using the current shooting angle of the camera; or,

[0134] If there is no human face in the image, the control support part adjusts the shooting angle of the camera along the preset adjustment direction and according to the second preset angle step, so that the human face in the image captured by the camera device is within the specified area of the image; if the human face in the image captured by the camera device is within the specified area of the image, the existing initial shooting angle is updated using the current shooting angle of the camera; if the number of adjustments reaches the preset number threshold, a warning message is output.

[0135] In one embodiment, the device further includes a real-time adjustment module ( Figure 6 not shown), for:

[0136] Obtain the image currently captured by the camera device;

[0137] When there is no complete face in the image, the support part is controlled to adjust the shooting angle of the camera according to the position information of the face in the image, so that the camera device captures an image containing the face of the current person being photographed.

[0138] In one embodiment, the real-time adjustment module obtains the image currently captured by the camera, including: obtaining the image currently captured by the camera after a specified time interval from when the camera is awakened.

[0139] In one embodiment, the real-time adjustment module is further used to: after the face recognition is completed, control the support unit to adjust the shooting angle of the camera back to the initial shooting angle.

[0140] like Figure 7 , which is a block diagram of a face recognition system according to an exemplary embodiment of the present specification, including a face recognition terminal 72, a face recognition server 74, and an angle adjustment device 76;

[0141] The face recognition terminal 72 includes a camera device for collecting facial images, the camera device includes a support portion and a camera, and the camera is movably connected to the support portion;

[0142] The face recognition server 74 is used to perform face recognition on the face image collected by the face recognition terminal;

[0143] The angle adjustment device 76 is used to: obtain the position information of the face in the image, the image including the image captured by the camera device at the existing initial shooting angle; calculate the corrected shooting angle of the camera based on the position information of the face in the image; and control the support part to adjust the shooting angle of the camera to the corrected initial shooting angle according to the corrected shooting angle.

[0144] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0145] Accordingly, an embodiment of this specification also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of the above embodiments when executing the program.

[0146] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0147] Accordingly, an embodiment of this specification further provides a computer storage medium, wherein the storage medium stores program instructions, and the program instructions implement the method of any of the above embodiments.

[0148] The embodiments of this specification may take the form of a computer program product implemented on one or more storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0149] Other embodiments of the present invention will readily occur to those skilled in the art upon consideration of the present invention and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present invention being indicated by the following claims.

[0150] It should be understood that the present description is not limited to the exact structure that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

[0151] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A method for adjusting the camera angle of a camera device, wherein the camera device comprises a support and a camera, wherein the camera is movably connected to the support, the method comprising: Obtaining position information of a face in an image, wherein the image includes an image captured by the camera at an existing initial shooting angle; Calculating a corrected shooting angle of the camera based on position information of the face in the image; controlling the support portion to adjust the shooting angle of the camera to a corrected initial shooting angle according to the corrected shooting angle; After completing face recognition based on the image captured by the camera device, controlling the support unit to adjust the shooting angle of the camera back to the existing initial shooting angle; The initial shooting angle is obtained by: An initial setup page is provided, through which the following information is input: the height of the camera in the camera device from the ground, a preset height range of people in the area where the camera device is located, the average length of a person's face, and the distance between a person and the vertical plane where the camera is located; Determine an upper limit angle according to the upper limit value in the preset crowd height range and other information; and determine a lower limit angle according to the lower limit value in the preset crowd height range and other information; The initial shooting angle of the camera is determined with the goal that the camera shooting area covers the area corresponding to the upper limit angle and the lower limit angle.

2. The method according to claim 1, wherein the image comprises at least: Images captured by the camera device from the last time the initial shooting angle was corrected to the current time.

3. The method according to claim 2, wherein obtaining the position information of the face in the image comprises: When the preset adjustment conditions are met, obtaining the position information of the face in the image; The preset adjustment conditions include one or more of the following conditions: The number of face recognition failures reaches the preset failure threshold; The preset angle adjustment time is reached; Face recognition is performed on the images captured by the camera device.

4. The method according to claim 1, further comprising: When the camera device is started for the first time, determining the existing initial shooting angle of the camera; The supporting part is controlled to adjust the shooting angle of the camera to the corrected initial shooting angle.

5. The method according to claim 1, further comprising: Acquire images captured by the camera device in a preset camera test mode; If there is a face in the image and the face is within the specified area of the image, output a prompt message indicating that the test is successful; or, If a partial face is present in the image, an adjustment direction is determined based on the position of the face in the image, and the support portion is controlled to fine-tune the camera's shooting angle along the adjustment direction according to a first preset angle step size; if the adjusted camera device captures an image containing a complete face, the existing initial shooting angle is updated using the camera's current shooting angle; or, If there is no human face in the image, controlling the support unit to adjust the shooting angle of the camera along a preset adjustment direction and according to a second preset angle step, so that the human face in the image captured by the camera device is within the specified area of the image; if the human face in the image captured by the camera device is within the specified area of the image, using the current shooting angle of the camera to update the existing initial shooting angle; If the number of adjustments reaches the preset threshold, an early warning message will be output.

6. The method according to any one of claims 1 to 5, further comprising: Obtain the image currently captured by the camera device; When there is no complete human face in the image, the support portion is controlled to adjust the shooting angle of the camera according to the position information of the human face in the image, so that the camera device captures an image containing a complete human face.

7. The method according to claim 6, wherein obtaining the image currently captured by the camera device comprises: Get the image currently captured by the camera device after a specified time interval from the start of the camera device wake-up.

8. A method for adjusting the camera angle of a camera device, the camera device comprising a support and a camera, the camera being movably connected to the support, the method comprising: Acquire an image captured by the camera at an initial shooting angle; Obtaining a face recognition result of the image; If the face recognition result is that the face is incomplete, controlling the support unit to adjust the shooting angle of the camera so that the camera captures an image containing a complete face; After completing face recognition based on the image captured by the camera device, controlling the support unit to adjust the shooting angle of the camera back to the initial shooting angle; The initial shooting angle is obtained by: An initial setup page is provided, through which the following information is input: the height of the camera in the camera device from the ground, a preset height range of people in the area where the camera device is located, the average length of a person's face, and the distance between a person and the vertical plane where the camera is located; Determine an upper limit angle according to the upper limit value in the preset crowd height range and other information; and determine a lower limit angle according to the lower limit value in the preset crowd height range and other information; The initial shooting angle of the camera is determined with the goal that the camera shooting area covers the area corresponding to the upper limit angle and the lower limit angle.

9. The method according to claim 8, wherein controlling the support portion to adjust the shooting angle of the camera comprises: The support portion is controlled to adjust the pitch angle of the camera according to a first preset angle.

10. The method according to claim 8, further comprising: If the face recognition result is that no face is recognized, the process returns to the step of obtaining the image captured by the camera at the initial shooting angle and the step of obtaining the face recognition result of the image after a specified time interval.

11. The method according to claim 10, wherein after returning to the steps of obtaining the image captured by the camera at the initial shooting angle and obtaining the face recognition result of the image after a specified time interval, the method further comprises: If the face recognition result is still that no face is recognized, the support portion is controlled to adjust the pitch angle of the camera according to a second preset angle.

12. The method according to any one of claims 8 to 11, further comprising: If the face recognition result is a complete face, the face recognition result is used for identity verification.

13. The method according to claim 12, further comprising, after the step of performing identity authentication using the face recognition result: Storing the image of the recognized complete face and storing the shooting angle when the camera captures the image of the recognized complete face, so as to adjust the initial shooting angle; and / or, If the camera is not at the initial shooting angle, the support portion is controlled to adjust the shooting angle of the camera back to the initial shooting angle.

14. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Method and device for determining shooting angle of camera and picture pick-up system

    CN103248824A

  • Shooting angle adjustment method and device for camera

    CN105357442A

  • Camera angle adjustment method, device, equipment and system of camera device

    CN110175518B