CN115761019A - Infrared imaging picture-based format processing method and device - Google Patents

Infrared imaging picture-based format processing method and device Download PDF

Info

Publication number
CN115761019A
CN115761019A CN202211453832.XA CN202211453832A CN115761019A CN 115761019 A CN115761019 A CN 115761019A CN 202211453832 A CN202211453832 A CN 202211453832A CN 115761019 A CN115761019 A CN 115761019A
Authority
CN
China
Prior art keywords
custom
data
picture
format
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211453832.XA
Other languages
Chinese (zh)
Inventor
黄晟
杨艳峰
王鹏
周汉林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Guide Sensmart Tech Co ltd
Original Assignee
Wuhan Guide Sensmart Tech Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Guide Sensmart Tech Co ltd filed Critical Wuhan Guide Sensmart Tech Co ltd
Priority to CN202211453832.XA priority Critical patent/CN115761019A/en
Publication of CN115761019A publication Critical patent/CN115761019A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the invention provides a format processing method and device based on an infrared imaging picture, wherein the method comprises the following steps: acquiring target infrared picture data, and compressing the target infrared picture data into preset format data; acquiring custom information, and splicing the content of the custom information to generate custom data; and adding the custom data into the tail part of the preset format data to generate a custom format compression packet. Therefore, the new custom format picture not only contains the data content of the original picture format, but also contains custom data, namely the new format can store a lot of core information except the original data, the set verification process is simple and reasonable, the accuracy is high, the efficiency is high, additional files such as audio files do not need to be created, video files and label files are used for storing audio, video and labels, and the picture in the new format can meet the requirements of a user and can not enable the user to feel that the image does not correspond to the content.

Description

