CN116418984A - Method, system and storage medium for compressing infrared image data - Google Patents

Method, system and storage medium for compressing infrared image data Download PDF

Info

Publication number
CN116418984A
CN116418984A CN202310228569.2A CN202310228569A CN116418984A CN 116418984 A CN116418984 A CN 116418984A CN 202310228569 A CN202310228569 A CN 202310228569A CN 116418984 A CN116418984 A CN 116418984A
Authority
CN
China
Prior art keywords
compressed
infrared image
data
scene
raw data
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
CN202310228569.2A
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 CN202310228569.2A priority Critical patent/CN116418984A/en
Publication of CN116418984A publication Critical patent/CN116418984A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/30Transforming light or analogous information into electric information
    • H04N5/33Transforming infrared radiation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application provides a method, a system and a storage medium for compressing infrared image data, comprising the following steps: acquiring a RAW data difference average value of an infrared image to be compressed; determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value and a preset RAW data difference standard value, wherein the scene type is as follows: dynamic or static scenes; performing compression processing on the infrared image to be compressed according to the scene type, wherein the compression processing comprises: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed. The infrared image to be compressed is compressed in different modes according to the scene type, so that the processes of data displacement and splicing are reduced, and the compression time of a single frame of infrared image is effectively shortened.

Description

Method, system and storage medium for compressing infrared image data
Technical Field
The application belongs to the field of image compression, and particularly relates to a method, a system and a storage medium for compressing infrared image data.
Background
The image generally seen by people is an image based on visible light shooting, and the compression algorithm of the visible light image is mature, and mainly comprises the following steps: based on statistical information of the data, the data are compressed, and the data are mainly subjected to arithmetic coding, LZ77, huffman coding and travel coding, so that the application is mature in the field of visible light image data compression; each tile of the previous frame is matched to a certain position in the current frame by a certain movement based on the continuity and correlation of the adjacent frames. Mainly motion compensated coding, which is commonly used by video compression/video codecs to reduce spatial redundancy in video sequences.
At present, there is no compression algorithm for the infrared image, but if the compression algorithm for the visible light image is directly applied to the compression calculation of the infrared image, a good compression effect cannot be obtained due to factors such as poor non-uniformity, low repeatability, large dynamic range and the like of the infrared data.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a method, a system and a storage medium for compressing infrared image data, so that the infrared image to be compressed is compressed in different modes according to scene types, the processes of data displacement and splicing are reduced, and the compression time of a single frame of infrared image is effectively reduced.
In a first aspect, there is provided a method of infrared image data compression, the method comprising:
acquiring a RAW data difference average value of an infrared image to be compressed;
determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value and a preset RAW data difference standard value, wherein the scene type is as follows: dynamic or static scenes;
performing compression processing on the infrared image to be compressed according to the scene type, wherein the compression processing comprises: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed.
In one possible implementation manner, the acquiring the RAW data difference average value of the infrared image to be compressed includes:
traversing all pixel points of the infrared image to be compressed and the infrared image of the previous frame to obtain RAW data difference values of the infrared image to be compressed and the infrared image of the previous frame in the same pixel point;
and acquiring the RAW data difference average value of the infrared image to be compressed according to a preset RAW data difference average value calculation formula and the RAW data difference value.
In another possible implementation manner, determining a scene type of the infrared image to be compressed according to a relationship between a RAW data difference average value of the infrared image to be compressed and a preset RAW data difference standard value includes:
if the RAW data difference average value is larger than the RAW data difference standard value, the scene type of the infrared image to be compressed is a dynamic scene, and if the RAW data difference average value is smaller than the RAW data difference standard value, the scene type of the infrared image to be compressed is a static scene.
In another possible implementation manner, the spatial domain compression is specifically:
dividing the infrared image data to be compressed into 2n pixel points;
respectively obtaining data to be compressed of each pixel point in the data block, and the maximum value and the minimum value of the data to be compressed of the pixel point, so as to calculate the range of the data to be compressed of the pixel point and the compressed data to be stored of the pixel point;
establishing a corresponding relation between the range of data to be compressed of the pixel point and the bit number of the compressed pixel point;
compressing the pixel points into corresponding bit numbers according to the corresponding relation, and splicing the corresponding bit numbers into m-bit storage data;
wherein: the product of the number 2n of pixel points in the infrared image data to be compressed and the corresponding bit number is an integer multiple of m bits.
In another possible implementation manner, the range of the data to be compressed of the pixel points is the difference between the maximum value and the minimum value of the data to be compressed of each pixel point in the data block.
In another possible implementation manner, the pixel point needs to store compressed data, specifically:
and the difference value between the data to be compressed of each pixel point in the data block and the minimum value of the data to be compressed of the pixel point.
In another possible implementation, the stored data includes unsigned int, signed char, or unsigned char.
In another possible implementation manner, the time domain compression includes compressing a RAW data difference value between the to-be-compressed infrared image and an infrared image of a previous frame.
In a second aspect, there is provided a system for infrared image data compression, the system comprising:
the RAW data difference average value acquisition module is used for acquiring the RAW data difference average value of the infrared image to be compressed;
the scene type determining module is configured to determine a scene type of the infrared image to be compressed according to a relationship between the RAW data difference average value and a preset RAW data difference standard value, where the scene type is: dynamic or static scenes;
the compression module is used for carrying out compression processing on the infrared image to be compressed according to the scene type, and the compression processing comprises the following steps: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed.
In a third aspect, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of infrared image data compression of any of the first aspects.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a flow chart of a method for infrared image data compression according to one embodiment of the present invention;
FIG. 2 is a flow chart of a method for infrared image data compression in accordance with yet another embodiment of the present invention;
FIG. 3 is a block diagram of a system for infrared image data compression in accordance with one embodiment of the present invention;
FIG. 4 is a block diagram of a system for infrared image data compression in accordance with yet another embodiment of the present invention;
FIG. 5 is a schematic diagram of the physical structure of an electronic device according to the present invention;
fig. 6 is a flowchart of a method for compressing infrared image data according to an embodiment of the present invention.
Detailed description of the preferred embodiments
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar modules or modules having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of illustrating the present application and are not to be construed as limiting the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, modules, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, modules, components, and/or groups thereof. It will be understood that when a module is referred to as being "connected" or "coupled" to another module, it can be directly connected or coupled to the other module or intervening modules may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any module and all combination of one or more of the associated listed items.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the implementation of the present application will be described in further detail with reference to the accompanying drawings.
The following describes the technical solutions of the present application and the technical solutions of the present application, such as the solution of the above technical problems, in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for compressing infrared image data according to an embodiment of the present invention, where the method includes:
step 101, acquiring a RAW data difference average value of an infrared image to be compressed;
step 102, determining a scene type of the infrared image to be compressed according to the relation between the RAW data difference average value and a preset RAW data difference standard value, wherein the scene type is as follows: dynamic or static scenes;
step 103, performing compression processing on the infrared image to be compressed according to the scene type, wherein the compression processing includes: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed.
In the embodiment of the present invention, the RAW image data RAW is the original data of each pixel point in the image, and the image of each frame is usually in a variation, so that the picture content of each frame of image is different, and then the RAW of the same pixel point in the front and rear two frames of images is different, so that the RAW data difference exists in the front and rear two frames of images of the same pixel point, and as the RAW data difference of each pixel point is different, the RAW data difference average value of the whole image can be obtained through statistics, according to the relationship between the RAW data difference average value and the preset RAW data difference standard value, the scene type of the infrared image to be compressed can be classified into a dynamic scene or a static scene, and according to different scene types, different compression modes are used, specifically: if the scene type of the infrared image to be compressed is a dynamic scene, performing airspace compression on the infrared image to be compressed; if the scene type of the infrared image to be compressed is a static scene, firstly performing time domain compression on the infrared image to be compressed, and performing space domain compression on the infrared image to be compressed which is subjected to time domain compression. Wherein, the time domain compression is: and compressing the difference value.
The acquiring the RAW data difference average value of the infrared image to be compressed comprises the following steps:
traversing all pixel points of the infrared image to be compressed and the infrared image of the previous frame to obtain RAW data difference values of the infrared image to be compressed and the infrared image of the previous frame in the same pixel point;
and acquiring the RAW data difference average value of the infrared image to be compressed according to a preset RAW data difference average value calculation formula and the RAW data difference value.
In the embodiment of the invention, all pixel points of an infrared image to be compressed and an infrared image of a previous frame are traversed, RAW data values of all pixel points are obtained, RAW data difference values of two frames before and after the same pixel point are obtained, and RAW data difference values of all pixel points are calculated averagely through a RAW data difference average value calculation formula, so that a RAW data difference average value can be obtained. The preset RAW data difference average value calculation formula comprises the following steps:
Figure BDA0004119458510000051
wherein Y is current RAW data representing an infrared image to be compressed, Y pre RAW data representing a previous frame, Y deta The RAW data difference value of the infrared image to be compressed is represented, subAvg represents the RAW data difference average value, w and h represent the width and height of the RAW data respectively, and (i, j) represents the RAW data of the ith row and jth column pixel point of the image to be compressed.
The determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value of the infrared image to be compressed and the preset RAW data difference standard value comprises the following steps:
if the RAW data difference average value is larger than the RAW data difference standard value, the scene type of the infrared image to be compressed is a dynamic scene, and if the RAW data difference average value is smaller than the RAW data difference standard value, the scene type of the infrared image to be compressed is a static scene.
Wherein the time domain compression comprises:
and compressing the RAW data difference value of the infrared image to be compressed and the infrared image of the previous frame.
According to the embodiment of the invention, the RAW data difference average value of the infrared image to be compressed is obtained; determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value and a preset RAW data difference standard value, wherein the scene type is as follows: dynamic or static scenes; performing compression processing on the infrared image to be compressed according to the scene type, wherein the compression processing comprises: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed. The infrared image to be compressed is compressed in different modes according to the scene type, so that the processes of data displacement and splicing are reduced, and the compression time of a single frame of infrared image is effectively shortened.
Fig. 2 is a flowchart of a method for compressing infrared image data according to still another embodiment of the present invention, where the spatial domain compression is specifically:
step 201, dividing the infrared image data to be compressed into 2n pixel points;
step 202, respectively obtaining data to be compressed of each pixel point in the data block, and the maximum value and the minimum value of the data to be compressed of the pixel point, thereby calculating the range of the data to be compressed of the pixel point and the compressed data to be stored of the pixel point;
step 203, establishing a corresponding relation between the range of the data to be compressed of the pixel point and the bit number of the compressed pixel point;
step 204, compressing the pixel points into corresponding bit numbers according to the corresponding relation, and splicing the bit numbers into m-bit storage data;
wherein: the product of the number 2n of pixel points in the infrared image data to be compressed and the corresponding bit number is an integer multiple of m bits.
In the embodiment of the present invention, the data to be compressed of the pixel points in each data block and the value range of each pixel point can be according to the following common formulaFormula (1) obtaining:
Figure BDA0004119458510000071
wherein Y is input B is data to be compressed after time domain compression k Represents the kth 2n x 8 data block, min k Representation B k Range, minimum of (2) k Representation B k The value range of the pixel points in the block, C k Representing the data that needs to be compressed after subtracting the intra-block minimum.
For airspace compression, firstly dividing infrared image data to be compressed into 2n pixel points, respectively acquiring data to be compressed of each pixel point, respectively acquiring the maximum value and the minimum value of the data to be compressed of each pixel point from the data to be compressed, acquiring the range of the data to be compressed of each pixel point and the data to be compressed in each pixel point according to the maximum value and the minimum value, establishing a corresponding relation between the range of the data to be compressed of each pixel point and the bit number of the compressed pixel point, compressing the pixel points into corresponding bit numbers according to the corresponding relation, and splicing the bit numbers into m-bit storage data, wherein: the product of the number of pixel points 2n in the infrared image data to be compressed and the corresponding bit number is an integer multiple of m bits.
Determining the number of bits of the pixel points according to a preset pixel point number determining principle and the value range, wherein the pixel point number determining principle is as follows: the number of the brance is more than 256 and is 16, the number of the brance is 64 < 256 and is 8, the number of the brance is 16 < 64 and is 6, the number of the brance is 4 < 16 and is 4, and the number of the brance is 2, wherein the brance is the value range of the pixel point;
according to a preset compression method and the bit number, compressing the pixel point into 8-bit unsigned char data, wherein the compression method specifically comprises the following steps: for 16-bit pixel points, each data to be compressed is stored through two char data; for 8-bit pixel points, each datum to be compressed is stored through one char datum; for the 6-bit pixel point, storing every four data to be compressed through three char data; for 4-bit pixel points, storing every two data to be compressed through one char data; for a 2-bit pixel point, every four data to be compressed are stored through one char data.
The range of the data to be compressed is the difference between the maximum value and the minimum value of the data to be compressed in the same pixel point.
The compressed data is the difference between the data to be compressed and the minimum value of the data to be compressed in the same pixel point.
Wherein the stored data includes unsigned int, signed char, or unsigned char.
And compressing the pixel points into corresponding bit numbers and storage data, and storing the corresponding bit numbers and the storage data into a file.
FIG. 3 is a block diagram of a system for infrared image data compression according to one embodiment of the present invention, the system comprising:
the RAW data difference average value obtaining module 301 is configured to obtain a RAW data difference average value of an infrared image to be compressed;
the scene type determining module 302 is configured to determine a scene type of the infrared image to be compressed according to a relationship between the RAW data difference average value and a preset RAW data difference standard value, where the scene type is: dynamic or static scenes;
the compression module 303 is configured to perform compression processing on the infrared image to be compressed according to the scene type, where the compression processing includes: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed.
In the embodiment of the present invention, the RAW image data RAW is the original data of each pixel point in the image, and the image of each frame is usually in a variation, so that the picture content of each frame of image is different, and then the RAW of the same pixel point in the front and rear two frames of images is different, so that the RAW data difference exists in the front and rear two frames of images of the same pixel point, and as the RAW data difference of each pixel point is different, the RAW data difference average value of the whole image can be obtained through statistics, according to the relationship between the RAW data difference average value and the preset RAW data difference standard value, the scene type of the infrared image to be compressed can be classified into a dynamic scene or a static scene, and according to different scene types, different compression modes are used, specifically: if the scene type of the infrared image to be compressed is a dynamic scene, performing airspace compression on the infrared image to be compressed; if the scene type of the infrared image to be compressed is a static scene, firstly performing time domain compression on the infrared image to be compressed, and performing space domain compression on the infrared image to be compressed which is subjected to time domain compression. Wherein, the time domain compression is: and compressing the difference value.
The acquiring the RAW data difference average value of the infrared image to be compressed comprises the following steps:
traversing all pixel points of the infrared image to be compressed and the infrared image of the previous frame to obtain RAW data difference values of the infrared image to be compressed and the infrared image of the previous frame in the same pixel point;
and acquiring the RAW data difference average value of the infrared image to be compressed according to a preset RAW data difference average value calculation formula and the RAW data difference value.
In the embodiment of the invention, all pixel points of an infrared image to be compressed and an infrared image of a previous frame are traversed, RAW data values of all pixel points are obtained, RAW data difference values of two frames before and after the same pixel point are obtained, and RAW data difference values of all pixel points are calculated averagely through a RAW data difference average value calculation formula, so that a RAW data difference average value can be obtained. The RAW data difference average value calculation formula comprises:
Figure BDA0004119458510000091
wherein Y is current RAW data representing an infrared image to be compressed, Y pre RAW data representing a previous frame, Y deta The RAW data difference value of the infrared image to be compressed is represented, subAvg represents the RAW data difference average value, w and h represent the width and height of the RAW data respectively, and (i, j) represents the RAW data of the ith row and jth column pixel point of the image to be compressed.
The determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value of the infrared image to be compressed and the preset RAW data difference standard value comprises the following steps:
if the RAW data difference average value is larger than the RAW data difference standard value, the scene type of the infrared image to be compressed is a dynamic scene, and if the RAW data difference average value is smaller than the RAW data difference standard value, the scene type of the infrared image to be compressed is a static scene.
Wherein the time domain compression comprises:
and compressing the RAW data difference value of the infrared image to be compressed and the infrared image of the previous frame.
According to the embodiment of the invention, the RAW data difference average value of the infrared image to be compressed is obtained; determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value and a preset RAW data difference standard value, wherein the scene type is as follows: dynamic or static scenes; performing compression processing on the infrared image to be compressed according to the scene type, wherein the compression processing comprises: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed. The infrared image to be compressed is compressed in different modes according to the scene type, so that the processes of data displacement and splicing are reduced, and the compression time of a single frame of infrared image is effectively shortened.
Fig. 4 is a block diagram of a system for compressing infrared image data according to still another embodiment of the present invention, where the compression module includes:
a dividing unit 401, configured to divide the infrared image data to be compressed into 2n pixel points;
a range and compressed data obtaining unit 402, configured to obtain data to be compressed of each pixel point in the data block, and a maximum value and a minimum value of the data to be compressed of the pixel point, thereby calculating a range of the data to be compressed of the pixel point and compressed data to be stored of the pixel point;
a correspondence establishing unit 403, configured to establish a correspondence between a range of data to be compressed of the pixel and a bit number of the compressed pixel;
the compression unit 404 is configured to compress the pixel point into a corresponding bit number according to the corresponding relationship, and splice the pixel point into m bits of storage data;
wherein: the product of the number 2n of pixel points in the infrared image data to be compressed and the corresponding bit number is an integer multiple of m bits.
In the embodiment of the invention, the data to be compressed of the pixel points in each data block and the value range of each pixel point can be obtained according to the following formula:
Figure BDA0004119458510000101
wherein Y is input B is data to be compressed after time domain compression k Represents the kth 2n x 8 data block, min k Representation B k Range, minimum of (2) k Representation B k The value range of the pixel points in the block, C k Representing the data that needs to be compressed after subtracting the intra-block minimum.
For airspace compression, firstly dividing infrared image data to be compressed into 2n pixel points, respectively acquiring data to be compressed of each pixel point, respectively acquiring the maximum value and the minimum value of the data to be compressed of each pixel point from the data to be compressed, acquiring the range of the data to be compressed of each pixel point and the data to be compressed in each pixel point according to the maximum value and the minimum value, establishing a corresponding relation between the range of the data to be compressed of each pixel point and the bit number of the compressed pixel point, compressing the pixel points into corresponding bit numbers according to the corresponding relation, and splicing the bit numbers into m-bit storage data, wherein: the product of the number of pixel points 2n in the infrared image data to be compressed and the corresponding bit number is an integer multiple of m bits.
Determining the number of bits of the pixel points according to a preset pixel point number determining principle and the value range, wherein the pixel point number determining principle is as follows: the number of the brance is more than 256 and is 16, the number of the brance is 64 < 256 and is 8, the number of the brance is 16 < 64 and is 6, the number of the brance is 4 < 16 and is 4, and the number of the brance is 2, wherein the brance is the value range of the pixel point;
according to a preset compression method and the bit number, compressing the pixel point into 8-bit unsigned char data, wherein the compression method specifically comprises the following steps: for 16-bit pixel points, each data to be compressed is stored through two char data; for 8-bit pixel points, each datum to be compressed is stored through one char datum; for the 6-bit pixel point, storing every four data to be compressed through three char data; for 4-bit pixel points, storing every two data to be compressed through one char data; for a 2-bit pixel point, every four data to be compressed are stored through one char data.
The range of the data to be compressed is the difference between the maximum value and the minimum value of the data to be compressed in the same pixel point.
The compressed data is the difference between the data to be compressed and the minimum value of the data to be compressed in the same pixel point.
Wherein the stored data includes unsigned int, signed char, or unsigned char.
And compressing the pixel points into corresponding bit numbers and storage data, and storing the corresponding bit numbers and the storage data into a file.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: a processor (processor) 501, a communication interface (Communications Interface) 502, a memory (memory) 503 and a communication bus 504, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. A processor may invoke logic instructions in a memory to perform a method of infrared image data compression, the method comprising: acquiring a RAW data difference average value of an infrared image to be compressed; determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value and a preset RAW data difference standard value, wherein the scene type is as follows: dynamic or static scenes; performing compression processing on the infrared image to be compressed according to the scene type, wherein the compression processing comprises: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed.
Further, the logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform 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, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method of infrared image data compression provided by the method embodiments described above, the method comprising: acquiring a RAW data difference average value of an infrared image to be compressed; determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value and a preset RAW data difference standard value, wherein the scene type is as follows: dynamic or static scenes; performing compression processing on the infrared image to be compressed according to the scene type, wherein the compression processing comprises: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed.
In yet another aspect, embodiments of the present invention further provide a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the method of infrared image data compression provided by the above embodiments, the method comprising: acquiring a RAW data difference average value of an infrared image to be compressed; determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value and a preset RAW data difference standard value, wherein the scene type is as follows: dynamic or static scenes; performing compression processing on the infrared image to be compressed according to the scene type, wherein the compression processing comprises: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed.
Fig. 6 is a schematic flow chart of a method for compressing infrared image data according to an embodiment of the present invention, wherein for a given infrared image to be compressed, a RAW data difference average value of the infrared image to be compressed is obtained, and a scene type of the infrared image to be compressed is determined according to a relationship between the RAW data difference average value and a preset RAW data standard value: if the dynamic scene is adopted, only the infrared image to be compressed is subjected to space domain compression, if the static scene is adopted, the infrared image to be compressed is sequentially subjected to time domain compression and space domain compression, wherein the time domain compression is to compress the RAW difference value between the infrared image to be compressed and the infrared image of the previous frame, the data to be subjected to space domain compression is firstly divided into data blocks A0-A31 shown in FIG. 6, the data to be compressed of each data block is obtained, the storage bit number of each data block is calculated according to the data to be compressed, and the storage data is spliced according to the corresponding storage bit number, so that the space domain compression is completed.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
While only a partial implementation of the invention has been described, it should be noted that it will be apparent to those skilled in the art that several modifications and adaptations can be made without departing from the principles of the invention, and such modifications and adaptations should and are intended to be comprehended within the scope of the invention.

Claims (10)

1. A method of infrared image data compression, the method comprising:
acquiring a RAW data difference average value of an infrared image to be compressed;
determining the scene type of the infrared image to be compressed according to the relation between the RAW data difference average value and a preset RAW data difference standard value, wherein the scene type is as follows: dynamic or static scenes;
performing compression processing on the infrared image to be compressed according to the scene type, wherein the compression processing comprises: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; and if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed.
2. The method of claim 1, wherein the obtaining the RAW data difference mean of the infrared image to be compressed comprises:
traversing all pixel points of the infrared image to be compressed and the infrared image of the previous frame to obtain RAW data difference values of the infrared image to be compressed and the infrared image of the previous frame in the same pixel point;
and acquiring the RAW data difference average value of the infrared image to be compressed according to the RAW data difference value.
3. The method of claim 1, wherein determining the scene type of the infrared image to be compressed according to the relationship between the RAW data difference average value of the infrared image to be compressed and the preset RAW data difference standard value comprises:
if the RAW data difference average value is larger than or equal to the RAW data difference standard value, the scene type of the infrared image to be compressed is a dynamic scene;
and if the RAW data difference average value is smaller than the RAW data difference standard value, the scene type of the infrared image to be compressed is a static scene.
4. A method according to any of claims 1-3, characterized in that the spatial domain compression is in particular:
dividing the infrared image data to be compressed into 2n pixel points;
respectively obtaining data to be compressed of each pixel point in the data block, and the maximum value and the minimum value of the data to be compressed of the pixel point, so as to calculate the range of the data to be compressed of the pixel point and the compressed data to be stored of the pixel point;
establishing a corresponding relation between the range of data to be compressed of the pixel point and the bit number of the compressed pixel point;
compressing the pixel points into corresponding bit numbers according to the corresponding relation, and splicing the corresponding bit numbers into m-bit storage data;
wherein: the product of the number 2n of pixel points in the infrared image data to be compressed and the corresponding bit number is an integer multiple of m bits.
5. The method of claim 4, wherein the range of data to be compressed for each pixel is the difference between the maximum and minimum values of data to be compressed for each pixel in the data block.
6. The method of claim 4, wherein the pixel point needs to store compressed data, specifically:
and the difference value between the data to be compressed of each pixel point in the data block and the minimum value of the data to be compressed of the pixel point.
7. The method of claim 4, wherein the stored data comprises unsigned int, signed char, or unsigned char.
8. The method of claims 1 to 7, wherein the time domain compression comprises compressing a RAW data difference value of the infrared image to be compressed and an infrared image of a previous frame. .
9. A system for infrared image data compression, the system comprising:
the RAW data difference average value acquisition module is used for acquiring the RAW data difference average value of the infrared image to be compressed;
the scene type determining module is configured to determine a scene type of the infrared image to be compressed according to a relationship between the RAW data difference average value and a preset RAW data difference standard value, where the scene type is: dynamic or static scenes;
the compression module is used for carrying out compression processing on the infrared image to be compressed according to the scene type, and the compression processing comprises the following steps: if the scene is a dynamic scene, performing airspace compression on the infrared image to be compressed; or if the scene is a static scene, sequentially performing time domain compression and space domain compression on the infrared image to be compressed.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the method of infrared image data compression as claimed in any one of claims 1 to 8.
CN202310228569.2A 2023-03-03 2023-03-03 Method, system and storage medium for compressing infrared image data Pending CN116418984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310228569.2A CN116418984A (en) 2023-03-03 2023-03-03 Method, system and storage medium for compressing infrared image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310228569.2A CN116418984A (en) 2023-03-03 2023-03-03 Method, system and storage medium for compressing infrared image data

