Search

CN-117349240-B - Multi-path camera data backflow method and system based on embedded equipment

CN117349240BCN 117349240 BCN117349240 BCN 117349240BCN-117349240-B

Abstract

The invention discloses a multi-path camera data backflow method and system, comprising two parts, an embedded device and a PC end, the invention supports the acquisition of lossless or lossy images on the embedded device with USB interface, the method supports multiple image formats, supports the preservation of the meta-attribute of the image, supports the backward flow of the image data through the USB interface, is used for intelligent algorithm function processing modules such as face detection or recognition and the like, and realizes statistical analysis or scene reproduction and the like. The invention also supports the simultaneous acquisition of the data of the multiple cameras, saves the correlation among the images from different cameras, is used for acquiring the images corresponding to the multiple cameras at the same time, and supports the data acquisition and the data backflow requirement of the living body detection algorithm. The invention is based on the PYTHON tool, realizes the functional requirements for large data volume acquisition and backflow, improves the automatic test level, and improves the development and test efficiency.

Inventors

  • LIU CHUNLONG
  • MEI HAIFENG
  • ZHAN DONGHUI
  • YU JINXI

Assignees

  • 厦门瑞为信息技术有限公司

Dates

Publication Date
20260508
Application Date
20230725

Claims (4)

  1. 1. The multichannel camera data backflow method based on the embedded equipment is characterized by comprising the following steps of: The method comprises the steps of S1, capturing YUV data of cameras 1 to N in a camera module of embedded equipment, enabling images acquired by multiple cameras at the same time to have the same image ID value, judging correlation among the images, comparing time stamps, ensuring the images captured at the same time to be used for living body detection, respectively marking N paths of images which are correspondingly input to a living body algorithm as cam1_ idM to camN _ idM, wherein cam1 is image data captured from the camera 1, camN is image data captured from the camera N, idM is an image acquired at the same time point, and preserving meta-attributes of the images; Performing face detection and saving a face detection result as image attribute information; Obtaining multiple paths of images at the same time, executing living body detection, and storing the score of the living body detection as image attribute information; Performing face recognition, and storing a face recognition result as image attribute information; Step S5, storing the image and all the image attribute information into a file, and packaging the image attribute information into a regular image file name so that the PC end analyzes the corresponding image attribute information from the image file name; step S6, connecting the USB interface of the embedded equipment with a data line, connecting the embedded equipment with a PC end, and operating the embedded equipment on the PC end by a user through an ADB; Step S7, the PC end polls whether the acquired images exist in the embedded equipment in a round-robin mode, an image list is acquired through the ADB, and the acquired images are downloaded to the PC end through the ADB in sequence; step S8, the PC end stores the downloaded image data into a designated folder; step S9, the PC end selects images acquired at the same time point from the acquired data of the N cameras and uploads the images to the embedded equipment, an ID value is analyzed from an image file name by using PYTHON, namely, an image with the ID value of M is analyzed from the camera 1, an image with the ID of M is analyzed from the camera N, the analyzed N images are image sets acquired at the same time, and the image sets are uploaded to the embedded equipment by using ADB.
  2. 2. The multi-path camera data backflow method based on the embedded device of claim 1, wherein the process of collecting image data from the embedded device by the PC end comprises the following steps: Step a, the PC end issues a start identification command through the ADB SHELL; step b, inquiring whether the embedded equipment successfully collects the identified images in a round robin manner, and acquiring an image list which is successfully collected; step c, sending an image uploading command through the ADB, uploading the acquired image, storing the image to a designated folder, and if the folder does not exist, newly creating the folder; step d, judging whether the number of the acquired images is larger than a threshold value, if so, entering a step e, otherwise, entering a step b; and e, ending.
  3. 3. The multichannel camera data backflow system based on the embedded equipment is characterized by comprising a plurality of cameras, the embedded equipment and a PC (personal computer) end; The cameras are used for collecting original images; The embedded device captures YUV data of cameras 1 to N, images acquired by the cameras 1 to N at the same time have the same image ID value, the images are used for judging correlation among the images, timestamps are compared, multipath images captured at the same time are ensured and used for living body detection, N paths of images correspondingly input to a living body algorithm are respectively identified as cam1_ idM to camN _ idM, wherein cam1 is image data captured by the camera 1, camN is image data captured by the camera N, idM is an image acquired at the same time point, the meta attribute of the images is saved, the embedded device is used for executing face detection, obtaining a face detection result, saving the face detection result as image attribute information, obtaining multipath images at the same time, executing living body detection, obtaining a living body detection result, saving the score of the living body detection as image attribute information, executing face recognition, obtaining a face recognition result, saving the face recognition result as the image attribute information, saving the image and all the image attribute information to a file, packaging the image attribute information into a regular image file name, and enabling a PC end to analyze the corresponding image attribute information from the image file name; The PC end is connected with a USB interface of the embedded equipment by using a data line, the embedded equipment is operated on the basis of PYTHON by the ADB, when image data are collected, whether the embedded equipment has collected images or not is circularly inquired, an image list is obtained and is sequentially downloaded to the PC end, when the data are backward filled, the image collected at the same time point is selected from the collected data of N cameras and is uploaded to the embedded equipment, an ID value is analyzed from the name of an image file by using the PYTHON, namely, an image with the ID value M is analyzed from the camera 1, an image with the ID M is analyzed from the camera N, the analyzed N images are image sets collected at the same time, and the image sets are uploaded to the embedded equipment by using the ADB.
  4. 4. The multi-camera data back-flowing system based on embedded equipment of claim 3, wherein the specific process of collecting image data from the embedded equipment by the PC end comprises the following steps: step a, the PC end issues a start identification command through the ADB SHELL; step b, inquiring whether the embedded equipment successfully collects the identified images in a round robin manner, and acquiring an image list which is successfully collected; step c, sending an image uploading command through the ADB, uploading the acquired image, storing the image to a designated folder, and if the folder does not exist, newly creating the folder; step d, judging whether the number of the acquired images is larger than a threshold value, if so, entering a step e, otherwise, entering a step b; and e, ending.

Description

Multi-path camera data backflow method and system based on embedded equipment The invention is a divisional application provided for automatic test method and system for data acquisition and data backflow of a multi-path camera with the application number 2023109126131 and the application date 2023, 07 and 25 Technical Field The invention relates to the technical field of computers, in particular to a multichannel camera data backflow method and system based on embedded equipment. Background The embedded device is an intelligent door lock, wherein an important component is an intelligent module, and important functional modules in the intelligent module are functional modules such as face detection, face recognition and/or living body detection. The training of the algorithm model is generally completed on a personal computer or a GPU, and the algorithm model is generated and then applied to the embedded device. In addition, two or more cameras with the same time are required to acquire images corresponding to the living body algorithm. In general, face pictures used by a training algorithm need to be collected from a camera of the embedded equipment, so that the consistency of an algorithm model and an actual application scene can be ensured as much as possible, and the detection and recognition effects are better. In addition, in practical application, the face data needs to be fed back to the intelligent algorithm for counting the detection effect or the identification effect of the algorithm model or for locating whether the algorithm model has holes or not. The current collection of data is typically by saving camera video data to a file. Video formats are typically MJEPG or H264, etc. The acquisition method has the defects that 1. The acquired data is distorted to different degrees after compression. 2. The acquired data typically requires further classification or recalibration. 3. Two or more paths of camera data at the same time cannot be stored at the same time, and the data acquisition requirements of algorithms such as living body detection cannot be met. Currently, a special device (such as HDMI to AHD) is generally used to convert the collected video into a virtual camera. The disadvantage is 1. The special equipment requires additional costs. 2. The video-compressed data is distorted. 3. Embedded devices without camera interfaces (e.g., smart door lock modules) cannot be used. 4. The data backflow requirement of the living body detection algorithm cannot be met. In addition, there is a backward data mode of transmitting video data or picture data through a network port, but the mode can be realized only by depending on the existence of the network port or WIFI of the embedded device. For embedded equipment without a network port (such as an intelligent door lock module), the embedded equipment cannot be used. Disclosure of Invention The invention aims to overcome the defects of the prior art and provides a multi-path camera data backflow method based on embedded equipment, which has low requirements on equipment, does not depend on a network port and a video interface, and supports the multi-path camera data acquisition and data backflow requirements. In order to solve the above-mentioned purpose, the invention adopts the technical scheme: a multichannel camera data backflow method based on embedded equipment comprises the following steps: Step S1, capturing YUV data of cameras 1 to N in a camera module of the embedded equipment, wherein images acquired by multiple cameras at the same time have the same image ID value, judging correlation among the images, comparing time stamps, ensuring the images to be captured at the same time for living body detection, respectively marking N paths of images which are correspondingly input to a living body algorithm as cam1_ idM to camN _ idM, wherein cam1 is image data captured from the camera 1, camN is image data captured from the camera N, idM is expressed as images acquired at the same time point, and preserving meta-attributes of the images; Step S5, storing the image and all the image attribute information into a file, and packaging the image attribute information into a regular image file name so that the PC end analyzes the corresponding image attribute information from the image file name; step S6, connecting the USB interface of the embedded equipment with a data line, connecting the embedded equipment with a PC end, and operating the embedded equipment on the PC end by a user through an ADB; Step S7, the PC end polls whether the acquired images exist in the embedded equipment in a round-robin mode, an image list is acquired through the ADB, and the acquired images are downloaded to the PC end through the ADB in sequence; step S8, the PC end stores the downloaded image data into a designated folder; step S9, the PC end selects images acquired at the same time point from the acquired data of the N cameras and uploads the images to the embedded eq