Infrared imaging picture-based format processing method and device
Technical Field
The invention relates to the technical field of image processing, in particular to a format processing method and device based on an infrared imaging picture.
Background
The image format, that is, the format in which the image file is stored on the memory card, is generally jpeg, TIFF, RAW, or the like. Since the image file captured by the digital camera is large and has limited storage capacity, the image is usually compressed and stored, for example, the jpeg format is a standard picture format, but some core information may be added to the exif structure of the format.
However, in the prior art, for example, the exif structure in jpeg can hold a small amount of specific information, but has the following defects: 1. the keywords of the specific information are defined by the exif structure of the jpeg, and if a content different from the specific meaning is stored, the user can feel that the text is not correct; 2. the extensibility is poor, the number of keywords in the exif structure is limited, and various custom content requirements cannot be met.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a format processing method and device based on an infrared imaging picture.
The embodiment of the invention provides a format processing method based on an infrared imaging picture, which comprises the following steps:
acquiring target infrared picture data, and compressing the target infrared picture data into preset format data;
acquiring custom information, and splicing the content of the custom information to generate custom data;
and adding the custom data into the tail part of the preset format data to generate a custom format compression packet.
In one embodiment, the method further comprises:
the self-defined frame head identification, the core information length, the core information, the starting value of the self-defined data and the self-defined frame tail identification.
In one embodiment, the method further comprises:
and sequentially splicing the custom frame header identification, the core information length, the core information, the starting value of the custom data and the custom frame tail identification to generate the custom data.
In one embodiment, the method further comprises:
after receiving a picture compression packet, analyzing and traversing tail bytes of the picture compression packet, and comparing and verifying whether the tail bytes are consistent with the custom frame tail identification;
if the two-dimensional image compression packets are consistent, the image compression packet is the custom format compression packet, and the initial value of the custom data is obtained through traversal;
and performing address offset according to the initial value of the custom data, and verifying whether the corresponding content after the address offset is consistent with the splicing content of the custom data.
In one embodiment, the method further comprises:
verifying whether the corresponding content after the address offset is a custom frame header identifier, core information length and core information in sequence;
and if the correspondence is consistent, outputting the core information.
In one embodiment, the method further comprises:
and presetting the corresponding relation between the custom frame head identification and the custom frame tail identification.
In one embodiment, the method further comprises:
the initial value of the user-defined data is the byte number of the target infrared picture data;
the length of the core information is the byte number of the core information.
In one embodiment, the method further comprises:
serializing the custom data by using a preset format to generate serialized data corresponding to the custom data;
and the custom frame header identification, the custom information length, the custom information, the starting offset address and the custom frame tail identification are sequentially spliced to generate custom data.
The embodiment of the invention provides a format processing device based on an infrared imaging picture, which comprises:
the first acquisition module is used for acquiring target infrared picture data and compressing the target infrared picture data into preset format data;
the second acquisition module is used for acquiring custom information and splicing the content of the custom information to generate custom data;
and the generating module is used for adding the custom data into the tail part of the preset format data to generate a custom format compression packet.
An embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the format processing method based on infrared imaging pictures.
The embodiment of the invention provides a format processing method and device based on an infrared imaging picture, which are used for acquiring target infrared picture data and compressing the target infrared picture data into preset format data; acquiring custom information, and splicing the content of the custom information to generate custom data; and adding the custom data into the tail part of the preset format data to generate a custom format compression packet. The new format picture is utilized to contain the data content of the original picture format and the custom data, namely the new format can store a lot of core information except the original data, the set verification process is simple and reasonable, the accuracy is high, the efficiency is high, extra files such as audio files, video files and label files are not required to be created to store audio, video and labels, and the picture of the new format can meet the user requirement and can not enable the user to feel that the image does not correspond to the content.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a format processing method based on an infrared imaging picture according to an embodiment of the present invention;
FIG. 2 is a block diagram of an apparatus for processing IR imaging photo-based format according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a format processing method based on an infrared imaging picture according to an embodiment of the present invention, and as shown in fig. 1, an embodiment of the present invention provides a format processing method based on an infrared imaging picture, including:
step S101, acquiring target infrared picture data, and compressing the target infrared picture data into preset format data.
Specifically, the target infrared picture data is original picture data, and the target infrared picture data is first compressed into data in a preset format, for example, the RAW format picture is compressed into a jpeg format.
Step S102, obtaining custom information, wherein the custom information comprises: the method comprises the steps of self-defining frame header identification, core information length, core information, a starting value of self-defining data and self-defining frame tail identification.
Specifically, core information to be added to a picture is obtained, where the core information may be, for example, a shooting location of the picture, a shooting person, shooting time, a text note during shooting, a visible light mark during shooting, a voice record during shooting, and the like, and to be added to the picture, a custom frame header identifier, a core information length, a starting value of custom data, and a custom frame tail identifier need to be set, where the "custom frame header identifier" may be customized by a user according to a requirement of the user, for example, the custom frame header identifier is defined as "0xAA, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0x33", total 8 bytes are used, the custom frame tail identifier establishes a corresponding relationship with the custom identifier, and the content is easily recognized, for example, the custom frame tail identifier is set as 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, and is also 8 bytes. The core information length indicates the number of bytes of the added core information, and the address size for storing the core information length is limited to 4 bytes. And the starting value of the custom data identifies the starting position of the custom data, namely the byte number of the target infrared picture data.
Step S103, obtaining an initial value of the custom data according to the number of bytes of the calculated target infrared picture data; and calculating the byte number of the core information to obtain the length of the core information. And splicing the self-defined frame header identification, the core information length, the core information, the starting value of the self-defined data and the self-defined frame tail identification into the self-defined data according to the sequence of head-to-tail connection.
Specifically, target infrared picture data, a custom frame header identifier, a core information length, core information, a starting value of the custom data, and a custom frame tail identifier are sequentially connected in an end-to-end connection order and spliced into the custom data, and the custom data and the target infrared picture data are shown in table 1 and have a jpeg type.
Figure BDA0003952536920000051
TABLE 1
In addition, the core information may be serialized using a preset format, for example, the core information may be serialized using a json/xml/protobuf format, so as to generate serialized data corresponding to the core information.
And step S104, adding the custom data into the tail part of the preset format data to generate a custom format compression packet.
Specifically, the integrity of the original image data can be ensured by adding the custom data to the end of the preset format data, namely, the custom format compressed packet is generated by adding the custom data after the original image data, and the suffix name of the custom format can be set by self, such as gdpic, jpeg, jpg and the like.
The format processing method based on the infrared imaging picture, provided by the embodiment of the invention, comprises the steps of obtaining target infrared picture data, and compressing the target infrared picture data into preset format data; acquiring custom information, and splicing the content of the custom information to generate custom data; and adding the custom data into the tail part of the preset format data to generate a custom format compression packet. Generating custom data by the custom frame head identification, the core information length, the core information, the starting value of the custom data and the custom frame tail identification according to the sequence of head-to-tail connection; and adding the custom data into the tail of the preset format data, and generating a custom format compression packet. Therefore, the new custom-format picture not only contains the data content of the original picture format, but also contains custom data, namely the new format can store a lot of core information except the original data, no extra files such as audio files, video files and label files are required to be created to store audio, video and labels, and the new-format picture can meet the user requirement.
In another embodiment, for a format processing method based on infrared imaging pictures, for a custom format compression packet, the program presets the direction of each movement of the cursor and the number of bytes traversed, for example, referring to the byte length of the target infrared picture data and the custom data in table 1. After the parsing module of picture received the picture compression package, can traverse the afterbody byte of picture compression package, compare with self-defined frame tail sign according to the afterbody byte, judge whether the picture compression package is self-defined form compression package, when the picture compression package is self-defined form compression package, traverse the first 4 bytes of afterbody byte, the initial value (4 bytes) of self-defined data promptly, and detect whether corresponding content is self-defined frame head sign in proper order, core information length, core information, if correspond completely, output core information, concrete step can include:
1) Traversing from the tail of the file, wherein the self-defined frame tail identifier is 8 bytes, moving the cursor of the file forwards by 8 bytes, traversing the content of the 8 bytes backwards, judging whether the frame tail identifier is '0 x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0 xAA', if not, directly judging that the jpg picture is not a self-defined jpg picture, and if so, entering the step 2);
2) Moving the file cursor forwards for 4 bytes, then traversing 4 bytes backwards to obtain the initial value of the user-defined data, positioning the initial address of the user-defined data by the offset address of the user-defined data in the whole file, and then entering the step 3);
3) Moving the file cursor forward to the position indicated by the "start value of the custom data", and then traversing 8 bytes of content backward to see whether the content is the custom frame header identifier "0xA0x99, 0x88, 0x77, 0x66, 0x44, 0x33", if so, then going to step 4);
4) Traversing the content of 4 bytes backwards to obtain the length of the core information, for example, the read content is 14;
5) Traversing 14 bytes of content backwards, the 14 bytes of content read is followed by "core information".
Fig. 2 is a device for processing a format based on an infrared imaging picture according to an embodiment of the present invention, including: a first obtaining module S201, a second obtaining module S202, and a generating module S203, wherein:
the first obtaining module S201 is configured to obtain target infrared picture data, and compress the target infrared picture data into preset format data.
And a second obtaining module S202, configured to obtain the custom information, and splice the content of the custom information to generate custom data.
And the generating module S203 is configured to add the custom data to the tail of the preset format data, and generate a custom format compression packet.
For specific limitations of the format processing device based on infrared imaging pictures, reference may be made to the above limitations on the format processing method based on infrared imaging pictures, and details are not repeated here. The modules in the format processing device based on infrared imaging pictures can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 3 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 3: a processor (processor) 301, a memory (memory) 302, a communication Interface (Communications Interface) 303 and a communication bus 304, wherein the processor 301, the memory 302 and the communication Interface 303 complete communication with each other through the communication bus 304. The processor 301 may call logic instructions in the memory 302 to perform the following method: acquiring target infrared picture data, and compressing the target infrared picture data into preset format data; acquiring custom information, and splicing the content of the custom information to generate custom data; and adding the custom data into the tail part of the preset format data to generate a custom format compression packet.
Furthermore, the logic instructions in the memory 302 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the transmission method provided in the foregoing embodiments when executed by a processor, and for example, the method includes: acquiring target infrared picture data, and compressing the target infrared picture data into preset format data; acquiring custom information, and splicing the content of the custom information to generate custom data; and adding the custom data into the tail part of the preset format data to generate a custom format compression packet.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on the understanding, the above technical solutions substantially or otherwise contributing to the prior art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A format processing method based on infrared imaging pictures is characterized by comprising the following steps:
acquiring target infrared picture data, and compressing the target infrared picture data into preset format data;
acquiring custom information, and splicing the content of the custom information to generate custom data;
and adding the custom data into the tail part of the preset format data to generate a custom format compression packet.
2. The infrared imaging picture-based format processing method as claimed in claim 1, wherein the custom information includes:
the method comprises the steps of self-defining frame head identification, core information length, core information, a starting value of self-defining data and self-defining frame tail identification.
3. The infrared imaging picture-based format processing method of claim 2, wherein the content splicing of the custom information generates custom data, and comprises:
and sequentially splicing the custom frame header identification, the core information length, the core information, the starting value of the custom data and the custom frame tail identification to generate the custom data.
4. The infrared imaging picture-based format processing method as claimed in claim 2, wherein the method further comprises:
after receiving a picture compression packet, analyzing and traversing tail bytes of the picture compression packet, and comparing and verifying whether the tail bytes are consistent with the custom frame tail identification;
if the picture compression packet is consistent with the user-defined format compression packet, traversing to obtain an initial value of the user-defined data;
and performing address offset according to the initial value of the custom data, and verifying whether the corresponding content after the address offset is consistent with the splicing content of the custom data.
5. The infrared imaging picture-based format processing method according to claim 4, wherein the verifying whether the content corresponding to the address offset is consistent with the splicing content of the custom data includes:
verifying whether the corresponding content after the address offset is a custom frame header identifier, core information length and core information in sequence;
and if the correspondence is consistent, outputting the core information.
6. The infrared imaging picture-based format processing method as claimed in claim 2, wherein the method further comprises:
and presetting the corresponding relation between the custom frame head identifier and the custom frame tail identifier.
7. The method as claimed in claim 4, wherein the performing address offset according to the start value of the custom data comprises:
the initial value of the user-defined data is the byte number of the target infrared picture data;
the length of the core information is the byte number of the core information.
8. The infrared imaging picture-based format processing method as claimed in claim 2, wherein the method further comprises:
serializing the custom data by using a preset format to generate serialized data corresponding to the custom data;
and the custom frame head identification, the custom information length, the custom information, the starting offset address and the custom frame tail identification are sequentially spliced to generate custom data.
9. An infrared imaging picture based format processing apparatus, comprising:
the first acquisition module is used for acquiring target infrared picture data and compressing the target infrared picture data into preset format data;
the second acquisition module is used for acquiring custom information and splicing the content of the custom information to generate custom data;
and the generating module is used for adding the custom data into the tail part of the preset format data to generate a custom format compression packet.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for processing format based on infrared imaging pictures according to any one of claims 1 to 8 when executing the program.
CN202211453832.XA 2022-11-21 2022-11-21 Infrared imaging picture-based format processing method and device Pending CN115761019A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211453832.XA CN115761019A (en) 2022-11-21 2022-11-21 Infrared imaging picture-based format processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211453832.XA CN115761019A (en) 2022-11-21 2022-11-21 Infrared imaging picture-based format processing method and device

