A device for automatically adjusting the height and angle of photographing and its control system
Through deep learning's face center key point recognition and automatic tracking technology, the camera height and angle are dynamically adjusted, which solves the problem of angle deviation when self-service equipment takes face photos, achieving high-quality photo acquisition, and is suitable for a wide range of self-service Equipment scene.
Patent Information
- Application Number
- CN202210169623.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-23
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2042-02-23
AI Technical Summary
When existing self-service equipment takes photos of faces, the camera position is fixed, which results in angle deviation and affects the quality of the photos. Especially when the face is not flat and vertical, the photo information is incomplete and affects the subsequent face comparison function.
It uses deep learning's face center key point recognition and automatic tracking technology to dynamically adjust the camera height and angle. Through the lens height adjustment unit and the lens plane angle adjustment unit, it ensures that the face is located in the center of the photo, reducing distortion and improving photo quality.
It realizes the automatic, fast and high-quality acquisition of facial photos, ensures the quality of photo shooting, is suitable for various self-service devices, and improves the reliability of the face comparison function.
Smart Images

Figure CN114542874B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of image processing, and in particular to a device for automatically adjusting photographing height and angle and a control system thereof. Background Art
[0002] Automatic service equipment has been widely used in government services, banks, public transportation, commercial entities, traffic control and other fields. In order to ensure the security and authenticity of business handling, business handlers are usually required to keep photos. Some businesses also require the retention of ID photos when they involve ID processing. Therefore, self-service equipment is generally equipped with a camera to extract the head photo of the business handler. There are usually two solutions for self-service equipment to obtain the face photo of the business handler. One is to take the ID photo through the self-service ID photo device. Generally, the business handler needs to find a specific device and follow the device's guidance instructions. It can achieve good photo effects but is time-consuming and laborious; the other is to directly extract the face photo of the business handler through the camera of the self-service device. Due to the fixed position of the camera and the free movement of the human body, coupled with the influence of objective factors such as light, the quality of the face photos extracted by many self-service devices is not satisfactory, especially when the camera angle is not perpendicular to the plane where the face is located, but there is an angle deviation, the face information of the obtained photo is incomplete, affecting the subsequent face comparison and other functional applications. Therefore, it is necessary to improve the face photo acquisition solution of self-service equipment to address this problem. Summary of the invention
[0003] In view of the above situation, the present invention provides a device for automatically adjusting the height and angle of photographing and a control system thereof, which realizes a method for acquiring facial photos by automatically tracking faces and dynamically adjusting the height and angle of the camera, thereby achieving the function of automatically, quickly and high-quality extraction of facial photos.
[0004] The beneficial effects achieved by the present invention are as follows: the present invention recognizes, locates and automatically tracks the key points in the center of the face based on deep learning, thereby automatically adjusting the vertical height of the camera lens to be the same height as the face, adjusting the center line of the lens to coincide with the key points in the center of the face, ensuring that the face is located in the center of the photo when various cameras take photos, and improving the quality of the photo. The device and system can be used on various self-service devices equipped with cameras, with a wide range of application scenarios and guaranteed photo shooting quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] Figure 1 Schematic diagram of the device structure in an embodiment of the present invention.
[0006] Figure 2 Schematic diagram of a preliminary image obtained by a lens height adjustment unit in an embodiment of the present invention.
[0007] Figure 3 4 is a schematic diagram of a lens plane angle adjustment unit in an embodiment of the present invention.
[0008] In the figure, 1-left eye center, 2-right eye center, 3-center of the line connecting the left and right eye centers, 4-vertical moving device, 41-carrying platform, 42-vertical moving motor, 43-fixed plate, 44-ball screw, 5-rotating camera. DETAILED DESCRIPTION
[0009] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings.
[0010] The present invention provides a face photo acquisition device and system based on automatic face tracking and dynamic adjustment of camera height and angle. The system realizes automatic, rapid and high-quality extraction of face photos of people handling business at self-service equipment.
[0011] In order to achieve the above-mentioned purpose of the invention, the system specifically includes a lens height adjustment unit, a face recognition unit, and a lens plane angle adjustment unit, and specifically adopts the following technical solutions.
[0012] The lens height adjustment unit is used to calibrate the height of the face. The specific method is: according to the height range of 95% of Chinese people, the adjustable height of the lens installation is selected between 160cm and 170cm, the center line of the lens is in a horizontal position, and the height can be adjusted by sliding up and down; the height adjustment is based on the vertical coordinate of the highest pixel point in the face area in the photo. Assuming that the maximum pixel coordinate of the photo is (X, Y) and the coordinate of the highest pixel point in the face area is (x i ,y max ), the lens adjustment height is Δh:
[0013]
[0014] Where θ is the camera's viewing angle, l is the horizontal distance between the business person and the lens, which can be estimated according to the size of the self-service device, usually between 40 and 60 cm. The highest vertical coordinate of the pixel point in the face area of the photo is usually 0.94, and the optimal range is (0.93, 0.95). When Δh>0, the lens rises by Δh; when When the lens height is reduced by Δh; generally, self-service equipment uses a wide-angle lens and does not need to consider If a smaller viewing angle is used, The lens needs to be tilted up, and the tilting angle needs to be calculated according to the lens parameters.
[0015] The face recognition unit uses a pre-trained deep learning model to recognize key points of the face. Figure 1, especially extracting the pixel coordinates of the three key points: left eye center 1, right eye center 2, and center 3 of the line connecting the left and right eye centers. The CNN model for facial key point detection was developed and trained based on the TensorFlow open source machine learning platform. The model input data is the image after the shooting height is adjusted by the lens height adjustment unit. At this time, the lens and the left and right eye centers are basically on the same horizontal plane. Next, the camera horizontal angle can be adjusted through the three facial key points to ensure that the face is located in the center of the photo.
[0016] The lens plane angle adjustment unit adjusts the shooting angle of the lens on the horizontal plane so that the lens faces the face and improves the quality of the face photo. Through the above steps, the key point 3 has been found as the center of the face. When the key point 3 is located at the center of the photo, the face will be located in the middle of the photo, ensuring the quality of the photo.
[0017] Self-service photo taking equipment generally uses wide-angle shooting, and there will be barrel distortion at the edge of the photo screen, and the pixels located in the center area of the lens are not distorted. The farther away from the center of the lens, the more serious the image distortion is. Therefore, when the center of the face is directly opposite the center of the lens, the overall distortion of the image is less. In the present invention, when the center of the lens and the key point 3 of the face are on the same line, the face is in the middle of the photo and the overall distortion is the least. Therefore, the first step of the lens plane angle adjustment unit is to make the key point 3 of the face located on the center line of the lens; the second step is to correct the radial distortion of the image and finally form the image.
[0018] The first step is to: Figure 2 In the figure, points 1, 2, and 3 are on the same horizontal axis 0x, which is the position of the actual face on the horizontal plane; the horizontal axis 0x, v0v x In the same horizontal plane, the horizontal axis v0v x 0x is the pixel position in the image obtained by the camera through the horizontal axis; y axis is the center line of the lens, f is the focal length of the camera lens, v0 is the center point of the image obtained by the camera, and points 1, 3, and 2 are successively away from the center line of the lens. At this time, the face is located in half of the image of the photo, and the other half does not contain or contains very little face information, and barrel distortion will cause the face information to be compressed and distorted. If the face key point 3 is located on the center line of the lens, key points 1 and 2 are closest to the center of the lens, so the overall distortion of the face is minimal, so the lens will rotate an angle of α in the horizontal plane to make the center line of the lens pass through key point 3. The lens plane angle adjustment unit solves the angle α and adjusts the center line of the lens to pass through key point 3.
[0019] Depend on Figure 2 It can be seen that:
[0020]
[0021] So we have:
[0022] Substituting the above formula into formula (1) yields:
[0023] Finally, it is determined that when the facial key point 3 is not on the center line of the lens, the lens needs to be rotated by an angle α in the horizontal plane according to the following formula (2):
[0024]
[0025] The specific method of the second step is to use the open source radial distortion correction model on the OpenCV platform to correct the distortion of facial imaging, and finally obtain a high-quality photo with the face in the center of the photo and no distortion.
[0026] A device for automatically adjusting the height and angle of a photograph can be used to adjust the camera using the following structure (see Figure 3 ): In actual use, the camera adjustment mechanism includes a vertical moving mechanism 4 for controlling the camera to slide up and down, a rotating camera 5 installed on the slider of the vertical moving mechanism (the rotating camera 5 can use existing components on the market), and a controller. The above system can be integrated into the controller.
[0027] The vertical moving device 4 includes a carrying platform 41, a vertical moving motor 42 fixed to one end of the carrying platform 41, and a fixed plate 43. The vertical moving motor, the rotating camera 5 and the controller are electrically connected; the rotating camera 5 is rotatably installed on the fixed plate 43, and the fixed plate 43 is fixed to the driving shaft of the vertical moving motor 42 through a ball screw 44. The ball screw 44 includes a screw and a nut slidably connected to the screw. The other side end of the fixed plate 43 is fixed to the nut. The controller controls the vertical moving distance of the vertical moving motor according to the adjustment height provided by the lens height adjustment unit. The controller controls the rotation angle of the rotating camera 5 according to the lens plane angle adjustment unit, thereby realizing the height and plane rotation angle adjustment of the camera 5.
[0028] Of course, the carrying platform 41 can also be fixedly installed on a synchronous block, the synchronous block is fixedly clamped on a synchronous belt, and the synchronous belt is connected to the vertical moving motor 42 through a synchronous wheel.
[0029] In another implementation, the carrying platform 41 is installed on a servo module, and the vertical moving motor 42 is a servo motor, which drives the servo module to achieve the moving action.
[0030] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.
Claims
1. A device for automatically adjusting the height and angle of photographing, characterized in that: The device comprises a vertical moving mechanism for controlling the camera to slide up and down, a rotating camera mounted on a slider of the vertical moving mechanism, and a controller; The vertical moving device includes a carrying platform, a vertical moving motor fixed to one end of the carrying platform, and a fixing plate; the vertical moving motor, the rotating camera and the controller are electrically connected; The rotating camera is rotatably mounted on a fixed plate, which is connected to a driving shaft of a vertical moving motor through a transmission device and is located on a bearing platform. The controller controls the operation of the vertical moving motor according to the adjustment height provided by the lens height adjustment unit to control the vertical moving distance of the fixed plate, and controls the rotation angle of the rotating camera according to the lens plane angle adjustment unit controller, thereby achieving height and plane rotation angle adjustment of the camera; The device for automatically adjusting the height and angle of photographing also includes a control system, which includes a lens height adjustment unit, a face recognition unit and a lens plane angle adjustment unit; The lens height adjustment unit is used to calibrate the face height and adjust the lens height according to the current face area position so that the lens and the left and right eye centers are at the same horizontal plane to obtain a preliminary image; The specific implementation method of the lens height adjustment unit is as follows: according to the preset height range, the lens installation adjustment height is selected to be between 160cm and 170cm, the center line of the lens is in a horizontal position, and the lens is installed in an up and down sliding manner to adjust the height; the vertical coordinate of the highest pixel point in the face area in the image is used as the reference for adjustment, and the maximum value of the pixel coordinate of the photo is (X, Y), and the coordinate of the highest pixel point in the face area is (x i ,y max ), the lens adjustment height is Δh: Where θ is the camera’s viewing angle, l is the horizontal distance between the user and the lens. 0.93, Δh>0, the lens rises Δh; when When , the lens height decreases by Δh; The face recognition unit uses a deep learning model to identify key points of the face based on the preliminary image, and extracts the pixel coordinates of the three key points: the center of the left eye, the center of the right eye, and the center of the line connecting the left and right eye centers; In the lens plane angle adjustment unit, the lens angle is first adjusted based on the pixel coordinates of the key point so that the key point is located on the center line of the lens, and then the radial distortion of the imaging is corrected and the final imaging is obtained to obtain the final photo with adjusted lens height and angle.
2. The device for automatically adjusting the height and angle of photographing according to claim 1, characterized in that: The transmission device is a ball screw, which includes a screw rod and a nut slidably connected to the screw rod. The fixing plate is installed on the nut. The screw rod is arranged in the bearing platform and is connected to the driving shaft of the vertical moving motor.
3. The device for automatically adjusting the height and angle of photographing according to claim 1, characterized in that: The transmission device is a synchronous block and a synchronous belt. The fixed plate is installed on the synchronous block. The synchronous block is fixedly clamped on the synchronous belt. The synchronous belt is connected to the vertical moving motor through a synchronous wheel.
4. The device for automatically adjusting the height and angle of photographing according to claim 1, characterized in that: The bearing platform is installed on the servo module, and the vertical moving motor is a servo motor, which drives the servo module to realize the moving action.
5. The device for automatically adjusting the height and angle of photographing according to claim 1, characterized in that: In the face recognition unit, a CNN model for facial key point detection is developed and trained based on the TensorFlow open source machine learning platform. The model input data is the image after the shooting height is adjusted by the lens height adjustment unit. At this time, the lens and the centers of the left and right eyes are on the same horizontal plane. Next, the camera horizontal angle is adjusted through the three facial key points to ensure that the face is located in the center of the photo.
6. The device for automatically adjusting the height and angle of photographing according to claim 1, characterized in that: In the lens plane angle adjustment unit, for the preliminary image, the three facial key points are on the same horizontal axis 0x, which is the position of the actual face on the horizontal plane; the horizontal axis 0x, v0v x In the same horizontal plane, the horizontal axis v0v x is the pixel position of the image obtained by the camera through the 0x horizontal axis; the y axis is the center line of the lens, f is the focal length of the camera lens, v0 is the center point of the image obtained by the camera, and the three facial key points are successively away from the center line of the lens; the lens plane angle adjustment unit solves the horizontal plane rotation angle α, and adjusts the lens by the α angle so that the center line of the lens passes through the center of the line connecting the centers of the left and right eyes; Depend on: So we have: Substituting the above formula into formula (1) we get: Finally, it is determined that when the facial key point 3 is not on the center line of the lens, the lens is rotated by an angle α in the horizontal plane according to the following formula (2):
7. The device for automatically adjusting the height and angle of photographing according to claim 1, characterized in that: In the lens plane angle adjustment unit, the open source radial distortion correction model on the OpenCV platform is used to correct the distortion of the face imaging, and the final image is a distortion-free photo with the face at the center of the photo.
