CN107888922B - Image preprocessing method and device for preventing code stream overflow of JPEG-LS lossless compression algorithm - Google Patents

Image preprocessing method and device for preventing code stream overflow of JPEG-LS lossless compression algorithm Download PDF

Info

Publication number
CN107888922B
CN107888922B CN201711158299.3A CN201711158299A CN107888922B CN 107888922 B CN107888922 B CN 107888922B CN 201711158299 A CN201711158299 A CN 201711158299A CN 107888922 B CN107888922 B CN 107888922B
Authority
CN
China
Prior art keywords
image
current
sub
lossless compression
transformation parameter
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.)
Active
Application number
CN201711158299.3A
Other languages
Chinese (zh)
Other versions
CN107888922A (en
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.)
Xian Institute of Space Radio Technology
Original Assignee
Xian Institute of Space Radio Technology
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 Xian Institute of Space Radio Technology filed Critical Xian Institute of Space Radio Technology
Priority to CN201711158299.3A priority Critical patent/CN107888922B/en
Publication of CN107888922A publication Critical patent/CN107888922A/en
Application granted granted Critical
Publication of CN107888922B publication Critical patent/CN107888922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • 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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/48Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using compressed domain processing techniques other than decoding, e.g. modification of transform coefficients, variable length coding [VLC] data or run-length data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

Abstract

The invention discloses an image preprocessing method and device for preventing code stream overflow in a JPEG-LS lossless compression algorithm. Wherein, the method comprises the following steps: the method comprises a dividing step, a judging step, an image preprocessing step, a first lossless compression coding step and a second lossless compression coding step. The invention not only can better solve the problem of code stream overflow possibly occurring when the JPEG-LS lossless compression algorithm is applied, but also can keep the relative independence of the JPEG-LS lossless compression coding module, and is easy for modular design.

Description