Publications (1)

Publication Number Publication Date
CN115761019A true CN115761019A (en) 2023-03-07

Family

ID=85334287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211453832.XA Pending CN115761019A (en) 2022-11-21 2022-11-21 Infrared imaging picture-based format processing method and device

Country Status (1)

Country Link
CN (1) CN115761019A (en)

Similar Documents

Publication Publication Date Title
US8836817B2 (en) Data processing apparatus, imaging apparatus, and medium storing data processing program
US8271544B2 (en) Data file having more than one mode of operation
USRE48430E1 (en) Two-dimensional code processing method and terminal
CN109195007B (en) Video generation method, device, server and computer readable storage medium
EP4148675A1 (en) Method and device for image data encoding, display method and device, and electronic device
EP3780642A1 (en) Streaming media data processing method and streaming media processing server
CN115630618A (en) Intelligent scene editing method, system, equipment and medium for PDF document
US7986350B2 (en) Mobile terminal and operating method thereof
CN106332556B (en) Method and terminal for transmitting cloud files and cloud server
CN111506747B (en) File analysis method, device, electronic equipment and storage medium
CN104243886B (en) A kind of high speed image parsing and video generation method based on plug-in part technology
CN106878145B (en) Display method, display device and display system of user-defined picture
CN110839135B (en) Recovery method and system for DV or HDV video file
CN115761019A (en) Infrared imaging picture-based format processing method and device
CN102855602B (en) Picture processing method and picture processing device
CN101482863A (en) Interest point information storage method
CN116193160A (en) Digital watermark embedding method, device, equipment and medium
JP5264155B2 (en) Program, file management apparatus and file management method
CN115033544A (en) Data compression method, device, equipment and medium based on relation numerical value
US20020111773A1 (en) System and method for associating historical information with sensory data and distribution thereof
CN113099270B (en) File storage method, decoding method, device, storage medium and electronic device
US20120179676A1 (en) Method and apparatus for annotating image in digital camera
CN106874285B (en) Photo file processing method and terminal equipment
CN111797060A (en) Offline video recording method, device and equipment and computer readable storage medium
CN117560539A (en) Private media data transmission method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination