Image data storage method, device, computer equipment and storage medium

By using time synchronization rules and spatial matching rules in image storage to determine image data association information, and writing auxiliary reference image data into the extension area of ​​RGB image file, the problems of high complexity and poor correlation in the prior art are solved. The synchronous storage and efficient association of image data are realized.

CN113987231BActive Publication Date: 2025-02-14BEIJING AIBI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111274548.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-02-14
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In the prior art, when storing images, RGB images and auxiliary reference images (such as depth images) are stored separately, and are associated by labeling, resulting in high storage complexity and poor correlation, which affects subsequent detection and use.

Method used

Using an image data storage method, image data association information is determined through time synchronization rules and/or spatial matching rules, the second image data is written into the extension area of ​​the image file format corresponding to the first image data, and an image file is generated.

Benefits of technology

The data synchronous storage of RGB images and auxiliary reference images is realized, reducing storage complexity, improving image correlation, and facilitating subsequent detection and use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113987231B_ABST
    Figure CN113987231B_ABST
Patent Text Reader

Abstract

The present application relates to an image data storage method, device, computer equipment, storage medium and computer program product. The method comprises: collecting first image data and second image data; the second image data is auxiliary reference data of the first image data; based on time synchronization rules and / or space matching rules, determining image data association information, writing the image data association information and the second image data into an extension area of ​​an image file format corresponding to the first image data according to data format rules, and generating an image file. The method can realize synchronous storage of different types of image data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image detection technology, and in particular to an image data storage method, device, computer equipment and storage medium. Background Art

[0002] With the development of AI (Artificial Intelligence) visual detection technology, the accuracy of target object detection based solely on RGB (Red Green Blue, three primary colors) images can no longer meet the current detection accuracy requirements. Therefore, current camera equipment has realized the function of acquiring RGB images and auxiliary reference images (for example, depth images) for the same scene. Furthermore, when the camera device collects image data, the camera device synchronously acquires the RGB image and the auxiliary reference image and stores the image.

[0003] However, when storing images, the two types of image data obtained by the camera device are often stored separately, and the two types of images are associated through labeling. This storage method increases the storage complexity and the image correlation is poor, which brings difficulties to the subsequent detection and use of image data. Therefore, an image data storage method is urgently needed. Summary of the invention

[0004] Based on this, it is necessary to provide an image data storage method, device, computer equipment, computer-readable storage medium and computer program product to address the above technical problems.

[0005] In a first aspect, the present application provides a method for storing image data. The method comprises:

[0006] Collecting first image data and second image data; the second image data is auxiliary reference data of the first image data;

[0007] Based on time synchronization rules and / or space matching rules, image data association information is determined, and the image data association information and the second image data are written into an extension area of ​​the image file format corresponding to the first image data according to data format rules to generate an image file.

[0008] In one embodiment, the method further comprises:

[0009] Parse the image file according to the data format rule to obtain the first image data, the second image data and the image data association information; the image data association information includes the time synchronization information and the space matching information;

[0010] The first image data and the second image data are restored according to the time synchronization information and the space matching information.

[0011] In one embodiment, the collecting of the first image data and the second image data comprises:

[0012] According to a preset time interval, synchronously collect a first image signal and a second image signal, and add timestamp information to the first image signal and the second image signal;

[0013] Performing encoding processing on the first image signal through a first image processing channel to obtain first image data;

[0014] The second image signal is encoded through a second image processing channel to obtain second image data.

[0015] In one of the embodiments, before determining the image data association information based on the time synchronization rule and / or the space matching rule, the method further includes:

[0016] Based on the image file format corresponding to the first image data, data format rules and / or data synchronization rules contained in the image file format are read; the data synchronization rules include time synchronization rules and space matching rules.

[0017] In one of the embodiments, determining the image data association information based on the time synchronization rule and / or the space matching rule includes:

[0018] Determining synchronization timestamp information corresponding to the first image data and the second image data according to the time synchronization rule;

[0019] According to the spatial matching rule, the resolution correction coordinate information corresponding to the first image data and the second image data is determined.

[0020] In one embodiment, writing the image data association information and the second image data into an extension area of ​​an image file format corresponding to the first image data to generate an image file includes:

[0021] Writing the first image data into a storage area in an image file format; the image file format is a basic file format of the first image data;

[0022] identifying an extension area in the image file format according to a preset extension area identifier;

[0023] In the extension area, the second image data is written according to a preset extension area writing rule, and the image data association information is added to the data synchronization rule of the image file format to generate an image file.

[0024] In one embodiment, the image file format includes a plurality of extension areas carrying the preset extension area identifiers, and writing the second image data into the extension areas according to the preset extension area writing rules includes:

[0025] Based on a preset write data amount, the full amount of the second image data is divided into data units; each of the data units contains the second image data of the write data amount;

[0026] The data unit is written into the extension area carrying the preset extension area identifier according to the data writing order, and a writing sequence number is added to the extension area.

[0027] In a second aspect, the present application also provides an image data storage device. The device comprises:

[0028] An acquisition module, used for acquiring first image data and second image data; the second image data is auxiliary reference data of the first image data;

[0029] A generation module is used to determine image data association information based on time synchronization rules and / or space matching rules, write the image data association information and the second image data into an extension area of ​​the image file format corresponding to the first image data according to data format rules, and generate an image file.

[0030] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0031] Collecting first image data and second image data; the second image data is auxiliary reference data of the first image data;

[0032] Based on time synchronization rules and / or space matching rules, image data association information is determined, and the image data association information and the second image data are written into an extension area of ​​the image file format corresponding to the first image data according to data format rules to generate an image file.

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0034] Collecting first image data and second image data; the second image data is auxiliary reference data of the first image data;

[0035] Based on time synchronization rules and / or space matching rules, image data association information is determined, and the image data association information and the second image data are written into an extension area of ​​the image file format corresponding to the first image data according to data format rules to generate an image file.

[0036] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0037] Collecting first image data and second image data; the second image data is auxiliary reference data of the first image data;

[0038] Based on time synchronization rules and / or space matching rules, image data association information is determined, and the image data association information and the second image data are written into an extension area of ​​the image file format corresponding to the first image data according to data format rules to generate an image file.

[0039] In the above-mentioned image data storage method, apparatus, computer equipment, storage medium and computer program product, the acquisition system acquires the first image data and the second image data; wherein the second image data is auxiliary reference data of the first image data. Then, the acquisition system determines the image data association information based on the time synchronization rule and / or the space matching rule, writes the image data association information and the second image data into the extension area of ​​the image file format corresponding to the first image data according to the data format rule, and generates an image file. With this method, the generated image file contains the first image data, the second image data and the image data association information, and then, due to the natural association relationship formed in the same image file, the data synchronization storage between the two image data is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of a flow chart of an image data storage method in one embodiment;

[0041] Figure 2 is a flow chart of an image data restoration step in one embodiment;

[0042] Figure 3 is a schematic flow chart of an image data acquisition step in one embodiment;

[0043] Figure 4 A flowchart of a data format and synchronization rules for reading an image file format in one embodiment;

[0044] Figure 5 A flowchart of the steps of obtaining data synchronization information based on data synchronization rules in one embodiment;

[0045] Figure 6 A schematic diagram of a flow chart of steps for writing image data and image data associated information in one embodiment;

[0046] Figure 7 A flowchart of a step of writing data based on a preset amount of written data in one embodiment;

[0047] Figure 8 is a structural block diagram of an image data storage device in one embodiment;

[0048] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] In one embodiment, Figure 1 As shown, a method for storing image data is provided. This embodiment takes the method applied to a computer device capable of performing image acquisition and image processing as an example. In this embodiment, the method includes the following steps:

[0051] Step 102: Acquire first image data and second image data.

[0052] The second image data is auxiliary reference data of the first image data.

[0053] In implementation, the data acquisition module in the computer device synchronously (or simultaneously) acquires the first image data and the second image data based on a preset time interval.

[0054] Specifically, when the computer device collects image data, it can synchronously collect at least two types of image data. These two types of image data are image data collected by the same collection device (computer device) at the same collection angle. These two types of image data correspond to two different feature dimensions, which more accurately reflect the real situation in the collection scene. For example, the first image data type can be a color visual image type, such as RGB (Red, Green, Blue image three primary colors) data. The image data of the first image data type is used as the first image data to reflect the image visual information in the collection scene. The second image data type can be a distance image type, such as depth data. The image data of this image data type is used as the second image data to reflect the relative position relationship between each pixel in the image visual information (the depth distance of each pixel based on the reference plane). Since the first image data and the second image data are image feature data of different dimensions, the second image data can assist the first image data in image data applications such as image detection.

[0055] Optionally, the first image data is used to display the color visual image information of the acquisition scene at each acquisition moment during the acquisition process. This type of image data can be RGB data, and can also be PNG (Portable Network Graphics) data, GIF (Graphics Interchange Format) data, TIFF (Tagged Image File Format) data. The embodiment of the present application does not limit the data format type of the first image data. The second image data is used to reflect the image feature information of other dimensions in addition to visual color in the acquisition scene. Therefore, the second image data can be, but is not limited to, depth image data.

[0056] Step 104, based on the time synchronization rule and / or the space matching rule, determine the image data association information, write the image data association information and the second image data into the extension area of ​​the image file format corresponding to the first image data according to the data format rule, and generate an image file.

[0057] In implementation, the computer device determines the image data association information for each set of the first image data and the second image data based on the preset time synchronization rule and / or space matching rule. Then, the first image data is written into the storage area of ​​the image file format, and based on the image file format of the first image data (also referred to as the basic image file format), the image data association information and the second image data are written into the extension area of ​​the image file format corresponding to the first image data according to the preset data format rule to generate an image file.

[0058] For example, when the first image data is RGB image data, the conventional image file format of the RGB image data is the JPEG (Joint Photographic Experts Group) image file format, which is composed of multiple areas, wherein the first image data is written into a standard storage area of ​​the JPEG image file format based on the JPEG image file format, and then the second image data (for example, depth data) and image data-related information are written into an extended area of ​​the JPEG image file format according to predefined data format rules, thereby generating an image file containing the first image data, the second image data, and the image data-related information.

[0059] Optionally, the image data association information includes synchronization timestamp information and spatial matching information. Therefore, after the first image data and the second image data and the corresponding image data association information are encapsulated as an image file, not only can the auxiliary application of the first image data and the second image data (same acquisition angle) after offline can be realized based on the image data association information in the image file, but also multi-angle image detection of the same target scene can be realized for image files generated by different sampling devices (corresponding to different acquisition angles) for the same target scene (or target object) based on the synchronization timestamp information (accurate to milliseconds) and spatial matching information (i.e., image data association relationship) in the image files.

[0060] In the above-mentioned image data storage method, the computer device collects the first image data and the second image data; wherein the second image data is the auxiliary reference data of the first image data. Then, the computer device determines the image data association information based on the time synchronization rule and / or the space matching rule, writes the image data association information and the second image data into the extension area of ​​the image file format corresponding to the first image data according to the data format rule, and generates an image file. With this method, the generated image file contains the first image data, the second image data and the image data association information, and then, due to the natural association relationship formed in the same image file, the data synchronization storage between the two image data is realized.

[0061] In one embodiment, if Figure 2 As shown, the method also includes:

[0062] Step 202: parse the image file according to the data format rule to obtain the first image data, the second image data and the image data associated information.

[0063] The image data association information includes time synchronization information and space matching information.

[0064] In implementation, the first image data, the second image data and the image data associated information are written based on preset data format rules. Thus, the image data can be reversely parsed based on the data format rules. Specifically, the computer device parses the image file according to the preset data format rules to obtain the first image data, the second image data and the image data associated information.

[0065] Specifically, when the first image data is RGB data, the second image data is depth data, and the image data associated information is timestamp information and correction coordinates, the computer device restores the RGB image data based on the RGB data processing channel according to the encoding parsing rules (data format rules) in the JPEG image file format, and the RGB image data represents the visual image data at the time of image acquisition. Then, the computer device parses the second image data (depth data) and image data associated information in the image file according to the predefined data format rules (i.e., the rules when writing).

[0066] Step 204: restore the first image data and the second image data according to the time synchronization information and the space matching information.

[0067] In implementation, the computer device restores the first image data and the second image data according to the time synchronization information and the space matching information. Specifically, the image data association information may include time synchronization information, such as synchronization timestamp information at the time of acquisition, and may also include space matching information, such as pixel correction coordinates (or coordinate correction relationship) at the same acquisition angle. Therefore, after the computer device parses the first image data, the second image data and the image data association information in the image file, the computer device may restore the time synchronization relationship between the first image data and the second image data at the time of acquisition based on the time synchronization information (timestamp information at the time of acquisition), and may restore the correspondence between the pixel values ​​of each pixel of the first image data and the second image data at different resolutions based on the space matching information (corrected coordinates). Typically, the resolutions of the first image data and the second image data are different, which results in different matrix sizes (different dimensions) of the pixel matrix of the first image data and the pixel matrix of the second image data. Therefore, based on the correction coordinates in the image data association information, a coordinate correction relationship can be established between the four corner coordinates of the pixel matrix corresponding to the first image data and the pixel matrix corresponding to the second image data to restore the correspondence between each pixel point in the spatial pixel matrix of the first image data and each pixel point in the spatial pixel matrix of the second image data.

[0068] In one embodiment, if Figure 3 As shown, the specific processing process of step 102 includes:

[0069] Step 302: synchronously collect the first image signal and the second image signal according to a preset time interval, and add time stamp information to the first image signal and the second image signal.

[0070] In implementation, the computer device includes image data acquisition modules (or image acquisition sensors integrated therein) that contain different types of image data, and each image acquisition module synchronously acquires a first image signal and a second image signal according to a preset time interval. For example, the RGB image acquisition module and the depth image acquisition module synchronously acquire RGB image signals and depth image signals of the same shooting angle, and add synchronization timestamp information of the acquisition moment to the two image signals. Specifically, the image acquisition module synchronously (or simultaneously) acquires RGB image signals and depth image signals based on a preset time interval, and a time series of RGB image signals and a time series of depth image signals can be obtained.

[0071] Optionally, in addition to integrating an image acquisition module inside a computer device for image acquisition, an image sensor may be connected to the computer device for image acquisition, for example, an RGB sensor (SENSOR) may be connected to acquire RGB image data, and a depth sensor may be connected to acquire depth image data. The sensor may be connected wirelessly or wired.

[0072] Step 304: encode the first image signal through a first image processing channel to obtain first image data.

[0073] In implementation, the computer device encodes the first image signal through the first image processing channel to obtain the first image data. Specifically, Figure 4 As shown, the RGB image data acquisition module (also called RGBSENSOR) in the computer device encodes and compresses the first image signal (RGB image signal) through the RGB data processing channel to obtain encoded JPEG encoded data (ie, the first image data).

[0074] Step 306: Encode the second image signal through a second image processing channel to obtain second image data.

[0075] In implementation, the computer device encodes and compresses the second image signal through the second image processing channel to obtain second image data. Specifically, Figure 4 As shown, the depth image data acquisition module (DepthSENSOR) in the computer device encodes and compresses the second image signal through the depth data processing channel to obtain encoded point cloud data (ie, the second image data).

[0076] Optionally, the first image data processing channel and the second image data processing channel process the image data in parallel. At the same time, cache queues are respectively set in the first image data processing channel and the second image data processing channel, and after the image data of the same frame image is accessed, the image data is processed centrally.

[0077] In one embodiment, a data format rule and a data synchronization rule are pre-set in the image file format of the first image data, and before step 104, the method further includes:

[0078] Based on the image file format corresponding to the first image data, the data format rule and the data synchronization rule contained in the image file format are read, wherein the data synchronization rule includes a time synchronization rule and a space matching rule.

[0079] In implementation, the computer device reads the data format rules and data synchronization rules predefined in the image file format based on the image file format corresponding to the first image data. Specifically, the computer device can read the data format rules predefined in the JPEG image file format, such as the single data writing amount rule, the single data writing amount occupied extension area rule, the extension area identification rule, and the extension area numbering rule, based on the JPEG image file format. At the same time, the computer device can read the pre-set data synchronization rules in the JPEG image file format, namely, the time synchronization rule (for example, timestamp (8 bytes): XXX) and the space matching rule (corrected coordinates (32 bytes): XXX). So that the image data association information can be determined according to the data synchronization rule, and then the image data association information can be written into the data synchronization rule target position according to the preset data format rule. For example, if the time synchronization information in the image data association information is 2101.10.21, 17:0040 765, then the time synchronization information (2101.10.21, 17:0040 765) (time stamp is at least accurate to milliseconds) is written into the target position of the time synchronization rule: timestamp: XXX, and the data record of timestamp: 2101.10.21, 17:0040 765 is obtained. The target position written into the spatial matching rule is the same as the time synchronization rule, that is, the "XXX" position in the spatial matching rule is written. The embodiments of the present application will not be repeated here.

[0080] In one embodiment, if Figure 5 As shown, the specific processing process of determining the image data association information based on the time synchronization rule and / or the data synchronization rule in step 104 includes:

[0081] Step 502: Determine synchronization timestamp information corresponding to the first image data and the second image data according to a time synchronization rule.

[0082] In implementation, the computer device determines the synchronization timestamp information corresponding to the first image data and the second image data according to the time synchronization rule. Specifically, the image data acquisition device of the computer device records the timestamp information of each acquisition moment during the image acquisition process. When the data stream of the first image data and the second image data is acquired for storage, the computer device obtains the acquisition time record corresponding to the current first image data and the second image data in the computer device based on the predefined time synchronization rule, and determines the synchronization timestamp information corresponding to the current first image data and the second image data.

[0083] Optionally, the specific accuracy of the timestamp may be based on the time accuracy maintained by the electronic system (computer device) itself.

[0084] Step 504: Determine the resolution correction coordinate information corresponding to the first image data and the second image data according to the space matching rule.

[0085] In implementation, the computer device reads the predefined spatial matching rules (correction coordinates (32 bytes): XXX) in the image file format, obtains the resolution correction coordinate information (i.e., spatial matching information) specific to the two image acquisition modules in the computer device, and determines the corresponding pixel coordinates of the four corner pixel points corresponding to each pair of the first image data and the second image data acquired simultaneously. In addition to obtaining the resolution correction coordinate information between the two images, the image data-related attribute information corresponding to each data type can also be recorded, for example, the image data resolution, for example, the resolution of the RGB image data is 1920*1080, and the resolution of the depth image data is 1024*1024, thereby realizing the recording of the image data attribute information.

[0086] In one embodiment, if Figure 6 As shown, in step 104, the image data association information and the second image data are written into the extension area of ​​the image file format corresponding to the first image data according to the data format rule. The specific processing process of generating the image file includes:

[0087] Step 602: write the first image data into a storage area in an image file format.

[0088] The image file format is a basic file format of the first image data.

[0089] In implementation, the computer device writes the first image data into a storage area in an image file format. For example, if the first image data is RGB image data, the RGB image data is written into a storage area in a JPEG image file format according to a conventional JPEG image file format of RGB image data.

[0090] Step 604: Identify the extension area in the image file format according to the preset extension area identifier.

[0091] In implementation, the computer device identifies the extension area in the image file format according to the preset extension area identifier. Specifically, in the JPEG image file format, APPn represents the application extension area, wherein n is 1 to 15, which means that 15 original extension areas are pre-developed in the JPEG image file format. The format of each extension area starts from 0xFFEn, and each extension area can be repeated according to the preset number of repetitions, that is, extension area 1 can be repeated multiple times to generate multiple extension areas 1. Furthermore, in order to embed the second image data into the image file format corresponding to the first image data, the computer device can customize the extension area identifier, and distinguish the extension area to be occupied by the second image data by adding the customized extension area identifier to the extension area. For example, among the 15 original extension areas in the JPEG image file format, only extension area 1 is occupied as the extension area for writing the second image data, and a customized extension area identifier is added to extension area 1. For example, if the customized identifier is "a", extension area 1a represents the extension area for writing the second image data. Furthermore, when writing the second image data, the target extension area is identified in the image file format according to the customized extension area identifier. The custom extended area identifier is used to distinguish the extended area occupied by the current user when writing data from the extended area occupied by other users when writing data.

[0092] Optionally, in addition to occupying only one type of extension area (for example, occupying only extension area 1 and repeating extension area 1 continuously), all original extension areas in the image file format can also be occupied, and custom extension area identifiers can be added to all occupied original extension areas. For example, there are 15 original extension areas, and the second image data are written into extension areas 1 to 15 respectively, and custom extension area identifiers "a" are added to extension areas 1 to 15 to indicate that the extension area has been occupied, so as to distinguish between the current user embedding the second image data into the extension area of ​​the image file format and other users embedding additional auxiliary reference image data (for example, third image data) into the extension area of ​​the image file format.

[0093] Step 606: write the second image data into the extended area according to the preset extended area writing rule, and add the image data association information into the data synchronization rule of the image file format to generate an image file.

[0094] In implementation, in the extension area of ​​the image file format, the computer device writes the second image data according to the preset extension area writing rules, specifically, based on the preset writing rules in the JPEG image file format: only one line (also referred to as a preset writing data amount) of the second image data (depth data) is placed in each extension area, and an extension area number is added to the extension area each time an extension area is written, and the second image data is written line by line. Then, the computer device adds the image data association information in the data synchronization rules of the image file format to generate an image file, specifically, fills in the image data association information of the current first image data and the second image data in the data synchronization rules of the JPEG image file format (for example, timestamp: XXX, correction coordinates: XXX) that have been written into the first image data (RGB image data) and the second image data (depth data), ensures the synchronous association relationship between the two data, and generates the final image file.

[0095] In one embodiment, if Figure 7 As shown, the image file format includes multiple extension areas carrying preset extension area identifiers, and the specific processing of writing the second image data into the extension area according to the preset extension area writing rule in step 606 includes:

[0096] Step 702: based on a preset write data amount, divide the entire second image data into data units.

[0097] In implementation, the computer device divides the full amount of the second image data into data units based on the preset amount of data to be written, so that each data unit contains the second image data of the preset amount of data to be written. Specifically, when the computer device collects the second image data, it collects it by "row", and each row has a fixed number of bytes. Then, the computer device can define the preset amount of data to be written as "one row" of the second image data, so that the second image data can also be written by row when being written.

[0098] Step 704: write the data unit into the extended area carrying the preset extended area identifier according to the data writing order, and add a writing sequence number to the extended area.

[0099] In implementation, the computer device writes all the data contained in each image (RGB image or depth image) in the form of data units in order into the extension area carrying the preset extension area identifier based on the writing order during data acquisition, and adds a writing sequence number to the extension area. For example, the first data unit is written into the first extension area 1a, and then the writing sequence number ① is added to the extension area, that is, the extension area 1a①, the second data unit is written into the second extension area 1a (the copied extension area 1, a is the custom identifier occupying the extension area), and then the writing sequence number ② is added to the extension area, ... The 8th data unit is written into the eighth extension area 1a, and then the writing sequence number ⑧ is added to the extension area. The number of repeatable extension areas can be pre-defined based on the size of the second image data (depth image).

[0100] In one embodiment, the data format rules and data synchronization rules in the image file data format can be pre-defined in the header of the first occupied extension area. Then, when writing data, the computer device can directly read the data format rules defined in the header of the first extension area, write the image data, and record the image data-related information based on the data synchronization rules.

[0101] Among them, the data format rules may include but are not limited to: user-defined extension area identifier (4 bytes): "a", the number of repeatable subsequent extension areas (2 bytes): the maximum number of repetitions is less than or equal to 64KB, each extension area writes a line of second image data, and the extension area carries the sequential number "①", "②", "③..."""; data synchronization rules: timestamp (8 bytes), image data resolution (including the resolution of two image data types), correction coordinates (32 bytes). The above data synchronization rules can all be filled in with corresponding image synchronization information. For example, timestamp: 2021.10.21, 19:00. First image data resolution: 1920*1080, etc., this application will not give detailed examples.

[0102] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0103] Based on the same inventive concept, the embodiment of the present application also provides an image data storage device for implementing the above-mentioned image data storage method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more image data storage device embodiments provided below can refer to the limitations on the image data storage method above, and will not be repeated here.

[0104] In one embodiment, Figure 8 As shown, an image data storage device 800 is provided, comprising: a collection module 810 and a generation module 820, wherein:

[0105] The acquisition module 810 is used to acquire first image data and second image data; the second image data is auxiliary reference data of the first image data;

[0106] The generation module 820 is used to determine the image data association information based on the time synchronization rule and / or the space matching rule, write the image data association information and the second image data into the extension area of ​​the image file format corresponding to the first image data according to the data format rule, and generate an image file.

[0107] The above-mentioned image data storage device 800 collects first image data and second image data; wherein the second image data is auxiliary reference data of the first image data. Then, based on the time synchronization rule and / or the space matching rule, the image data association information is determined, and the image data association information and the second image data are written into the extension area of ​​the image file format corresponding to the first image data according to the data format rule to generate an image file. With this method, the generated image file contains the first image data, the second image data and the image data association information, and then, due to the natural association relationship formed in the same image file, the data synchronization storage between the two image data is realized.

[0108] In one embodiment, the apparatus 800 further includes:

[0109] A parsing module, used to parse the image file according to the data format rule to obtain the first image data, the second image data and image data association information; the image data association information includes time synchronization information and space matching information;

[0110] The synchronous restoration module is used to restore the first image data and the second image data according to the time synchronization information and the space matching information.

[0111] In one embodiment, the acquisition module 810 is specifically used to synchronously acquire the first image signal and the second image signal according to a preset time interval, and add timestamp information to the first image signal and the second image signal;

[0112] Performing encoding processing on the first image signal through a first image processing channel to obtain first image data;

[0113] The second image signal is coded through the second image processing channel to obtain second image data.

[0114] In one embodiment, the apparatus 800 further includes:

[0115] The reading module is used to read the data format rules and / or data synchronization rules contained in the image file format based on the image file format corresponding to the first image data; the data synchronization rules include time synchronization rules and space matching rules.

[0116] In one of the embodiments, the generating module 820 is specifically used to determine the synchronization timestamp information corresponding to the first image data and the second image data according to the time synchronization rule;

[0117] According to the space matching rule, the resolution correction coordinate information corresponding to the first image data and the second image data is determined.

[0118] In one embodiment, the generating module 820 is specifically used to write the first image data into a storage area in an image file format; the image file format is a basic file format of the first image data;

[0119] Identify the extension area in the image file format according to the preset extension area identifier;

[0120] In the extended area, the second image data is written according to a preset extended area writing rule, and image data association information is added to the data synchronization rule of the image file format to generate an image file.

[0121] In one embodiment, the generating module 820 is further used to divide the full amount of the second image data into data units based on a preset amount of written data; each data unit includes the second image data of the amount of written data;

[0122] The data unit is written into the extended area carrying the preset extended area identifier according to the data writing order, and a writing sequence number is added to the extended area.

[0123] Each module in the above-mentioned image data storage device 800 can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0124] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an image data storage method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the computer device housing, or an external keyboard, touch pad or mouse, etc.

[0125] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0126] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0127] Collecting first image data and second image data; the second image data is auxiliary reference data of the first image data;

[0128] Based on the time synchronization rule and / or the space matching rule, the image data association information is determined, and the image data association information and the second image data are written into the extension area of ​​the image file format corresponding to the first image data according to the data format rule to generate an image file.

[0129] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0130] Parse the image file according to the data format rule to obtain the first image data, the second image data and image data association information; the image data association information includes time synchronization information and space matching information;

[0131] The first image data and the second image data are restored according to the time synchronization information and the space matching information.

[0132] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0133] According to a preset time interval, synchronously collect the first image signal and the second image signal, and add timestamp information to the first image signal and the second image signal;

[0134] Performing encoding processing on the first image signal through a first image processing channel to obtain first image data;

[0135] The second image signal is coded through the second image processing channel to obtain second image data.

[0136] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0137] Based on the image file format corresponding to the first image data, the data format rule and / or data synchronization rule contained in the image file format is read; the data synchronization rule includes a time synchronization rule and a space matching rule.

[0138] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0139] Determine synchronization timestamp information corresponding to the first image data and the second image data according to a time synchronization rule;

[0140] According to the space matching rule, the resolution correction coordinate information corresponding to the first image data and the second image data is determined.

[0141] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0142] Writing the first image data into a storage area in an image file format; the image file format is a basic file format of the first image data;

[0143] Identify the extension area in the image file format according to the preset extension area identifier;

[0144] In the extended area, the second image data is written according to a preset extended area writing rule, and image data association information is added to the data synchronization rule of the image file format to generate an image file.

[0145] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0146] Based on a preset write data amount, the full amount of the second image data is divided into data units; each data unit includes the second image data of the write data amount;

[0147] The data unit is written into the extended area carrying the preset extended area identifier according to the data writing order, and a writing sequence number is added to the extended area.

[0148] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0149] Collecting first image data and second image data; the second image data is auxiliary reference data of the first image data;

[0150] Based on the time synchronization rule and / or the space matching rule, the image data association information is determined, and the image data association information and the second image data are written into the extension area of ​​the image file format corresponding to the first image data according to the data format rule to generate an image file.

[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0152] Parse the image file according to the data format rule to obtain the first image data, the second image data and image data association information; the image data association information includes time synchronization information and space matching information;

[0153] The first image data and the second image data are restored according to the time synchronization information and the space matching information.

[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0155] According to a preset time interval, synchronously collect the first image signal and the second image signal, and add timestamp information to the first image signal and the second image signal;

[0156] Performing encoding processing on the first image signal through a first image processing channel to obtain first image data;

[0157] The second image signal is coded through the second image processing channel to obtain second image data.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] Based on the image file format corresponding to the first image data, the data format rule and / or data synchronization rule contained in the image file format is read; the data synchronization rule includes a time synchronization rule and a space matching rule.

[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0161] Determine synchronization timestamp information corresponding to the first image data and the second image data according to a time synchronization rule;

[0162] According to the space matching rule, the resolution correction coordinate information corresponding to the first image data and the second image data is determined.

[0163] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0164] Writing the first image data into a storage area in an image file format; the image file format is a basic file format of the first image data;

[0165] Identify the extension area in the image file format according to the preset extension area identifier;

[0166] In the extended area, the second image data is written according to a preset extended area writing rule, and image data association information is added to the data synchronization rule of the image file format to generate an image file.

[0167] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0168] Based on a preset write data amount, the full amount of the second image data is divided into data units; each data unit includes the second image data of the write data amount;

[0169] The data unit is written into the extended area carrying the preset extended area identifier according to the data writing order, and a writing sequence number is added to the extended area.

[0170] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0172] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0173] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0174] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for storing image data, characterized in that: The method comprises: Collecting first image data and second image data; the second image data is auxiliary reference data of the first image data; Determine image data association information based on a time synchronization rule and / or a space matching rule; Writing the first image data into a storage area in an image file format; the image file format is a basic file format of the first image data; the data format rules and data synchronization rules in the image file format are predefined in the header of the first occupied extension area; identifying an extension area in the image file format according to a preset extension area identifier; In the extension area, the second image data is written according to a preset extension area writing rule, and the image data associated information is added to the data synchronization rule of the image file format to generate an image file.

2. The method according to claim 1, characterized in that The method further comprises: Parse the image file according to the data format rule to obtain the first image data, the second image data and the image data association information; the image data association information includes the time synchronization information and the space matching information; The first image data and the second image data are restored according to the time synchronization information and the space matching information.

3. The method according to claim 1, characterized in that The collecting of the first image data and the second image data comprises: According to a preset time interval, synchronously collect a first image signal and a second image signal, and add timestamp information to the first image signal and the second image signal; Performing encoding processing on the first image signal through a first image processing channel to obtain first image data; The second image signal is encoded through a second image processing channel to obtain second image data.

4. The method according to claim 1, characterized in that: Before determining the image data association information based on the time synchronization rule and / or the space matching rule, the method further includes: Based on the image file format corresponding to the first image data, data format rules and / or data synchronization rules contained in the image file format are read; the data synchronization rules include time synchronization rules and space matching rules.

5. The method according to claim 1, characterized in that The determining of image data association information based on the time synchronization rule and / or the space matching rule includes: Determining synchronization timestamp information corresponding to the first image data and the second image data according to the time synchronization rule; According to the spatial matching rule, the resolution correction coordinate information corresponding to the first image data and the second image data is determined.

6. The method according to claim 1, characterized in that The image file format includes a plurality of extension areas carrying the preset extension area identifiers, and the second image data is written into the extension areas according to the preset extension area writing rules, including: Based on a preset write data amount, the full amount of the second image data is divided into data units; each of the data units contains the second image data of the write data amount; The data unit is written into the extension area carrying the preset extension area identifier according to the data writing order, and a writing sequence number is added to the extension area.

7. An image data storage device, characterized in that: The device comprises: An acquisition module, used for acquiring first image data and second image data; the second image data is auxiliary reference data of the first image data; A generation module is used to determine image data association information based on time synchronization rules and / or space matching rules, and write the first image data into a storage area of ​​an image file format; the image file format is a basic file format of the first image data; the data format rules and data synchronization rules in the image file format are predefined in the header of the first occupied extension area; according to a preset extension area identifier, the extension area is identified in the image file format; in the extension area, the second image data is written according to the preset extension area writing rules, and the image data association information is added in the data synchronization rules of the image file format to generate an image file.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Sensor data generation, transmission and processing methods, devices and systems

    CN108881946A