Image preprocessing method and device for preventing code stream overflow of JPEG-LS lossless compression algorithm
Technical Field
The invention belongs to the field of digital image compression, and particularly relates to an image preprocessing method and device for preventing code stream overflow in a JPEG-LS lossless compression algorithm.
Background
With the development of satellite remote sensing imaging technology and the continuous improvement of ground resolution and breadth requirements of users, the resolution of images acquired by remote sensing satellites is higher and higher, so that the quantity of image data to be stored and transmitted is increased rapidly, huge pressure is brought to a real-time data transmission system, and in order to solve the contradiction between massive high-speed data transmission and limited transmission bandwidth, a data compression technology is required. The existing satellite data compression technology is mainly divided into two categories, namely lossless compression and lossy compression. Lossless compression is to encode a compressed image, and image data before compression can be accurately obtained. Lossless compression provides a compression technology without information loss, and coding is mainly performed based on the principle of information entropy, and currently, prediction coding, transform coding, hybrid coding and the like are commonly used. Lossless compression can recover the original image from compressed data without error, but the compression ratio is not high, and is generally 2: 1-5: 1. In recent years, due to the increasing demand of users for image quality, domestic satellites successively adopt a lossless data compression algorithm JPEG-LS with good performance, such as satellites like ZY-3, KZ-1 and the like. However, under certain specific conditions, even though JPEG-LS lossless compression is adopted for data of the satellite remote sensing system, the data may still exceed the upper limit of the channel capacity, and a code stream overflow phenomenon occurs, and at this time, due to loss of code stream data, subsequent image data cannot be solved, image information is lost, and subsequent analysis work of satellite data is seriously affected. Therefore, the research on an image processing method for solving the problem of code stream overflow of JPEG-LS lossless compression has very important practical significance.
The problem of code stream overflow is not strange in the field of image compression, but when the code stream overflow occurs in the previous compression coding algorithms with controllable code rates, such as JPEG2000, CCSDS, SPITE and other compression algorithms, only the detail information of the image is lost, but the main information of the image is not lost, and the subsequent analysis work of satellite data is not seriously influenced. The JPEG-LS lossless compression algorithm is a compression coding algorithm with controllable quality, the code rate is not controllable, gradual transmission of the code stream is not supported, once the code stream overflows in the practical application, the subsequent image information is completely lost from the position where the code stream overflows, the image bad block with default pixel information appears at the tail end of the reconstructed image in the visual sense, and the subsequent interpretation of the satellite remote sensing image is seriously influenced. At present, because the JPEG-LS lossless compression algorithm is not widely used in a satellite remote sensing system, and the code stream overflow phenomenon can only occur under individual specific conditions, the research on the problem of code stream overflow prevention of JPEG-LS lossless compression coding has not been paid attention by related designers, and related research documents are few.
Disclosure of Invention
The technical problem solved by the invention is as follows: the image preprocessing method and the image preprocessing device for preventing the overflow of the code stream of the JPEG-LS lossless compression algorithm overcome the defects of the prior art, not only can better solve the problem of the overflow of the code stream of the JPEG-LS lossless compression algorithm possibly generated in the application process, but also can keep the relative independence of a JPEG-LS lossless compression coding module, and are easy for modular design.
The purpose of the invention is realized by the following technical scheme: according to an aspect of the present invention, there is provided an image preprocessing method for preventing code stream overflow of a JPEG-LS lossless compression algorithm, the method comprising the steps of: dividing: dividing the image to obtain a plurality of sub-images; a judging step: judging whether the value of the transformation parameter of the image preprocessing module is greater than 1; an image preprocessing step: if the value of the transformation parameter of the image preprocessing module is larger than 1, image preprocessing is carried out on each sub-image to obtain a corresponding transformed image; a first lossless compression encoding step: carrying out lossless compression treatment on each converted image, judging whether the code stream of the converted image corresponding to the current sub-image has overflow condition, and if so, adjusting the conversion parameters of the converted image corresponding to the current sub-image; a second lossless compression encoding step: if the value of the conversion parameter of the image preprocessing module is equal to 1, each sub-image is subjected to lossless compression processing, whether the code stream of the current sub-image has overflow condition or not is judged, and if the code stream of the current sub-image has overflow condition, the conversion parameter corresponding to the current sub-image is adjusted.
In the image preprocessing method for preventing the code stream overflow of the JPEG-LS lossless compression algorithm, in the dividing step, the sub-image dividing size is determined by the width of the camera input image, the storage processing capacity of a compression coding hardware part and the adopted compression algorithm factor.
In the image preprocessing method for preventing code stream overflow of the JPEG-LS lossless compression algorithm, in the image preprocessing step, the image preprocessing formula is as follows:wherein f (i, j) is a subgraph, g (i, j) is a transformed image, alpha is a transformation parameter, alpha is>1,For the rounding down operation, i is the row number of the image element and j is the column number of the image element.
In the image preprocessing method for preventing code stream overflow in the JPEG-LS lossless compression algorithm, the first lossless compression encoding step specifically includes: and carrying out lossless compression treatment on each transformed image and judging the transformation parameters obtained by the current transformed image: if the transformation parameter obtained by the current transformed image is 1, counting the current total output compressed code flow, comparing the current total output compressed code flow with the preset compressed code flow, and if the current total output compressed code flow is larger than the preset compressed code flow, adjusting the transformation parameter obtained by the current transformed image; if the transformation parameter obtained by the current transformed image is larger than 1, counting the current total output compressed code flow, solving the difference between the total compressed code flow of the previous sub-image and the current total output compressed code flow, then judging whether the difference is larger than a first threshold value, and if the difference is larger than the first threshold value and the transformation parameter alpha obtained by the transformed image corresponding to the previous sub-image is equal to the transformation parameter obtained by the transformed image corresponding to the current sub-image, stopping image preprocessing.
In the image preprocessing method for preventing code stream overflow in the JPEG-LS lossless compression algorithm, the second lossless compression encoding step specifically comprises the following steps: if the value of the transformation parameter of the image preprocessing module is equal to 1, each sub-image is subjected to lossless compression treatment and the transformation parameter obtained by the current sub-image is interpreted: if the transformation parameter obtained by the current sub-graph is equal to 1, counting the current total output compressed code flow, comparing the current total output compressed code flow with the preset compressed code flow, and if the current total output compressed code flow is larger than the preset compressed code flow, adjusting the transformation parameter obtained by the current sub-graph; if the transformation parameter obtained by the current sub-image is larger than 1, counting the current total output compressed code flow, solving the difference between the total compressed code flow of the previous sub-image and the current total output compressed code flow, then judging whether the difference is larger than a second threshold value, and if the difference is larger than the second threshold value and the transformation parameter obtained by the previous sub-image is equal to the transformation parameter obtained by the current sub-image, stopping image preprocessing.
In the image preprocessing method for preventing code stream overflow in the JPEG-LS lossless compression algorithm, the formula of the first threshold is as follows:
T=λ*IQ
wherein λ is a scale factor, 0< λ <1, and IQ is the total size of the input subgraph.
In the image preprocessing method for preventing the overflow of the code stream in the JPEG-LS lossless compression algorithm, the formula of the second threshold is as follows:
T'=λ'*IQ
where λ' is the scale factor, 0< λ <1, and IQ is the total size of the input subgraph.
In the image preprocessing method for preventing the code stream overflow of the JPEG-LS lossless compression algorithm, in the first lossless compression coding step, the conversion parameter of the converted image corresponding to the current sub-image is adjusted to be 2.
In the image preprocessing method for preventing the overflow of the code stream of the JPEG-LS lossless compression algorithm, in the second lossless compression coding step, the transformation parameter corresponding to the current sub-image is adjusted to be 2.
According to another aspect of the present invention, there is also provided an image preprocessing apparatus for preventing code stream overflow of a JPEG-LS lossless compression algorithm, the apparatus including: the dividing module is used for dividing the image to obtain a plurality of sub-images; the image preprocessing module is used for judging whether the value of the transformation parameter of the image preprocessing module is greater than 1; the image preprocessing module is used for preprocessing the image of each sub-image to obtain a corresponding transformed image if the value of the transformation parameter of the image preprocessing module is greater than 1; the lossless compression coding module is used for carrying out lossless compression processing on each converted image and judging whether the code stream of the converted image corresponding to the current sub-image has overflow conditions, and if the overflow conditions exist, the lossless compression coding module is used for adjusting the conversion parameters of the converted image corresponding to the current sub-image; and the image preprocessing module is used for carrying out lossless compression processing on each sub-image and judging whether the code stream of the current sub-image has overflow condition or not if the value of the conversion parameter of the image preprocessing module is equal to 1, and adjusting the conversion parameter corresponding to the current sub-image if the code stream of the current sub-image has overflow condition.
Compared with the prior art, the invention has the following beneficial effects:
(1) the problem solved by the invention makes up the possible defects of the JPEG-LS lossless compression algorithm in practical application, and lays a good foundation for the wide application of the algorithm in the satellite remote sensing system.
(2) The invention not only designs the opening function of the image preprocessing module, but also designs the closing function of the image preprocessing module, can process problems in time when the overflow phenomenon of code streams occurs, and does not intervene the processing flow of JPEG-LS compression coding of the original image under the condition that most of the code streams are normal, thereby furthest retaining the information of the original image.
(3) The image preprocessing method designed by the invention solves the problem from the image processing angle, and keeps the relative independence of the subsequent JPEG-LS compression coding module, thereby facilitating modular design, facilitating rapid function embedding and removal, and being suitable for all compression coding systems using JPEG-LS lossless compression algorithm.
(4) The operation method for transforming the input original subgraph in the invention considers the problem of conversion of subsequent hardware implementation, so that the hardware implementation of the transformation is convenient and simple, the implementation is easy, and the complicated floating point operation is avoided.
(5) The control signals fed back by the JPEG-LS lossless compression coding module are all information values commonly used in a compression coding system, the design is simple and effective, and the resource utilization rate of the original compression coding system is basically not increased when FPGA is realized.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a block diagram of an algorithm of an image pre-processing module according to an embodiment of the present invention;
FIG. 2 is a block diagram of an implementation of code stream overflow prevention for JPEG-LS lossless compression coding according to the present invention;
FIG. 3 is a diagram illustrating a hardware-implemented port definition of an image pre-processing module according to an embodiment of the present invention;
FIG. 4(a) is a schematic diagram of an original input image provided by an embodiment of the present invention;
FIG. 4(b) is a schematic diagram of a code stream overflow reconstructed image provided by the embodiment of the present invention;
FIG. 4(c) is a schematic diagram of a reconstructed image after image preprocessing according to an embodiment of the present invention;
fig. 5 is a control flow diagram of an image preprocessing module according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
The embodiment provides an image preprocessing method for preventing code stream overflow of a JPEG-LS lossless compression algorithm, which comprises the following steps of:
(1) the remote sensing image input by the camera is not limited in height except that the width of the image is determined by parameters of the CCD camera, and the input image is generally input to a subsequent unit for processing after sub-image division, which belongs to the known category of the technicians in the field and is not described herein again. The input image supplied to the image preprocessing module is thus a divided sub-image, and the image referred to here is the input sub-image.
(2) When the image preprocessing module processes, firstly, a conversion parameter alfa is judged, the initial value of the conversion parameter alfa is 1, the alfa value indicates the opening and closing state of the image preprocessing module, when alfa is 1, the image preprocessing module indicates that the image preprocessing module is in the closing state, and when the alfa is in the closing state, the image preprocessing module does not perform any conversion on an input subgraph and directly sends the input subgraph to a subsequent JPEG-LS lossless compression coding module to complete lossless compression processing; when alfa is greater than 1, the image preprocessing module is in an open state, the image preprocessing module transforms an input sub-image and sends the transformed sub-image to a subsequent JPEG-LS lossless compression coding module to complete lossless compression processing;
(3) after the JPEG-LS lossless compression coding module finishes the compression coding of the current subgraph, the current alfa value is also interpreted: when alfa is 1, turning to the step (4); when alfa is larger than 1, turning to the step (5);
(4) when alfa is 1, the JPEG-LS lossless compression encoding module firstly counts the current total output compressed code flow sq (i), and compares it with the required compressed code flow OSQ (not less than 1.3 times compression), if sq (i) > OSQ, the code stream overflow control signal overflow _ ctrl < 1', that is, the high level is valid; otherwise, setting the code stream overflow control signal overflow _ ctrl < equal to '0', namely, the low level is invalid;
meanwhile, the image preprocessing module detects the code stream overflow control signal overflow _ ctrl fed back in real time, and when it is found that it is effective, the adjustment of the conversion parameter alfa is completed, a specific implementation mode is that alfa is adjusted to alfa 2, as can be seen from the simulation result of the previous 8 remote sensing images, alfa 2 can reduce the dynamic range of the original input image to half of the original one, the compression performance of the converted image is improved to different degrees, and the compression ratio required by the channel capacity can be basically met, and in hardware implementation, the conversion of the image preprocessing can be directly converted into right shift operation, which is very simple to implement, that is:
g(i,j)=f(i,j)>>1
(5) when alfa >1, the JPEG-LS lossless compression coding module also counts the current total output compressed code flow SQ (i) first, and finds the difference between the total compressed code flow SQ (i-1) and SQ (i) of the previous sub-picture, that is:
ΔSQ=SQ(i-1)-SQ(i)
then, it is determined whether Δ SQ is greater than a threshold T, and a specific embodiment is to take T to 0.2 × IQ, where IQ is the total size (number of bytes) of the original input subgraph. The size of each sub-graph is equal, where the total size refers to the total data amount input to the sub-graph, which may be in bytes.
If the Δ SQ > T and the alfa value α (i-1) obtained from the previous sub-graph is equal to the alfa value a (i) obtained from the current sub-graph, the JPEG-LS lossless compression coding module sets the normal control signal initial _ ctrl of the code stream to be '1', that is, the high level is valid, otherwise, sets the normal control signal initial _ ctrl of the code stream to be '0', that is, the low level is invalid;
meanwhile, the image preprocessing module detects a fed-back code stream normal control signal initial _ ctrl in real time, and when the code stream normal control signal initial _ ctrl is found to be effective, a parameter alfa of the image preprocessing module is initialized to 1 again, namely the image preprocessing module is in a closed state; otherwise, the value of the parameter alfa is kept unchanged, and the image preprocessing module is kept in an on state.
The following describes a specific implementation of the image preprocessing method for preventing code stream overflow in the JPEG-LS lossless compression algorithm, with reference to the accompanying drawings and specific implementation examples:
table 1 shows compression ratios of different source images when the JPEG-LS is used for lossless compression, the 8 selected images are representative 10-bit remote sensing images, the sizes of the images are 2048 × 2048, the NEAR takes a fixed value of 0, and the image contents relate to mountains, cities, oceans, harbors and the like.
TABLE 1 compression ratio for lossless compression of different image contents using JPEG-LS
It can be seen from this table that, when the NEAR values of different input original images are all zero, that is, when the original images are all compressed without loss, the output code rates are different, that is, the code rates are not controllable. The JPEG-LS lossless compression algorithm is a compression algorithm with controlled quality, the reconstruction quality can be accurately controlled, meanwhile, the other cost is that the output compression code rate is uncontrollable, the JPEG-LS lossless compression algorithm can obtain good compression efficiency and is widely used for lossless data compression, on one hand, the self-adaptive prediction is adopted, the context modeling is adopted to remove the correlation among image pixels, the purpose of reducing the image entropy is achieved, and on the other hand, the run length coding and the self-adaptive classification coding are adopted to reduce the storage capacity of a code stream, so that the limit of an entropy theory is reached. Therefore, it can be seen that different image contents determine the compression performance of the JPEG-LS lossless compression algorithm, and when the correlation of the input image is stronger, the redundancy is larger, and the flat area of the image is more, the higher the compression efficiency of the JPEG-LS lossless compression algorithm is, the smaller the output code rate is, whereas when the correlation of the input image is smaller, the redundancy is smaller, and the flat area of the image is less, the lower the compression efficiency of the JPEG-LS lossless compression algorithm is, the larger the output code rate is.
The embodiment also provides an image preprocessing device for preventing code stream overflow of a JPEG-LS lossless compression algorithm, which comprises: the device comprises a dividing module, an image preprocessing module and a lossless compression coding module. The dividing module is used for dividing the image to obtain a plurality of sub-images. The image preprocessing module is used for judging whether the value of the transformation parameter of the image preprocessing module is greater than 1; and if the value of the transformation parameter of the image preprocessing module is greater than 1, performing image preprocessing on each sub-image to obtain a corresponding transformed image. The lossless compression coding module is used for carrying out lossless compression processing on each converted image and judging whether the code stream of the converted image corresponding to the current sub-image has overflow conditions, and if the overflow conditions exist, the lossless compression coding module is used for adjusting the conversion parameters of the converted image corresponding to the current sub-image; and the image preprocessing module is used for carrying out lossless compression processing on each sub-image and judging whether the code stream of the current sub-image has overflow condition or not if the value of the conversion parameter of the image preprocessing module is equal to 1, and adjusting the conversion parameter corresponding to the current sub-image if the code stream of the current sub-image has overflow condition.
FIG. 2 is a block diagram of implementing code stream overflow prevention by JPEG-LS lossless compression coding, and the following describes the detailed implementation of the image preprocessing module by taking remote sensing 10-bit image to perform JPEG-LS lossless compression coding not less than 1.3 times.
First, the processing flow of the image preprocessing module
An algorithm block diagram of the originally input image is shown in fig. 1, wherein f (i, j) and g (i, j) are processed images after image preprocessing.
The process of image preprocessing the original input image f (i, j) is to complete the following transformation:
wherein alpha is an adjustment factor, alpha>1,For the lower rounding operation.
Next, we take two values of α ═ 1.5 and 2, preprocess the 8 representative remote sensing images, and then compare the change of compression performance of JPEG-LS lossless compression encoding of the images before and after image preprocessing:
TABLE 2 comparison of compression Performance before and after image preprocessing
TABLE 3 comparison of dynamic Range before and after image preprocessing
It can be seen from the above table that after the original images are respectively preprocessed, the compression ratios of the images after JPEG-LS lossless compression are all improved, and as α is larger, the compression ratio of the lossless compression is higher, which can be known from the information theory, and this is because after the images are preprocessed, the category number of the information elements is reduced (as shown in table 3), and the entropy of the images is effectively reduced, so that the compression performance of the compression algorithm is improved, the flow of the output compression codes is greatly reduced, and the problem of code stream overflow is solved.
Second, the control flow of the image preprocessing module
The image preprocessing module is mainly used for converting a pixel value of an input sub-image, sending the converted pixel value to a subsequent compression coding module for JPEG-LS lossless compression, and meanwhile, generating a code stream overflow control signal overflow _ ctrl and a code stream normal control signal initial _ ctrl by the JPEG-LS lossless compression coding module through the compression performance (compression ratio) of the current sub-image so as to adjust a conversion parameter alfa of the image preprocessing module in real time and complete the opening and closing of the image preprocessing module.
Fig. 3 is a port definition when the image preprocessing module is implemented by an FPGA, where datain is a pixel value of a current input sub-image, synin is a synchronous signal of input data datain, overflow _ ctrl is a code stream overflow control signal fed back by the JPEG _ LS compression encoding module, initial _ ctrl is a code stream normal control signal fed back by the JPEG-LS compression encoding module, dataout is a pixel value after converting datain output by the image preprocessing module, synout is a synchronous signal of data dataout, and alfa is a parameter a (i) currently used.
Fig. 4 shows the result of performing code stream overflow prevention processing on a 1024 x 1024 remote sensing image with 10 bits, where the input image of the original camera is as shown in fig. 4(a), and the compression ratio of the image is 1.2036 times when the image directly completes JPEG-LS lossless compression coding, which is 1.3 times less than the channel capacity required by satellite real-time downloading, so that code stream overflow occurs, and the code stream beyond the compression ratio cannot be downloaded to the ground, so that an image bad block appears in the ground reconstructed image, as shown in fig. 4(b), the JPEG-LS compression coding is performed after the original input image is subjected to image preprocessing, the image compression ratio can be increased to 1.3731 times, which completely satisfies the channel capacity 1.3 times required by satellite real-time downloading, the compressed code stream of the processed image is completely downloaded, and the reconstructed image is complete and has no bad block, as shown in fig. 4(c), different from the original input image, the brightness of the reconstructed image after the image preprocessing is reduced, which is just because the dynamic range of the transformed image after the image preprocessing is reduced to half of that of the original image, but the image content is kept intact, and the ground interpretation is not influenced.
The specific implementation mode of the invention takes an image preprocessing method for preventing code stream overflow of a JPEG-LS lossless compression algorithm of the remote sensing image as an example, but the application range of the invention is not limited in the field of remote sensing images.
The above-described embodiments are merely preferred embodiments of the present invention, and general changes and substitutions by those skilled in the art within the technical scope of the present invention are included in the protection scope of the present invention.

