A method for accurate face acquisition in real-time video stream
By combining static and dynamic acquisition modes, combined with face positioning recognition and gyroscope anti-shake technology, the problems of low face acquisition accuracy and poor environmental adaptability in the existing technology are solved, and efficient and accurate face data acquisition is achieved. Maintain acquisition quality in different light and dynamic environments to ensure data security.
Patent Information
- Application Number
- CN202410454085.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-04-16
AI Technical Summary
The existing face acquisition technology consumes high computing resources, low accuracy, high environmental requirements, and cannot effectively deal with face posture changes and problems of different genders, ages and skin tones when accurately collecting faces in real-time video streams, which affects actual applications. Effect and efficiency.
The static and dynamic acquisition modes are used to determine the acquisition mode through face positioning recognition, and the face center point recognition and camera parameters are automatically adjusted in static mode. The gyroscope is used to prevent the image in dynamic mode to improve the accuracy and stability of the acquisition. And save local data when it is not connected to the network.
It improves the flexibility, accuracy, accuracy and environmental adaptability of face collection, ensures high-quality facial data acquisition in different scenarios, reduces computing resource consumption and misidentification, and enhances the security and reliability of data.
Smart Images

Figure CN118279959B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of video face acquisition, and in particular relates to a method for accurately acquiring faces in real-time video streams. Background Art
[0002] At present, with the rapid development of computer technology, face acquisition technology has been widely used in many fields, such as public security, identity authentication, face recognition, etc. However, there are still some problems with the existing face acquisition technology in accurately acquiring faces in real-time video streams. First, the existing face acquisition technology often requires a lot of computing resources when acquiring faces in real-time video streams. For example, some methods require face detection for each frame, which consumes a lot of computing resources, resulting in poor real-time performance. Secondly, the existing face acquisition technology often has low accuracy when acquiring faces in real-time video streams. For example, some methods may ignore some small or blurred faces when detecting faces, resulting in incomplete collected face data.
[0003] In addition, existing face acquisition technologies often have high requirements for environmental conditions when acquiring faces in real-time video streams. For example, some methods need to be performed in an environment with good lighting conditions and a single background, otherwise the accuracy of face detection may be affected. Furthermore, existing face acquisition technologies often cannot effectively handle changes in facial posture when acquiring faces in real-time video streams. For example, some methods work better when processing frontal faces, but the detection effect will be greatly reduced for side faces or tilted faces. Finally, existing face acquisition technologies often cannot effectively handle faces of different genders, ages, and skin colors when acquiring faces in real-time video streams.
[0004] For example, some methods work better when processing adult male faces, but the detection effect is poor for children or elderly faces. In general, the existing face acquisition technology still has many problems in accurately acquiring faces in real-time video streams, such as high consumption of computing resources, low acquisition accuracy, high environmental requirements, and inability to effectively handle facial posture changes and faces of different genders, ages, and skin colors. These problems have seriously affected the effect and efficiency of face acquisition technology in practical applications, and it is urgent to research and develop new face acquisition methods to overcome the above problems. Summary of the invention
[0005] The present invention proposes a real-time video stream accurate face acquisition method, which solves the problem in the prior art that the acquisition effect is poor due to the dynamic changes of the face, and the acquisition accuracy is affected by the changes in ambient light when the face is acquired in real time. By introducing dynamic and static acquisition modes, the light sensor automatically adjusts the camera parameters and the gyroscope anti-shake, the accuracy and stability of face acquisition are improved. .
[0006] The technical solution of the present invention is implemented as follows: a method for accurately capturing faces in real-time video streams, the method comprising the following steps:
[0007] S1: perform face location recognition in the video image and determine the face acquisition mode. If the face is determined to be static, proceed to step S2 for static acquisition mode; if the face is determined not to be static, proceed to step S3 for dynamic acquisition mode;
[0008] S2: After entering the static collection mode, real-time streaming face detection is performed to collect face data in the image and determine the face position. If the face position is not within the set area, face information is not collected. If the face position is within the set area, face center point recognition is performed and then step S21 is entered:
[0009] S21: After the face center point is continuously recognized for 2 seconds, the face image is still in the recognition area, and the face center point is recognized again. The image stability determination algorithm is used to determine whether the collected image is stable. If the image is stable, the process proceeds to step S22. If the image is not stable, the real-time stream face detection is performed again.
[0010] S22: re-photographing the image determined to be a stable image to capture face data, and sending the face data to the server, which receives the face data. When the static acquisition mode is connected to the network, the face data is uploaded to the server, and when the network is not connected, the face data is backed up in the local server;
[0011] S3: After entering the dynamic acquisition mode, firstly, the dynamic video stream can only be used to capture images, and then real-time stream face detection is performed to collect face data in the image and determine the face position. If no face data is detected, real-time stream face detection is performed again. After the face data is detected, the dynamic acquisition mode is entered, the face model evaluation data is synchronously recorded, and the time interval of the face data is determined;
[0012] S31: After collecting the face data, determine whether it appears for the first time within 30 minutes. If yes, intercept the face data and send it to the server and then go to step S33. If no, go to step S32.
[0013] S32: If it is determined that the face data appears repeatedly within 30 minutes, the face data is denoised by a dual-mode weighted de-duplication algorithm, and the repeated face data is determined to be valid face data. If it is determined to be valid face data by the dual-mode weighted de-noising algorithm, the process proceeds to step S33, and if it is determined to be invalid face data, the invalid face data is removed;
[0014] S33: sending the facial data to the server, which receives the facial data. When connected to the Internet in the static acquisition mode, the facial data is uploaded to the server. When not connected to the Internet, the facial data is backed up in the local server.
[0015] Compared with the prior art, the real-time video stream accurate face acquisition method of this application has the following differences and advantages:
[0016] First, this method introduces two acquisition modes, static and dynamic. Different acquisition modes are selected according to whether the face is in a static state, which improves the flexibility of acquisition and can better cope with various actual situations. Secondly, during the acquisition process, this method judges the position of the face. Only when the face position is within the set area, it is collected, avoiding misidentification caused by faces outside the acquisition area and improving the accuracy of acquisition.
[0017] Thirdly, this method introduces face center point recognition in the static acquisition mode, and continuously judges and corrects the recognition of face center point, which improves the accuracy of face acquisition. In addition, this method also uses the photosensitive sensor to automatically adjust the camera parameters and retake the photo after the adjustment is completed, which can effectively cope with the changes in ambient light, thereby ensuring the quality of face acquisition.
[0018] In this application document, the face collection use environment is divided into static and dynamic face collection. For people in motion and photos collected under different lighting environments, there are blurred and unstable imaging problems. This collection inaccuracy may cause errors in the subsequent face processing stage, causing the face to be incorrectly matched to a similar individual or cannot be used at all, thereby reducing the subsequent usability of the collected photos. To address this problem, the present invention can adopt a dynamic face collection mode, in which the exposure parameters can be automatically adjusted according to different usage scenarios, thereby improving the quality of the photos.
[0019] For traditional face collection of static crowds, the face will be collected when it enters the collection area. Such collected faces are in relative motion, which will cause the face to be blurred and unclear. To address this problem, the present invention can adopt a static face collection mode, in which the position of the center point of the image can be compared. By comparing the center points of the face twice to confirm that the face tends to be static, the camera sensor will automatically adjust the parameters, and then take pictures to collect the face, and then perform anti-shake correction according to the deviation value of the center point.
[0020] Finally, when the method is not connected to the Internet, the image data is backed up on the local server to ensure the security of the data. In general, compared with the existing technology, the real-time video stream accurate face acquisition method of the present application has obvious advantages in flexibility, accuracy, precision, quality and security.
[0021] As a preferred implementation, in step S2, after entering the static acquisition mode, the face position is set at one-half of the screen. When acquiring a face image, if the distance between the acquired face position and the set position exceeds a set threshold, face information will not be acquired. If the distance between the acquired face position and the set position is within the set threshold, face information acquisition will be performed.
[0022] As a preferred implementation, in step S3, after entering the dynamic acquisition mode, the face position is set at two-thirds of the screen. When acquiring face images, if the distance between the acquired face position and the set position exceeds a set threshold, face information will not be acquired. If the distance between the acquired face position and the set position is within the set threshold, face information acquisition will be performed.
[0023] As a preferred implementation, the face center point recognition in step S2 uses the center point of the captured image as the dot matrix center, performs dot matrix analysis on the recognized face image, measures the distance between the dot matrix in the dot matrix center and the standard dot matrix, and uses the distance as a parameter for anti-shake correction.
[0024] As a preferred implementation, in step S21, when the face center point is continuously recognized for 2 seconds, the face dynamic displacement parameters are added and the parameter variables are set. During the continuous recognition period, the position of the face center point is repeatedly monitored, and it is determined whether the change in the position of the face center point is within the set parameter variable range, and then the camera parameters are automatically adjusted according to the photosensor.
[0025] After adopting the above technical scheme, the beneficial effect of the present invention is as follows: through the introduction of static and dynamic acquisition modes, the method can select the most suitable acquisition mode according to the actual state of the face (whether it is static or not), effectively respond to the face acquisition needs in various scenes, and improve the accuracy and flexibility of face acquisition. In the static acquisition mode, by continuously identifying and correcting the center point of the face, and using the gyroscope for anti-shake in the dynamic mode, the acquisition accuracy of the face image is greatly improved, ensuring that the collected face data is more accurate and clear. The function of automatically adjusting the camera parameters using the photosensitive sensor can effectively adapt to the changes in ambient light, and the quality of face acquisition can be guaranteed even in an environment with poor lighting conditions, thereby improving the environmental adaptability of the acquisition system. In the absence of networking, the collected data will be stored in the local server, which not only ensures the security of the data, but also ensures that the data will not be lost when the network conditions are poor, thereby enhancing the security and reliability of the data. By accurately controlling the acquisition area and only collecting when the face is located in the set area, the processing and storage of irrelevant data is reduced, the processing efficiency is improved, and the computing and storage resources are also saved. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0027] Figure 1 The process of the present invention is Figure 1 ;
[0028] Figure 2 The process of the present invention is Figure 2 ;
[0029] Figure 3 The present invention is a flow chart of the method of the prior art. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] Example:
[0032] like Figures 1 to 3 As shown, a method for accurately capturing faces in real-time video streams comprises the following steps:
[0033] S1: perform face location recognition in the video image and determine the face acquisition mode. If the face is determined to be static, proceed to step S2 for static acquisition mode; if the face is determined not to be static, proceed to step S3 for dynamic acquisition mode;
[0034] S2: After entering the static collection mode, real-time streaming face detection is performed to collect face data in the image and determine the face position. If the face position is not within the set area, face information is not collected. If the face position is within the set area, face center point recognition is performed and then step S21 is entered:
[0035] S21: After the face center point is continuously recognized for 2 seconds, the face image is still in the recognition area, and the face center point is recognized again. The image stability determination algorithm is used to determine whether the collected image is stable. If the image is stable, the process proceeds to step S22. If the image is not stable, the real-time stream face detection is performed again.
[0036] S22: re-photographing the image determined to be a stable image to capture face data, and sending the face data to the server, which receives the face data. When the static acquisition mode is connected to the network, the face data is uploaded to the server, and when the network is not connected, the face data is backed up in the local server;
[0037] S3: After entering the dynamic acquisition mode, firstly, the dynamic video stream can only be used to capture images, and then real-time stream face detection is performed to collect face data in the image and determine the face position. If no face data is detected, real-time stream face detection is performed again. After the face data is detected, the dynamic acquisition mode is entered, the face model evaluation data is synchronously recorded, and the time interval of the face data is determined;
[0038] S31: After collecting the face data, determine whether it appears for the first time within 30 minutes. If yes, intercept the face data and send it to the server and then go to step S33. If no, go to step S32.
[0039] S32: If it is determined that the face data appears repeatedly within 30 minutes, the face data is denoised by a dual-mode weighted de-duplication algorithm, and the repeated face data is determined to be valid face data. If it is determined to be valid face data by the dual-mode weighted de-noising algorithm, the process proceeds to step S33, and if it is determined to be invalid face data, the invalid face data is removed;
[0040] S33: sending the facial data to the server, which receives the facial data. When connected to the Internet in the static acquisition mode, the facial data is uploaded to the server. When not connected to the Internet, the facial data is backed up in the local server.
[0041] The working principle and workflow of this real-time video stream accurate face acquisition method cover the key links such as face positioning, recognition, acquisition and data processing. The specific process is divided into three main steps: face state judgment (static or dynamic), static acquisition mode and dynamic acquisition mode to cope with different scenarios and needs. First, the face is identified and located in the video image through face positioning and recognition technology, and then the corresponding acquisition mode is selected according to whether the face is in a static state. In the static acquisition mode, the located face is accurately acquired. If the face is in the preset acquisition area, the face center point is identified and the camera parameters are automatically adjusted to obtain high-quality face images. In the dynamic acquisition mode, the gyroscope anti-shake function is enabled and the camera parameters are automatically adjusted to adapt to the dynamic changes of the face to ensure the stability and clarity of the acquired image. Finally, according to the network conditions, the collected data is uploaded to the server or stored in the local server.
[0042] Compared with the prior art, the difference and advantage of this application lies in its detailed face state judgment and targeted acquisition mode selection, as well as automatic parameter adjustment and data processing mechanism during the acquisition process. Traditional face acquisition methods often ignore the processing of dynamic changes in the face, resulting in reduced acquisition quality in dynamic scenes. This method effectively improves the accuracy and stability of face acquisition by switching between static and dynamic acquisition modes, as well as detailed operations in each mode (such as continuous recognition of the center point of the face and automatic adjustment of camera parameters), especially in dynamic and complex practical application scenarios.
[0043] From the working principle point of view, this application fully considers the impact of environmental changes and changes in facial state on the acquisition effect by comprehensively utilizing facial positioning and recognition technology, photosensitive sensors and gyroscope anti-shake technology, and achieves the goal of obtaining high-quality facial images in different scenarios. From the workflow, this application clarifies the operating procedures and data processing logic under different states, ensuring the efficiency of data acquisition and the reliability of data quality. In addition, this application also takes into account data security and emergency processing mechanisms, and adopts a local storage strategy when not connected to the Internet to ensure the security and integrity of the data. These differences together constitute the significant advantages of this application compared to the existing technology, which not only improves the accuracy and stability of face acquisition, but also enhances the adaptability and reliability of the system, and meets the high standards required in complex application scenarios.
[0044] In the step S2, after entering the static acquisition mode, the face position is set to be at the half position of the picture. When acquiring the face image, if the distance between the acquired face position and the set position exceeds the set threshold, the face information will not be acquired. If the distance between the acquired face position and the set position is within the set threshold, the face information will be acquired. The face acquisition method mentioned in this description adopts a strategy of precise position control when processing static face image acquisition, that is, ensuring that the acquired face position is in a specific area of the picture (such as half of the picture), and setting a specific threshold to determine whether the face position meets the acquisition requirements. This strategy shows three main differences and advantages compared with the prior art.
[0045] This method improves the consistency and standardization of face collection data by setting the precise range and threshold of face position. In traditional face collection technology, the specific position of the face in the picture is often ignored, which may cause fluctuations in the quality of the collected data, especially when additional preprocessing work may be added during subsequent face recognition or analysis. This method ensures the visual concentration and uniformity of the collected face images, providing a higher quality and more reliable data foundation for subsequent processing.
[0046] This method increases the intelligence and automation of the acquisition process. By automatically determining whether the deviation between the face position and the set position is within the threshold, it achieves automatic filtering of images that do not meet the acquisition standards, reducing reliance on manual intervention. This is in stark contrast to the existing practice of manual screening or preliminary screening through relatively simple algorithms, effectively improving acquisition efficiency and data quality.
[0047] By strictly controlling the position of the face, this method can also better cope with face acquisition tasks in complex backgrounds. In the case of multiple faces or high background noise, ensuring that the face is located in a specific position can significantly reduce the possibility of incorrect acquisition, while also providing a clearer and more focused background environment for the collected face image. Compared with existing technologies, this precise control strategy shows higher robustness and reliability when dealing with face acquisition in complex scenes.
[0048] By setting the precise range of face position and adopting a threshold judgment mechanism, this method has significant advantages over existing technologies in terms of data consistency, collection automation, and adaptability to complex environments, reflecting its innovation and practicality in the field of face collection.
[0049] The image stability determination algorithm used in step S21 is mainly used in static acquisition mode. Since handheld devices will inevitably experience slight shaking during use, these shaking will introduce noise data, affecting the accuracy of face recognition and acquisition. This algorithm determines whether the person being collected is in a stationary state by analyzing the video stream and gyroscope sensor data in real time, thereby ensuring that clear face information is captured and collected. The specific implementation process is as follows:
[0050] Gyroscope data analysis: Continuously capture gyroscope sensor data and group the data in 1-second units. Perform low-pass filtering on each group of data, and then calculate its Euclidean norm as the motion reference value. If the motion reference values of all groups within 1 second are less than or equal to 0.2, the device is considered to be stable. If any group of data does not meet the stability condition, the timing will be restarted.
[0051] Video stream image data analysis: Continuously analyze continuous video stream image data. If a certain frame does not detect a face, or the detected face is inconsistent with the previous frame, the timing will be restarted. At the same time, the area of the face boundary rectangle and the distance from the center point of the face to the center point of the video screen in each frame are calculated. If the area of the face rectangle is larger than 1 / 2 of the area of the video image, or the distance from the center point of the rectangle where the face is located to the center point of the video image exceeds 1 / 2 of the diagonal length of the video image, it is determined to be an unqualified image and the timing will be restarted.
[0052] Comprehensive judgment: When any one of the gyroscope data and the video stream image data needs to be re-timed, the other data should also be reset immediately. Only when both sets of data remain stable can the current acquisition environment be determined to be stable and reliable and suitable for face acquisition. Through this method, the present invention can effectively improve the stability and accuracy of face data acquisition in static acquisition mode.
[0053] In step S22, the image determined to be a stable image is re-photographed before facial data is captured, and then the complete image is automatically captured through intelligent shooting control before facial data capture. The algorithm used by intelligent shooting control is optimized for the static acquisition mode to ensure that high-quality facial images can be obtained under different lighting conditions. The specific process is as follows:
[0054] Light intensity judgment: Switch shooting mode according to light intensity. When the light intensity is less than or equal to 3LUX, it is considered that the ambient light is insufficient, infrared fill light is enabled and night mode is entered. At this time, a fixed shutter speed of 1 / 250 second is used to shoot black and white face images to ensure image clarity. When the light intensity is greater than or equal to 50LUX, the lighting conditions are considered good, and a fixed shutter speed of 1 / 250 second is also used to shoot color face images. Adaptive exposure control: When the light intensity is in the (3,50)LUX interval, the shutter speed is dynamically adjusted according to the following formula: Y = 1 / (60*ln(x)) where Y is the exposure speed and x is the currently measured light intensity. Image capture: After calculating the appropriate exposure speed, image capture is performed to obtain high-quality, clear static face images. In this way, the system can intelligently adjust the shooting parameters according to different lighting conditions to ensure that the best face images are obtained in static acquisition mode.
[0055] After entering the dynamic acquisition mode, the dynamic acquisition mode of the present invention can collect high-quality video stream data in real time, providing a more flexible and efficient face recognition function for the body camera. Some technical difficulties in the dynamic acquisition mode can be solved through the multiple algorithms and technologies of the present invention. The difficulties mainly include:
[0056] Blurred image processing: Due to the relatively long exposure time and the continuous motion of the person being collected, blurred facial images are likely to appear in the video stream, which makes it difficult to use them for accurate identification. Redundant data processing: Direct detection through continuous video streams will generate a large amount of redundant facial data information, which not only increases the network transmission pressure on the device side, but also wastes the local storage and network traffic of the device. Environmental adaptability: In dynamic collection mode, the body camera may face changing lighting conditions and complex background environments, which requires the camera parameters to have strong environmental adaptability and universality.
[0057] In the dynamic acquisition mode, there is also dynamic video stream intelligent shooting control, which mainly adopts low exposure: in order to ensure that the acquisition time of the dynamic video stream is as short as possible, so as to quickly carry out subsequent business process processing (such as scaling, encoding, storage and network transmission, etc.), the present invention adopts a fixed exposure time of 1 / 125 seconds to acquire the video stream. Night mode: When the light intensity is less than or equal to 10LUX, in order to ensure the clarity and brightness of the image, the system will turn on the infrared fill light and switch to the night mode to acquire the video stream.
[0058] The present invention trains a unique image clarity evaluation model based on the blur and dim features of the image through a convolutional neural network (CNN). The following are the key steps to achieve this goal:
[0059] Data preparation: In order to train the model, a sufficient amount of training data needs to be prepared. Place body cameras in various shopping malls, buildings, pedestrian checkpoints and other places, and obtain original uncompressed video stream image data by recording. This data will be used for model training and verification. It is recommended that the number of blurred data and clear data should be more than 10,000 and more than 5,000 respectively. In addition, a validation data set, including 100 blurred data and 500 clear data, needs to be prepared to evaluate the performance of the model. The validation data set and the training data set should not overlap. Data labeling: Label the collected data into two categories: blurred data and clear data. This step is crucial for training the model because it provides the target that the model needs to learn. Model training: Use the collected and labeled data to train the convolutional neural network. During the training process, the model will learn to distinguish blurred and clear image features. Model verification: Use the verification data set to evaluate the performance of the model to ensure that the model can accurately evaluate the clarity of the image. Model application: Once the model training and verification are completed, it can be applied to the dynamic acquisition mode to evaluate and score the clarity of the face in each frame.
[0060] The dual-mode weighted algorithm used in step S32 combines the image clarity parameters to weight and remove redundant images. This ensures that the information of the same person appears at most twice in 30 minutes. The steps are as follows:
[0061] Initialization: When someone's facial information is first obtained in the video stream image, if the weight score of the facial information reaches 0.7 (the full score is 1) or above, the image is directly saved locally and sent to the server for recognition. At the same time, a timer is started to record the facial score (a0) and clarity score (b0) of the current image. The current moment is recorded as time T0. Deduplication within 30 minutes: In the next 30 minutes, the information of the same face is weightedly deduplicated using the dual model scores. For the facial information of the person obtained again, the current facial score (a1) and clarity score (b1) are recorded. Calculate the Y value
[0062] Use the formula: Y=ln(1+0.2(a1-a0))+ln(1+0.8(b1-b0)).
[0063] Determination and saving: If the weighted value Y is greater than or equal to 0.1, the system determines that this is a high-quality duplicate image. The image is saved locally as a high-quality duplicate image of the person within 30 minutes and sent to the server for recognition. Filter settings: Within T0+30 minutes, the system will check the face data in each frame of the video stream. If the face identification is the same as the identification of the saved high-quality duplicate image, the data is directly discarded without further processing. Time update: T0+30 minutes, reset the timer for the face information.
[0064] In this way, the dual-mode weighted deduplication algorithm ensures that there will be no missed or over-collected images during dynamic video capture, and that a high-quality image can always be captured in normal application scenarios. This method helps reduce the storage and transmission of redundant data and improves the efficiency and accuracy of the system.
[0065] In step S3, after entering the dynamic acquisition mode, the face position is set to be at the two-thirds position of the screen. When collecting face images, if the distance between the collected face position and the set position exceeds the set threshold, the face information is not collected. If the distance between the collected face position and the set position is within the set threshold, the face information is collected. In the dynamic acquisition mode, by setting the specific position of the face in the screen (such as the two-thirds position) and introducing threshold control, this method proposes a new strategy for face acquisition in a dynamic environment. Compared with the existing technology, this strategy embodies three main differences and advantages, namely, the accuracy of face position control in dynamic scenes, the intelligent management of the acquisition process, and the high adaptability to complex dynamic environments.
[0066] For face collection in dynamic environments, this method improves data quality and the convenience of subsequent processing by accurately controlling the position of the face in the picture. Traditional technologies often focus more on how to capture the face when processing dynamic scenes and ignore the specific position of the face in the picture, which may lead to inconsistencies in the visual effects and data standardization of the collected images. This method ensures that the face image is not only accurately captured, but also located in a predefined optimal area, which helps to improve the accuracy and efficiency of the face recognition system.
[0067] The introduction of the concept of distance threshold enhances the automation and intelligence of the collection process. In the dynamic collection mode, the system can automatically determine whether the collected face position meets the preset conditions and effectively filter out the collection results that do not meet the requirements. This intelligent judgment mechanism reduces the workload of manual screening and improves the efficiency of data processing. Compared with traditional technologies, it is more efficient and accurate in processing large amounts of dynamic collection data.
[0068] This method improves the adaptability and robustness of the acquisition system to complex environments by precisely controlling the position of the face in a dynamic environment. The movement of the face and changes in environmental factors in dynamic scenes pose challenges to face acquisition. By setting specific face positions and acquisition thresholds, this method can ensure that high-quality face images can be acquired even in complex dynamic environments, reducing the impact of environmental changes on acquisition quality. Compared with existing technologies, this method shows significant advantages in the accuracy, degree of automation, and adaptability to complex environments of dynamic face acquisition, providing an effective solution for high-quality face image acquisition in dynamic environments.
[0069] The facial center point recognition in step S2 uses the center point of the captured image as the dot matrix center, performs dot matrix analysis on the recognized facial image, measures the spacing between the dot matrix in the dot matrix center and the standard dot matrix, and uses the spacing as a parameter for anti-shake correction. In step S2, by using the technology of using the center point of the captured image as the dot matrix center, performing dot matrix analysis on the recognized facial image, and using the spacing between the dot matrix in the dot matrix center and the standard dot matrix as a parameter for anti-shake correction, this method presents an innovative strategy for the processing of static facial image acquisition. Compared with the prior art, this method shows significant differences and advantages in terms of accuracy, image quality improvement, and anti-shake effect optimization.
[0070] The introduction of dot matrix analysis and the strategy of using dot matrix center spacing as an anti-shake parameter greatly improves the accuracy of face acquisition. Traditional face acquisition technology may focus more on simple image capture and basic anti-shake measures, but fails to fully consider the image quality degradation caused by slight movement or vibration during image acquisition. This method can accurately measure and correct slight position deviations caused by vibration through dot matrix analysis of face images, ensuring that the collected face images have higher accuracy and clarity.
[0071] This method effectively improves the stability and quality of the image by measuring the spacing between the centers of the dot matrix and performing anti-shake correction. In static face acquisition, even small vibrations can cause recognition errors or image quality loss. The application of this technology, especially the use of dot matrix spacing as a parameter in the correction process, allows the system to intelligently adjust the image to compensate for these small movements, thereby ensuring image stability while also optimizing the quality of the final image.
[0072] This anti-shake correction method based on dot matrix analysis and spacing measurement provides a more efficient and accurate solution than traditional technologies, especially in application scenarios that require high-precision face acquisition. Existing anti-shake technologies often rely on hardware (such as optical image stabilization) or simple software algorithms, which may not be accurate enough when processing subtle vibrations. This method can more accurately identify and correct these vibrations through innovative algorithms at the software level, providing significant improvements in face recognition and other technical fields that require high-quality image acquisition.
[0073] Compared with the existing technologies, this method shows obvious improvements and advantages in the accuracy of face image acquisition, image quality and application of anti-shake technology, and has important application value in scenarios where subtle vibrations in static images need to be processed.
[0074] In the step S21, when the face center point is continuously recognized for 2 seconds, the face dynamic displacement parameter is added and the parameter variable is set. During the continuous recognition period, the face center point position is repeatedly monitored, and it is determined that the change in the face center point position is within the set parameter variable range, and then the camera parameters are automatically adjusted according to the light-sensitive sensor. In the step S21, by adding the face dynamic displacement parameter during the continuous recognition of the face center point, and performing anti-shake and automatic adjustment of the camera parameters by repeatedly monitoring the change in the face center point position during the recognition period, a significant improvement in dynamic face acquisition accuracy, image quality adjustment, and real-time response capability is demonstrated compared to the prior art.
[0075] This method introduces the concept of dynamic face displacement parameters to accurately monitor and analyze the slight changes in the position of the center point of the face. This strategy can effectively identify and compensate for the image quality degradation caused by slight user movements or environmental factors. Within 2 seconds of continuous recognition, the system can capture the slight movement of the face in real time. By judging whether the change in the position of the center point of the face is within the preset parameter variable range, the acquisition process is finely controlled, which not only improves the accuracy of face acquisition, but also optimizes the sensitivity and response speed of the acquisition process, ensuring the acquisition of high-quality data. This method automatically adjusts the camera parameters, such as aperture size, shutter speed, etc., through linkage with the photosensitive sensor, and makes intelligent adjustments to the dynamic changes of the face monitored in real time. Compared with the existing technology, this adaptive adjustment mechanism can intelligently optimize the shooting parameters according to the actual dynamic position changes of the face, so as to maintain the optimization of image quality in a dynamic environment, significantly improving the adaptability and stability of image acquisition. This method continuously adjusts the camera parameters to adapt to the dynamic displacement of the face during the continuous recognition of the center point of the face, reflecting the ability to respond quickly to dynamic changes in real-time acquisition scenes. Compared with the existing technology that relies on post-processing to adjust image quality, the real-time monitoring and instant adjustment strategy of this method greatly reduces the dependence on post-processing, ensuring that the data collected in real time is of the best quality, especially in application scenarios with extremely high real-time requirements, such as real-time monitoring, dynamic identity authentication and other fields, showing higher application value.
[0076] like Figure 2 As shown, the static collection mode of the prior art has the following main disadvantages:
[0077] The timing of shooting requires manual judgment on whether the image is stable; if the light is too strong or too dark, resulting in blurred images, the camera parameters need to be adjusted manually; this algorithm can automatically identify the current external environmental conditions through the image stability judgment algorithm, and can automatically capture the optimal image through the intelligent shooting control algorithm, and finally capture a clearer and more accurate face. The existing technology does not have a dynamic acquisition mode locally on the device, and generally pushes the video stream to the server for centralized processing. Some defects of centralized video stream processing on the server are as follows: the video stream data is pushed in its entirety, the network pressure is high, and the video stream data transmission in outdoor patrol scenes with large traffic will inevitably have an exponential delay difference compared to the processed face data transmission speed; the real-time performance of centralized analysis and collection in the cloud is poor, and the opportunity to encounter wanted criminals and suspected criminals during field patrols is fleeting; centralized analysis and collection in the cloud does not effectively utilize terminal examples, and does not reasonably utilize terminal computing power, resulting in serious economic waste.
[0078] The dynamic collection mode adopted in the present invention performs real-time and rapid face collection on the terminal device and only sends a small amount of processed data to the server for comparison, which basically makes up for the defects of dynamic collection on the server side in the prior art.
[0079] Dynamically collecting face information in real-time streaming data on the device side is prone to missed collection, repeated collection, and image blur. By integrating dynamic video stream intelligent shooting control technology, image clarity evaluation model, and dual-mode weighted deduplication algorithm, the present invention effectively improves the collection quality and efficiency of face information in dynamic collection mode. Specific benefits include:
[0080] Intelligent shooting control of dynamic video stream: Automatically adjust camera settings, such as exposure time and fill light strategy, according to the ambient light and target movement in the real-time streaming data to adapt to the rapidly changing shooting environment. Intelligent evaluation model for image clarity: Evaluate the clarity of the captured image through an evaluation model trained by deep learning, automatically filter out high-quality images, and exclude blurry images. Dual-mode weighted deduplication algorithm: Combine face recognition scoring and image clarity scoring to intelligently filter multiple acquisitions of the same target person, avoid repeated acquisition, and find the best second face image of the target person in the most timely manner with the highest probability.
[0081] The integration of these technologies is essential for efficient and accurate facial data collection in dynamic, uncontrolled scenarios, significantly improving the various capabilities of facial information collection on the device side. It ensures that in dynamic collection mode, the system can effectively identify and retain high-quality facial images, while reducing unnecessary data transmission and storage, and improving overall collection efficiency and recognition accuracy.
[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for accurate face acquisition in real-time video stream, characterized in that: The method comprises the following steps: S1: perform face location recognition in the video image and determine the face acquisition mode. If the face is determined to be static, proceed to step S2 for static acquisition mode; if the face is determined not to be static, proceed to step S3 for dynamic acquisition mode; S2: After entering the static collection mode, real-time streaming face detection is performed to collect face data in the image and determine the face position. If the face position is not within the set area, face information is not collected. If the face position is within the set area, face center point recognition is performed and then step S21 is entered: S21: After the face center point is continuously recognized for 2 seconds, the face image is still in the recognition area, and the face center point is recognized again. The image stability determination algorithm is used to determine whether the collected image is stable. If the image is stable, the process proceeds to step S22. If the image is not stable, the real-time stream face detection is performed again. S22: re-photographing the image determined to be a stable image to capture face data, and sending the face data to the server, which receives the face data. When the static acquisition mode is connected to the network, the face data is uploaded to the server, and when the network is not connected, the face data is backed up in the local server; S3: After entering the dynamic acquisition mode, firstly, the image is captured through the dynamic video stream intelligent shooting control, and then the real-time stream face detection is performed to collect the face data in the image and determine the face position. If no face data is detected, the real-time stream face detection is performed again. After the face data is detected, the dynamic acquisition mode is entered, the face model evaluation data is synchronously recorded, and the time interval of the face data is determined; S31: After collecting the face data, determine whether it appears for the first time within 30 minutes. If yes, intercept the face data and send it to the server and then go to step S33. If no, go to step S32. S32: If it is determined that the face data appears repeatedly within 30 minutes, the face data is denoised by a dual-mode weighted de-duplication algorithm, and the repeated face data is determined to be valid face data. If it is determined to be valid face data by the dual-mode weighted de-noising algorithm, the process proceeds to step S33, and if it is determined to be invalid face data, the invalid face data is removed; S33: sending the facial data to the server, which receives the facial data. When connected to the Internet in the dynamic acquisition mode, the facial data is uploaded to the server. When not connected to the Internet, the facial data is backed up in the local server.
2. A method for accurate face acquisition in real-time video stream according to claim 1, characterized in that: In the step S2, after entering the static acquisition mode, the face position is set to be at the half position of the screen. When acquiring the face image, if the distance between the acquired face position and the set position exceeds the set threshold, the face information will not be acquired. If the distance between the acquired face position and the set position is within the set threshold, the face information will be acquired.
3. The method for accurate face acquisition in real-time video stream according to claim 1, characterized in that: In the step S3, after entering the dynamic acquisition mode, the face position is set at two-thirds of the screen. When acquiring the face image, if the distance between the acquired face position and the set position exceeds the set threshold, the face information will not be acquired. If the distance between the acquired face position and the set position is within the set threshold, the face information will be acquired.
4. The method for accurate face acquisition in real-time video stream according to claim 1, characterized in that: The face center point recognition in step S2 takes the center point of the captured image as the dot matrix center, performs dot matrix analysis on the recognized face image, measures the distance between the dot matrix in the dot matrix center and the standard dot matrix, and uses the distance as a parameter for anti-shake correction.
5. The method for accurate face acquisition in real-time video stream according to claim 1, characterized in that: In the step S21, when the face center point is continuously recognized for 2 seconds, the face dynamic displacement parameters are added and the parameter variables are set. During the continuous recognition period, the position of the face center point is repeatedly monitored, and it is determined whether the change in the position of the face center point is within the set parameter variable range, and then the camera parameters are automatically adjusted according to the photosensor.
