WO2022048054A1 - 一种红外数据压缩方法、装置及设备 - Google Patents

一种红外数据压缩方法、装置及设备 Download PDF

Info

Publication number
WO2022048054A1
WO2022048054A1 PCT/CN2020/133264 CN2020133264W WO2022048054A1 WO 2022048054 A1 WO2022048054 A1 WO 2022048054A1 CN 2020133264 W CN2020133264 W CN 2020133264W WO 2022048054 A1 WO2022048054 A1 WO 2022048054A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
grayscale
image
infrared
infrared image
Prior art date
Application number
PCT/CN2020/133264
Other languages
English (en)
French (fr)
Inventor
于盛楠
刘宇廷
康萌萌
王云齐
齐亚鲁
徐召飞
马彦静
Original Assignee
烟台艾睿光电科技有限公司
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 烟台艾睿光电科技有限公司 filed Critical 烟台艾睿光电科技有限公司
Publication of WO2022048054A1 publication Critical patent/WO2022048054A1/zh

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/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J5/00Radiation pyrometry, e.g. infrared or optical thermometry
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J5/00Radiation pyrometry, e.g. infrared or optical thermometry
    • G01J2005/0077Imaging

Definitions

  • the present invention relates to the field of infrared image compression, in particular to an infrared data compression method, device, device and computer-readable storage medium.
  • infrared video surveillance and detection systems are used in all walks of life.
  • the raw video infrared images and temperature images have a large amount of data, and the real-time and quantitative accuracy requirements are relatively high in the data transmission and data storage processes such as networking.
  • the infrared video data is compressed, and the compressed data is transmitted to the receiving client through a data cable or wireless network.
  • the receiving client decompresses the compressed infrared data, and then watches the become an inevitable trend.
  • the real-time and compression ratio requirements for data compression are high.
  • the compression ratio of video data and the compression quality before and after compression are relatively high.
  • Many products need not only real-time video monitoring and detection functions, but also data storage functions for later video data analysis and filing. The functional requirements of these two aspects make the compression and decompression of infrared data an indispensable key technology.
  • infrared video data compression is usually processed with reference to visible light video compression. It is mainly divided into two categories: lossy compression and lossless compression. Among them, lossy compression has relatively large compression and fast compression speed, and some modules are very mature. It can be directly integrated into the chip, which can satisfy the compression of infrared video data to a certain extent. However, because the intra-frame compression of this type of method usually adopts a lossy compression mode, and the precision loss is not easy to quantify and control, it is very unfavorable for the transmission of infrared temperature data and video; while the classical lossless compression compression is relatively low, and the algorithm is complex and inefficient.
  • the purpose of the present invention is to provide an infrared data compression method, device, equipment and computer-readable storage medium, in order to solve the problem that the prior art cannot improve the compression rate while ensuring high precision, resulting in excessive infrared data, difficult to transmit and storage problems.
  • the present invention provides an infrared data compression method, comprising:
  • first image grayscale information according to the infrared image information to be processed and preset temperature mode information, wherein the first image grayscale information includes coarse grayscale corresponding to a position in the infrared image information to be processed degree parameters, each of the coarse grayscale parameters corresponds to a temperature interval of a first width;
  • the fine grayscale parameter corresponding to the position in the information, the fine grayscale parameter divides the temperature interval of the first width into equal parts according to the temperature pattern information;
  • the first image grayscale information and the second image grayscale information are compressed through a lossless compression algorithm to determine the compressed infrared image information.
  • the grayscale information of the first image and the grayscale information of the second image are passed through.
  • the lossless compression algorithm is used for compression, and the information of the compressed infrared image is determined to include:
  • the compressed infrared video information is determined by compressing the subordinate infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information through the lossless compression algorithm.
  • the subordinate infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information are processed by the The lossless compression algorithm is used to compress, and it is determined that the compressed infrared video information includes:
  • the denoising dependent infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information are compressed by the lossless compression algorithm to determine the compressed infrared video information.
  • the subordinate infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information are processed by the The lossless compression algorithm is used to compress, and it is determined that the compressed infrared video information includes:
  • the number of grayscale zero points is determined, and the number of grayscale zero points is the number of the coarse grayscale parameters and the fine grayscale parameters that are zero in the subordinate infrared image compression information.
  • the subordinate infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information are compressed by the lossless compression algorithm , determine the compressed infrared video information;
  • the first image grayscale information in the subordinate infrared image compression information and the first image grayscale information of the first frame infrared image information are compressed by the lossless compression algorithm , to determine the compressed infrared video information.
  • the coarse grayscale parameter and the fine grayscale parameter are 8-bit data.
  • the receiving infrared image information to be processed includes:
  • first image grayscale information is obtained according to the infrared image information to be processed and the temperature mode information, wherein the first image grayscale information includes a position corresponding to the infrared image information to be processed.
  • Coarse grayscale parameters each of which corresponds to a temperature interval with a first width.
  • An infrared data compression device comprising:
  • a receiving module for receiving infrared image information to be processed
  • a first grayscale module configured to obtain first image grayscale information according to the infrared image information to be processed and preset temperature mode information, wherein the first image grayscale information includes the same information as the infrared image to be processed.
  • the coarse grayscale parameters corresponding to the positions in the information, each of the coarse grayscale parameters corresponding to a temperature interval of a first width;
  • the second grayscale module is configured to obtain second image grayscale information according to the infrared image information to be processed, the temperature mode information and the first image grayscale information, wherein the second image grayscale information Including fine grayscale parameters corresponding to the positions in the infrared image information to be processed, the fine grayscale parameters equally divide the temperature interval of the first width according to the temperature pattern information;
  • a lossless compression module configured to compress the grayscale information of the first image and the grayscale information of the second image through a lossless compression algorithm to determine compressed infrared image information.
  • the lossless compression module includes:
  • a first-slave determining unit configured to determine the first frame of infrared image information and the subordinate infrared image information arranged in sequence according to a plurality of the infrared image information to be processed
  • the marking unit is used to sequentially compare the coarse grayscale parameters of the subordinate infrared image information in each frame with the coarse grayscale parameters of the infrared image information to be processed in the previous frame. At the same position, if the coarse grayscale parameters of the subordinate infrared image information The grayscale parameter is the same as the coarse grayscale parameter of the infrared image information to be processed in the previous frame, then the coarse grayscale parameter of the subordinate infrared image information is marked as the grayscale parameter to be thickened; The fine grayscale parameter of the image information is compared with the fine grayscale parameter of the infrared image information to be processed in the previous frame.
  • the fine grayscale parameter of the subordinate infrared image information is the same as the If the fine grayscale parameters for processing the infrared image information are the same, the fine grayscale parameters of the subordinate infrared image information are marked as the grayscale parameters to be thinned;
  • a zero-setting unit configured to zero the grayscale parameter to be thickened and the grayscale parameter to be thinned to obtain subordinate infrared image compression information
  • a compression unit configured to compress the subordinate infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information through the lossless compression algorithm, and determine the compressed infrared video information .
  • An infrared data compression device comprising:
  • the processor is configured to implement the steps of any one of the infrared data compression methods described above when executing the computer program.
  • a computer-readable storage medium storing a computer program on the computer-readable storage medium, when the computer program is executed by a processor, implements the steps of any one of the above infrared data compression methods.
  • the infrared data compression method receives infrared image information to be processed; obtains first image grayscale information according to the infrared image information to be processed and preset temperature mode information, wherein the first image grayscale
  • the degree information includes coarse grayscale parameters corresponding to positions in the infrared image information to be processed, and each of the coarse grayscale parameters corresponds to a temperature interval of a first width; according to the infrared image information to be processed, the temperature mode information and the grayscale information of the first image to obtain the grayscale information of the second image, wherein the grayscale information of the second image includes a fine grayscale parameter corresponding to the position in the infrared image information to be processed, so
  • the fine grayscale parameter divides the temperature interval of the first width into equal parts according to the temperature mode information; compresses the grayscale information of the first image and the grayscale information of the second image through a lossless compression algorithm, and determines the compression Infrared image information.
  • the present invention divides the received infrared image to be processed into two image grayscale information with different response temperature accuracy, although the number of characters required to describe the temperature of each position in the image is not changed, the characters describing the temperature (that is, the described temperature) are not changed.
  • the repetition of the coarse grayscale parameter and the fine grayscale parameter) is greatly increased, so that when the first image grayscale information and the second image grayscale information are compressed by the lossless compression algorithm, the compression speed and The compression ratio is greatly increased, while also guaranteeing a low loss of precision during compression.
  • the present invention also provides an infrared data compression device, equipment and computer-readable storage medium with the above beneficial effects.
  • FIG. 1 is a schematic flowchart of a specific embodiment of an infrared data compression method provided by the present invention
  • FIG. 2 is a schematic flowchart of another specific embodiment of the infrared data compression method provided by the present invention.
  • FIG. 3 is a schematic flowchart of another specific embodiment of the infrared data compression method provided by the present invention.
  • FIG. 4 is a schematic structural diagram of a specific implementation manner of an infrared data compression device provided by the present invention.
  • FIG. 5 is a partial schematic diagram of image grayscale information in a specific embodiment of the infrared data compression method provided by the present invention.
  • FIG. 6 is an effect diagram before and after denoising of a specific embodiment of the infrared data compression method provided by the present invention.
  • FIG. 8 is a schematic diagram of storage of infrared data in a specific embodiment of the infrared data compression method provided by the present invention.
  • FIG. 9 is a schematic diagram of storing infrared data in another specific embodiment of the infrared data compression method provided by the present invention.
  • Lossy compression usually adopts H264, H265 and other methods to directly apply the data compression mode of visible light to compress infrared data. This kind of method has a very fast compression ratio and compression speed, and some modules are very mature and can be directly integrated into the chip, which can satisfy the compression of infrared video data to a certain extent.
  • the intra-frame compression of this type of method usually adopts a lossy compression mode, and the loss is not easy to quantify and control, it is very unfavorable for the transmission of infrared temperature data video.
  • the existing infrared video Compared with visible light video, the existing infrared video has the characteristics of only containing brightness information, low signal-to-noise ratio, and temperature measurement.
  • the data of infrared temperature video requires high data precision before and after compression, and the temperature data precision lost by compression can be quantified.
  • Using the existing H264, H265 and other lossy compression algorithms has a large loss of data accuracy.
  • the temperature range of the input data is relatively narrow, which cannot meet the input data storage requirements of complex temperature scenarios or industrial temperature measurement.
  • Internal compression is lossy compression, and the temperature loss before and after compression is not easy to quantify and control in real time, which cannot meet the needs of infrared temperature video data compression and decompression storage.
  • the core of the present invention is to provide an infrared data compression method, and a schematic flowchart of a specific implementation of the method is shown in FIG.
  • S101 Receive infrared image information to be processed.
  • the infrared image information is gray value image information marked with temperature information.
  • S102 Obtain first image grayscale information according to the to-be-processed infrared image information and preset temperature mode information, where the first image grayscale information includes a position corresponding to the to-be-processed infrared image information Coarse grayscale parameters, each of which corresponds to a temperature interval with a first width.
  • the temperature mode information may include the measured temperature interval and the measured temperature accuracy, the temperature accuracy in the transmission process, and the like.
  • step S101 becomes: receiving infrared image information to be processed and temperature mode information.
  • first image grayscale information is obtained according to the infrared image information to be processed and the temperature mode information, wherein the first image grayscale information includes the same information as the infrared image information to be processed.
  • the coarse grayscale parameter corresponding to the position of , and each of the coarse grayscale parameters corresponds to a temperature interval of a first width.
  • the host computer can select the compression mode suitable for the current product application scenario according to different needs, and issue different temperature mode information in order to obtain the best compression effect, interactive design, and adapt to the needs of various scenarios
  • the temperature range of the first width can also be regarded as a low-precision temperature parameter.
  • the coarse grayscale parameter 35 corresponds to a temperature range of 1 degree Celsius to 10 degrees Celsius
  • the coarse grayscale parameter 36 corresponds to a temperature range of 11 degrees Celsius to 20 degrees Celsius, then It can be thought of as temperature data with an accuracy of 10 degrees Celsius.
  • S103 Obtain second image grayscale information according to the infrared image information to be processed, the temperature mode information, and the first image grayscale information, where the second image grayscale information includes the same information as the to-be-processed information.
  • the fine grayscale parameter corresponding to the position in the infrared image information, the fine grayscale parameter equally divides the temperature interval of the first width according to the temperature mode information.
  • the fine grayscale parameter divides the temperature interval of the first width into equal parts according to the temperature pattern information, which means that each of the fine grayscale parameters represents a section of a specific position within the temperature interval of the first width, Continuing the above example, suppose that the temperature interval of the first width is divided into ten equal parts, then since the temperature width of the interval is 10 degrees Celsius, each fine grayscale parameter corresponds to 1 degree Celsius, which can also be regarded as an accuracy of 1 degree Celsius temperature data.
  • FIG. 5 is the grayscale information of the first image and the grayscale information of the second image in the same area in the infrared image, and each small square can be regarded as a position (pixel), wherein the first image
  • the grayscale information of the first image (the left side of Figure 5) is all 3, indicating that the points here are all in the same temperature range
  • the grayscale information of the second image (the right side of Figure 5) 17, 18 indicate the temperature of these points respectively
  • the 17th and 18th segments in the temperature interval corresponding to the first image grayscale information 3 suppose that the temperature interval is divided into 20 segments by fine grayscale parameters, and the first image grayscale information 3 corresponds to 51 degrees Celsius to 70 degrees Celsius, the first image grayscale 3 and the second image grayscale information 17 correspond to 67 degrees Celsius; if the first image grayscale information is 2 and the second image grayscale information is 17, it can be inferred that the corresponding temperature is 47 degrees Celsius.
  • S104 Compress the grayscale information of the first image and the grayscale information of the second image through a lossless compression algorithm to determine compressed infrared image information.
  • the lossless compression algorithm may be the zstd algorithm or the LZ77 algorithm, and other suitable algorithms may also be selected according to the actual situation.
  • the coarse grayscale parameter and the fine grayscale parameter are 8-bit data.
  • the grayscale data or temperature data of infrared images in the prior art are usually represented by 14bit or 16bit numbers, and the present invention compresses the original infrared 16bit or 14bit data into 1 or 2 8bit files according to the temperature mode (that is, the first In the image grayscale information and the second image grayscale information), it should be noted that in extreme cases, the bandwidth of real-time data transmission is greatly limited, and at this time, only the first image grayscale with poor accuracy can be selected.
  • the grayscale information of the second image is stored locally, and the grayscale information of the first image and the grayscale information of the second image are combined to obtain high-precision infrared image information during data playback.
  • the following example shows that when the temperature mode information selects the industrial precise temperature measurement mode, the initial temperature is -20°C, the temperature range is -20°C to 400°C, and the accuracy is 0.1°C, then two 8-bit files can be used to store, the first one
  • the 8-bit file stores low-precision information (that is, the grayscale information of the first image) with an accuracy of 2°C (other temperatures, such as 25°C, of course) are rounded to zero, which can be selected according to actual conditions.
  • the second 8-bit file stores the original data minus the temperature stored in the first 8-bit to obtain high-precision information (that is, the grayscale information of the second image), with an accuracy of 0.1°C. Storing high-precision and low-precision information separately can reduce the amount of computation and achieve the effect of intra-frame block storage. Specific steps are as follows:
  • the value exceeding the measurement threshold is assigned to the maximum value of the measurement range.
  • repeated numbers can be constructed in the image, which is convenient for later combination with the existing lossless compression algorithm to improve the compression ratio.
  • the initial temperature is 20°C
  • the temperature range is 20°C to 45.5°C
  • the accuracy is 0.1°C.
  • the two 8bit files obtained from high-precision and low-precision temperature data can be stored separately or combined.
  • a special case is that the low precision is 25.6°C, the high precision is 0.1°C, the extracted high-precision temperature data is placed on the left, the low-precision data is placed on the right, or the high-precision temperature data is placed on the upper side, and the low-precision temperature data is placed on the upper side.
  • the data is placed on the lower side, as shown in the image below.
  • the original 640*512 area array 16bit temperature data becomes 1280*512 area array 8bit temperature data or 640*1024 area array 8bit temperature data.
  • the volume of the compressed infrared image information is greatly reduced, which is convenient for transmission and storage.
  • the above steps are reversed, according to the decompression of the classical lossless compression algorithm, the decompression of the inter-frame compression algorithm, The decompression of the intra-frame compression algorithm is followed by decompression, which is usually used for real-time analysis of infrared data on the computer client and the PTZ.
  • high-precision and low-precision information are stored separately, which can reduce the amount of computation and achieve the effect of intra-frame block storage.
  • the difference is different from the traditional 8*8, 4*4, etc., which are stored in blocks according to the local neighborhood and rely heavily on the local temperature difference.
  • This method of storing high-precision information and low-precision information separately has controllable compression accuracy, is more flexible, and has higher accuracy. It can cover a wider temperature range in the 8-bit storage space, and can also be selected according to the host computer mode. Faster compression, better compression.
  • the infrared data compression method receives infrared image information to be processed; obtains first image grayscale information according to the infrared image information to be processed and preset temperature mode information, wherein the first image grayscale
  • the degree information includes coarse grayscale parameters corresponding to positions in the infrared image information to be processed, and each of the coarse grayscale parameters corresponds to a temperature interval of a first width; according to the infrared image information to be processed, the temperature mode information and the grayscale information of the first image to obtain the grayscale information of the second image, wherein the grayscale information of the second image includes a fine grayscale parameter corresponding to the position in the infrared image information to be processed, so
  • the fine grayscale parameter divides the temperature interval of the first width into equal parts according to the temperature mode information; compresses the grayscale information of the first image and the grayscale information of the second image through a lossless compression algorithm, and determines the compression Infrared image information.
  • the present invention divides the received infrared image to be processed into two image grayscale information with different response temperature accuracy, although the number of characters required to describe the temperature of each position in the image is not changed, the characters describing the temperature (that is, the described temperature) are not changed.
  • the repetition of the coarse grayscale parameter and the fine grayscale parameter) is greatly increased, so that when the first image grayscale information and the second image grayscale information are compressed by the lossless compression algorithm, the compression speed and The compression ratio is greatly increased, while also ensuring low precision loss during the compression process, reducing the hard disk pressure for data storage.
  • the existing algorithm can make full use of hardware resources, reduce the pressure on the CPU, and further improve the compression effect.
  • the compressed data is transmitted through a data cable or wirelessly to reduce bandwidth pressure.
  • S201 Receive a plurality of infrared image information to be processed.
  • S202 Obtain a plurality of first image grayscale information respectively according to the infrared image information to be processed and preset temperature mode information, wherein the first image grayscale information includes the same information as the infrared image information to be processed.
  • the coarse grayscale parameters corresponding to the positions, and each of the coarse grayscale parameters corresponds to a temperature interval with a first width.
  • S203 Obtain a plurality of second image grayscale information corresponding to the first image grayscale information according to a plurality of the infrared image information to be processed, the temperature mode information, and a plurality of the first image grayscale information , wherein the second image grayscale information includes a fine grayscale parameter corresponding to a position in the infrared image information to be processed, and the fine grayscale parameter converts the temperature of the first width according to the temperature mode information interval equals.
  • S204 Determine the first frame of infrared image information and the subordinate infrared image information arranged in sequence according to the plurality of infrared image information to be processed.
  • the subordinate infrared image information and the first frame of infrared image information can be determined according to preset rules, and the first frame in a video is determined as the first frame of infrared image, and the rest of the frames are all subordinate infrared images.
  • the video can also be divided into multiple segments, all frames in each segment of the video are a group, and each group determines the corresponding first frame of infrared image information and subordinate infrared image information.
  • S206 Set the grayscale parameter to be thickened and the grayscale parameter to be thinned to zero to obtain subordinate infrared image compression information.
  • slave copy There are many ways to achieve zero setting, including copying the slave infrared image information, which is called a slave copy.
  • every frame is compared, and the corresponding frame in the slave copy is compared.
  • the grayscale parameter of the position corresponding to the frame is set to zero, and after the comparison of all the subordinate infrared image information is completed, the subordinate copy is directly used as the subordinate infrared image compression information.
  • S207 Compress the subordinate infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information through the lossless compression algorithm, and determine to compress infrared video information.
  • the compression method for a single frame of image in the first embodiment it is further considered that when there are multiple frames of infrared image information (which can also be regarded as infrared video information), the first frame of infrared image is set as the basis, and the rest of the infrared images are set as the basis.
  • the pixels with the same grayscale are directly set to zero, which greatly increases the number of zeros in the compression information of the subordinate infrared image, that is, causes more identical items. Therefore,
  • the lossless compression algorithm is used for compression, the compression ratio can be further improved, and the volume of the compressed infrared video information can be further reduced.
  • the step S206 includes:
  • S2061 Determine the number of grayscale zero points according to the subordinate infrared image compression information, where the number of grayscale zero points is the number of the coarse grayscale parameters and the fine grayscale parameters that are zero in the subordinate infrared image compression information sum of numbers.
  • S2062 Determine whether the number of grayscale zero points exceeds a preset still scene determination threshold.
  • S2063 When the still scene judgment threshold is not exceeded, compress the subordinate infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information through the lossless compression algorithm Compression is performed to determine the compression of infrared video information.
  • the still scene judgment threshold When the still scene judgment threshold is not exceeded, it can be judged that the infrared image information obtained at this time corresponds to a scene in which the background is still and the target is moving. At this time, because the background is still, there are many zero points in the subordinate infrared image compression information, and the compression ratio High, the compressed data can be directly transmitted, and the bandwidth requirement is low.
  • S2064 When the static scene judgment threshold is exceeded, pass the first image grayscale information in the subordinate infrared image compression information and the first image grayscale information of the first frame infrared image information through the lossless compression algorithm Compression is performed to determine the compression of infrared video information.
  • the static scene judgment threshold When the static scene judgment threshold is exceeded, it can be judged that the infrared image information obtained at this time corresponds to a scene in which the background and the target are moving. At this time, the compression is relatively low, which may lead to insufficient transmission bandwidth. At this time, only the transmission bandwidth can be directly transmitted.
  • the grayscale information of the first image with lower accuracy of course, the accuracy of the grayscale information of the second image can also be reduced, so that more fine grayscale parameters are the same to be set to zero, the compression ratio is increased, and then the first Compression and transmission of image grayscale information and second image grayscale information.
  • a criterion is used to automatically determine the scene difference between the frames before and after. Small, transmits high frequency and low frequency information. This dynamic adaptation method can ensure that the camera does not freeze even when the temperature difference is large in a rotating state or in a scene with a large background change, and in a relatively static state, the transmission accuracy is greater.
  • the above-mentioned specific embodiment adaptively adjusts the compression precision according to the scene, and the compression precision is higher where the background pauses, so that the data is not stuck, and the control precision can be quantified according to the demand while compressing the data.
  • S2 Decompression of the inter-frame compression algorithm.
  • the relationship between the first frame and the adjacent frame is used for decompression and restoration within each group. If the data after the second frame in each group is 0, the data at the corresponding position of the previous frame is replaced to obtain the data_High and data_Low of each frame.
  • S301 Receive a plurality of infrared image information to be processed.
  • S302 Obtain a plurality of first image grayscale information according to the infrared image information to be processed and the preset temperature mode information, respectively, wherein the first image grayscale information includes a The coarse grayscale parameters corresponding to the positions, and each of the coarse grayscale parameters corresponds to a temperature interval with a first width.
  • S303 Obtain a plurality of second image grayscale information corresponding to the first image grayscale information according to a plurality of the infrared image information to be processed, the temperature mode information, and a plurality of the first image grayscale information , wherein the second image grayscale information includes a fine grayscale parameter corresponding to a position in the infrared image information to be processed, and the fine grayscale parameter converts the temperature of the first width according to the temperature mode information interval equals.
  • S304 Determine the first frame of infrared image information and the subordinate infrared image information arranged in sequence according to the plurality of infrared image information to be processed.
  • S306 Set the grayscale parameter to be thickened and the grayscale parameter to be thinned to zero to obtain subordinate infrared image compression information.
  • S307 Divide the second image grayscale information corresponding to the subordinate infrared image information in the subordinate infrared image compression information into noise identification areas with preset resolutions.
  • the noise identification areas do not overlap each other, and may be a pixel area of k*k (k is an odd number such as 3, 5, 7, etc.), and the grayscale information of the first image is divided into several small areas.
  • S308 Determine the number of non-zero fine grayscale parameters in the noise identification area, and if it does not exceed a preset elimination threshold, set all the fine grayscale parameters in the noise identification area to zero, otherwise do not process , get the denoising dependent infrared image compression information.
  • S309 Compress the denoising dependent infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information by using the lossless compression algorithm to determine compressed infrared video information.
  • a denoising step is added, that is, the second image grayscale is divided into multiple noise identification areas, and how many zeros are in the noise identification areas are calculated respectively. If a single area (such as a 3*3 pixel square ) in the non-zero point does not exceed the elimination threshold (equivalent to the zero point exceeding a certain value), it means that the non-zero point in this area is salt and pepper noise, because the probability of the temperature difference of a single pixel in a small range and the surrounding area is very low, you can further Improve the accuracy of temperature measurement, only transmit valid data, avoid too much noise in the data, and reduce the accuracy of grayscale images.
  • the elimination threshold equivalent to the zero point exceeding a certain value
  • the temperature fluctuation of a single point is ignored by denoising, and if it is temperature data, the noise reduction effect is achieved to a certain extent.
  • the temperature measured by the isolated points is unstable, and there is a lot of salt and pepper noise in the image.
  • the salt and pepper noise can be removed by median filtering, and only the critical temperature is transmitted. The percentage of zero points increased from 55.19% to 65.44%.
  • FIG. 6 Please refer to FIG. 6 .
  • the left side of FIG. 6 is an infrared grayscale image that has not been denoised by this specific embodiment, and the right side is an infrared grayscale image that has been denoised.
  • the infrared data compression device provided by the embodiment of the present invention is introduced below.
  • the infrared data compression device described below and the infrared data compression method described above can be referred to each other correspondingly.
  • FIG. 4 is a structural block diagram of an infrared data compression apparatus provided by an embodiment of the present invention, which is referred to as specific embodiment four.
  • the infrared data compression apparatus may include:
  • the first grayscale module 200 is configured to obtain first image grayscale information according to the infrared image information to be processed and preset temperature mode information, wherein the first image grayscale information includes the same information as the infrared image information to be processed. the coarse grayscale parameters corresponding to the positions in the image information, each of the coarse grayscale parameters corresponding to a temperature interval of a first width;
  • the second grayscale module 300 is configured to obtain second image grayscale information according to the infrared image information to be processed, the temperature mode information and the first image grayscale information, wherein the second image grayscale
  • the information includes a fine grayscale parameter corresponding to a position in the infrared image information to be processed, and the fine grayscale parameter equally divides the temperature interval of the first width according to the temperature pattern information;
  • the lossless compression module 400 is configured to compress the grayscale information of the first image and the grayscale information of the second image through a lossless compression algorithm to determine compressed infrared image information.
  • the lossless compression module includes:
  • a first-slave determining unit configured to determine the first frame of infrared image information and the subordinate infrared image information arranged in sequence according to a plurality of the infrared image information to be processed
  • the marking unit is used to sequentially compare the coarse grayscale parameters of the subordinate infrared image information in each frame with the coarse grayscale parameters of the infrared image information to be processed in the previous frame. At the same position, if the coarse grayscale parameters of the subordinate infrared image information The grayscale parameter is the same as the coarse grayscale parameter of the infrared image information to be processed in the previous frame, then the coarse grayscale parameter of the subordinate infrared image information is marked as the grayscale parameter to be thickened; The fine grayscale parameter of the image information is compared with the fine grayscale parameter of the infrared image information to be processed in the previous frame.
  • the fine grayscale parameter of the subordinate infrared image information is the same as the If the fine grayscale parameters for processing the infrared image information are the same, the fine grayscale parameters of the subordinate infrared image information are marked as the grayscale parameters to be thinned;
  • a zero-setting unit configured to zero the grayscale parameter to be thickened and the grayscale parameter to be thinned to obtain subordinate infrared image compression information
  • a compression unit configured to compress the subordinate infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information through the lossless compression algorithm, and determine the compressed infrared video information .
  • the lossless compression module includes:
  • a division unit configured to divide the second image grayscale information corresponding to the subordinate infrared image information in the subordinate infrared image compression information into noise identification areas of preset resolutions
  • a denoising unit configured to determine the number of non-zero fine grayscale parameters in the noise identification area, and if it does not exceed a preset elimination threshold, set all the fine grayscale parameters in the noise identification area to zero, Otherwise, no processing is performed, and the denoising subordinate infrared image compression information is obtained;
  • the second compression unit is configured to compress the denoising dependent infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame of infrared image information through the lossless compression algorithm, and determine Compress infrared video information.
  • the lossless compression module includes:
  • a data statistics unit configured to determine the number of grayscale zero points according to the subordinate infrared image compression information, where the grayscale zero point number is the coarse grayscale parameter and the fine grayscale parameter that are zero in the subordinate infrared image compression information the sum of the number of degree parameters;
  • a scene judging unit configured to judge whether the number of grayscale zero points exceeds a preset still scene judgment threshold
  • the static compression unit is used to compress the subordinate infrared image compression information, the first image grayscale information and the second image grayscale information of the first frame infrared image information when the static scene judgment threshold is not exceeded, through
  • the lossless compression algorithm is compressed to determine the compressed infrared video information
  • the motion compression unit is used for, when exceeding the still scene judgment threshold, the first image grayscale information in the subordinate infrared image compression information and the first image grayscale information of the first frame infrared image information, through the
  • the lossless compression algorithm described above is used for compression to determine the compressed infrared video information.
  • the coarse grayscale parameter and the fine grayscale parameter are 8-bit data.
  • the receiving module includes:
  • the dual-source receiving unit is used to receive the infrared image information to be processed and the temperature mode information;
  • first image grayscale information is obtained according to the infrared image information to be processed and the temperature mode information, wherein the first image grayscale information includes a position corresponding to the infrared image information to be processed.
  • Coarse grayscale parameters each of which corresponds to a temperature interval with a first width.
  • the infrared data compression device is used for receiving the infrared image information to be processed through the receiving module 100; the first grayscale module 200 is used for obtaining the infrared image information to be processed and the preset temperature mode information according to the infrared image information to be processed.
  • the first image grayscale information wherein the first image grayscale information includes a coarse grayscale parameter corresponding to a position in the infrared image information to be processed, and each of the coarse grayscale parameters corresponds to a segment of a first width.
  • the second grayscale module 300 is configured to obtain second image grayscale information according to the infrared image information to be processed, the temperature mode information and the first image grayscale information, wherein the second image grayscale information
  • the image grayscale information includes a fine grayscale parameter corresponding to a position in the infrared image information to be processed, and the fine grayscale parameter divides the temperature interval of the first width into equal parts according to the temperature mode information;
  • a lossless compression module 400 for compressing the grayscale information of the first image and the grayscale information of the second image through a lossless compression algorithm to determine compressed infrared image information.
  • the present invention divides the received infrared image to be processed into two image grayscale information with different response temperature accuracy, although the number of characters required to describe the temperature of each position in the image is not changed, the characters describing the temperature (that is, the described temperature) are not changed.
  • the repetition of the coarse grayscale parameter and the fine grayscale parameter) is greatly increased, so that when the first image grayscale information and the second image grayscale information are compressed by the lossless compression algorithm, the compression speed and The compression ratio is greatly increased, while also guaranteeing a low loss of precision during compression.
  • the infrared data compression device in this embodiment is used to implement the aforementioned infrared data compression method, so the specific implementation of the infrared data compression device can be found in the foregoing embodiment of the infrared data compression method, for example, the receiving module 100, the first grayscale The degree module 200, the second grayscale module 300, and the lossless compression module 400 are respectively used to implement steps S101, S102, S103 and S104 in the above infrared data compression method, so the specific implementation can refer to the corresponding parts of the embodiments. description, which will not be repeated here.
  • An infrared data compression device comprising:
  • the processor is configured to implement the steps of any one of the infrared data compression methods described above when executing the computer program.
  • the infrared data compression method provided by the present invention receives infrared image information to be processed; obtains first image grayscale information according to the infrared image information to be processed and preset temperature mode information, wherein the first image grayscale
  • the degree information includes coarse grayscale parameters corresponding to positions in the infrared image information to be processed, and each of the coarse grayscale parameters corresponds to a temperature interval of a first width; according to the infrared image information to be processed, the temperature mode information and the grayscale information of the first image to obtain the grayscale information of the second image, wherein the grayscale information of the second image includes a fine grayscale parameter corresponding to the position in the infrared image information to be processed, so
  • the fine grayscale parameter divides the temperature interval of the first width into equal parts according to the temperature mode information; compresses the grayscale information of the first image and the grayscale information of the second image
  • the present invention by dividing the received infrared image to be processed into two image grayscale information with different response temperature precisions, although the number of characters required to describe the temperature of each position in the image is not changed, the characters describing the temperature (that is, the The repetition degree of the coarse grayscale parameter and the fine grayscale parameter) is greatly increased, so that when the first image grayscale information and the second image grayscale information are compressed by the lossless compression algorithm, the compression speed and The compression ratio is greatly increased, while also guaranteeing a low loss of precision during compression.
  • a computer-readable storage medium storing a computer program on the computer-readable storage medium, when the computer program is executed by a processor, implements the steps of any one of the above infrared data compression methods.
  • the infrared data compression method provided by the present invention receives infrared image information to be processed; obtains first image grayscale information according to the infrared image information to be processed and preset temperature mode information, wherein the first image grayscale
  • the degree information includes coarse grayscale parameters corresponding to positions in the infrared image information to be processed, and each of the coarse grayscale parameters corresponds to a temperature interval of a first width; according to the infrared image information to be processed, the temperature mode information and the grayscale information of the first image to obtain the grayscale information of the second image, wherein the grayscale information of the second image includes a fine grayscale parameter corresponding to the position in the infrared image information to be processed, so
  • the fine grayscale parameter divides the temperature interval of the first width into equal parts according to the temperature mode information;
  • the present invention divides the received infrared image to be processed into two image grayscale information with different response temperature accuracy, although the number of characters required to describe the temperature of each position in the image is not changed, the characters describing the temperature (that is, the described temperature) are not changed.
  • the repetition of the coarse grayscale parameter and the fine grayscale parameter) is greatly increased, so that when the first image grayscale information and the second image grayscale information are compressed by the lossless compression algorithm, the compression speed and The compression ratio is greatly increased, while also guaranteeing a low loss of precision during compression.
  • a software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