Claims (8)

1. An image preprocessing method for preventing code stream overflow of a JPEG-LS lossless compression algorithm is characterized by comprising the following steps of:
dividing: dividing the image to obtain a plurality of sub-images;
a judging step: judging whether the value of the transformation parameter of the image preprocessing module is greater than 1;
an image preprocessing step: if the value of the transformation parameter of the image preprocessing module is larger than 1, image preprocessing is carried out on each sub-image to obtain a corresponding transformed image;
a first lossless compression encoding step: carrying out lossless compression treatment on each converted image, judging whether the code stream of the converted image corresponding to the current sub-image has overflow condition, and if so, adjusting the conversion parameters of the converted image corresponding to the current sub-image;
a second lossless compression encoding step: if the value of the conversion parameter of the image preprocessing module is equal to 1, each sub-image is subjected to lossless compression processing, whether the code stream of the current sub-image has overflow or not is judged, and if the code stream of the current sub-image has overflow, the conversion parameter corresponding to the current sub-image is adjusted; wherein the content of the first and second substances,
the first lossless compression encoding step specifically includes: and carrying out lossless compression treatment on each transformed image and judging the transformation parameters obtained by the current transformed image: if the transformation parameter obtained by the current transformed image is 1, counting the current total output compressed code flow, comparing the current total output compressed code flow with the preset compressed code flow, and if the current total output compressed code flow is larger than the preset compressed code flow, adjusting the transformation parameter obtained by the current transformed image; if the transformation parameter obtained by the current transformed image is larger than 1, counting the current total output compressed code flow, solving the difference value between the total compressed code flow of the previous sub-image and the current total output compressed code flow, then judging whether the difference value is larger than a first threshold value, and if the difference value is larger than the first threshold value and the transformation parameter alpha obtained by the transformed image corresponding to the previous sub-image is equal to the transformation parameter obtained by the transformed image corresponding to the current sub-image, stopping image preprocessing;
the second lossless compression encoding step specifically includes: if the value of the transformation parameter of the image preprocessing module is equal to 1, each sub-image is subjected to lossless compression treatment and the transformation parameter obtained by the current sub-image is interpreted: if the transformation parameter obtained by the current sub-graph is equal to 1, counting the current total output compressed code flow, comparing the current total output compressed code flow with the preset compressed code flow, and if the current total output compressed code flow is larger than the preset compressed code flow, adjusting the transformation parameter obtained by the current sub-graph; if the transformation parameter obtained by the current sub-image is larger than 1, counting the current total output compressed code flow, solving the difference between the total compressed code flow of the previous sub-image and the current total output compressed code flow, then judging whether the difference is larger than a second threshold value, and if the difference is larger than the second threshold value and the transformation parameter obtained by the previous sub-image is equal to the transformation parameter obtained by the current sub-image, stopping image preprocessing.
2. The image preprocessing method for preventing code stream overflow of JPEG-LS lossless compression algorithm as claimed in claim 1, wherein: in the dividing step, the sub-graph dividing size is determined by the width of the camera input image, the storage processing capacity of the compression coding hardware part and the adopted compression algorithm factor.
3. The image preprocessing method for preventing code stream overflow of JPEG-LS lossless compression algorithm as claimed in claim 1, wherein: in the image preprocessing step, the formula of image preprocessing is as follows:
wherein f (i, j) is a subgraph, g (i, j) is a transformed image, alpha is a transformation parameter, alpha is>1,For the rounding down operation, i is the row number of the image element and j is the column number of the image element.
4. The image preprocessing method for preventing code stream overflow of JPEG-LS lossless compression algorithm as claimed in claim 1, wherein: the formula of the first threshold is as follows:
T=λ*IQ
wherein λ is a scale factor, 0< λ <1, and IQ is the total size of the input subgraph.
5. The image preprocessing method for preventing code stream overflow of JPEG-LS lossless compression algorithm as claimed in claim 1, wherein: the formula of the second threshold is as follows:
T'=λ'*IQ
where λ' is the scale factor, 0< λ <1, and IQ is the total size of the input subgraph.
6. The image preprocessing method for preventing code stream overflow of JPEG-LS lossless compression algorithm as claimed in claim 1, wherein: in the first lossless compression encoding step, the transform parameter of the transformed image corresponding to the current sub-picture is adjusted to 2.
7. The image preprocessing method for preventing code stream overflow of JPEG-LS lossless compression algorithm as claimed in claim 1, wherein: in the second lossless compression encoding step, the transformation parameter corresponding to the current sub-picture is adjusted to 2.
8. An image preprocessing apparatus for preventing code stream overflow in a JPEG-LS lossless compression algorithm, the apparatus comprising:
the dividing module is used for dividing the image to obtain a plurality of sub-images;
the image preprocessing module is used for judging whether the value of the transformation parameter of the image preprocessing module is greater than 1; the image preprocessing module is used for preprocessing the image of each sub-image to obtain a corresponding transformed image if the value of the transformation parameter of the image preprocessing module is greater than 1;
the lossless compression coding module is used for carrying out lossless compression processing on each converted image and judging whether the code stream of the converted image corresponding to the current sub-image has overflow conditions, and if the overflow conditions exist, the lossless compression coding module is used for adjusting the conversion parameters of the converted image corresponding to the current sub-image; the image preprocessing module is used for carrying out lossless compression processing on each sub-image and judging whether the code stream of the current sub-image has overflow condition or not if the value of the conversion parameter of the image preprocessing module is equal to 1, and adjusting the conversion parameter corresponding to the current sub-image if the code stream of the current sub-image has overflow condition; and carrying out lossless compression treatment on each converted image and judging conversion parameters obtained by the current converted image: if the transformation parameter obtained by the current transformed image is 1, counting the current total output compressed code flow, comparing the current total output compressed code flow with the preset compressed code flow, and if the current total output compressed code flow is larger than the preset compressed code flow, adjusting the transformation parameter obtained by the current transformed image; if the transformation parameter obtained by the current transformed image is larger than 1, counting the current total output compressed code flow, solving the difference value between the total compressed code flow of the previous sub-image and the current total output compressed code flow, then judging whether the difference value is larger than a first threshold value, and if the difference value is larger than the first threshold value and the transformation parameter alpha obtained by the transformed image corresponding to the previous sub-image is equal to the transformation parameter obtained by the transformed image corresponding to the current sub-image, stopping image preprocessing; if the value of the transformation parameter of the image preprocessing module is equal to 1, each sub-image is subjected to lossless compression treatment and the transformation parameter obtained by the current sub-image is interpreted: if the transformation parameter obtained by the current sub-graph is equal to 1, counting the current total output compressed code flow, comparing the current total output compressed code flow with the preset compressed code flow, and if the current total output compressed code flow is larger than the preset compressed code flow, adjusting the transformation parameter obtained by the current sub-graph; if the transformation parameter obtained by the current sub-image is larger than 1, counting the current total output compressed code flow, solving the difference between the total compressed code flow of the previous sub-image and the current total output compressed code flow, then judging whether the difference is larger than a second threshold value, and if the difference is larger than the second threshold value and the transformation parameter obtained by the previous sub-image is equal to the transformation parameter obtained by the current sub-image, stopping image preprocessing.
CN201711158299.3A 2017-11-20 2017-11-20 Image preprocessing method and device for preventing code stream overflow of JPEG-LS lossless compression algorithm Active CN107888922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711158299.3A CN107888922B (en) 2017-11-20 2017-11-20 Image preprocessing method and device for preventing code stream overflow of JPEG-LS lossless compression algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711158299.3A CN107888922B (en) 2017-11-20 2017-11-20 Image preprocessing method and device for preventing code stream overflow of JPEG-LS lossless compression algorithm

Publications (2)

Publication Number Publication Date
CN107888922A CN107888922A (en) 2018-04-06
CN107888922B true CN107888922B (en) 2019-12-20

Family

ID=61777550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711158299.3A Active CN107888922B (en) 2017-11-20 2017-11-20 Image preprocessing method and device for preventing code stream overflow of JPEG-LS lossless compression algorithm

Country Status (1)

Country Link
CN (1) CN107888922B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6757437B1 (en) * 1994-09-21 2004-06-29 Ricoh Co., Ltd. Compression/decompression using reversible embedded wavelets
CN1691782A (en) * 2000-11-28 2005-11-02 国枝博昭 High-performance code compression system of dynamic image information
CN101895760A (en) * 2010-07-29 2010-11-24 西安空间无线电技术研究所 Joint photographic expert group-lossless and near lossless (JPEG-LS) algorithm-based code stream splicing system and method
CN102088602A (en) * 2010-12-22 2011-06-08 西安空间无线电技术研究所 Code rate control method for JPEG-LS (joint photographic experts group-lossless standard) image compression
CN102695055A (en) * 2012-05-18 2012-09-26 西安电子科技大学 JPEG_LS (Joint Pho-tographic Experts Group-Lossless Standard) bit rate control method under high bit rate
CN102833549A (en) * 2012-08-24 2012-12-19 西安空间无线电技术研究所 JPEG (joint photographic experts group)-LS (layer style) image compression control method based on image source features
CN103310406A (en) * 2013-06-25 2013-09-18 同济大学 Image reversible data hiding method based on histogram pairs
CN105828070A (en) * 2016-03-23 2016-08-03 华中科技大学 Anti-error code propagation JPEG-LS image lossless/near-lossless compression algorithm hardware realization method
CN106067157A (en) * 2016-05-27 2016-11-02 陕西师范大学 The reversible water mark that changing direction difference expansion and synchronizes to embed embeds and extracting method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7693339B2 (en) * 2003-12-17 2010-04-06 Andreas Wittenstein Method and apparatus for faster-than-real-time lossless compression and decompression of images

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6757437B1 (en) * 1994-09-21 2004-06-29 Ricoh Co., Ltd. Compression/decompression using reversible embedded wavelets
CN1691782A (en) * 2000-11-28 2005-11-02 国枝博昭 High-performance code compression system of dynamic image information
CN101895760A (en) * 2010-07-29 2010-11-24 西安空间无线电技术研究所 Joint photographic expert group-lossless and near lossless (JPEG-LS) algorithm-based code stream splicing system and method
CN102088602A (en) * 2010-12-22 2011-06-08 西安空间无线电技术研究所 Code rate control method for JPEG-LS (joint photographic experts group-lossless standard) image compression
CN102695055A (en) * 2012-05-18 2012-09-26 西安电子科技大学 JPEG_LS (Joint Pho-tographic Experts Group-Lossless Standard) bit rate control method under high bit rate
CN102833549A (en) * 2012-08-24 2012-12-19 西安空间无线电技术研究所 JPEG (joint photographic experts group)-LS (layer style) image compression control method based on image source features
CN103310406A (en) * 2013-06-25 2013-09-18 同济大学 Image reversible data hiding method based on histogram pairs
CN105828070A (en) * 2016-03-23 2016-08-03 华中科技大学 Anti-error code propagation JPEG-LS image lossless/near-lossless compression algorithm hardware realization method
CN106067157A (en) * 2016-05-27 2016-11-02 陕西师范大学 The reversible water mark that changing direction difference expansion and synchronizes to embed embeds and extracting method