Publications (1)

Publication Number Publication Date
CN116418984A true CN116418984A (en) 2023-07-11

Family

ID=87054117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310228569.2A Pending CN116418984A (en) 2023-03-03 2023-03-03 Method, system and storage medium for compressing infrared image data

Country Status (1)

Country Link
CN (1) CN116418984A (en)

Similar Documents

Publication Publication Date Title
US6339616B1 (en) Method and apparatus for compression and decompression of still and motion video data based on adaptive pixel-by-pixel processing and adaptive variable length coding
JP4468490B2 (en) A visually lossless image compression scheme based on an efficient lookup table
US6011864A (en) Digital image coding system having self-adjusting selection criteria for selecting a transform function
CN111131828B (en) Image compression method and device, electronic equipment and storage medium
CN114640857B (en) Image compression method and 3D noise reduction method based on improved Huffman coding
US6584226B1 (en) Method and apparatus for implementing motion estimation in video compression
CN111556315A (en) Data transmission method and device
CN108540799B (en) Compression method capable of accurately representing difference between two frames of images of video file
Miyata et al. Novel inverse colorization for image compression
US20010011959A1 (en) Huffman encoder, huffman encoding method and recording medium having program for huffman encoding process recorded thereon
CN116418984A (en) Method, system and storage medium for compressing infrared image data
CN107682699A (en) A kind of nearly Lossless Image Compression method
CN107509074B (en) Self-adaptive 3D video compression coding and decoding method based on compressed sensing
US20190238832A1 (en) Image processing device
CN109413445B (en) Video transmission method and device
US7657110B2 (en) Image compression using a color visual model
Li et al. Fractal color image compression
CN112509107A (en) Point cloud attribute recoloring method, device and encoder
CN114449294A (en) Motion estimation method, motion estimation apparatus, motion estimation device, storage medium, and computer program product
CN116170596A (en) Encoding and decoding method and electronic equipment
CN106657999A (en) Rapid selection method for HEVC intra-frame prediction coding units
JP2806944B2 (en) How to improve the resolution of digital signals
CN110956670A (en) Multi-mode self-adaptive Z value compression algorithm based on depth migration
US20010046318A1 (en) Compressing image data
CN111243046A (en) Image quality detection method, device, electronic equipment and 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