一种红外数据压缩方法、装置、设备及计算机可读存储介质,通过接收待处理红外图像信息;根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息;根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息;将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。本发明通过将接收到的待处理红外图像分为两个反应温度精度不同的图像灰度信息,使得描述温度的字符的重复度大幅增加,进而使后续无损压缩时红外数据的压缩速度及压缩比大幅上升,同时还保证了压缩过程中的可控低精度损失。

Description

一种红外数据压缩方法、装置及设备
本申请要求于2020年09月02日提交中国专利局、申请号为202010908902.0、发明名称为“一种红外数据压缩方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及红外图像压缩领域,特别是涉及一种红外数据压缩方法、装置、设备及计算机可读存储介质。
背景技术
随着红外技术的发展,红外视频监控和检测系统应用于各行各业。原始视频红外图像和温度图像数据量很大,在组网等数据传输和数据存储过程中对实时性和量化精度要求比较高。受带宽压力和成本的限制,对红外视频的数据进行压缩,压缩后的数据通过数据线或者无线网络传输到接收的客户端,接收的客户端对压缩后的红外数据进行解压,再进行观看已成为必然趋势。在视频监控和检测系统对于数据压缩的实时性和压缩比要求均较高。在数据存储方面,对于视频数据的压缩比和压缩前后的压缩质量要求较高。很多产品既需要具备实时视频监控和检测功能,也需要具备数据存储的功能,以便后期视频数据分析和备案。这两方面的产品功能需求使得红外数据的压缩和解压缩成为必不可少的关键技术。
现有的红外视频数据的压缩通常借鉴可见光的视频压缩进行处理,主要分为有损压缩和无损压缩两大类,其中有损压缩的压缩比较大,压缩速度较快,某些模块很成熟,可以直接集成到芯片上,在一定程度上可以满足对红外视频数据的压缩。但是由于这类方法的帧内压缩通常采用有损压缩模式,且精度损失不容易量化控制,对于红外温度数据视频的传输十分不利;而经典的无损压缩压缩比较低,且算法复杂,效率低下。
因此,如何找到一种在保证高精度的同时,提高压缩比与处理速度的红外压缩方法,是本领域技术人员亟待解决的问题。
发明内容
本发明的目的是提供一种红外数据压缩方法、装置、设备及计算机可读存储介质,以解决现有技术中无法在保证高精度的同时,提高压缩率,导致红外数据过大,不易传输和存储的问题。
为解决上述技术问题,本发明提供一种红外数据压缩方法,包括:
接收待处理红外图像信息;
根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;
根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分;
将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。
可选地,在所述的红外数据压缩方法中,当接收多个连续的所述待处理红外图像信息时,所述将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息包括:
根据多个所述待处理红外图像信息确定首帧红外图像信息及按顺序排列的从属红外图像信息;
依次将每帧所述从属红外图像信息的粗灰度参数与前一帧的待处理红外图像信息的粗灰度参数对比,在同一位置,若所述从属红外图像信息的粗灰度参数与所述前一帧的待处理红外图像信息的粗灰度参数相同,则将所述从属红外图像信息的粗灰度参数标记为待变粗灰度参数;并将所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数对比,在同一位置,若所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数相同,则将所述从属红外图像信息的细灰度参数标记为待变细灰度参数;
将所述待变粗灰度参数及所述待变细灰度参数置零,得到从属红外图像压缩信息;
将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
可选地,在所述的红外数据压缩方法中,所述将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息包括:
将所述从属红外图像压缩信息中的从属红外图像信息对应的第二图像灰度信息分成预设分辨率的噪声识别区;
确定所述噪声识别区内非零的细灰度参数的个数,若未超过预设的消除阈值,则将所述噪声识别区内全部的细灰度参数置零,否则不做处理,得到去噪从属红外图像压缩信息;
将所述去噪从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
可选地,在所述的红外数据压缩方法中,所述将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息包括:
根据所述从属红外图像压缩信息,确定灰度零点数,所述灰度零点数为所述从属红外图像压缩信息中为零的所述粗灰度参数及所述细灰度参数的个数的和;
判断所述灰度零点数是否超过预设的静止场景判断阈值;
当未超过所述静止场景判断阈值时,将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息;
当超过所述静止场景判断阈值时,将所述从属红外图像压缩信息中的第一图像灰度信息及所述首帧红外图像信息的第一图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
可选地,在所述的红外数据压缩方法中,所述粗灰度参数及所述细灰度参数为8bit数据。
可选地,在所述的红外数据压缩方法中,所述接收待处理红外图像信 息包括:
接收待处理红外图像信息及温度模式信息;
相应地,根据所述待处理红外图像信息及所述温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间。
一种红外数据压缩装置,包括:
接收模块,用于接收待处理红外图像信息;
第一灰度模块,用于根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;
第二灰度模块,用于根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分;
无损压缩模块,用于将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。
可选地,在所述的红外数据压缩装置中,所述无损压缩模块包括:
首从确定单元,用于根据多个所述待处理红外图像信息确定首帧红外图像信息及按顺序排列的从属红外图像信息;
标记单元,用于依次将每帧所述从属红外图像信息的粗灰度参数与前一帧的待处理红外图像信息的粗灰度参数对比,在同一位置,若所述从属红外图像信息的粗灰度参数与所述前一帧的待处理红外图像信息的粗灰度参数相同,则将所述从属红外图像信息的粗灰度参数标记为待变粗灰度参数;并将所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数对比,在同一位置,若所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数相同,则将所述从属红外图像信息的细灰度参数标记为待变细灰度参数;
置零单元,用于将所述待变粗灰度参数及所述待变细灰度参数置零, 得到从属红外图像压缩信息;
压缩单元,用于将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
一种红外数据压缩设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行所述计算机程序时实现如上述任一种所述的红外数据压缩方法的步骤。
一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述的红外数据压缩方法的步骤。
本发明所提供的红外数据压缩方法,通过接收待处理红外图像信息;根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分;将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。本发明通过将接收到的待处理红外图像分为两个反应温度精度不同的图像灰度信息,虽然没有改变图像中描述每个位置温度需要的字符数,但使得描述温度的字符(即所述粗灰度参数及所述细灰度参数)的重复度大幅增加,进而使所述第一图像灰度信息及所述第二图像灰度信息通过所述无损压缩算法进行压缩时,压缩速度及压缩比大幅上升,同时还保证了压缩过程中的低精度损失。本发明同时还提供了一种具有上述有益效果的红外数据压缩装置、设备及计算机可读存储介质。
附图说明
为了更清楚的说明本发明实施例或现有技术的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单的介绍,显而易见地,下 面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明提供的红外数据压缩方法的一种具体实施方式的流程示意图;
图2为本发明提供的红外数据压缩方法的另一种具体实施方式的流程示意图;
图3为本发明提供的红外数据压缩方法的又一种具体实施方式的流程示意图;
图4为本发明提供的红外数据压缩装置的一种具体实施方式的结构示意图;
图5为本发明提供的红外数据压缩方法的一种具体实施方式图像灰度信息局部示意图;
图6为本发明提供的红外数据压缩方法的一种具体实施方式去噪前后的效果图;
图7为现有技术中的一种红外数据的存储方式示意图;
图8为本发明提供的红外数据压缩方法的一种具体实施方式中的红外数据的存储示意图;
图9为本发明提供的红外数据压缩方法的另一种具体实施方式中的红外数据的存储示意图。
具体实施方式
现有的红外视频数据的压缩通常借鉴可见光的视频压缩进行处理,主要分为有损压缩和无损压缩两大类。有损压缩通常采用H264,H265等方式直接套用可见光的数据压缩模式对红外数据进行压缩。这类方法压缩比和压缩速度很快,某些模块很成熟,可以直接集成到芯片上,在一定程度上可以满足对红外视频数据的压缩。但是由于这类方法的帧内压缩通常采用有损压缩模式,且损失不容易量化控制,对于红外温度数据视频的传输十分不利。为了实现对温度数据的传输,各种无损压缩算法应运而生。各种无损压缩算法通常分为两大类:一.借鉴H264,H265算法的IP帧的关系,在帧内对数据进行分块,存储各个小块内的最小值和各个点与小块内最小值的差的方式进行帧内压缩,在帧间通常采用分组的方式,存储组内其他 帧与组内第一帧或前一帧的差的方式进行帧间压缩。这类方式实现了温度数据的无损压缩,但是仅适用于温度场景内温差相对较窄的温度段,若各个分块内的温差较小,可以在较高的温度压缩精度内实现较好的数据压缩效果,但是在工业测温或者温度场景差异较大的情况下,这类算法的精度损失较大,且无法自动调整精度,对场景的自适应能力较差。二.借鉴各种针对文件或者图像的无损压缩算法例如熵编码算法、预测压缩算法、变换编码算法等进行压缩。这类算法的压缩比相对有损压缩往往较低,算法相对复杂。此外,基于人工神经网络等深度学习压缩算法的复杂度太高、数据压缩精度较难量化控制,目前很少应用在红外视频数据压缩上。由于压缩方式的不同,在一定程度上具有数据加密的效果。
现有的红外视频相比可见光视频具有仅含亮度信息、信噪比较低、可以测温等特点。红外温度视频的数据要求压缩前后的数据精度较高,压缩损失的温度数据精度可以量化。采用现有的H264,H265等有损压缩算法数据精度损失较大,为了保障输入数据的存储精度,输入数据的温度范围较为狭窄,无法满足复杂温度场景或者工业测温的输入数据存储需求且帧内压缩为有损压缩,压缩前后的温度损失不易量化和实时控制,无法满足红外温度视频数据压缩解压存储的需求。
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的核心是提供一种红外数据压缩方法,其一种具体实施方式的流程示意图如图1所示,称其为具体实施方式一,包括:
S101:接收待处理红外图像信息。
所述红外图像信息为标注温度信息的灰度值图像信息。
S102:根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间。
所述温度模式信息可包括测量的温度区间及测量的温度精度、传输过程中的温度精度等。
另外,所述温度模式信息还可为非预设,而是之后接收的信息,此时步骤S101变为:接收待处理红外图像信息及温度模式信息。
相应地,本步骤变为根据所述待处理红外图像信息及所述温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间。
上位机可根据不同需求选择适合当前产品应用场景的压缩模式,下达不同的所述温度模式信息,以便获得最好的压缩效果,可交互性设计,适应各种场景需求
所述第一宽度的温度区间也可看作低精度的温度参数,如粗灰度参数35对应1摄氏度至10摄氏度的温度区间,如粗灰度参数36对应11摄氏度20摄氏度的温度区间,则可使看作是精度为10摄氏度的温度数据。
S103:根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分。
所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分,指每一个所述细灰度参数都表示所述第一宽度的温度区间内的特定位置的一段,继续承接上面的例子,设所述第一宽度的温度区间被等分为十份,则由于区间温度宽度为10摄氏度,则每一个细灰度参数对应1摄氏度,也可看作精度为1摄氏度的温度数据。
进一步地,可参考图5,图5为红外图像中同一区域的第一图像灰度信息及第二图像灰度信息,可把每个小方格看作一个位置(像素),其中所述第一图像灰度信息(图5左侧)均为3,说明此处的点均处于同一温度区间,而第二图像灰度信息(图5右侧)中的17、18表示这些点的温度分别在第一图像灰度信息3对应的温度区间内的第17段及第18段,设所述温度区间被细灰度参数分为20段,第一图像灰度信息3对应的是51摄氏度至70摄氏度,则第一图像灰度3、第二图像灰度信息17对应的则为67 摄氏度;若第一图像灰度信息为2,第二图像灰度信息为17,可推得对应温度为47摄氏度。
S104:将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。
所述无损压缩算法可为zstd算法或LZ77算法,也可根据实际情况挑选其他适合的算法。
作为一种优选实施方式,所述粗灰度参数及所述细灰度参数为8bit数据。现有技术中的红外图像的灰度数据或者温度数据通常采用14bit或者16bit的数字表示,本发明根据温度模式将原始红外16bit或者14bit的数据压缩到1或者2个8bit文件(即所述第一图像灰度信息及所述第二图像灰度信息)中,需要注意的是,在极端情况下,数据实时传输的带宽被大大限制,此时可选择只传输精度较差的第一图像灰度信息,而将所述第二图像灰度信息先存储在本地,在数据回放时再将所述第一图像灰度信息及所述第二图像灰度信息结合,得到高精度的红外图像信息。
下面举例说明,当所述温度模式信息选择工业精准测温模式时,起始温度-20℃,温度区间-20℃~400℃,精度0.1℃,则可以采用2个8bit文件存储,第一个8bit文件存储低精度信息(即所述第一图像灰度信息),精度2℃(当然也可取其他温度,如25℃),向零取整,可根据实际情况进行选取。第二个8bit文件存储原始数据减去第一个8bit存储的温度得到高精度信息(即所述第二图像灰度信息),精度0.1℃。将高精度和低精度信息分开存储可以降低运算量的同时达到帧内分块存储的效果。具体步骤如下:
(1)14bit原始温度数据data_org,温度存储精度0.01℃。根据上位机设置的起始温度对应的灰度数据startT和终止温度对应的灰度数据endT,对原始温度数据进行压缩,并进行阈值处理,得到data_org1,具体如下:
Figure PCTCN2020133264-appb-000001
本步骤先把超出测量阈值的数值赋予测量范围的最大值。
(2)根据上位机设置的高精度(0.1℃),将data_org1进行线性压缩,四舍五入,得到data_org2。
Figure PCTCN2020133264-appb-000002
根据上位机设置的低精度(2℃),将data_org2进行线性压缩,向零取整,得到低精度温度数据data_Low,用第1个8bit文件存储。注意精度的选择,要满足以下条件:
Figure PCTCN2020133264-appb-000003
Figure PCTCN2020133264-appb-000004
根据data_High=data_org2-data_Low*低精度,得到高精度温度数据。将低精度温度数据和高精度温度数据分别存储,可以在图像中构造重复数字,便于后面与现有无损压缩算法进行结合,提高压缩比。
Figure PCTCN2020133264-appb-000005
另一种情况,当选择人体测温模式,起始温度20℃,温度区间20℃~45.5℃,精度0.1℃。则可以根据实际情况采用分段线性压缩、线性压缩或非线性压缩的方式,将原始红外数据转化为8bit的文件数据。人体测温案例可只用了算法步骤的(1)和(2),将data_org2存储到1个8bit文件中(即上文中说明的只发送所述第一图像灰度信息)。
将高精度和低精度温度数据得到的2个8bit文件可以分开存储,也可以合并存储。一种特殊情况是,低精度是25.6℃,高精度是0.1℃,将提取的高精度温度数据放在左侧,低精度数据放在右侧或者高精度温度数据放在上侧,低精度温度数据放在下侧,如下图所示。原本的640*512面阵16bit的温度数据变成1280*512面阵的8bit温度数据或者640*1024面阵的8bit温度数据。若温度范围比较窄,高位全为0,可直接用1个640*512面阵的8bit文件进行表示,如图7、图8及图9所示,其中,图8为现有的灰度数据的存储方式,图9和图8为上述两种新的存储方式。
压缩后的红外图像信息体积大大缩小,便于传输与存储,需要读取所述压缩红外信息时,则将上述步骤反过来进行,按照经典无损压缩算法的解压缩、帧间压缩算法的解压缩、帧内压缩算法的解压缩依次进行解压缩, 通常用于电脑客户端、云台上实现红外数据的实时解析。
本具体实施方式将高精度和低精度信息分开存储可以降低运算量的同时达到帧内分块存储的效果。区别与传统的8*8,4*4等根据局部邻域分块存储严重依赖局部温差的情况。这种将高精度信息和低精度信息分开存储的方式,压缩精度可控,更加灵活,精度更高,在8bit的存储空间上可以覆盖更广的温度段,也可以根据上位机模式选择,实现更快的压缩,压缩效果更好。
本发明所提供的红外数据压缩方法,通过接收待处理红外图像信息;根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分;将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。本发明通过将接收到的待处理红外图像分为两个反应温度精度不同的图像灰度信息,虽然没有改变图像中描述每个位置温度需要的字符数,但使得描述温度的字符(即所述粗灰度参数及所述细灰度参数)的重复度大幅增加,进而使所述第一图像灰度信息及所述第二图像灰度信息通过所述无损压缩算法进行压缩时,压缩速度及压缩比大幅上升,同时还保证了压缩过程中的低精度损失,降低了数据存储的硬盘压力。与经典无损压缩算法的结合使用,可以使得现有算法充分利用硬件资源,降低CPU的压力,压缩效果更进一步。将压缩后的数据通过数据线或者无线方式进行传输,减轻带宽压力。
在具体实施方式一的基础上,进一步考虑存在多个所述待处理红外图像信息的情况,得到具体实施方式二,其流程示意图如图2所示,包括:
S201:接收多个待处理红外图像信息。
S202:分别根据所述待处理红外图像信息及预设的温度模式信息,得 到多个第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间。
S203:根据多个所述待处理红外图像信息、所述温度模式信息及多个所述第一图像灰度信息,得到多个与所述第一图像灰度信息对应的第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分。
S204:根据多个所述待处理红外图像信息确定首帧红外图像信息及按顺序排列的从属红外图像信息。
可按预设规则确定所述从属红外图像信息及所述首帧红外图像信息,将一段视频中的第一帧确定为首帧红外图像,其余帧全部为从属红外图像,当然,在视频过长的情况下,也可将视频分为多段,每段视频中的所有帧为一个小组,每个小组确定对应的首帧红外图像信息及从属红外图像信息。
S205:依次将每帧所述从属红外图像信息的粗灰度参数与前一帧的待处理红外图像信息的粗灰度参数对比,在同一位置,若所述从属红外图像信息的粗灰度参数与所述前一帧的待处理红外图像信息的粗灰度参数相同,则将所述从属红外图像信息的粗灰度参数标记为待变粗灰度参数;并将所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数对比,在同一位置,若所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数相同,则将所述从属红外图像信息的细灰度参数标记为待变细灰度参数。
S206:将所述待变粗灰度参数及所述待变细灰度参数置零,得到从属红外图像压缩信息。
实现置零的方法有很多,包括将所述从属红外图像信息复制一份,称其为从属副本,在S205的对比过程中,每对比一帧,就将该帧在所述从属副本中对应的帧对应的位置的灰度参数置零,在将所有从属红外图像信息对比完成后,直接将所述从属副本作为所述从属红外图像压缩信息。
S207:将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确 定压缩红外视频信息。
本具体实施方式与上述具体实施方式的不同之处在于,本具体实施方式中进一步限定了存在多个所述待处理红外图像信息,其余步骤均与上述具体实施方式相同,在此不再展开赘述。
现有的无损压缩算法往往只考虑静态的图像,对于帧间的数据关系考虑较少,使得红外数据视频的压缩比较低,带宽压力较大,存储所需硬盘较大。少数无损压缩算法考虑了帧间的关系,借鉴了可见光中H264、H265算法中帧间的关系增大了压缩比,但是压缩效果受温度场景影响较大,无法自适应各种宽温度范围的场景。传输的温度数据中存在大量噪声,红外视频数据压缩效果不稳定,容易造成延迟无法满足实时监控的需求。本具体实施方式中在具体实施方式一的针对单帧图像的压缩方法上,进一步考虑了有多帧红外图像信息(也可看作红外视频信息)时通过设置首帧红外图像作为基础,对其余的从属红外图像与所述其前一帧红外相比较,灰度相同的像素直接置零,大大增多了所述从属红外图像压缩信息中的零的数量,即造成了更多的相同项,因此在通过所述无损压缩算法进行压缩时,其压缩比能进一步提升,进一步减小所述压缩红外视频信息的体积。
作为一种优选实施方式,所述步骤S206包括:
S2061:根据所述从属红外图像压缩信息,确定灰度零点数,所述灰度零点数为所述从属红外图像压缩信息中为零的所述粗灰度参数及所述细灰度参数的个数的和。
S2062:判断所述灰度零点数是否超过预设的静止场景判断阈值。
S2063:当未超过所述静止场景判断阈值时,将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
当未超过所述静止场景判断阈值时,可以判断此时获取的红外图像信息对应的为背景静止,目标移动的场景,此时由于背景静止,所述从属红外图像压缩信息中零点多,压缩比高,可以直接将压缩后的数据传输,对带宽需求低。
S2064:当超过所述静止场景判断阈值时,将所述从属红外图像压缩信息中的第一图像灰度信息及所述首帧红外图像信息的第一图像灰度信息, 通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
当超过所述静止场景判断阈值时,可以判断此时获取的红外图像信息对应的为背景、目标均在移动的场景,此时压缩比较低,可能会导致传输带宽不足,此时可以直接只传输精度较低的所述第一图像灰度信息,当然,也可降低所述第二图像灰度信息的精度,使更多的细灰度参数相同从而置零,提高压缩比,再进行第一图像灰度信息及第二图像灰度信息的压缩与传输。针对摄像头转动,背景变化较大的场景,采用一个判据自动判别前后帧的场景差异,若场景差异较大,每帧均传输高频信息,精度为高频数据的压缩精度,若场景差异较小,传输高频和低频信息。此动态适应的方法,可以保证摄像头在旋转状态下或者背景变化较大的场景中温度差异较大的情况下也不卡顿,在相对静止状态下,传输精度更大。
上述具体实施方式根据场景自适应调整压缩精度,背景停顿处压缩精度更高,不卡顿,压缩数据的同时可根据需求量化控制精度。
下面提供一种红外视频信息解压缩的方法:
S1:经典无损压缩算法的解压缩,根据选择的无损压缩算法进行解压缩。
S2:帧间压缩算法的解压缩。对每个组内利用第一帧与相邻帧的关系进行解压缩复原。每个组内第二帧之后的数据为0的则用前一帧对应位置的数据代替,得到每一帧的data_High和data_Low。
S3:帧内压缩算法的解压缩。根据帧内压缩选择的压缩精度和压缩范围按照
Figure PCTCN2020133264-appb-000006
关系式进行解压缩。
在具体实施方式二的基础上,进一步考虑存在多个所述待处理红外图像信息的情况,得到具体实施方式三,其流程示意图如图3所示,包括:
S301:接收多个待处理红外图像信息。
S302:分别根据所述待处理红外图像信息及预设的温度模式信息,得到多个第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处 理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间。
S303:根据多个所述待处理红外图像信息、所述温度模式信息及多个所述第一图像灰度信息,得到多个与所述第一图像灰度信息对应的第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分。
S304:根据多个所述待处理红外图像信息确定首帧红外图像信息及按顺序排列的从属红外图像信息。
S305:依次将每帧所述从属红外图像信息的粗灰度参数与前一帧的待处理红外图像信息的粗灰度参数对比,在同一位置,若所述从属红外图像信息的粗灰度参数与所述前一帧的待处理红外图像信息的粗灰度参数相同,则将所述从属红外图像信息的粗灰度参数标记为待变粗灰度参数;并将所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数对比,在同一位置,若所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数相同,则将所述从属红外图像信息的细灰度参数标记为待变细灰度参数。
S306:将所述待变粗灰度参数及所述待变细灰度参数置零,得到从属红外图像压缩信息。
S307:将所述从属红外图像压缩信息中的从属红外图像信息对应的第二图像灰度信息分成预设分辨率的噪声识别区。
所述噪声识别区互不重叠,可为k*k(k为3,5,7等奇数)的像素区域,将所述第一图像灰度信息分成若干小区域。
S308:确定所述噪声识别区内非零的细灰度参数的个数,若未超过预设的消除阈值,则将所述噪声识别区内全部的细灰度参数置零,否则不做处理,得到去噪从属红外图像压缩信息。
S309:将所述去噪从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
本具体实施方式与上述具体实施方式的不同之处在于,本具体实施方 式中进一步对所述从属红外信息进行了去噪,其余步骤均与上述具体实施方式相同,在此不再展开赘述。
本具体实施方式中,加入了去噪步骤,即将所述第二图像灰度分为多个噪声识别区,分别计算噪声识别区中有多少零,若单个区域(如3*3像素的方格)中非零点没有超过消除阈值(相当于零点超过一定值),则表示该区域中的非零点为椒盐噪声,因为在意小范围内出现单个像素的温度不同与周边区域的概率很低,可进一步提升测温准确度,只传输有效数据,避免数据噪点太多,使灰度图像精度下降。本具体实施方式通过去噪使得单点的温度波动被忽略,若为温度数据,在一定程度上起到了降噪的效果。孤立的点测得的温度不稳定,图像中存在大量的椒盐噪声,可以通过中值滤波去掉椒盐噪声,只传输关键温度。零点的占比从55.19%提高到65.44%。
请见图6,图6左侧为没有经过本具体实施方式去噪的红外灰度图像,右侧为经过去噪的红外灰度图像。
当然,想去除椒盐噪声的点,除了上述确定多个噪声识别区,再看零点个数外,还可通过提取中心点,计算中心点周围的零点个数,看零点个数是否超出阈值,若超出阈值,则将中心点置零的方法消除椒盐噪声。
下面对本发明实施例提供的红外数据压缩装置进行介绍,下文描述的红外数据压缩装置与上文描述的红外数据压缩方法可相互对应参照。
图4为本发明实施例提供的红外数据压缩装置的结构框图,称其为具体实施方式四,参照图4红外数据压缩装置可以包括:
接收模块100,用于接收待处理红外图像信息;
第一灰度模块200,用于根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;
第二灰度模块300,用于根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等 分;
无损压缩模块400,用于将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。
作为一种优选实施方式,所述无损压缩模块包括:
首从确定单元,用于根据多个所述待处理红外图像信息确定首帧红外图像信息及按顺序排列的从属红外图像信息;
标记单元,用于依次将每帧所述从属红外图像信息的粗灰度参数与前一帧的待处理红外图像信息的粗灰度参数对比,在同一位置,若所述从属红外图像信息的粗灰度参数与所述前一帧的待处理红外图像信息的粗灰度参数相同,则将所述从属红外图像信息的粗灰度参数标记为待变粗灰度参数;并将所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数对比,在同一位置,若所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数相同,则将所述从属红外图像信息的细灰度参数标记为待变细灰度参数;
置零单元,用于将所述待变粗灰度参数及所述待变细灰度参数置零,得到从属红外图像压缩信息;
压缩单元,用于将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
作为一种优选实施方式,所述无损压缩模块包括:
划区单元,用于将所述从属红外图像压缩信息中的从属红外图像信息对应的第二图像灰度信息分成预设分辨率的噪声识别区;
去噪单元,用于确定所述噪声识别区内非零的细灰度参数的个数,若未超过预设的消除阈值,则将所述噪声识别区内全部的细灰度参数置零,否则不做处理,得到去噪从属红外图像压缩信息;
第二压缩单元,用于将所述去噪从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
作为一种优选实施方式,所述无损压缩模块包括:
数统单元,用于根据所述从属红外图像压缩信息,确定灰度零点数, 所述灰度零点数为所述从属红外图像压缩信息中为零的所述粗灰度参数及所述细灰度参数的个数的和;
场景判断单元,用于判断所述灰度零点数是否超过预设的静止场景判断阈值;
静置压缩单元,用于当未超过所述静止场景判断阈值时,将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息;
运动压缩单元,用于当超过所述静止场景判断阈值时,将所述从属红外图像压缩信息中的第一图像灰度信息及所述首帧红外图像信息的第一图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
作为一种优选实施方式,所述粗灰度参数及所述细灰度参数为8bit数据。
作为一种优选实施方式,所述接收模块包括:
双源接收单元,用于接收待处理红外图像信息及温度模式信息;
相应地,根据所述待处理红外图像信息及所述温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间。
本发明所提供的红外数据压缩装置,通过接收模块100,用于接收待处理红外图像信息;第一灰度模块200,用于根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;第二灰度模块300,用于根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分;无损压缩模块400,用于将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。本发明通过将接收到的待处理红外图像分为两个反应温度精度不同的图像灰度信息,虽然没有改变图像中描述每 个位置温度需要的字符数,但使得描述温度的字符(即所述粗灰度参数及所述细灰度参数)的重复度大幅增加,进而使所述第一图像灰度信息及所述第二图像灰度信息通过所述无损压缩算法进行压缩时,压缩速度及压缩比大幅上升,同时还保证了压缩过程中的低精度损失。
本实施例的红外数据压缩装置用于实现前述的红外数据压缩方法,因此红外数据压缩装置中的具体实施方式可见前文中的红外数据压缩方法的实施例部分,例如,接收模块100,第一灰度模块200,第二灰度模块300,无损压缩模块400,分别用于实现上述红外数据压缩方法中步骤S101,S102,S103和S104,所以,其具体实施方式可以参照相应的各个部分实施例的描述,在此不再赘述。
一种红外数据压缩设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行所述计算机程序时实现如上述任一种所述的红外数据压缩方法的步骤。本发明所提供的红外数据压缩方法,通过接收待处理红外图像信息;根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分;将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。本发明通过将接收到的待处理红外图像分为两个反应温度精度不同的图像灰度信息,虽然没有改变图像中描述每个位置温度需要的字符数,但使得描述温度的字符(即所述粗灰度参数及所述细灰度参数)的重复度大幅增加,进而使所述第一图像灰度信息及所述第二图像灰度信息通过所述无损压缩算法进行压缩时,压缩速度及压缩比大幅上升,同时还保证了压缩过程中的低精度损失。
一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述的红外数据压缩方法的步骤。本发明所提供的红外数据压缩方法,通过接收待处理红外图像信息;根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分;将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。本发明通过将接收到的待处理红外图像分为两个反应温度精度不同的图像灰度信息,虽然没有改变图像中描述每个位置温度需要的字符数,但使得描述温度的字符(即所述粗灰度参数及所述细灰度参数)的重复度大幅增加,进而使所述第一图像灰度信息及所述第二图像灰度信息通过所述无损压缩算法进行压缩时,压缩速度及压缩比大幅上升,同时还保证了压缩过程中的低精度损失。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者 设备中还存在另外的相同要素。
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
以上对本发明所提供的红外数据压缩方法、装置、设备及计算机可读存储介质进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。

Claims (10)

  1. 一种红外数据压缩方法,其特征在于,包括:
    接收待处理红外图像信息;
    根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;
    根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分;
    将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。
  2. 如权利要求1所述的红外数据压缩方法,其特征在于,当接收多个连续的所述待处理红外图像信息时,所述将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息包括:
    根据多个所述待处理红外图像信息确定首帧红外图像信息及按顺序排列的从属红外图像信息;
    依次将每帧所述从属红外图像信息的粗灰度参数与前一帧的待处理红外图像信息的粗灰度参数对比,在同一位置,若所述从属红外图像信息的粗灰度参数与所述前一帧的待处理红外图像信息的粗灰度参数相同,则将所述从属红外图像信息的粗灰度参数标记为待变粗灰度参数;并将所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数对比,在同一位置,若所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数相同,则将所述从属红外图像信息的细灰度参数标记为待变细灰度参数;
    将所述待变粗灰度参数及所述待变细灰度参数置零,得到从属红外图像压缩信息;
    将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰 度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
  3. 如权利要求2所述的红外数据压缩方法,其特征在于,所述将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息包括:
    将所述从属红外图像压缩信息中的从属红外图像信息对应的第二图像灰度信息分成预设分辨率的噪声识别区;
    确定所述噪声识别区内非零的细灰度参数的个数,若未超过预设的消除阈值,则将所述噪声识别区内全部的细灰度参数置零,否则不做处理,得到去噪从属红外图像压缩信息;
    将所述去噪从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
  4. 如权利要求2所述的红外数据压缩方法,其特征在于,所述将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息包括:
    根据所述从属红外图像压缩信息,确定灰度零点数,所述灰度零点数为所述从属红外图像压缩信息中为零的所述粗灰度参数及所述细灰度参数的个数的和;
    判断所述灰度零点数是否超过预设的静止场景判断阈值;
    当未超过所述静止场景判断阈值时,将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息;
    当超过所述静止场景判断阈值时,将所述从属红外图像压缩信息中的第一图像灰度信息及所述首帧红外图像信息的第一图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
  5. 如权利要求1所述的红外数据压缩方法,其特征在于,所述粗灰度参数及所述细灰度参数为8bit数据。
  6. 如权利要求1所述的红外数据压缩方法,其特征在于,所述接收待处理红外图像信息包括:
    接收待处理红外图像信息及温度模式信息;
    相应地,根据所述待处理红外图像信息及所述温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间。
  7. 一种红外数据压缩装置,其特征在于,包括:
    接收模块,用于接收待处理红外图像信息;
    第一灰度模块,用于根据所述待处理红外图像信息及预设的温度模式信息,得到第一图像灰度信息,其中,所述第一图像灰度信息包括与所述待处理红外图像信息中的位置对应的粗灰度参数,每个所述粗灰度参数对应一段第一宽度的温度区间;
    第二灰度模块,用于根据所述待处理红外图像信息、所述温度模式信息及所述第一图像灰度信息,得到第二图像灰度信息,其中,所述第二图像灰度信息包括与所述待处理红外图像信息中的位置对应的细灰度参数,所述细灰度参数根据所述温度模式信息将所述第一宽度的温度区间等分;
    无损压缩模块,用于将所述第一图像灰度信息及所述第二图像灰度信息通过无损压缩算法进行压缩,确定压缩红外图像信息。
  8. 如权利要求7所述的红外数据压缩装置,其特征在于,所述无损压缩模块包括:
    首从确定单元,用于根据多个所述待处理红外图像信息确定首帧红外图像信息及按顺序排列的从属红外图像信息;
    标记单元,用于依次将每帧所述从属红外图像信息的粗灰度参数与前一帧的待处理红外图像信息的粗灰度参数对比,在同一位置,若所述从属红外图像信息的粗灰度参数与所述前一帧的待处理红外图像信息的粗灰度参数相同,则将所述从属红外图像信息的粗灰度参数标记为待变粗灰度参数;并将所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数对比,在同一位置,若所述从属红外图像信息的细灰度参数与所述前一帧的待处理红外图像信息的细灰度参数相同,则将所 述从属红外图像信息的细灰度参数标记为待变细灰度参数;
    置零单元,用于将所述待变粗灰度参数及所述待变细灰度参数置零,得到从属红外图像压缩信息;
    压缩单元,用于将所述从属红外图像压缩信息、所述首帧红外图像信息的第一图像灰度信息及第二图像灰度信息,通过所述无损压缩算法进行压缩,确定压缩红外视频信息。
  9. 一种红外数据压缩设备,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至6任一项所述的红外数据压缩方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述的红外数据压缩方法的步骤。
