Palm print recognition system based on USB camera

Through the palmprint recognition system based on USB camera, using ordinary USB camera and palmprint recognition APP, the high cost problem of existing technology is solved, and low-cost, high-integration and high-compatibility palmprint recognition is achieved, which is suitable for various computing devices.

CN120689910APending Publication Date: 2025-09-23SHENZHEN FISE TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510932411.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Existing commercial palmprint recognition systems require professional hardware equipment, which leads to high costs and is not conducive to popularization.

Method used

A palmprint recognition system based on a USB camera is adopted, including a terminal device, a USB connection management module, a camera initialization configuration module and a data transceiver processing module. Palmprint collection is realized using an ordinary USB camera and a palmprint recognition APP, which is integrated on the mainboard. High-precision data collection is achieved through USB connection and image processing.

Benefits of technology

It achieves low-cost, high-integration and high-compatibility palmprint recognition, provides excellent user experience, and is plug-and-play via a standard USB interface, making it suitable for various computing devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689910A_ABST
    Figure CN120689910A_ABST
Patent Text Reader

Abstract

The invention provides a palmprint recognition system based on a USB camera. The palmprint recognition system comprises terminal equipment, a camera module and a palmprint recognition APP, wherein the camera module and the palmprint recognition APP are connected through a USB. The terminal device comprises a USB connection management module used for USB connection state detection, role switching and VBUS control, and a camera initialization configuration module used for camera initialization parameter configuration, capability configuration, output format configuration and operation interface management. The processing thread is used for creating request and result metadata queues, receiving image capture requests and handing over the image capture requests to the output thread for processing, processing image data and performing image processing operations including clipping, scaling and format conversion, converting the processed image data into a predetermined output format, managing distribution, enqueue, dequeue and release of a graphics buffer, and outputting the image data to the output thread. And a data transceiving processing module for processing metadata associated with the captured image. The palmprint recognition of the terminal can be realized only by depending on the common USB camera and cooperating with the palmprint recognition APP, the cost is low, and the palmprint recognition popularization is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of palmprint recognition, and in particular to a palmprint recognition system based on a USB camera. Background Art

[0002] With the rapid development of technology, various palmprint recognition systems have been widely used in various fields. However, existing commercial palmprint collectors usually require specialized hardware equipment, which is costly and hinders the popularization of palmprint recognition. Existing technologies lack a solution that can realize palmprint recognition with only a common USB camera and terminal.

[0003] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention

[0004] The present invention provides a palmprint recognition system based on a USB camera. The main purpose of the present invention is to solve the technical problems mentioned in the background technology of the prior art.

[0005] The present invention provides a palmprint recognition system based on a USB camera, which includes a terminal device, a camera module connected to the terminal device via USB communication, and a matching palmprint recognition app; the camera module is used to obtain an image of the user's palm; The terminal device includes a USB connection management module, a camera initialization configuration module and a data transceiver processing module; the USB connection management module is used for USB connection status detection, role switching and VBUS control; the camera initialization configuration module is used for camera initialization parameter configuration, camera capability configuration, output format configuration, and device operation interface management; The data transceiver processing module is used to create request and result metadata queues, receive image capture requests from the device operation interface and hand them over to the output thread for processing, process the image data captured by the camera module and perform image processing operations including cropping, scaling and format conversion, convert the processed image data into a predetermined output format, manage the allocation, enqueueing, dequeueing and release of the graphics buffer, and process metadata associated with the captured image; the palmprint recognition APP is installed in the terminal device and is used to extract and identify palmprint features from the image data obtained by the data transceiver module and output the palmprint recognition results.

[0006] In an optional embodiment of the present invention, the camera initialization configuration module includes: A camera ID generation unit is used to extract the video device number from the device path in the constructor and generate a camera ID using a predetermined offset; A camera characteristic acquisition unit, used to acquire the characteristics of the camera; Camera feature initialization unit, used to initialize the features and capabilities of the camera; The camera enabling unit is used to open the camera device, check whether the input parameter is a null pointer, and notify the callback status based on the check result, check the current status of the device; create a new session instance and adjust the session state based on the result; save the session reference and return the session interface; Output format setting unit, used to set the format and frame rate, initialize supported output formats, process different output characteristics according to the format, calculate the minimum frame rate and set related parameters; A frame rate processing unit, for processing the frame rate, including calculating and retaining the effective frame rate; The session instance creation unit is used to create a session instance and initialize a new external camera device session by passing all necessary parameters.

[0007] In an optional embodiment of the present invention, the camera characteristic acquisition unit includes: The camera status check subunit is used to call the lock protection status check function to check the camera initialization status and return an error value if initialization fails; The data format conversion subunit is used to convert the acquired camera feature metadata into a HIDL compatible format through a data structure conversion function if initialization is successful.

[0008] In an optional embodiment of the present invention, the camera characteristic initialization unit includes: The device file opening subunit is used to open the V4L2 device file by calling the open function in the global space. If the opening fails, an error value is returned. The feature sequence processing subunit is used to initialize the camera features, basic features, control features, output features and device capabilities in sequence after successful opening.

[0009] In an optional embodiment of the present invention, the output format setting unit includes: The format list acquisition subunit is used to call the format list initialization function to obtain the format list supported by the camera device; The device capability determination subunit is used to determine the device capability based on the image data type identifier: An image characteristic configuration subunit, configured to configure color image output characteristics when the color information flag is activated, and to configure depth image output characteristics when the depth information flag is activated; The minimum frame rate calculation subunit is used to call the minimum frame rate calculation function to calculate the minimum frame rate of the camera; The data macro update subunit is used to set the effective area size and pixel array size of the image sensor, and write the effective area size into the camera metadata through the metadata update macro.

[0010] In an optional embodiment of the present invention, the data transceiver processing module includes: The queue creation unit is used to check the validity of the device file descriptor, query the device capabilities and set the manufacturer and model information, create and initialize the output processing thread, initialize the default request template, and create the request and result metadata queues; Camera output stream configuration unit, which is used to check stream combination support, initialize stream buffers, select the best output format, configure stream parameters, allocate intermediate buffers and handle stream configuration; The request capture unit is used to check the session status and request validity, import the request buffer and obtain the frame data, create and submit a series of request objects to the output thread; The request processing unit is used to wait for and process requests, convert frames to the target format, perform format conversion and scaling on the output buffer, generate the target format image and return the processing result; Device stream state management unit, used to set the format, resolution and configure the frame rate, request the buffer and start streaming, and manage the frame buffer queue; Metadata processing unit, used to update metadata according to request status, generate result callbacks and manage templates; The buffer management unit is used to import and manage the buffer life cycle, clean up the buffers that are no longer used and keep them synchronized.

[0011] In an optional embodiment of the present invention, the USB connection management module includes: An ID pin interrupt trigger unit, configured to detect a low-level state by reading the ID pin value when a camera module is inserted, and respond to the low-level state to trigger a camera detection process; The USB role switching unit is used to read the low level state of the ID pin to determine the USB role requirement and switch the USB role of the controller through system calls; VBUS control unit, used to enable the OTG output function according to the low level state of the ID pin and set the OTG current limit to ensure power safety.

[0012] In an optional embodiment of the present invention, the USB connection management module further includes: The USB Hub reset unit is used to reset the USB Hub through low-high level conversion to ensure that the USB Hub is correctly initialized in host mode.

[0013] A data switch opening unit is used to connect the USB data line to the host controller; The system event notification unit is used to notify the system USB Host driver to enumerate the camera device, load the corresponding camera driver and generate the device node.

[0014] Beneficial effects: The present invention provides a palmprint recognition system based on a USB camera, comprising a terminal device, a USB-connected camera module, and a palmprint recognition app; the terminal device comprises a USB connection management module for USB connection status detection, role switching, and VBUS control, a camera initialization configuration module for camera initialization parameter configuration, capability configuration, output format configuration, and operation interface management; and a data transceiver processing module for creating request and result metadata queues, receiving image capture requests and handing them over to an output thread for processing, processing image data and performing image processing operations including cropping, scaling, and format conversion, converting the processed image data into a predetermined output format, managing the allocation, enqueuing, dequeuing, and release of a graphics buffer, and processing metadata associated with the captured image. The present invention only requires an ordinary USB camera and a palmprint recognition app to implement palmprint recognition at the terminal, which is low-cost and facilitates the popularization of palmprint recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is a schematic diagram of an embodiment of a palmprint recognition system based on a USB camera of the present invention; Figure 2 This is a timing diagram of the configuration process of a camera initialization configuration module of the present invention; Figure 3 The figure is a timing diagram of the processing process of a data transceiver processing module of the present invention.

[0016] Figure 4 The figure is a timing diagram of the connection process of a USB connection management module of the present invention. DETAILED DESCRIPTION

[0017] The terms "first," "second," "third," "fourth," and so on (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that shown or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.

[0018] See also Figure 1The present invention provides a palmprint recognition system based on a USB camera, the palmprint recognition system includes a terminal device, a camera module connected to the terminal device via USB communication, and a matching palmprint recognition APP (i.e., the palmprint APP in the figure); the camera module is used to obtain a user's palm image; the terminal device includes a USB connection management module (i.e., the USB module in the figure), a camera initialization configuration module (i.e., the device identification and initialization module in the figure), and a data transceiver processing module (i.e., the data processing module in the figure); the USB connection management module is used for USB connection status detection, role switching, and VBUS control; the camera initialization configuration module is used for initializing camera parameters Configuration, camera capability configuration, output format configuration, and device operation interface management; the data transceiver processing module is used to create request and result metadata queues, receive image capture requests from the device operation interface and hand them over to the output thread for processing, process the image data captured by the camera module and perform image processing operations including cropping, scaling and format conversion, convert the processed image data into a predetermined output format, manage the allocation, enqueueing, dequeueing and release of the graphics buffer, and process metadata associated with the captured image; the palmprint recognition APP is installed in the terminal device and is used to extract and identify palmprint features from the image data obtained by the data transceiver module, and output the palmprint recognition results.

[0019] In an optional embodiment of the present invention, the camera initialization configuration module includes: The camera ID generation unit is used to extract the video device number from the device path in the constructor and generate the camera ID through a predetermined offset. Exemplarily, the unit can be specifically configured to generate the camera ID (i.e., camera ID) by extracting the video device number from the device path and adding the offset in the configuration through mCameraId=std::to string(mCfg.cameraIdOffset+ std::stoi(sm[1])) in the constructor ExternalCameraDevice.

[0020] A camera characteristics acquisition unit is used to obtain camera characteristics. Exemplarily, this unit can obtain camera characteristics by performing the following operations in the member function getCameraCharacteristics of the ExternalCameraDevice class: 1. Calling isInitFailedLocked to check the initialization status; if it fails, an error is returned; 2. Converting the obtained metadata rawMetadata into a HIDL-compatible format using convertToHidl; 3. Returning return Void(). Specifically, the camera characteristics acquisition unit includes: a camera status check subunit, which is used to call the lock protection status check function to check the camera initialization status and return an error value if initialization fails; and a data format conversion subunit, which is used to convert the obtained camera characteristics metadata into a HIDL-compatible format using a data structure conversion function if initialization is successful.

[0021] The camera feature initialization unit is used to initialize the camera's features and capabilities. Exemplarily, this unit can initialize camera features by performing the following operations in the initCameraCharacteristics member function of the ExternalCameraDevice class: 1. Open the V4L2 device file by calling the open function in the global space, returning an error value if failure occurs; 2. Initialize various features in sequence: basic features, control features, output features, and device capabilities; 3. Return return Void(). Specifically, the camera feature initialization unit includes: a device file opening subunit, used to open the V4L2 device file by calling the open function in the global space, returning an error value if the opening fails; and a feature sequence processing subunit, used to initialize the camera features, basic features, control features, output features, and device capabilities in sequence after successful opening.

[0022] The camera enabling unit is used to open the camera device, check whether the input parameter is a null pointer, and notify the callback status according to the check result, check the current status of the device; create a new session instance, and adjust the session status according to the result; save the session reference and return the session interface; illustratively, the unit opens the camera device by performing the following operations in the member function open of the ExternalCameraDevice class: 1. Check whether the parameter is a null pointer, callback == nullptr, fail to notify the callback error through _hidl_cb, and successfully return Void(); 2. Initialize the status check, fail to notify the callback error through _hidl_cb, and successfully return Void(); 3. Try to open the V4L2 device multiple times (with a retry mechanism), fail to notify the callback error through _hidl_cb, and successfully return Void(); 4. Create a new session instance, fail to notify the callback error through _hidl_cb, and successfully return Void(); 5. Save the session reference and return the session interface, return Void().

[0023] The output format setting unit is used to set the format and frame rate, initialize the supported output formats, process different output characteristics according to the format, calculate the minimum frame rate and set related parameters; for example, the unit format and frame rate processing can be performed in the member function initOutputCharsKeys of the ExternalCameraDevice class by doing the following operations: 1. Call initSupportedFormatsLocked to obtain the supported format list; 2. Process the output characteristics of different formats according to hasColor and hasDepth; 3. Call calculateMinFps to calculate the minimum FPS; 4. Set the active array and pixel array size, and use the UPDATE macro to set activeArray Size is written into the camera metadata (camera_metadata_t); that is, the output format setting unit includes: a format list acquisition subunit, which is used to call the format list initialization function to obtain the format list supported by the camera device; a device capability judgment subunit, which is used to judge the device capability according to the image data type identifier: an image characteristic configuration subunit, which is used to configure the color image output characteristics when the color information identifier is activated, and configure the depth image output characteristics when the depth information identifier is activated; a minimum frame rate calculation subunit, which is used to call the minimum frame rate calculation function to calculate the minimum frame rate of the camera; a data macro update subunit, which is used to set the effective area size and pixel array size of the image sensor, and write the effective area size into the camera metadata through the metadata update macro.

[0024] The frame rate processing unit is used to process the frame rate, including calculating and retaining the effective frame rate. Exemplarily, the frame rate processing of the unit can be performed in the member function getFrameRateList of the ExternalCameraDevice class by performing the following operations: 1. Enumerate all frame interval settings; 2. Calculate the frame rate = denominator / numerator; 3. Only retain the frame rate that does not exceed the upper limit.

[0025] The session instance creation unit is used to create a session instance and initialize a new external camera device session by passing all necessary parameters. For example, the unit can create a session by performing the following operations in the member function createSession of the ExternalCameraDevice class: new an instance: ExternalCameraDeviceSession creates a new session instance and passes all required parameters. The configuration process sequence diagram of the camera initialization configuration module of the present invention can be shown as follows: Figure 2 shown.

[0026] In an optional embodiment of the present invention, the data transceiver processing module includes: A queue creation unit is used to check the validity of the device file descriptor, query the device capabilities and set the manufacturer and model information, create and initialize the output processing thread, initialize the default request template, and create the request and result metadata queues. Exemplarily, this unit can be a member function initialize of the ExternalCameraDeviceSession class instance created during device initialization, performing the following operations: 1. Check the validity of the V4L2 device file descriptor; 2. Query the device capabilities and set the manufacturer and model information; 3. Call initOutputThread to create and initialize the output processing thread OutputThread; 4. Call initDefaultRequests to initialize the default request template (preview, photo, video, etc.); 5. Create the request and result metadata queues.

[0027] The camera output stream configuration unit is used to check stream combination support, initialize stream buffer, select the best output format, configure stream parameters, allocate intermediate buffers and process stream configuration; illustratively, this unit can configure the camera output stream by performing the following operations in the member function configureStreams of the ExternalCameraDeviceSession class: 1. isStreamCombinationSupported checks whether the stream combination is supported; 2. mCirculatingBuffers.emplace initializes the buffer; 3. Selects the best V4L2 format according to the output stream requirements; 4. Configures V4L2 stream parameters (resolution, frame rate, etc.); 5. allocateIntermediateBuffers allocates intermediate processing buffers; 6. Sets HAL stream configuration.

[0028] The request capture unit is used to check the session status and request validity, import the request buffer and obtain frame data, create and submit a series of request objects to the output thread; illustratively, the unit processes the capture request by performing the following operations in the member function processOneCaptureRequest of the ExternalCameraDeviceSession class: 1. Check the session status and request validity; 2. importRequestLocked imports the request buffer; 3. dequeueV4l2FrameLocked obtains frame data from the V4L2 device; 4. Creates a series of HAL request objects (such as frameNumber, setting, shutterTs, etc.); 5. mOutputThread->submitRequest submits the request to the output thread for processing.

[0029] The request processing unit is used to wait for and process requests, convert frames to the target format, perform format conversion and scaling on the output buffer, generate the target format image and return the processing result. Exemplarily, the image data conversion and format processing of this unit can be performed in the thread loop function OutputThread::threadLoop of the ExternalCameraDeviceSession class by performing the following operations: 1. Wait for requests; 2. Convert V4L2 frames to YUV format; 3. Process each output buffer according to the request; 4. Perform format conversion and scaling; 5. For JPEG requests, generate a JPEG image; 6. Return the processing result.

[0030] The device stream state management unit is used to set the format, resolution, and configure the frame rate, request the buffer and start streaming, and manage the frame buffer queue. Exemplarily, the unit manages the device stream state by performing the following operations in the member function configureV4l2StreamLocked of the ExternalCameraDeviceSession class: 1. Setting the V4L2 format and resolution; 2. Configuring the frame rate; 3. Requesting and mapping the buffer; 4. Starting streaming; 5. Managing the frame buffer queue.

[0031] The metadata processing unit is used to update metadata according to the request status, generate result callbacks and manage templates. Exemplarily, the metadata processing unit can perform the following operations in the member function fillCaptureResult of the ExternalCameraDeviceSession class: 1. Update metadata according to the request and status; 2. Fill in information such as timestamp and AF status; 3. Generate result callbacks; 4. Manage default request templates.

[0032] The buffer management unit is used to import and manage the buffer life cycle, clean up the buffer that is no longer in use and keep it synchronized. For example, the unit can manage the buffer by performing the following operations in the member function importBufferLocked of the ExternalCameraDeviceSession class: 1. Import the buffer in the request; 2. Manage the buffer life cycle; 3. Clean up the buffer that is no longer in use; 4. Synchronize the access to the buffer. The processing flow sequence diagram of the data transceiver processing module of the present invention can be shown as follows: Figure 3 shown.

[0033] In an optional embodiment of the present invention, the USB connection management module includes: The ID pin interrupt trigger unit is used to detect the low-level state by reading the ID pin value when the camera module is inserted, and respond to the low-level state to trigger the camera detection process; exemplarily, the unit can be get_extcon_detect_id to read the ID pin value (low level) when the USB camera is inserted, and trigger the detection.

[0034] The USB role switching unit is used to read the low-level state of the ID pin to determine the USB role requirement and switch the USB role of the controller through system calls; illustratively, the unit can execute m_usb_extcon_set_role based on gpiod_get_value to read the low level of the ID pin, call m_usb_extcon_update_role, execute extcon_set_state_sync to notify the system, and call usb_role_switch_set_role to switch the controller role.

[0035] The VBUS control unit is used to enable the OTG output function based on the low level state of the ID pin and set the OTG current limit to ensure power safety. For example, the unit can execute m_usb_extcon_set_vbus and call m_usb_extcon_set_vbus_v1 to enable OTG output and set the current limit based on the low level state of the ID pin read by gpiod_get_value.

[0036] The USB Hub reset unit is used to reset the USB Hub by performing a low-to-high level transition to ensure that the USB Hub is correctly initialized in host mode. For example, this unit can call m_usb_extcon_id_pin_init to reset the USB Hub (performing a low-to-high level transition) to ensure that the Hub is correctly initialized in host mode.

[0037] The data switch enabling unit is used to connect the USB data line to the host controller; illustratively, the unit may execute set_usb_up_switch_gpio(1) to allow the USB data line (D+ / D-) to connect to the host controller.

[0038] The system event notification unit is used to notify the system USB Host driver to enumerate the camera device, load the corresponding camera driver and generate the device node. For example, the unit can call extcon_set_state_sync to trigger the USB host driver and enumerate the camera device, load the uvcvideo driver, and generate the / dev / videoX device node. The connection process timing diagram of the USB connection management module of the present invention can be as follows: Figure 4 shown.

[0039] Generally speaking, the palmprint recognition system based on USB camera of the present invention has the following technical effects: low cost: high-precision palmprint recognition can be achieved using an ordinary USB camera; high integration: all modules are integrated on the motherboard and connected via USB, without the need for dedicated hardware devices; high compatibility: standard USB interface design, plug and play, compatible with various computing devices; excellent user experience: natural interaction method, no need for specific gestures or auxiliary line positioning.

[0040] In summary, the present invention provides a palmprint recognition system based on a USB camera, comprising a terminal device, a USB-connected camera module, and a palmprint recognition app; the terminal device includes a USB connection management module for USB connection status detection, role switching, and VBUS control, a camera initialization configuration module for camera initialization parameter configuration, capability configuration, output format configuration, and operation interface management; and a data transceiver processing module for creating request and result metadata queues, receiving image capture requests and handing them over to an output thread for processing, processing image data and performing image processing operations including cropping, scaling, and format conversion, converting the processed image data into a predetermined output format, managing the allocation, enqueuing, dequeuing, and release of a graphics buffer, and processing metadata associated with the captured image. The present invention only requires an ordinary USB camera and a palmprint recognition app to implement palmprint recognition on a terminal, which is low-cost and facilitates the popularization of palmprint recognition. As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A palmprint recognition system based on a USB camera, characterized in that: The palmprint recognition system includes a terminal device, a camera module connected to the terminal device via USB communication, and a matching palmprint recognition app; the camera module is used to obtain an image of the user's palm; The terminal device includes a USB connection management module, a camera initialization configuration module and a data transceiver processing module; The USB connection management module is used for USB connection status detection, role switching and VBUS control; the camera initialization configuration module is used for camera initialization parameter configuration, camera capability configuration, output format configuration, and device operation interface management; The data transceiver processing module is used to create a request and result metadata queue, receive an image capture request from the device operation interface and hand it over to the output thread for processing, process the image data captured by the camera module and perform image processing operations including cropping, scaling and format conversion, convert the processed image data into a predetermined output format, manage the allocation, enqueueing, dequeueing and release of the graphics buffer, and process metadata associated with the captured image; The palmprint recognition APP is installed in the terminal device and is used to extract and recognize palmprint features from the image data obtained by the data transceiver module and output a palmprint recognition result.

2. The palmprint recognition system based on a USB camera according to claim 1, characterized in that: The camera initialization configuration module includes: A camera ID generation unit is used to extract the video device number from the device path in the constructor and generate a camera ID using a predetermined offset; A camera characteristic acquisition unit, used to acquire the characteristics of the camera; Camera feature initialization unit, used to initialize the features and capabilities of the camera; The camera enabling unit is used to open the camera device, check whether the input parameter is a null pointer, and notify the callback status based on the check result, check the current status of the device; create a new session instance and adjust the session state based on the result; save the session reference and return the session interface; Output format setting unit, used to set the format and frame rate, initialize supported output formats, process different output characteristics according to the format, calculate the minimum frame rate and set related parameters; A frame rate processing unit, for processing the frame rate, including calculating and retaining the effective frame rate; The session instance creation unit is used to create a session instance and initialize a new external camera device session by passing all necessary parameters.

3. The palmprint recognition system based on a USB camera according to claim 2, characterized in that: The camera characteristic acquisition unit includes: The camera status check subunit is used to call the lock protection status check function to check the camera initialization status and return an error value if initialization fails; The data format conversion subunit is used to convert the acquired camera feature metadata into a HIDL compatible format through a data structure conversion function if initialization is successful.

4. The palmprint recognition system based on a USB camera according to claim 2, characterized in that: The camera characteristic initialization unit includes: The device file opening subunit is used to open the V4L2 device file by calling the open function in the global space. If the opening fails, an error value is returned. The feature sequence processing subunit is used to initialize the camera features, basic features, control features, output features and device capabilities in sequence after successful opening.

5. The palmprint recognition system based on USB camera according to claim 2, characterized in that: The output format setting unit includes: The format list acquisition subunit is used to call the format list initialization function to obtain the format list supported by the camera device; The device capability determination subunit is used to determine the device capability based on the image data type identifier: An image characteristic configuration subunit, configured to configure color image output characteristics when the color information flag is activated, and to configure depth image output characteristics when the depth information flag is activated; The minimum frame rate calculation subunit is used to call the minimum frame rate calculation function to calculate the minimum frame rate of the camera; The data macro update subunit is used to set the effective area size and pixel array size of the image sensor, and write the effective area size into the camera metadata through the metadata update macro.

6. The palmprint recognition system based on a USB camera according to claim 1, characterized in that: The data transceiver processing module includes: The queue creation unit is used to check the validity of the device file descriptor, query the device capabilities and set the manufacturer and model information, create and initialize the output processing thread, initialize the default request template, and create the request and result metadata queues; Camera output stream configuration unit, which is used to check stream combination support, initialize stream buffers, select the best output format, configure stream parameters, allocate intermediate buffers and handle stream configuration; The request capture unit is used to check the session status and request validity, import the request buffer and obtain the frame data, create and submit a series of request objects to the output thread; The request processing unit is used to wait for and process requests, convert frames to the target format, perform format conversion and scaling on the output buffer, generate the target format image and return the processing result; Device stream state management unit, used to set the format, resolution and configure the frame rate, request the buffer and start streaming, and manage the frame buffer queue; Metadata processing unit, used to update metadata according to request status, generate result callbacks and manage templates; The buffer management unit is used to import and manage the buffer life cycle, clean up the buffers that are no longer used and keep them synchronized.

7. The palmprint recognition system based on a USB camera according to claim 1, characterized in that: The USB connection management module includes: An ID pin interrupt trigger unit, configured to detect a low-level state by reading the ID pin value when a camera module is inserted, and respond to the low-level state to trigger a camera detection process; The USB role switching unit is used to read the low level state of the ID pin to determine the USB role requirement and switch the USB role of the controller through system calls; VBUS control unit, used to enable the OTG output function according to the low level state of the ID pin and set the OTG current limit to ensure power safety.

8. The palmprint recognition system based on a USB camera according to claim 7, characterized in that: The USB connection management module also includes: The USB Hub reset unit is used to reset the USB Hub through low-high level conversion to ensure that the USB Hub is correctly initialized in host mode. A data switch opening unit is used to connect the USB data line to the host controller; The system event notification unit is used to notify the system USB Host driver to enumerate the camera device, load the corresponding camera driver and generate the device node.