Image Data Synchronization Method, Device, Terminal Device and Storage Medium
By acquiring and synchronizing the image data timestamps in the image queue of multiple cameras, the problem of out-of-synchronization of multi-camera image frame timestamps is solved, and the rapid synchronization of image data and the accuracy of security information is achieved.
Patent Information
- Application Number
- CN202210439405.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-04-25
AI Technical Summary
In the prior art, the image frame timestamps of multiple cameras are not synchronized, resulting in incorrect information around the vehicle and a safety hazard.
By acquiring the image queues corresponding to multiple cameras, the image queue includes image data generated by the camera within the preset time interval, and time synchronization is performed according to the time stamp of the image data at each preset time interval.
It realizes rapid synchronization of image data, solves the problem of out-of-synchronization of multi-camera image frame timestamps, and avoids safety hazards caused by incorrect information around the vehicle.
Smart Images

Figure CN115002295B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video processing, and particularly to an image data synchronization method, device, terminal device and storage medium. Background Art
[0002] In the prior art, driverless vehicles generally have multiple on-vehicle cameras. The data collected by each on-vehicle camera is detected through a preset algorithm and combined with vehicle information for ranging and speed measurement. Since the speeds and time delays of the video data generated by different cameras are different, there will be a problem of out-of-sync video data image frames collected by the on-vehicle cameras. If the timestamps of the image frames are not synchronized, the on-vehicle cameras in the front view and rear view of the vehicle will make some incorrect judgments on the information of surrounding vehicles, which may lead to emergency braking, rear-end collisions at best, and even safety accidents at worst. Therefore, the synchronization of the timestamps of the image frames, especially obtaining the data of the latest image frames, is particularly important.
[0003] Some of the prior art solutions are based on image statistics, which may lead to inaccurate timestamp synchronization; some are based on timestamps but not the latest time, which may lead to safety problems such as emergency braking and rear-end collisions. Summary of the Invention
[0004] Embodiments of the present invention provide an image data synchronization method, device, terminal device and storage medium to solve the problem of out-of-sync timestamps of image frames of multiple cameras in the prior art, which may lead to incorrect information about the surrounding of the vehicle and potential safety hazards.
[0005] To solve the above technical problems, the present invention is implemented as follows:
[0006] In a first aspect, embodiments of the present invention provide an image data synchronization method, the method includes: obtaining multiple image queues corresponding to multiple cameras, where the image queues include image data generated by the cameras within a preset time interval; and performing time synchronization according to the timestamps of the image data in the multiple image queues at every preset time interval.
[0007] Further, before obtaining the multiple image queues corresponding to the multiple cameras, it further includes: receiving the image data corresponding to the cameras, where the image data is sent to an image processing terminal after being generated by the cameras; and storing the image data into a message queue according to the timestamp of the image data to obtain the image queue, where the message queue is sorted according to the timestamp.
[0008] Further, the multiple image sequences include a first image sequence and at least one second image sequence. Among them, at every preset time interval, time synchronization is performed according to the timestamps of the image data in the multiple image queues, including: determining at least one second image data in the at least one second image sequence, where the second image data matches the first image data in the first image sequence; performing time synchronization according to the first image data and the at least one second image data.
[0009] Further, obtaining at least one second image data in the at least one second image sequence includes: sequentially matching the first image data and the image data in the second image sequence according to the time sorting of the timestamps of the image data in the second image sequence; determining the image data whose difference from the timestamp of the first image data is less than a preset time threshold as the second image data.
[0010] Further, obtaining at least one second image data in the at least one second image sequence includes: if the number of image data in the second image sequence is less than a preset quantity threshold, determining the third image data in the second image sequence as the second image data; or, if there is no image data in the second image sequence, determining the second image data according to the image data in the third image sequence, where the third image sequence is the image sequence corresponding to the previous time interval of the second image sequence.
[0011] Further, at every preset time interval, time synchronization is performed according to the timestamps of the image data in the multiple image queues, including: performing time alignment on the first image data and the at least one second image data to obtain environmental image data; performing image recognition on the environmental image data to obtain environmental data corresponding to the environmental image data.
[0012] In a second aspect, an embodiment of the present invention further provides an image data synchronization device, where the device includes: an acquisition module, configured to acquire multiple image queues corresponding to multiple cameras, where the image queues include image data generated by the cameras within a preset time interval; a synchronization module, configured to perform time synchronization according to the timestamps of the image data in the multiple image queues at every preset time interval.
[0013] Further, it further includes: a receiving module, configured to receive the image data corresponding to the camera before acquiring the multiple image queues corresponding to the multiple cameras, where the image data is sent to an image processing terminal after being generated by the camera; a storage module, configured to store the image data into a message queue according to the timestamp of the image data to obtain the image queue, where the message queue is sorted according to the timestamp.
[0014] Further, the multiple image sequences include a first image sequence and at least one second image sequence. Among them, the synchronization module includes: an acquisition unit, configured to acquire at least one second image data in the at least one second image sequence, where the second image data matches the first image data in the first image sequence; a synchronization unit, configured to perform time synchronization according to the first image data and the at least one second image data.
[0015] In a third aspect, an embodiment of the present invention further provides a terminal device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the steps of the image data synchronization method described in the first aspect above are implemented.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the image data synchronization method described in the first aspect above are implemented.
[0017] In an embodiment of the present invention, multiple image queues corresponding to multiple cameras are acquired, where the image queues include image data generated by the cameras within a preset time interval; at every preset time interval, time synchronization is performed according to the timestamps of the image data in the multiple image queues. Establishing the image queues corresponding to the cameras and synchronizing the image data according to the timestamps of the image data in the image queues with the image data of the multiple cameras can achieve fast synchronization of the image data, so as to solve the problem that the timestamps of the image frames of multiple cameras in the prior art are not synchronized, resulting in incorrect information about the surroundings of the vehicle and potential safety hazards.
[0018] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features, and advantages of the present invention more obvious and understandable, the following specifically describes the embodiments of the present invention. Description of the Drawings
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 is a flowchart of the steps of an image data synchronization method in an embodiment of the present invention;
[0021] Figure 2 It is a schematic structural diagram of an image data synchronization device in an embodiment of the present invention;
[0022] Figure 3 It is a schematic hardware structure diagram of a terminal device in an embodiment of the present invention. Specific embodiments
[0023] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described 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, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0024] A detailed introduction to an image data synchronization method provided by an embodiment of the present invention.
[0025] Referring to Figure 1 , a flowchart of the steps of an image data synchronization method in an embodiment of the present invention is shown.
[0026] S102, obtain a plurality of image queues corresponding to a plurality of cameras, where the image queues include image data generated by the cameras within a preset time interval.
[0027] S104, at every preset time interval, perform time synchronization according to the timestamps of the image data in the plurality of image queues.
[0028] In the technical solution of this embodiment, the data processing terminal is connected to a plurality of cameras, and the connection method can be a wired connection or a wireless connection. In this embodiment, no limitation is made in this regard. In this embodiment, no limitation is made on the parameters, models, and brands of the plurality of cameras.
[0029] In this embodiment, the image data includes, but is not limited to, images collected by cameras and video frames in videos.
[0030] In an example, the data terminal can be an in-vehicle terminal of a vehicle, and the cameras can be in-vehicle cameras distributed at various positions around the vehicle, or lidar, etc. After the cameras collect the environmental images around the vehicle, the collected environmental images are transmitted to the in-vehicle terminal, and the in-vehicle terminal performs synchronization, processing, and image recognition of the environmental images, and finally displays the environmental images on the display terminal of the vehicle.
[0031] Since there are differences in the data size, image format, and image pixels of the environmental image data collected by different cameras, the timestamps of the image data generated by different cameras at the same moment are also different.
[0032] In view of the above problems, in this embodiment, an image queue corresponding to a camera is constructed. The image queue stores image data generated by the camera within a preset time interval. Each piece of image data includes a timestamp, that is, the generation time of the image data. In this embodiment, the preset time interval is set according to the generation time of the image data of each camera and actual usage experience, and this embodiment does not limit it.
[0033] In this embodiment, the image data in multiple image queues corresponding to multiple cameras is time-synchronized every preset time interval. According to the image data generated by each camera within the preset time interval, the image data generated at the same time within the preset time interval is determined based on the timestamps of the image data.
[0034] It should be noted that, in the embodiment, multiple image queues corresponding to multiple cameras are obtained, where the image queue includes image data generated by the camera within a preset time interval; every preset time interval, time synchronization is performed according to the timestamps of the image data in the multiple image queues. Establishing an image queue corresponding to the camera and synchronizing the image data according to the timestamps of the image data in the image queue with the image data of multiple cameras can achieve fast synchronization of the image data, so as to solve the problem that the timestamps of the image frames of multiple cameras in the prior art are not synchronized, resulting in incorrect information around the vehicle and potential safety hazards.
[0035] Optionally, in this embodiment, before obtaining multiple image queues corresponding to multiple cameras, it further includes but is not limited to: receiving image data corresponding to the camera, where the image data is sent to the image processing terminal after being generated by the camera; storing the image data into a message queue according to the timestamp of the image data to obtain an image queue, where the message queue is sorted according to the timestamp.
[0036] In a specific application scenario, the image processing terminal receives the image data generated by each camera, and then stores the image data generated by each camera into different message queues respectively to obtain the image queues corresponding to each camera. The image data in the image queue is sorted in time order according to the timestamp of the image data, where the time order can be from early to late or from late to early.
[0037] It should be noted that the image data in the image queue is all image data generated by the camera within a preset time interval. In this embodiment, each image queue corresponds to a preset time interval.
[0038] In an example, the camera sends image data to the receiving node image processing terminal, and the receiving node performs data caching of the image data through the message queue; the image data is cached in the message queue. The relatively later image data is at the head of the message queue, and the relatively latest data is at the tail of the message queue.
[0039] Through the above example, the image data corresponding to the receiving camera is received, and the image data is stored in the message queue according to the timestamp of the image data to obtain an image queue, so as to collect the image data generated by the camera within a preset time interval.
[0040] Optionally, in this embodiment, the multiple image sequences include a first image sequence and at least one second image sequence. Among them, at every preset time interval, time synchronization is performed according to the timestamps of the image data in the multiple image queues, including but not limited to: obtaining at least one second image data in at least one second image sequence, where the second image data matches the first image data in the first image sequence; performing time synchronization according to the first image data and the at least one second image data.
[0041] Specifically, in this embodiment, one image queue is selected from the multiple image queues corresponding to the multiple cameras as the first image queue, and the remaining at least one image queue is the second image queue. The image data with the minimum timestamp in the first image queue is determined as the first image data, and then the second image data corresponding to the timestamp of the first image data is determined. The timestamp of the second image data matches the timestamp of the first image data, that is, the actual generation times of the first image data and the second image data are the same.
[0042] For example, if the timestamp of the first image data in the first image queue is 22:08:03, then the image data with the timestamp of 22:08:03 in the second image queue is determined as the second image data.
[0043] After determining the second image data that matches the first image data, time synchronization is performed on the first image data and the second image data, including but not limited to performing image recognition, image processing, data storage, etc. on the first image data and the second image data.
[0044] Through the above example, at least one second image data that matches the first image data is obtained, and then time synchronization is performed according to the first image data and the at least one second image data, realizing the fast synchronization of the generation time of the image data.
[0045] Optionally, in this embodiment, obtaining at least one second image data in at least one second image sequence includes but not limited to: sequentially matching the first image data and the image data in the second image sequence according to the time sorting of the timestamps of the image data in the second image sequence; determining the image data with a difference in timestamp from the first image data less than a preset time threshold as the second image data.
[0046] Specifically, in this embodiment, the first image data in the first image sequence is selected, and the image data in the second image sequence is matched based on the timestamp of the first image data. The image data in the second image sequence is sequentially matched according to the time sorting of the timestamps of the image data in the second image sequence. The image data with the difference between the timestamp of the image data in the second image queue and the timestamp of the first image being less than the preset time threshold is determined as the most similar image data, that is, the second image data. After obtaining the second image data, the image data in each image queue with a timestamp difference greater than the preset time threshold from the first image data is considered obsolete data and will be discarded.
[0047] In an example, the timestamp of the first image data in the first image queue is 22:08:03. If the time threshold is 100 ms, the image data with a difference within 100 ms from the timestamp 22:08:03 in the second image queue is determined as the second image data.
[0048] It should be noted that the first image sequence is not a fixed image sequence and can be randomly selected from multiple cameras corresponding to multiple cameras. The first image data is the image data with the smallest timestamp in the first image sequence. Then, the timestamps of the image sequences in at least one second image sequence are sequentially matched in the order from new to old in terms of timestamps to determine the second image data.
[0049] Through the above example, according to the time sorting of the timestamps of the image data in the second image sequence, the first image data and the image data in the second image sequence are sequentially matched to determine the second image data, realizing the rapid determination of the second image data to improve the synchronization speed of video data.
[0050] Optionally, in this embodiment, obtaining at least one second image data in at least one second image sequence includes, but is not limited to: if the number of image data in the second image sequence is less than the preset number threshold, determining the third image data in the second image sequence as the second image data; or, if there is no image data in the second image sequence, determining the second image data according to the image data in the third image sequence, where the third image sequence is the image sequence corresponding to the previous time interval of the second image sequence.
[0051] In a specific application scenario, there may be a situation where a certain camera fails or pauses working for a short period of time, and there are only a small amount of image data or missing image data in the image queue corresponding to the abnormal camera. If the number in the second image sequence is less than the preset number threshold, the image data closest to the timestamp of the first image data is determined as the third image data. For example, if there is only one image data in the second image sequence, this image data is determined as the second image data matching the first image data.
[0052] In another example, if there is no image data in the second image sequence corresponding to the camera, an image data is selected from the third image sequence corresponding to the previous preset time interval of the camera as the second image data of the second image sequence. Generally, the latest image data in the third image sequence is selected as the second image data. By filling in the missing image sequence, the normal display of the image data of the abnormal camera is ensured.
[0053] Through the above example, when the image data of the second image sequence of the camera is abnormal, the second image data is determined to realize the synchronization of the image data between multiple cameras in different scenarios.
[0054] Optionally, in this embodiment, at every preset time interval, time synchronization is performed according to the timestamps of the image data in multiple image queues, including but not limited to: aligning the time of the first image data and at least one second image data to obtain environmental image data; performing image recognition on the environmental image data to obtain environmental data corresponding to the environmental image data.
[0055] In a specific application scenario, after determining the second image data that matches the first image data, the time of the second image data is aligned based on the timestamp of the first image data to obtain environmental image data with consistent timestamps. Then, only image recognition is performed on the environmental image data, and the recognized data is processed to obtain structured environmental data. In this embodiment, the environmental data includes but is not limited to images, audio, video, environmental information, etc. Among them, the environmental information includes but is not limited to surrounding object information, distance, speed, etc., and this embodiment does not make any limitations in this regard.
[0056] Through the embodiments of the present invention, multiple image queues corresponding to multiple cameras are obtained, where the image queues include image data generated by the cameras within a preset time interval; at every preset time interval, time synchronization is performed according to the timestamps of the image data in the multiple image queues. By establishing the image queues corresponding to the cameras and synchronizing the image data according to the timestamps of the image data in the image queues, fast synchronization of the image data can be achieved to solve the problem that the timestamps of the image frames of multiple cameras in the prior art are not synchronized, resulting in incorrect information about the surroundings of the vehicle and potential safety hazards.
[0057] Next, a detailed introduction is given to an image data synchronization device provided by the embodiments of the present invention.
[0058] Referring to Figure 2 , a schematic structural diagram of an image data synchronization device in the embodiments of the present invention is shown.
[0059] The image data synchronization device according to an embodiment of the present invention includes: an acquisition module 20 and a synchronization module 22.
[0060] The functions of each module and the interaction relationships between the modules will be introduced in detail below.
[0061] The acquisition module 20 is configured to acquire a plurality of image queues corresponding to a plurality of cameras, where the image queues include image data generated by the cameras within a preset time interval;
[0062] The synchronization module 22 is configured to perform time synchronization according to the timestamps of the image data in the plurality of image queues at every preset time interval.
[0063] Optionally, in this embodiment, it further includes:
[0064] A receiving module, configured to receive the image data corresponding to the cameras before acquiring the plurality of image queues corresponding to the plurality of cameras, where the image data is sent to an image processing terminal after being generated by the cameras;
[0065] A storage module, configured to store the image data into a message queue according to the timestamp of the image data to obtain the image queue, where the message queue is sorted according to the timestamp.
[0066] Optionally, in this embodiment, the plurality of image sequences include a first image sequence and at least one second image sequence, where the synchronization module 22 includes:
[0067] A determination unit, configured to determine at least one second image data in the at least one second image sequence, where the second image data matches the first image data in the first image sequence;
[0068] A synchronization unit, configured to perform time synchronization according to the first image data and the at least one second image data.
[0069] Moreover, in the embodiment of the present invention, a plurality of image queues corresponding to a plurality of cameras are acquired, where the image queues include image data generated by the cameras within a preset time interval; at every preset time interval, time synchronization is performed according to the timestamps of the image data in the plurality of image queues. An image queue corresponding to a camera is established, and synchronization is performed with the image data of the plurality of cameras according to the timestamps of the image data in the image queue, which can achieve fast synchronization of the image data to solve the problem that the timestamps of the image frames of multiple cameras in the prior art are not synchronized, resulting in incorrect information about the vehicle surroundings and potential safety hazards.
[0070] Figure 3 A schematic diagram of the hardware structure of a terminal device for implementing various embodiments of the present invention.
[0071] The terminal device 300 includes, but is not limited to: a radio frequency unit 301, a network module 302, an audio output unit 303, an input unit 304, a sensor 305, a display unit 306, a user input unit 307, an interface unit 308, a memory 309, a processor 310, and a power supply 311, etc. Those skilled in the art can understand that Figure 3 the structure of the terminal device shown in does not constitute a limitation on the terminal device. The terminal device may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements. In the embodiments of the present invention, the terminal device includes, but is not limited to, mobile phones, tablet computers, laptop computers, palmtop computers, vehicle-mounted terminals, wearable devices, and pedometers, etc.
[0072] It should be understood that in the embodiments of the present invention, the radio frequency unit 301 can be used for receiving and sending signals during information reception or call processes. Specifically, after receiving the downlink data from the base station, it is given to the processor 310 for processing; in addition, the uplink data is sent to the base station. Usually, the radio frequency unit 301 includes, but is not limited to, antennas, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. In addition, the radio frequency unit 301 can also communicate with the network and other devices through a wireless communication system.
[0073] The terminal device provides the user with wireless broadband Internet access through the network module 302, such as helping the user to receive and send emails, browse web pages, and access streaming media, etc.
[0074] The audio output unit 303 can convert the audio data received by the radio frequency unit 301 or the network module 302 or stored in the memory 309 into an audio signal and output it as sound. Moreover, the audio output unit 303 can also provide audio outputs related to specific functions performed by the terminal device 300 (for example, call signal reception sound, message reception sound, etc.). The audio output unit 303 includes a speaker, a buzzer, and a receiver, etc.
[0075] The input unit 304 is used to receive audio or video signals. The input unit 304 may include a Graphics Processing Unit (GPU) 3041 and a microphone 3042. The GPU 3041 processes the image data of static pictures or videos obtained by an image capturing device (such as a camera) in the video capture mode or the image capture mode. The processed image frames can be displayed on the display unit 306. The image frames processed by the GPU 3041 can be stored in the memory 309 (or other storage media) or transmitted via the radio frequency unit 301 or the network module 302. The microphone 3042 can receive sounds and process such sounds into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 301 in the case of a phone call mode and output.
[0076] The terminal device 300 further includes at least one sensor 305, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 3051 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 3051 and / or the backlight when the terminal device 300 is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the terminal device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 305 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be elaborated here.
[0077] The display unit 306 is used to display the information input by the user or the information provided to the user. The display unit 306 may include a display panel 3061, and the display panel 3061 can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), etc.
[0078] The user input unit 307 can be used to receive input digital or character information and generate signal inputs related to the user settings and function control of the terminal device. Specifically, the user input unit 307 includes a touch panel 3071 and other input devices 3072. The touch panel 3071, also known as a touch screen, can collect touch operations of the user thereon or nearby (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 3071). The touch panel 3071 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 310, and receives and executes the command sent by the processor 310. In addition, the touch panel 3071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 3071, the user input unit 307 can also include other input devices 3072. Specifically, the other input devices 3072 can include but are not limited to a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, which will not be elaborated here.
[0079] Furthermore, the touch panel 3071 can cover the display panel 3061. After the touch panel 3071 detects a touch operation thereon or nearby, it transmits the operation to the processor 310 to determine the type of the touch event. Subsequently, the processor 310 provides a corresponding visual output on the display panel 3061 according to the type of the touch event. Although in Figure 3 the touch panel 3071 and the display panel 3061 are implemented as two independent components to realize the input and output functions of the terminal device, in some embodiments, the touch panel 3071 and the display panel 3061 can be integrated to realize the input and output functions of the terminal device, and specific details are not limited here.
[0080] The interface unit 308 is an interface for connecting an external device to the terminal device 300. For example, the external device can include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headset port, and so on. The interface unit 308 can be used to receive inputs from an external device (such as data information, power, etc.) and transmit the received inputs to one or more components within the terminal device 300 or can be used to transmit data between the terminal device 300 and the external device.
[0081] The memory 309 can be used to store software programs and various data. The memory 309 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 309 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0082] The processor 310 is the control center of the terminal device, connecting various parts of the entire terminal device through various interfaces and lines. By running or executing the software programs and / or modules stored in the memory 309, and calling the data stored in the memory 309, it executes various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. The processor 310 can include one or more processing units; preferably, the processor 310 can integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 310.
[0083] The terminal device 300 can also include a power supply 311 (such as a battery) for powering each component. Preferably, the power supply 311 can be logically connected to the processor 310 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.
[0084] In addition, the terminal device 300 includes some functional modules not shown here, which will not be elaborated here.
[0085] Preferably, an embodiment of the present invention further provides a terminal device, including: a processor 310, a memory 309, and a computer program stored on the memory 309 and executable on the processor 310. When the computer program is executed by the processor 310, it implements each process of the above-mentioned embodiment of the image data synchronization method and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0086] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements each process of the above embodiment of the image data synchronization method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.
[0087] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article, or device. Without more limitations, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article, or device including that element.
[0088] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions to enable a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0089] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the purpose of the present invention and the scope protected by the claims, and all of them belong to the protection scope of the present invention.
[0090] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0091] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0092] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0093] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0094] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0095] If the above functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0096] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. An image data synchronization method, characterized in that, The method includes: Obtaining multiple image queues corresponding to multiple cameras, where each image queue corresponds to an independent preset time interval, and the image queue includes image data generated by the camera within the preset time interval; Performing time synchronization according to the timestamps of the image data in the multiple image queues at each preset time interval; The multiple image queues include a first image sequence and at least one second image sequence, where The first image sequence is an image sequence randomly selected from the multiple image queues corresponding to the multiple cameras; Performing time synchronization according to the timestamps of the image data in the multiple image queues at each preset time interval includes: Determining at least one second image data in the at least one second image sequence, where the second image data matches the first image data in the first image sequence, and the first image data is the image data with the minimum timestamp in the first image sequence; Performing time synchronization according to the first image data and the at least one second image data; Determining at least one second image data in the at least one second image sequence includes: If there is no image data in the second image sequence, determining the second image data according to the image data in the third image sequence, where the third image sequence is the image sequence corresponding to the previous time interval of the second image sequence.
2. The method according to claim 1, characterized in that Before obtaining the multiple image queues corresponding to the multiple cameras, it further includes: Receiving the image data corresponding to the camera, where the image data is sent to the image processing terminal after being generated by the camera; Storing the image data into a message queue according to the timestamp of the image data to obtain the image queue, where the message queue is sorted according to the timestamp.
3. The method according to claim 1, wherein Obtaining at least one second image data in the at least one second image sequence includes: Sequentially matching the first image data and the image data in the second image sequence according to the time sorting of the timestamps of the image data in the second image sequence; Determining the image data with a difference in timestamp from the first image data less than a preset time threshold as the second image data.
4. The method according to claim 1, characterized in that Determining at least one second image data in the at least one second image sequence further includes: If the number of image data in the second image sequence is less than a preset number threshold, determining the third image data in the second image sequence as the second image data.
5. The method according to claim 1, characterized in that Performing time synchronization according to the timestamps of the image data in the multiple image queues at each preset time interval includes: Performing time alignment on the first image data and the at least one second image data to obtain environmental image data; Performing image recognition on the environmental image data to obtain environmental data corresponding to the environmental image data.
6. An image data synchronization device, characterized in that, The device includes: An obtaining module, configured to obtain multiple image queues corresponding to multiple cameras, where each image queue corresponds to an independent preset time interval, and the image queue includes image data generated by the camera within the preset time interval; A synchronization module, configured to perform time synchronization according to the timestamps of the image data in the multiple image queues at every preset time interval, where the multiple image queues include a first image sequence and at least one second image sequence; wherein, the first image sequence is an image sequence randomly selected from the multiple image queues corresponding to the multiple cameras; the synchronization module includes: A determination unit, configured to determine at least one second image data in the at least one second image sequence, where the second image data matches the first image data in the first image sequence, and the first image data is the image data with the minimum timestamp in the first image sequence; A synchronization unit, configured to perform time synchronization according to the first image data and the at least one second image data; wherein, determining the at least one second image data in the at least one second image sequence includes: If there is no image data in the second image sequence, determining the second image data according to the image data in the third image sequence, where the third image sequence is the image sequence corresponding to the previous time interval of the second image sequence.
7. The device according to claim 6, characterized in that, It further includes: A receiving module, configured to receive the image data corresponding to the camera before acquiring the multiple image queues corresponding to the multiple cameras, where the image data is sent to the image processing terminal after being generated by the camera; A storage module, configured to store the image data into a message queue according to the timestamp of the image data to obtain the image queue, where the message queue is sorted according to the timestamp.
8. A terminal device, characterized in that, It includes: A memory, a processor, and a computer program stored on the memory and executable on the processor, where when the computer program is executed by the processor, the steps of the image data synchronization method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, where when the computer program is executed by the processor, the steps of the image data synchronization method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Electronic device and image photographing method thereof
CN104935914A
Image processing method and device, electronic equipment, storage medium and image processing system
CN110505466A
Image synchronization method and device, equipment and computer storage medium
CN113728653A