PCT/CN2020/133264 2020-09-02 2020-12-02 一种红外数据压缩方法、装置及设备 WO2022048054A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010908902.0 2020-09-02
CN202010908902.0A CN112004093B (zh) 2020-09-02 2020-09-02 一种红外数据压缩方法、装置及设备

Publications (1)

Publication Number Publication Date
WO2022048054A1 true WO2022048054A1 (zh) 2022-03-10

Family

ID=73465090

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/133264 WO2022048054A1 (zh) 2020-09-02 2020-12-02 一种红外数据压缩方法、装置及设备

Country Status (2)

Country Link
CN (1) CN112004093B (zh)
WO (1) WO2022048054A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174774A (zh) * 2022-06-29 2022-10-11 上海飞机制造有限公司 一种深度图像的压缩方法、装置、设备及存储介质
CN117615088A (zh) * 2024-01-22 2024-02-27 沈阳市锦拓电子工程有限公司 一种安全监控的视频数据高效存储方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112004093B (zh) * 2020-09-02 2022-07-12 烟台艾睿光电科技有限公司 一种红外数据压缩方法、装置及设备
CN114205649A (zh) * 2021-12-08 2022-03-18 无锡英菲感知技术有限公司 图像数据处理方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339075A (zh) * 2007-07-04 2009-01-07 索尼株式会社 远红外辐射成像装置以及远红外辐射图像处理装置和方法
US20170264882A1 (en) * 2016-03-10 2017-09-14 Dell Products, Lp System and method of generating a temperature map
CN110611509A (zh) * 2019-08-16 2019-12-24 宁海县雁苍山电力建设有限公司 一种红外温度数据压缩方法及系统
CN110853108A (zh) * 2019-10-11 2020-02-28 中国南方电网有限责任公司超高压输电公司天生桥局 一种红外热图数据的压缩存储方法
CN112004093A (zh) * 2020-09-02 2020-11-27 烟台艾睿光电科技有限公司 一种红外数据压缩方法、装置及设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2437486A1 (en) * 2010-10-04 2012-04-04 Flir Systems AB IR Camera and Method for Processing Thermal Image Information
CN106407201B (zh) * 2015-07-29 2020-12-01 腾讯科技(深圳)有限公司 一种数据处理方法、装置及计算机可读存储介质
CN106649474B (zh) * 2016-09-29 2020-11-03 上海热像科技股份有限公司 一种红外图像数据的存储方法
WO2018122589A1 (zh) * 2016-12-30 2018-07-05 同济大学 一种基于红外热像图分析的沥青路面裂缝发育程度检测方法
CN110853109B (zh) * 2019-10-11 2020-07-10 中国南方电网有限责任公司超高压输电公司天生桥局 一种红外热图数据的压缩存储方法
CN111026708B (zh) * 2019-11-25 2023-04-14 烟台艾睿光电科技有限公司 一种热像仪图像文件的存储方法、装置、设备及存储介质
CN111337133B (zh) * 2020-03-02 2021-08-03 浙江大华技术股份有限公司 红外数据的生成方法及装置、解析方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339075A (zh) * 2007-07-04 2009-01-07 索尼株式会社 远红外辐射成像装置以及远红外辐射图像处理装置和方法
US20170264882A1 (en) * 2016-03-10 2017-09-14 Dell Products, Lp System and method of generating a temperature map
CN110611509A (zh) * 2019-08-16 2019-12-24 宁海县雁苍山电力建设有限公司 一种红外温度数据压缩方法及系统
CN110853108A (zh) * 2019-10-11 2020-02-28 中国南方电网有限责任公司超高压输电公司天生桥局 一种红外热图数据的压缩存储方法
CN112004093A (zh) * 2020-09-02 2020-11-27 烟台艾睿光电科技有限公司 一种红外数据压缩方法、装置及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SUN JING, ZHANG YONG;ZHANG YI;HU LINMIAO: "Backward-adaptive Lossless Compression of Infrared Video", INFRARED TECHNOLOGY, KUNMING WULI YANJIUSUO, CN, vol. 41, no. 12, 19 December 2019 (2019-12-19), CN , pages 1100 - 1105, XP055907237, ISSN: 1001-8891 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174774A (zh) * 2022-06-29 2022-10-11 上海飞机制造有限公司 一种深度图像的压缩方法、装置、设备及存储介质
CN115174774B (zh) * 2022-06-29 2024-01-26 上海飞机制造有限公司 一种深度图像的压缩方法、装置、设备及存储介质
CN117615088A (zh) * 2024-01-22 2024-02-27 沈阳市锦拓电子工程有限公司 一种安全监控的视频数据高效存储方法
CN117615088B (zh) * 2024-01-22 2024-04-05 沈阳市锦拓电子工程有限公司 一种安全监控的视频数据高效存储方法

Also Published As

Publication number Publication date
CN112004093A (zh) 2020-11-27
CN112004093B (zh) 2022-07-12

Similar Documents

Publication Publication Date Title
WO2022048054A1 (zh) 一种红外数据压缩方法、装置及设备
US20210152621A1 (en) System and methods for bit rate control
CN110495174B (zh) 编码方法、装置、图像处理系统和计算机可读存储介质
JP5164866B2 (ja) ビデオ画像シーケンスの時間的頻度を適合させる方法および装置
JP2003018599A (ja) 画像符号化装置および方法
US10750175B2 (en) Quantization partitioning for enhanced image compression
TW201737708A (zh) 用於在顯示串流壓縮中量化參數之適應性計算的裝置及方法
US10304213B2 (en) Near lossless compression scheme and system for processing high dynamic range (HDR) images
JP2017005456A (ja) 画像圧縮方法、画像圧縮装置及び撮像装置
CN116193130A (zh) 一种提高图像数据在网络中传输效率的方法及系统
JP2016021731A (ja) 撮像装置およびその制御方法ならびにプログラム
CN110740324B (zh) 编码控制方法及相关装置
US20230091103A1 (en) Electronic device and method for compressing video data
US20230222696A1 (en) Image processing method and apparatus, device, and computer-readable storage medium
US20090021645A1 (en) Video signal processing device, video signal processing method and video signal processing program
JP2007019878A (ja) 画像符号化装置及び画像符号化方法
JP2004186934A (ja) 画像処理システム、画像形成装置、画像処理方法、およびプログラム
Sagheer et al. Fast intra-frame compression for video conferencing using adaptive shift coding
JP2011109172A (ja) 映像符号化装置、および、そのデータ処理方法
US9942569B2 (en) Image encoding apparatus and control method of the same
JP2016082395A (ja) 符号化装置、符号化方法及びプログラム
WO2020062216A1 (en) Apparatus and method for hierarchical wireless video and graphics transmission based on video preprocessing
US20110103705A1 (en) Image encoding method and apparatus, and image decoding method and apparatus
WO2023024519A1 (zh) 一种视频处理方法、装置、设备以及系统
CN116527903B (zh) 图像浅压缩方法及解码方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20952295

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20952295

Country of ref document: EP

Kind code of ref document: A1