Also Published As

Publication number Publication date
CN107888922A (en) 2018-04-06

Similar Documents

Publication Publication Date Title
CN101742313B (en) Compression sensing technology-based method for distributed type information source coding
CN111726633B (en) Compressed video stream recoding method based on deep learning and significance perception
US6879727B2 (en) Decoding bit-plane-encoded data using different image quality for display
KR101775522B1 (en) Lossless image compression using differential transfer
CN100394883C (en) Quasi-lossless image compression and decompression method of wireless endoscope system
CN109040759B (en) Image parallel compression device and method
CN111340901B (en) Compression method of power transmission network picture under complex environment based on generation type countermeasure network
CN111163318A (en) Human-machine vision coding method and device based on feedback optimization
CN103118259B (en) JPEG2000 image coding method
CN109361919A (en) A kind of image coding efficiency method for improving combined super-resolution and remove pinch effect
CN110099280A (en) A kind of video service quality Enhancement Method under wireless self-organization network Bandwidth-Constrained
WO2009129418A1 (en) System and method for separated image compression
CN108521535B (en) A kind of Information hiding transmission method based on image blend processing
US20210366157A1 (en) Data compression device and compression method
CN107888922B (en) Image preprocessing method and device for preventing code stream overflow of JPEG-LS lossless compression algorithm
US9215468B1 (en) Video bit-rate reduction system and method utilizing a reference images matrix
Liu et al. Exploring effective mask sampling modeling for neural image compression
Chouhan et al. Double compression of JPEG image using DCT with estimated quality factor
Yang et al. Graph-convolution network for image compression
CN101902654A (en) Video scaling control method applied to multi-cannel video decoding chip
CN105306941A (en) Video coding method
Peng et al. An optimized algorithm based on generalized difference expansion method used for HEVC reversible video information hiding
CN115278314B (en) Multi-value digital video watermark embedding and blind extraction method
CN101287119A (en) Image layered coding and decoding method and system based on spectrum
CN205754687U (en) A kind of missile-borne video encoding/decoding apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB03 Change of inventor or designer information

Inventor after: Hou Shuwei

Inventor after: Dong Gang

Inventor after: Meng Hongying

Inventor before: Hou Shuwei

Inventor before: Dong Gang

Inventor before: Meng Hongying

CB03 Change of inventor or designer information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant