Face image acquisition device and method
By using the server module and communication module to generate and convert control commands in the face image acquisition device, the time synchronization of all acquisition modules is ensured, and the problem of camera synchronization acquisition in multi-view image modeling is solved, and the three-dimensional face modeling is improved Accuracy and efficiency.
Patent Information
- Application Number
- CN202411353995.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-17
AI Technical Summary
In the three-dimensional face modeling method based on multi-view images, synchronous acquisition of multiple cameras is difficult to ensure, resulting in deviations in reconstruction results.
A face image acquisition device is designed, including a server module, a communication module and a acquisition module. By generating and converting control commands, all acquisition modules obtain accurate and consistent initial second values when receiving the target timing instruction, realizing time. Synchronize and control the camera to perform image acquisition through the second pulse signal and the synchronization signal.
It improves the accuracy and efficiency of image acquisition, simplifies the design of the acquisition module, enhances the communication efficiency and compatibility of the system, and ensures the accuracy and synchronization of three-dimensional reconstruction.
Smart Images

Figure CN119155540A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a facial image acquisition device and method. Background Art
[0002] With the rapid advancement of science and technology, computer graphics and image processing technologies, as key cornerstones of the digital age, are driving development and innovation across various industries at an unprecedented pace. Three-dimensional facial modeling technology, a key branch of this field, demonstrates enormous potential for application in a variety of fields, including gaming and animation, film and television special effects, virtual reality, and security surveillance, due to its ability to accurately capture and reproduce the three-dimensional form and facial expressions.
[0003] Currently, image-based modeling methods use single or multiple 2D facial images as input and reconstruct the 3D structure of the face through image processing algorithms and computer vision techniques, such as feature point detection, stereo matching, and depth estimation. Depending on the number of input images, this approach can be further categorized into single-view modeling, dual-view modeling, and multi-view modeling. Multi-view modeling, by combining multiple facial images taken from different angles with camera calibration and image registration techniques, can significantly improve the accuracy and realism of 3D reconstruction.
[0004] However, in multi-view image-based modeling methods, synchronous acquisition of multiple cameras is key to ensuring 3D reconstruction accuracy. However, in practice, it is often difficult to ensure that all cameras accurately capture facial images at the same time, resulting in deviations in the reconstruction results. Summary of the Invention
[0005] In view of this, the present invention provides a facial image acquisition device and method to solve the problem that it is often difficult to ensure that all cameras accurately capture facial images at the same time in actual operation, resulting in deviations in reconstruction results.
[0006] In a first aspect, the present invention provides a facial image acquisition device, which includes: a server module, a communication module and at least two acquisition modules; the server module is used to generate a control command and send the control command to the communication module; wherein the control command includes: an original timing instruction, an original shooting instruction and an original generation instruction, and the original shooting instruction and the original generation instruction are both instructions generated when the count value of the server module and the number of second pulse signals of different acquisition modules are the same; the communication module is used to receive the timing instruction, perform protocol conversion processing on the original timing instruction to obtain a target timing instruction, and perform protocol conversion processing on the original shooting instruction to obtain a target shooting instruction. The acquisition module is used to receive the target timing instruction and the target shooting instruction, parse the target timing instruction, determine the initial second value in the target timing instruction, count according to the initial second value within a preset time period, generate a second pulse signal corresponding to each count, generate a synchronization signal when receiving the target generation instruction, and perform face image acquisition according to the synchronization signal and the target shooting instruction.
[0007] The facial image acquisition device provided in this embodiment uses the original timing instructions generated by the server module and then sent to the acquisition module after protocol conversion by the communication module. This ensures that all acquisition modules can obtain accurate and consistent initial second values when receiving the target timing instructions, thereby avoiding the problem of inconsistent image acquisition due to time differences. In addition, the communication module is responsible for receiving control commands from the server module and converting them into target instructions that the acquisition module can recognize. This process not only simplifies the design of the acquisition module, but also improves the communication efficiency of the entire system and the accuracy of instruction execution. At the same time, the protocol conversion process also enhances the compatibility and scalability of the system.
[0008] In an optional embodiment, the acquisition module includes: a command parsing module, a second pulse generation module, a trigger pulse generation module and a camera module; the command parsing module is used to receive the target timing instruction, parse the target timing instruction, and determine the initial second value in the target timing instruction; the second pulse generation module counts according to the initial second value within a preset time period, generates a second pulse signal corresponding to each count, and sends the second pulse signal to the trigger pulse generation module; the trigger pulse generation module is used to receive the target shooting instruction and the second pulse signal, and when the target generation instruction is received and the value corresponding to the second pulse signal is detected to be an integer, when the value corresponding to the second pulse signal is an integer, a synchronization signal is generated, and the camera module is controlled to perform face image acquisition according to the synchronization signal and the target shooting instruction.
[0009] The facial image acquisition device provided in this embodiment uses a command parsing module to parse the initial second value in the target timing instruction. Based on this initial value, the pulse-per-second generation module accurately generates a pulse-per-second signal within a preset time period, ensuring that the execution of the capture instruction is highly consistent with the preset time point. Furthermore, the trigger pulse generation module not only receives the target capture instruction and the pulse-per-second signal but also detects whether the value corresponding to the pulse-per-second signal is an integer. By utilizing the periodicity of the pulse-per-second signal, the module generates a synchronization signal and triggers the camera module to capture only when the value corresponding to the pulse-per-second signal is an integer (i.e., a full second). This effectively avoids false triggering at non-full second times, further improving the accuracy and efficiency of image acquisition.
[0010] In an optional embodiment, the control command also includes an original image readback instruction; the server module is further used to send the original image readback instruction to the communication module; the communication module is further used to receive the original image readback instruction, perform protocol conversion on the original image readback instruction, obtain the target image readback instruction, and send the target image readback instruction to the acquisition module; the acquisition module is further used to receive the target image readback instruction and read back the target facial image data to the server module; wherein the target facial image data is the data after acquisition.
[0011] The facial image acquisition device provided in this embodiment uses the original image readback instruction, and the server module can request image data for a specific time period or under specific conditions at any time as needed, without having to wait until all data is acquired before processing, thereby improving the system's response speed and data processing capabilities.
[0012] In an optional embodiment, the server module is further configured to receive target facial image data and perform modeling processing on the target facial image data to obtain a three-dimensional facial model.
[0013] The facial image acquisition device provided in this embodiment uses 3D modeling to enable the server-side module to more effectively defend against various fraudulent methods, such as photos, video playback, and 3D-printed masks. These fraudulent methods often struggle to perfectly replicate the geometric features and depth information of a real face in 3D space, and are therefore identified and rejected by the system.
[0014] In an optional embodiment, the control command also includes an original time readback instruction; the server module is further used to send the original time readback instruction to the communication module; the communication module is further used to receive the original time readback instruction, perform protocol conversion on the original time readback instruction, obtain the target time readback instruction, and send the target time readback instruction to the acquisition module; wherein the target time readback instruction is an instruction that can be recognized by the acquisition module; the acquisition module is further used to receive the target time readback instruction, and send the corresponding number of second pulse signals to the server module according to the target time readback instruction; the server module is further used to receive the number of target second pulse signals sent by each acquisition module, detect whether the number and count value of the target second pulse signals corresponding to each acquisition module are the same, and if the number and count value of the target second pulse signals corresponding to each acquisition module are the same, generate the original shooting instruction.
[0015] The facial image acquisition device provided in this embodiment uses a time readback instruction to enable the server module to obtain the number of pulse-per-second signals from each acquisition module in real time, i.e., their respective time synchronization status, thereby verifying whether all acquisition modules have reached the expected time synchronization point. Only when the time synchronization status of all acquisition modules is consistent is a capture instruction generated, thus ensuring the synchronization and accuracy of the capture operation.
[0016] In an optional embodiment, the device further includes: an image preprocessing module; the image preprocessing module is used to receive target facial image data and perform histogram equalization processing and image denoising processing on the target facial image data.
[0017] The facial image acquisition device provided in this embodiment uses histogram equalization in its image preprocessing module to achieve a more uniform grayscale distribution, effectively enhancing image contrast and improving image quality. Furthermore, denoising effectively removes this noise, improving image clarity and signal-to-noise ratio, and providing higher-quality image data for subsequent tasks such as facial recognition.
[0018] In an optional embodiment, the acquisition module includes: a first target acquisition module and a second target acquisition module; a server module, further used to receive the number of first target second pulse signals sent by the first target acquisition module in a first preset time period, and detect whether the number of first target second pulse signals and the count value are the same; if the number of first target second pulse signals and the count value are the same, receive the number of second target second pulse signals sent by the second target acquisition module in a second preset time period, detect whether the number of second target second pulse signals and the count value are the same, and if the number of second target second pulse signals and the count value are the same, generate an original shooting instruction.
[0019] The facial image acquisition device provided in this embodiment can more accurately ensure that all acquisition modules are highly synchronized in time by separately verifying whether the number of second pulse signals of two or more acquisition modules is consistent with the count value. This double or multiple verification mechanism reduces time synchronization problems caused by single module failure or error, and improves the time synchronization accuracy of the entire system.
[0020] In a second aspect, the present invention provides a facial image acquisition method, which is applied to the facial image acquisition system of the first aspect. The method includes: a server module generates a control command and sends the control command to a communication module; wherein the control command includes: an original timing instruction, an original shooting instruction and an original generation instruction, and the original shooting instruction and the original generation instruction are both instructions generated when the count value of the server module is the same as the number of second pulse signals of different acquisition modules; the communication module receives the timing instruction, performs protocol conversion processing on the original timing instruction to obtain a target timing instruction, performs protocol conversion processing on the original shooting instruction to obtain a target shooting instruction, performs protocol conversion processing on the original generation instruction to obtain a target generation instruction, and sends the target timing instruction, target shooting instruction and target generation instruction to the acquisition module; wherein the target timing instruction, target shooting instruction and target generation instruction are all commands that can be recognized by the acquisition module; the acquisition module receives the target timing instruction and the target shooting instruction, parses the target timing instruction, determines the initial second value in the target timing instruction, counts according to the initial second value within a preset time period, generates a second pulse signal corresponding to each count, generates a synchronization signal when the target generation instruction is received, and performs face image acquisition according to the synchronization signal and the target shooting instruction. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 is a structural block diagram of a face image acquisition device according to an embodiment of the present invention;
[0023] Figure 2 is a structural block diagram of another facial image acquisition device according to an embodiment of the present invention;
[0024] Figure 3 is a structural block diagram of another face image acquisition device according to an embodiment of the present invention;
[0025] Figure 4is a schematic structural diagram of a CAN frame according to an embodiment of the present invention;
[0026] Figure 5 is a structural block diagram of another face image acquisition device according to an embodiment of the present invention;
[0027] Figure 6 4 is a flow chart of a facial image acquisition method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0029] Based on relevant technologies, image-based modeling methods use a single or multiple 2D facial images as input and reconstruct the 3D structure of the face through image processing algorithms and computer vision techniques, such as feature point detection, stereo matching, and depth estimation. Depending on the number of input images, this can be further categorized into single-view modeling, dual-view modeling, and multi-view modeling. Multi-view modeling, by combining multiple facial images taken from different angles with camera calibration and image registration techniques, can significantly improve the accuracy and realism of 3D reconstruction.
[0030] Combine Figure 1 As shown, the system utilizes an image sensor and a processor. The image sensor comprises a first image sensor and a second image sensor, which capture the left and right facial regions, respectively. The first and second image sensors, respectively, consist of two infrared cameras, a color camera, and an infrared speckle detector. This allows for simultaneous capture of both left and right faces. The acquisition scheme is based on receiving image acquisition commands. The processor generates a 3D point cloud from the left and right facial images and fuses them to form a 3D facial model.
[0031] However, in multi-view image-based modeling methods, synchronous acquisition of multiple cameras is key to ensuring 3D reconstruction accuracy. However, in practice, it is often difficult to ensure that all cameras accurately capture facial images at the same time, resulting in deviations in the reconstruction results.
[0032] like Figure 2As shown, according to an embodiment of the present invention, an embodiment of a face image acquisition device is provided, which includes: a server module 201, a communication module 202 and at least two acquisition modules 203; the server module 201 is used to generate a control command and send the control command to the communication module 202; wherein the control command includes: an original timing instruction, an original shooting instruction and an original generation instruction, and the original shooting instruction and the original generation instruction are both instructions generated when the count value of the server module 201 and the number of second pulse signals of different acquisition modules 203 are the same; the communication module 202 is used to receive the timing instruction, perform protocol conversion processing on the original timing instruction to obtain the target timing instruction, and perform protocol conversion processing on the original shooting instruction. The target shooting instruction is obtained by performing protocol conversion on the original generation instruction to obtain the target generation instruction, and the target timing instruction, the target shooting instruction and the target generation instruction are sent to the acquisition module 203; wherein the target timing instruction, the target shooting instruction and the target generation instruction are all commands that can be recognized by the acquisition module 203; the acquisition module 203 is used to receive the target timing instruction and the target shooting instruction, parse the target timing instruction, determine the initial second value in the target timing instruction, count according to the initial second value within a preset time period, generate a second pulse signal corresponding to each count, and when the target generation instruction is received, generate a synchronization signal, and perform face image acquisition according to the synchronization signal and the target shooting instruction.
[0033] A control command is a command generated by the server module 201 and sent to the communication module 202. The control command may include, for example, an original timing instruction, an original capture instruction, and an original generation instruction. A pulse-per-second signal may be a signal generated by the acquisition module 203 within a preset time period based on an initial second value after receiving the target timing instruction. Each pulse-per-second signal represents a one-second interval and is used to ensure time synchronization between the acquisition module 203 and the server module 201. A synchronization signal may be a signal generated by the acquisition module 203 upon receiving the target generation instruction to trigger facial image acquisition. The synchronization signal may include a line synchronization signal and a field synchronization signal to ensure image acquisition accuracy.
[0034] The server module 201 is responsible for controlling and managing the entire facial image acquisition device, coordinating the operations of various modules. Specifically, the server module 201 generates and sends control commands to the communication module 202. It can periodically generate primitive timing commands to ensure time synchronization among the acquisition modules 203. When the number of pulse-per-second signals from all acquisition modules 203 matches the count value, a primitive capture command is generated. Primitive capture commands are also generated when necessary to trigger synchronization signals and image acquisition in the acquisition modules 203.
[0035] In one possible implementation, the method for periodically generating timing instructions can use a timer or clock service to implement a timing function, ensuring the periodic transmission of timing instructions. To detect the number of PPS signals, a counter can be set to record the number of PPS signals sent by each acquisition module 203 and compare it with the count value of the server module 201. When the number of PPS signals from all acquisition modules 203 is detected to be the same as the count value, a conditional statement can be used to generate the original capture instruction.
[0036] The communication module 202 acts as a bridge between the server module 201 and the acquisition module 203. It is responsible for receiving control commands sent by the server module 201 and performing protocol conversion so that the control commands can be recognized and executed by the acquisition module 203. At the same time, it is also responsible for transmitting data from the acquisition module 203 back to the server module 201.
[0037] The communication module 202 can be a Universal Serial Bus (USB) to Controller Area Network (CAN) bus module. In this embodiment, commands and data can be transmitted using a CAN bus network structure. Specifically, the communication module 202 receives control commands sent by the server module 201 and performs protocol conversion processing to generate target instructions (such as target acquisition commands, target generation commands, and target shooting commands) that can be recognized by the acquisition module 203. At the same time, the data and status information of the acquisition module 203 are transmitted back to the server module 201.
[0038] The acquisition module 203 can be used for data acquisition. Specifically, the acquisition module 203 can receive target timing instructions for time synchronization, and can also receive target capture instructions and target generation instructions for facial image acquisition. Specifically, the acquisition module 203 receives and parses the target timing instructions, generates a pulse-per-second signal within a preset time period, and sends the number of pulse-per-second signals to the server module 201 for verification. When verification is successful, it indicates time synchronization between the acquisition modules 203. When the time synchronization between the acquisition modules 203 is achieved, the acquisition module 203 receives and parses the target capture instruction and waits for the arrival of a synchronization signal. Upon receiving the synchronization signal, the facial image acquisition task is triggered, and the collected image data is sent to the server module 201 or a designated location for storage.
[0039] In one possible implementation, a pulse-per-second signal can be generated using a counter or timer. Whenever the counter reaches a preset threshold, a pulse-per-second signal is generated and sent to the server module 201 for verification. Image capture can be accomplished using a camera or other image acquisition device to capture facial images. Upon receiving a synchronization signal, an image capture task can be triggered, and the captured image data can be processed using an image processing library or framework.
[0040] The facial image acquisition device provided in this embodiment uses the original timing instructions generated by the server module and then sent to the acquisition module after protocol conversion by the communication module. This ensures that all acquisition modules can obtain accurate and consistent initial second values when receiving the target timing instructions, thereby avoiding the problem of inconsistent image acquisition due to time differences. In addition, the communication module is responsible for receiving control commands from the server module and converting them into target instructions that the acquisition module can recognize. This process not only simplifies the design of the acquisition module, but also improves the communication efficiency of the entire system and the accuracy of instruction execution. At the same time, the protocol conversion process also enhances the compatibility and scalability of the system.
[0041] Combine Figure 3 As shown, in an optional embodiment, the acquisition module 203 includes: a command parsing module 2031, a second pulse generating module 2032, a trigger pulse generating module 2033 and a camera module 2034; the command parsing module 2031 is used to receive the target timing instruction, parse the target timing instruction, and determine the initial second value in the target timing instruction; the second pulse generating module 2032 counts according to the initial second value within a preset time period, generates a second pulse signal corresponding to each count, and sends the second pulse signal to the trigger pulse generating module 2033; the trigger pulse generating module 2033 is used to receive the target shooting instruction and the second pulse signal, and when the target generation instruction is received and the value corresponding to the second pulse signal is detected to be an integer, when the value corresponding to the second pulse signal is an integer, a synchronization signal is generated, and the camera module 2034 is controlled to perform face image acquisition according to the synchronization signal and the target shooting instruction.
[0042] The command parsing module 2031 is used to parse commands issued by the server module 201, primarily including the original capture command, original timing command, original time readback command, and original image readback command. The original capture command is used to initiate control of the camera module 2034 and initiate the capture operation; the original timing command is used to assign the same initial time to each acquisition unit. The original time readback command is used to read the real-time time of each acquisition unit. The original image readback command is used to read captured image data from the image acquisition unit to the server module 201. The time readback command and image readback command are described in detail below.
[0043] Specifically, the command parsing module 2031 can be responsible for receiving the target timing instruction input by the server module 201, parsing the target timing instruction, and extracting the key initial second value information from it. This is the starting point for the entire acquisition module 203 to start and subsequent operations. The second pulse generation module 2032 can count within a preset time period based on the initial second value provided by the command parsing module 2031 and generate a second pulse signal at each counting point. The trigger pulse generation module 2033 can receive the second pulse signal and target shooting instruction from the second pulse generation module 2032. When specific conditions are met (such as the value corresponding to the second pulse signal is an integer and the target shooting instruction is received), the module generates a synchronization signal and controls the camera module 2034 to capture facial images accordingly. The camera module 2034 integrates electronic components such as image sensors and image processors and is used to capture, process, and transmit image signals. Specifically, facial images can be captured according to the instructions of the trigger pulse generation module 2033.
[0044] In one possible implementation, the pulse-per-second generation module 2032 can use a programmable logic device such as a field-programmable gate array (FPGA) to achieve high-precision timing and signal generation functions. It can also be implemented using a microcontroller such as an advanced reduced instruction set computer (ARM) or a digital signal processing (DSP) in combination with a high-precision clock source. For the trigger pulse generation module 2033, software simulation can be considered to achieve synchronization signal generation and control logic. For the camera module 2034, depending on the application scenario, a camera module 2034 with different resolutions, frame rates, light sensitivities, and focal lengths can be selected. A face recognition algorithm can also be integrated into the camera module 2034 to achieve face recognition functions, etc., which are not specifically limited here and can be implemented by those skilled in the art.
[0045] For example, in a facial recognition access control system, facial images need to be automatically captured at 9:00 a.m. every day. At this point, the command parsing module 2031 receives a target timing instruction containing an initial second value (e.g., the number of seconds corresponding to 9:00 a.m. that day, assuming it is 32400 seconds) and parses this value. The pulse-per-second generation module 2032 starts counting from the moment the instruction is received and generates a pulse-per-second signal every second. When the counter reaches 32400, it indicates that 9:00 a.m. has arrived. The trigger pulse generation module 2033 monitors the pulse-per-second signal and the target capture instruction (in this case, the preset automatic capture instruction) in real time. When the value corresponding to the pulse-per-second signal is 32400 and the target capture instruction is received, it generates a synchronization signal and controls the camera module 2034 to capture facial images. Upon receiving the control signal, the camera module 2034 activates the image sensor to capture the image. The captured image is pre-processed by the image processor and then transmitted to the access control system's host computer for facial recognition and verification.
[0046] Combine Figure 4 As shown in Table 1, the arbitration segment contains each node's ID information, while the command type and content are contained in the data segment. The data segment of each frame is fixed at 8 bytes and consists of 32'h1acffcld+0 server module 201ODE+DATA. 32'h1acffc1d distinguishes the command packet header from normal data packets. By parsing the CAN data frame, the data information corresponding to each command is determined.
[0047] Table 1
[0048]
[0049]
[0050] In Table 1, the data segment format corresponding to the original capture command is "32'h1acffcld+2'b00+30'd0," and the data segment format corresponding to the original timing command is "32'h1acffcld+2'b01+30'd0." The data segment format corresponding to the time readback command is "32'h1acffcld+2'b10+30'd0." The data segment format corresponding to the image readback command is "32'h1acffcld+2'b11+30'd0."
[0051] The facial image acquisition device provided in this embodiment uses a command parsing module to parse the initial second value in the target timing instruction. Based on this initial value, the pulse-per-second generation module accurately generates a pulse-per-second signal within a preset time period, ensuring that the execution of the capture instruction is highly consistent with the preset time point. Furthermore, the trigger pulse generation module not only receives the target capture instruction and the pulse-per-second signal but also detects whether the value corresponding to the pulse-per-second signal is an integer. By utilizing the periodicity of the pulse-per-second signal, the module generates a synchronization signal and triggers the camera module to capture only when the value corresponding to the pulse-per-second signal is an integer (i.e., a full second). This effectively avoids false triggering at non-full second times and improves the accuracy and efficiency of image acquisition.
[0052] In an optional embodiment, the control command also includes an original image readback instruction; the server module 201 is further used to send the original image readback instruction to the communication module 202; the communication module 202 is further used to receive the original image readback instruction, perform protocol conversion on the original image readback instruction, obtain the target image readback instruction, and send the target image readback instruction to the acquisition module 203; the acquisition module 203 is further used to receive the target image readback instruction and read back the target facial image data to the server module 201; wherein the target facial image data is the data after acquisition.
[0053] The original image read-back instruction can be used to request to read back the original image data that has been collected and stored from the acquisition module 203. Specifically, the server module 201 constructs an original image read-back instruction containing a specific identifier (such as image ID, timestamp, etc.) according to business needs or user requests. The instruction is sent to the communication module 202 through an internal interface or a message queue. Specifically, the original image read-back instruction can be sent through HTTP API calls, TCP / IP socket communication, or message queues (such as RabbitMQ, Kafka). For example: the server module 201 sends a JSON object containing an image ID to the communication module 202 through an HTTP POST request, requesting to read back the original facial image corresponding to the ID.
[0054] The communication module 202 listens for the original image read-back instruction from the server module 201. After receiving the original image read-back instruction, the instruction is parsed and converted according to the predetermined protocol specification to generate a target image read-back instruction that can be recognized by the acquisition module 203. Specifically, a customized protocol parser and converter can be used, or an existing communication framework (such as Netty, gR server module 201) can be used for implementation, etc., which is not specifically limited here and can be implemented by those skilled in the art. Among them, the conversion process may include data type conversion, encoding conversion, etc. For example: the communication module 202 receives an original image read-back instruction in JSON format, converts it into a target image read-back instruction in binary format, and sends it to the acquisition module 203.
[0055] The acquisition module 203 listens for instructions from the communication module 202. After receiving the target image read-back instruction, the corresponding target facial image data is retrieved from the storage medium according to the identifier in the instruction (such as the image ID). The retrieved image data is sent back to the server module 201 through the communication module 202. Specifically, the acquisition module 203 can store the image data in a local file system, a database, or cloud storage. The read-back process may involve data compression, encryption, and other processing to ensure data transmission efficiency and security. For example: the acquisition module 203 reads a facial image file in JPEG format from the local file system and sends it back to the server module 201 in the form of a binary stream through the communication module 202.
[0056] The facial image acquisition device provided in this embodiment uses the original image readback instruction, and the server module can request image data for a specific time period or under specific conditions at any time as needed, without having to wait until all data is acquired before processing, thereby improving the system's response speed and data processing capabilities.
[0057] In an optional embodiment, the server module 201 is further configured to receive target facial image data, and perform modeling processing on the target facial image data to obtain a three-dimensional facial model.
[0058] When the server module 201 receives the target facial image data sent by the acquisition module 203 through the communication module 202, it first verifies and preprocesses the target facial image data. Specifically, this may include checking the integrity of the data, whether the format is correct, and possible preprocessing steps such as noise removal and lighting balancing.
[0059] Specifically, before modeling, the image needs to be pre-processed in depth to meet the needs of the three-dimensional modeling algorithm. Specifically, it may include: face detection: accurately locating the position and size of the face in the image. Face alignment: rotating, scaling, and translating the detected face image to a standard posture for subsequent processing. Feature point extraction: marking key feature points (such as eyes, nose, mouth, etc.) on the face image, which will be used for subsequent model construction. It can then be used to construct a three-dimensional face model from the two-dimensional image, including but not limited to: statistical model-based methods: such as 3D Morphable Models (3DMM). This method generates a three-dimensional face model by training a statistical model of the three-dimensional face shape and using the feature point information in the two-dimensional image to fit the model parameters. If there are multiple two-dimensional face images taken from different angles, the principle of multi-view geometry can be used to reconstruct the three-dimensional model, etc., which is not specifically limited here and can be implemented by those skilled in the art.
[0060] More specifically, for the server module 201, the specific steps for implementing the modeling process may include: selecting the most suitable modeling algorithm based on application requirements and available resources. Integrating the selected algorithm into the server module 201 to ensure that it can work seamlessly with other parts of the module. Tuning the algorithm parameters to obtain the best three-dimensional modeling effect. Optimizing the performance of the modeling process to ensure that it can efficiently process large amounts of image data. For example: The server module 201 uses a 3DMM-based method to perform three-dimensional face modeling. It first uses a face detector to locate the face in the received image and uses a feature point detector to mark the key feature points of the face. Then, it inputs this feature point information into the 3DMM, fits the model parameters through the optimization algorithm, and finally generates a three-dimensional face model. This model may include the shape, texture, and possible expression information of the face.
[0061] The facial image acquisition device provided in this embodiment uses 3D modeling to enable the server-side module to more effectively defend against various fraudulent methods, such as photos, video playback, and 3D-printed masks. These fraudulent methods often struggle to perfectly replicate the geometric features and depth information of a real face in 3D space, and are therefore identified and rejected by the system.
[0062] In an optional embodiment, the control command also includes an original time readback instruction; the server module 201 is further used to send the original time readback instruction to the communication module 202; the communication module 202 is further used to receive the original time readback instruction, perform protocol conversion on the original time readback instruction, obtain the target time readback instruction, and send the target time readback instruction to the acquisition module 203; wherein, the target time readback instruction is an instruction that can be recognized by the acquisition module 203; the acquisition module 203 is further used to receive the target time readback instruction, and send the corresponding number of second pulse signals to the server module 201 according to the target time readback instruction; the server module 201 is further used to receive the number of target second pulse signals sent by each acquisition module 203, detect whether the number and count value of the target second pulse signals corresponding to each acquisition module 203 are the same, and if the number and count value of the target second pulse signals corresponding to each acquisition module 203 are the same, generate an original shooting instruction.
[0063] The original time readback instruction can be used to request the acquisition module 203 to report its current time or time-related status (such as the number of second pulse signals). Specifically, the server module 201 generates the original time readback instruction based on internal logic or external triggers (such as timed tasks). The instruction is sent to the communication module 202 through an internal interface or a message queue. Specifically, the TCP / IP protocol can be used to directly send the instruction. The instruction can also be sent asynchronously through a message queue (such as RabbitMQ, Kafka). The interface provided by the communication module 202 can also be called using the HTTP REST API, etc., which is not specifically limited here and can be implemented by those skilled in the art.
[0064] The instructions are converted into target time readback instructions according to predefined protocol mapping or conversion rules. The instructions can be sent to the acquisition module 203 via a physical connection (such as a serial port, Ethernet) or a wireless connection (such as Wi-Fi, Bluetooth). Specifically, industrial communication protocols such as Modbus and CAN can be used for conversion and transmission.
[0065] The acquisition module 203 receives the target time readback instruction and reads the number of pulse-second signals from an internal or external time source (such as a GPS receiver). This number is encoded into a data packet and sent back to the communication module 202 via the same communication channel. Specifically, the number of pulse-seconds since the last synchronization can be directly counted. Alternatively, the number of pulse-seconds can be calculated using a timestamp and an internal clock.
[0066] Communication module 202 receives data packets from acquisition module 203 and performs necessary decoding and verification. It then forwards the decoded PPS signal count to server module 201. Server module 201 compares the PPS signal counts reported by all acquisition modules 203 with its own count. Specifically, a hash table or dictionary can be used to store the PPS signal counts for each acquisition module 203.
[0067] When the number of pulse-per-second signals reported by all acquisition modules 203 matches the count value of the server module 201, the server module 201 generates an original capture instruction. This instruction is sent to the corresponding module (e.g., the image acquisition module 203) to trigger the capture operation. Specifically, the capture instruction can be sent directly to the image acquisition module 203 via the communication module 202. Alternatively, the capture instruction can be stored in a task queue and asynchronously executed by another processing thread or process. This is not specifically limited here and can be implemented by those skilled in the art.
[0068] The facial image acquisition device provided in this embodiment uses a time readback instruction to enable the server module to obtain the number of pulse-per-second signals from each acquisition module in real time, i.e., their respective time synchronization status, thereby verifying whether all acquisition modules have reached the expected time synchronization point. Only when the time synchronization status of all acquisition modules is consistent is a capture instruction generated, thus ensuring the synchronization and accuracy of the capture operation.
[0069] In one possible implementation, the communication module 202 is capable of receiving data packets from multiple collection modules 203. Each data packet contains a unique identifier (e.g., ID) for the collection module 203 and the number of pulse-second signals reported by the collection module 203. The communication module 202 can continuously monitor the communication port from the collection module 203, receive data packets, and then decode the received data packets according to a predefined protocol to extract the ID of the collection module 203 and the number of pulse-second signals. The integrity and consistency of the data packets are then verified to ensure that the data has not been tampered with or corrupted. After successful decoding and verification, the communication module 202 forwards the processed data (i.e., the ID of the collection module 203 and the corresponding number of pulse-second signals) to the server module 201.
[0070] The server module 201 can maintain a data structure (such as a hash table or dictionary) to store the number of pulse-second signals from each acquisition module 203. This data structure uses the ID of the acquisition module 203 as the key and the number of pulse-second signals as the value. The server module 201 can receive data from the communication module 202 and store it in the aforementioned data structure. Based on the system clock or other reliable time source, the server module 201 generates its own count value, which should have the same dimension and precision as the number of pulse-second signals. The stored data structure is then traversed, comparing the number of pulse-second signals reported by each acquisition module 203 with the count value of the server module 201. A fault tolerance mechanism is configured to allow for differences within a certain range (e.g., ±1 second, with the specific threshold determined based on system requirements and network conditions). If the number of pulse-second signals reported by all acquisition modules 203 matches the count value of the server module 201 within the fault tolerance range, the next step is executed; otherwise, an error is recorded and an alarm or retry mechanism may be triggered.
[0071] In order to achieve the robustness and reliability of the system, the following fault-tolerant mechanisms and error handling processes should be configured: Difference threshold: Set a reasonable difference threshold to determine whether the number of second pulse signals reported by the acquisition module 203 matches the count value of the server module 201. Error recording: When the difference is found to exceed the threshold, the error details are recorded, including the time of occurrence, the acquisition module 203 ID involved, the number of second pulse signals, the server count value, and the difference value. Alarm triggering: According to the system configuration, when the error reaches a certain level (such as multiple consecutive errors or a specific type of error), an alarm is triggered to notify the system administrator. Retry mechanism: For differences caused by network delays or temporary problems, a retry mechanism can be configured to re-request the number of second pulse signals from the acquisition module 203 after a period of time and re-compare.
[0072] In an optional embodiment, the device further includes: an image preprocessing module; the image preprocessing module is used to receive target facial image data and perform histogram equalization processing and image denoising processing on the target facial image data.
[0073] The image preprocessing module is used to perform a series of processing on the image before the image is further analyzed or used in the machine learning model to improve the quality and applicability of the image.
[0074] Histogram equalization adjusts the image's histogram distribution to make the pixel grayscale values more evenly distributed, thereby improving the image's visual quality and the performance of subsequent processing. Image denoising reduces or eliminates noise in an image. Noise can be caused by various factors during image acquisition (such as sensor noise and environmental noise). Denoising aims to improve image clarity and signal-to-noise ratio.
[0075] The specific content of histogram equalization processing can be: statistically calculating the grayscale histogram of the image, and based on the distribution of the histogram, performing nonlinear stretching on the grayscale value of each pixel in the image to make the histogram distribution of the output image more uniform. Specifically, the histogram of the entire image can be equalized through global histogram equalization. Alternatively, the image can be divided into multiple sub-blocks through local histogram equalization, and histogram equalization processing can be performed on each sub-block to better preserve the local details of the image. Adaptive histogram equalization can also be used to dynamically adjust the parameters of histogram equalization based on the local characteristics of the image. For example, using global histogram equalization to process a low-contrast image makes the details of the bright and dark parts of the image clearer.
[0076] Image denoising involves analyzing the characteristics of noise in an image and employing appropriate algorithms to reduce or eliminate it while preserving as much useful information as possible. Specifically, replacing the value of a pixel with the median of all points in its neighborhood can be used to remove noise such as salt and pepper noise. Alternatively, replacing the value of a pixel with the average of all points in its neighborhood can be used to remove Gaussian noise, but this may blur the image. Alternatively, wavelet decomposition can be performed on the image signal, followed by thresholding the high-frequency coefficients and reconstructing the image signal, which is suitable for removing various types of noise. For example, using a wavelet denoising algorithm to process an image containing Gaussian noise effectively removes the noise while preserving image detail.
[0077] The facial image acquisition device provided in this embodiment uses histogram equalization in its image preprocessing module to achieve a more uniform grayscale distribution, effectively enhancing image contrast and improving image quality. Furthermore, denoising effectively removes this noise, improving image clarity and signal-to-noise ratio, and providing higher-quality image data for subsequent tasks such as facial recognition.
[0078] In an optional embodiment, the acquisition module 203 includes: a first target acquisition module and a second target acquisition module; a server module 201, further used to receive the number of first target second pulse signals sent by the first target acquisition module in a first preset time period, and detect whether the number of first target second pulse signals and the count value are the same; if the number of first target second pulse signals and the count value are the same, receive the number of second target second pulse signals sent by the second target acquisition module in a second preset time period, detect whether the number of second target second pulse signals and the count value are the same, and if the number of second target second pulse signals and the count value are the same, generate an original shooting instruction.
[0079] The first target acquisition module is a specific acquisition module 203 that is responsible for collecting and transmitting the number of pulse-per-second signals within a specific time period (a first preset time period). These signals are typically used for time synchronization or measurement purposes. The second target acquisition module is similar to the first target acquisition module, but it is another independent acquisition module 203 and may operate within a different time period (a second preset time period). It is also responsible for collecting and transmitting the number of pulse-per-second signals. The first preset time period can be before the second preset time period. For example, if the first preset time period is 10 minutes 10 seconds to 10 minutes 20 seconds, the second preset time period can be 10 minutes 20 seconds to 10 minutes 30 seconds, etc., and no specific limitation is given here.
[0080] Specifically, the server module 201 receives the number of pulse-second signals sent by the first target acquisition module within a first preset time period. Data can be received via network communication protocols such as TCP / IP and UDP. Data can also be stored and forwarded using middleware such as message queues and databases. This is not specifically limited here and will be understood by those skilled in the art. For example, the server module 201 receives a data packet containing the number of pulse-second signals sent by the first target acquisition module via a TCP connection. The server module 201 compares the received number of pulse-second signals with its own generated count value. For example, if the count value of the server module 201 is 60 (assuming the number of seconds in a minute) and the received number of pulse-second signals is also 60, the server module 201 determines that the number of pulse-second signals is the same. The server module 201 receives the number of pulse-second signals sent by the second target acquisition module within a second preset time period. The server module 201 detects whether the number of pulse-second signals from the second target acquisition module and the count value are identical. If the number of pulse-second signals from both the first and second target acquisition modules is identical to the count value of the server module 201, the server module 201 generates and sends an original capture instruction.
[0081] In a specific application scenario, the server module 201 sends an original timing instruction through the communication module 202. The timing value under the parameters of the original timing instruction is a real-time second value converted by the server module 201 according to the system time.
[0082] Each acquisition module 203 (such as the first acquisition module 203, the second acquisition module 203, etc.) counts according to the initial second value, generates a pulse and saves the real-time counting time.
[0083] After 10 seconds, the server module 201 reads back the second count value of the first acquisition module 203 to determine whether it is consistent with the timing value of the server module 201 .
[0084] If they are consistent, after 10 seconds, the second count value of the second acquisition module 203 of the server module 201 is judged to be consistent with the timing value of the server module 201 system.
[0085] If they are consistent, after 10 seconds, the server module 201 reads back the second count value of the third acquisition module 203 to determine whether it is consistent with the timing value of the server module 201.
[0086] If they are consistent, it indicates that the time of the first acquisition module 203, the second acquisition module 203 and the third acquisition module 203 have achieved the effect of synchronization.
[0087] The facial image acquisition device provided in this embodiment can more accurately ensure that all acquisition modules are highly synchronized in time by separately verifying whether the number of second pulse signals of two or more acquisition modules is consistent with the count value. This double or multiple verification mechanism reduces time synchronization problems caused by single module failure or error, and improves the time synchronization accuracy of the entire system.
[0088] In one possible implementation, combining Figure 5 As shown, this embodiment provides a structural block diagram of a face image acquisition device.
[0089] The facial image acquisition device consists of a computer, a USB-to-CAN tool (also known as the aforementioned communication module 202), and three acquisition modules 203. Each acquisition module 203 comprises a command parsing module 2031, a pulse-per-second generation module 2032, a camera module 2034, a trigger pulse generation module 2033, a first camera module 1000, and a second camera module 2000. The three acquisition modules 203 are connected via a CAN bus.
[0090] The image acquisition unit can be a field programmable gate array (FPGA) used to control the acquisition work of the two cameras. Since FPGA has the ability of parallel processing, it can realize simultaneous control of the two cameras. The first acquisition module 203 is used to realize the acquisition of left face image data, the second acquisition module 203 is used to acquire right face image data, and the third acquisition module 203 is used to acquire frontal images. The three-dimensional face image acquisition device is placed within a range of 0.5-1m from the human body and uses structural parts to form a ring structure, so that the first acquisition module 203 can acquire left face image data, the second acquisition module 203 can acquire right face image data, and the third acquisition module 203 can acquire frontal images. The server module 201 completes the modeling of the three-dimensional face model based on the six images collected through modeling software.
[0091] The facial image acquisition device provided in this embodiment uses the original timing instructions generated by the server module and then sent to the acquisition module after protocol conversion by the communication module. This ensures that all acquisition modules can obtain accurate and consistent initial second values when receiving the target timing instructions, thereby avoiding the problem of inconsistent image acquisition due to time differences. In addition, the communication module is responsible for receiving control commands from the server module and converting them into target instructions that the acquisition module can recognize. This process not only simplifies the design of the acquisition module, but also improves the communication efficiency of the entire system and the accuracy of instruction execution. At the same time, the protocol conversion process also enhances the compatibility and scalability of the system.
[0092] According to an embodiment of the present invention, an embodiment of a facial image acquisition method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0093] In this embodiment, a facial image acquisition method is provided, which can be used in the facial image acquisition device described above. Figure 6 FIG. 1 is a flow chart of a facial image acquisition method according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:
[0094] In step S601, the server module generates a control command and sends the control command to the communication module. The control command includes an original timing instruction, an original shooting instruction, and an original generation instruction. The original shooting instruction and the original generation instruction are both instructions generated when the count value of the server module is the same as the number of second pulse signals of different acquisition modules.
[0095] In step S602, the communication module receives the timing instruction, performs protocol conversion processing on the original timing instruction to obtain a target timing instruction, performs protocol conversion processing on the original shooting instruction to obtain a target shooting instruction, performs protocol conversion processing on the original generation instruction to obtain a target generation instruction, and sends the target timing instruction, target shooting instruction, and target generation instruction to the acquisition module; wherein the target timing instruction, target shooting instruction, and target generation instruction are all commands that can be recognized by the acquisition module.
[0096] In step S603, the acquisition module receives the target timing instruction and the target shooting instruction, parses the target timing instruction, determines the initial second value in the target timing instruction, counts according to the initial second value within a preset time period, and generates a second pulse signal corresponding to each count. When a target generation instruction is received, a synchronization signal is generated, and facial image acquisition is performed according to the synchronization signal and the target shooting instruction.
[0097] The facial image acquisition method provided in this embodiment uses the original timing instructions generated by the server module and then sent to the acquisition module after protocol conversion by the communication module. This ensures that all acquisition modules can obtain accurate and consistent initial second values when receiving the target timing instructions, thereby avoiding image acquisition inconsistencies caused by time differences. Furthermore, the communication module is responsible for receiving control commands from the server module and converting them into target instructions that the acquisition module can recognize. This process not only simplifies the design of the acquisition module but also improves the communication efficiency of the entire system and the accuracy of instruction execution. Furthermore, the protocol conversion process also enhances the compatibility and scalability of the system.
[0098] In an optional embodiment, the acquisition module includes: a command parsing module, a second pulse generation module, a trigger pulse generation module and a camera module; wherein the method further includes:
[0099] Step a1: The command parsing module receives the target timing instruction, parses the target timing instruction, and determines the initial second value in the target timing instruction.
[0100] In step a2, the pulse-per-second generation module counts according to the initial second value within a preset time period, generates a pulse-per-second signal corresponding to each count, and sends the pulse-per-second signal to the trigger pulse generation module.
[0101] Step a3, the trigger pulse generation module receives the target shooting instruction and the second pulse signal. When the target generation instruction is received and the value corresponding to the second pulse signal is detected to be an integer, a synchronization signal is generated when the value corresponding to the second pulse signal is an integer, and the camera module is controlled to collect facial images according to the synchronization signal and the target shooting instruction.
[0102] In an optional embodiment, the control command further includes an image readback instruction; wherein the method further includes:
[0103] Step b1: The server module sends an image read-back instruction to the communication module.
[0104] Step b2: the communication module receives the image read-back instruction, performs protocol conversion on the image read-back instruction, obtains the target image read-back instruction, and sends the target image read-back instruction to the acquisition module.
[0105] Step b3: the acquisition module receives the target image read-back instruction and reads the target facial image data back to the server module; wherein the target facial image data is the acquired data.
[0106] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A facial image acquisition device, characterized in that: The device comprises: a server module, a communication module and at least two acquisition modules; The server module is used to generate a control command and send the control command to the communication module; wherein the control command includes: an original timing instruction, an original shooting instruction and an original generation instruction, and the original shooting instruction and the original generation instruction are both instructions generated when the count value of the server module and the number of second pulse signals of different acquisition modules are the same; The communication module is used to receive the timing instruction, perform protocol conversion processing on the original timing instruction to obtain a target timing instruction, perform protocol conversion processing on the original shooting instruction to obtain a target shooting instruction, perform protocol conversion processing on the original generation instruction to obtain a target generation instruction, and send the target timing instruction, the target shooting instruction and the target generation instruction to the acquisition module; wherein the target timing instruction, the target shooting instruction and the target generation instruction are all commands that can be recognized by the acquisition module; The acquisition module is used to receive the target timing instruction and the target shooting instruction, parse the target timing instruction, determine the initial second value in the target timing instruction, count according to the initial second value within a preset time period, generate a second pulse signal corresponding to each count, generate a synchronization signal when receiving the target generation instruction, and perform face image acquisition according to the synchronization signal and the target shooting instruction.
2. The facial image acquisition device according to claim 1, characterized in that: The acquisition module includes: a command parsing module, a second pulse generating module, a trigger pulse generating module and a camera module; The command parsing module is used to receive the target timing instruction, parse the target timing instruction, and determine the initial second value in the target timing instruction; The second pulse generation module counts according to the initial second value within a preset time period, generates a second pulse signal corresponding to each count, and sends the second pulse signal to the trigger pulse generation module; The trigger pulse generating module is used to receive the target shooting instruction and the second pulse signal. When the target generation instruction is received and whether the value corresponding to the second pulse signal is an integer is detected, when the value corresponding to the second pulse signal is an integer, a synchronization signal is generated, and the camera module is controlled to collect facial images according to the synchronization signal and the target shooting instruction.
3. The facial image acquisition device according to claim 1, characterized in that: The control command also includes an original image read-back instruction; The server module is further used to send the original image read-back instruction to the communication module; The communication module is further used to receive the original image read-back instruction, perform protocol conversion on the original image read-back instruction to obtain the target image read-back instruction, and send the target image read-back instruction to the acquisition module; The acquisition module is further used to receive the target image read-back instruction and read the target face image data back to the server module; wherein the target face image data is the acquired data.
4. The facial image acquisition device according to claim 3, characterized in that: The server module is further used to receive the target face image data and perform modeling processing on the target face image data to obtain a three-dimensional face model.
5. The facial image acquisition device according to claim 1, characterized in that: The control command also includes an original time readback instruction; The server module is further used to send the original time readback instruction to the communication module; The communication module is further used to receive the original time readback instruction, perform protocol conversion on the original time readback instruction to obtain a target time readback instruction, and send the target time readback instruction to the acquisition module; wherein the target time readback instruction is an instruction that can be recognized by the acquisition module; The acquisition module is further used to receive the target time readback instruction, and send the corresponding number of second pulse signals to the server module according to the target time readback instruction; The server module is further used to receive the number of target second pulse signals sent by each acquisition module, detect whether the number of target second pulse signals corresponding to each acquisition module and the count value are the same, and generate an original shooting instruction if the number of target second pulse signals corresponding to each acquisition module and the count value are the same.
6. The facial image acquisition device according to claim 3, characterized in that: The device also includes: an image preprocessing module; The image preprocessing module is used to receive the target face image data and perform histogram equalization processing and image denoising processing on the target face image data.
7. The facial image acquisition device according to claim 5, characterized in that: The acquisition module includes: a first target acquisition module and a second target acquisition module; The server module is further used to receive the number of first target second pulse signals sent by the first target acquisition module in the first preset time period, and detect whether the number and count value of the first target second pulse signals are the same; if the number and count value of the first target second pulse signals are the same, receive the number of second target second pulse signals sent by the second target acquisition module in the second preset time period, and detect whether the number and count value of the second target second pulse signals are the same; if the number and count value of the second target second pulse signals are the same, generate an original shooting instruction.
8. A facial image acquisition method, characterized in that: The method is applied to the face image acquisition system according to any one of claims 1 to 7; wherein the method comprises: The server module generates a control command and sends the control command to the communication module; wherein the control command includes: an original timing instruction, an original shooting instruction, and an original generation instruction, and the original shooting instruction and the original generation instruction are both instructions generated when the count value of the server module and the number of second pulse signals of different acquisition modules are the same; The communication module receives the timing instruction, performs protocol conversion processing on the original timing instruction to obtain a target timing instruction, performs protocol conversion processing on the original shooting instruction to obtain a target shooting instruction, performs protocol conversion processing on the original generation instruction to obtain a target generation instruction, and sends the target timing instruction, the target shooting instruction and the target generation instruction to the acquisition module; wherein the target timing instruction, the target shooting instruction and the target generation instruction are all commands that can be recognized by the acquisition module; The acquisition module receives the target timing instruction and the target shooting instruction, parses the target timing instruction, determines the initial second value in the target timing instruction, counts according to the initial second value within a preset time period, generates a second pulse signal corresponding to each count, generates a synchronization signal when receiving the target generation instruction, and performs facial image acquisition according to the synchronization signal and the target shooting instruction.
9. The facial image acquisition method according to claim 8, characterized in that: The acquisition module includes: a command parsing module, a second pulse generating module, a trigger pulse generating module and a camera module; wherein the method further includes: The command parsing module receives the target timing instruction, parses the target timing instruction, and determines the initial second value in the target timing instruction; The second pulse generation module counts according to the initial second value within a preset time period, generates a second pulse signal corresponding to each count, and sends the second pulse signal to the trigger pulse generation module; The trigger pulse generating module receives the target shooting instruction and the second pulse signal. When the target generation instruction is received and whether the value corresponding to the second pulse signal is an integer is detected, a synchronization signal is generated when the value corresponding to the second pulse signal is an integer, and the camera module is controlled to collect facial images according to the synchronization signal and the target shooting instruction.
10. The facial image acquisition method according to claim 8, characterized in that: The control command also includes an image readback instruction; wherein the method further includes: The server module sends the image read-back instruction to the communication module; The communication module receives the image read-back instruction, performs protocol conversion on the image read-back instruction to obtain a target image read-back instruction, and sends the target image read-back instruction to the acquisition module; The acquisition module receives the target image read-back instruction and reads the target face image data back to the server module; wherein the target face image data is the acquired data.
