CN115150624A - Image compression method and circuit system - Google Patents

Image compression method and circuit system Download PDF

Info

Publication number
CN115150624A
CN115150624A CN202110333562.8A CN202110333562A CN115150624A CN 115150624 A CN115150624 A CN 115150624A CN 202110333562 A CN202110333562 A CN 202110333562A CN 115150624 A CN115150624 A CN 115150624A
Authority
CN
China
Prior art keywords
code
image
random number
value
interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110333562.8A
Other languages
Chinese (zh)
Inventor
唐婉儒
李宗轩
陈世泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Realtek Semiconductor Corp
Original Assignee
Realtek Semiconductor Corp
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 Realtek Semiconductor Corp filed Critical Realtek Semiconductor Corp
Priority to CN202110333562.8A priority Critical patent/CN115150624A/en
Publication of CN115150624A publication Critical patent/CN115150624A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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
    • 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/124Quantisation
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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/186Methods 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 colour or a chrominance component

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application discloses an image compression method and a circuit system, in the method, a pixel value of an input image is obtained, each pixel has an original value, then a compression scheme is determined by the system, for example, the compression from M bitmap to N bitmap is determined, and a uniform quantization method or a non-uniform quantization method is determined to be adopted, so that a coding character interval can be determined, and each coding character interval is provided with a coding character interval, wherein except that the uniform quantization method is set as an interval with a fixed coding character interval, the uniform quantization method can also be divided into a plurality of intervals with different coding character intervals according to the brightness distribution of the pixels in the image. Then, a random number generator is used to generate a random number, so as to determine the code character and index value of the original value of each pixel according to the random number to form an index table, and the code book is queried during decoding to obtain the code character.

Description

Image compression method and circuit system
Technical Field
The present application provides an image compression method, and more particularly, to an image compression method and circuit system for encoding a random and non-uniform quantization-based video with a fixed length.
Background
With the popularization of image capturing apparatuses, image data can be obtained more easily, and the image processing capability of image capturing apparatuses is becoming more powerful with the upgrade of hardware, so that users can easily obtain images with better quality. For example, a plurality of images may be used to synthesize an image with a High Dynamic Range (HDR), and a video with Noise immunity techniques such as three-dimensional Noise reduction (3D Noise reduction, 3dnr) may be realized by several consecutive frames (frames) in the video, which may achieve a more desirable effect than single-sheet processing. However, while obtaining a better quality image, the cost of storage space and the burden of transmission and calculation processing are also increased, so how to compress data under the premise of keeping important information and avoiding excessive distortion is a very important issue.
Among compression methods applied to image and video data, JPEG (joint photographic experts group) image file compression is a widely used image compression standard method, in which Variable Length Coding (VLC) is performed according to data content, so that it is usually well represented, but the characteristic of variable length makes it difficult to estimate the maximum bandwidth required for transmission, increases uncertainty of system design, and in some extreme cases, increases data amount instead.
In view of the lack of JPEG, the conventional technology proposes a texture compression (texture compression) image compression technique, which is a vector quantization (vector quantization) method, and is ingenious in further reducing the size of a codebook (codebook) composed of code vectors (code vector) according to the trend of pixel value distribution (such as color line model) to achieve better compression efficiency. However, since it is not possible to perfectly match the distribution of various pixel values under the assumption of color line model, the texture compression is a lossy compression (lossy compression), and this side effect can compromise the effect of some image processing algorithms. Taking 3DNR as an example, after 3DNR averages a plurality of compressed pictures, although random noise can be eliminated, distortion (distortion) caused by compression cannot be repaired, so that the advantage of 3DNR of retaining static texture details cannot be effectively maintained, and error propagation (error propagation) caused by repeated compression also needs to be overcome.
As for the known lossless compression (lossless compression), although there is no concern about distortion, it is not suitable for the application scenario of 3DNR and other video processing because of the similar problem with variable length coding.
Disclosure of Invention
In view of the problems of the conventional video compression methods that can perform compression effectively, but most of them are lossy compression, or even if lossless compression can be achieved, the maximum bandwidth required for transmission becomes difficult to estimate due to variable length coding, and the uncertainty of system design is increased, the disclosure proposes a video compression method and a circuit system, wherein the proposed video compression method employs a video fixed length coding technique based on random and non-uniform quantization, so that the negative impact of the compression procedure on the video or the video can be reduced.
According to an embodiment, the proposed image compression method is implemented in a circuit system, such as an image processing circuit in a camera or video camera, in which the image compression method is performed by obtaining pixel values in pixels, each having an original value, through the circuit from receiving an image.
The method comprises the steps of firstly determining a compression scheme, wherein the compression scheme indicates that an image is coded into N-bit image data from M-bit image data, adopting a uniform quantization method or a non-uniform quantization method, and determining coding character intervals, each coding character interval is provided with a coding character interval.
Preferably, in the uniform quantization method, a fixed code word interval is used in each code word interval, so that the pixels in the image are divided into a plurality of blocks having the same code word interval according to the code word interval.
In another embodiment, the non-uniform quantization method may be provided according to the characteristic that human eyes have different sensitivities to the bright portion and the dark portion of the image, the non-uniform quantization method may be divided into a plurality of luminance blocks according to the luminance distribution of pixels in the image, the plurality of luminance blocks may set up respective code word segments according to the luminance characteristics of each luminance block, and the pixels in the image may be divided into a plurality of blocks having different code word intervals according to the code word segments.
Further, in the non-uniform quantization method, a regular code word interval is set in a regular luminance interval in the image, a smaller code word interval is set in a lower luminance interval, and a larger code word interval is set in a higher luminance interval.
For a better understanding of the features and technical content of the present invention, reference should be made to the following detailed description of the invention and accompanying drawings, which are provided for purposes of illustration and description only and are not intended to limit the invention.
Drawings
FIG. 1 shows a circuit block diagram of an embodiment of a circuit system;
FIG. 2 is a flowchart illustrating an embodiment of a method for compressing an image by a uniform quantization method;
FIG. 3 is a flowchart illustrating an embodiment of a method for image compression using non-uniform quantization to determine code words; and
fig. 4 shows a schematic diagram of a plurality of different brightness regions in a frame.
[ notation ] to show
10 electronic device
101 image processing circuit
103 image acquisition unit
105 storage unit
107 output interface unit
109 lens
111 display unit
40 images
401 higher luminance block
403 lower luminance block
405 general luminance Block
Image compression process of step S201-S211 uniform quantization method
Image compression process of step S301-S315 non-uniform quantization method
Detailed Description
The following is a description of embodiments of the present invention with reference to specific embodiments, and those skilled in the art will understand the advantages and effects of the present invention from the disclosure of the present specification. The invention is capable of other and different embodiments and its several details are capable of modification and various other changes, which can be made in various details within the specification and without departing from the spirit and scope of the invention. The drawings of the present invention are for illustrative purposes only and are not intended to be drawn to scale. The following embodiments are further detailed to explain the technical matters related to the present invention, but the disclosure is not intended to limit the scope of the present invention.
It will be understood that, although the terms "first," "second," "third," etc. may be used herein to describe various components or signals, these components or signals should not be limited by these terms. These terms are used primarily to distinguish one element from another element or from one signal to another signal. Additionally, the term "or" as used herein is intended to include any one or combination of the associated listed items, as the case may be.
The present application discloses an image compression method and a circuit system for realizing the method, which is characterized in that a fixed length coding technology is adopted, but a certain degree of compression ratio is still kept, and an approximately lossless compression method is achieved, or under a certain condition, the proposed image compression method can achieve an approximately lossless effect, in other words, when continuous frames are formed by restored images after the images are compressed by the proposed image compression method, the loss is not easy to feel to human eyes.
The following description is directed to the features of the image compression method proposed by the present application, and the image compression method can be applied to a circuit system in a specific electronic device, such as a camera, a web camera (webcam) and a device with a requirement for image capturing or image compression processing, wherein an image processing chip is provided, and when a photo or a movie is captured, the image compression method proposed by the present application is executed by the image processing chip, so that a compression effect without deviation and almost without loss to human eyes can be obtained under the requirement of fixed length coding.
The circuit system embodiment may refer to a circuit block diagram shown in fig. 1, which shows the main circuits in the electronic device 10.
The circuit system implements an image processing circuit 101 in the electronic device 10, the image processing circuit 101 is, for example, a Digital Signal Processor (DSP), a microprocessor (microprocessor), or a specific processor, and the image processing circuit 101 may be an integrated circuit of various circuit components responsible for image processing. The electronic device 10 is provided with an image capturing unit 103, wherein the image capturing unit 103 is a photosensitive element, which can be implemented by a CCD or a CMOS, and can sense external light from the lens 109 and form image data. The electronic device 10 is provided with a storage unit 105, such as a storage device formed by a flash memory, for storing the image data processed (e.g., restored, compressed) by the image capturing unit 103. The electronic device 10 is provided with an output interface unit 107 for external connection, and can be connected to a host computer in a wired manner to transmit image data, or can transmit image data to an external device in a wireless manner.
The image capturing unit 103 receives light from the lens 109 to form image data by sensing, and after the image data of each pixel is obtained by the image processing circuit 101, performs compression, in particular, the image compression method proposed in the present application is implemented in a firmware or software manner in the circuit, and stores the compressed and encoded image data in the storage unit 105. If the electronic device 10 has a display function, the image processing circuit 101 is also responsible for decompressing and restoring the image, which is displayed through the display unit 111.
The image compression method executed in the image processing circuit can refer to the flowchart of fig. 2.
Before the image compression method is executed, a compression scheme is confirmed (step S201), for example, a target (compression rate) of encoding the image is input, such as encoding the M-bit image data into N-bit image data, and parameters such as encoding character (encoded) intervals are determined by using a uniform quantization (uniform quantization) method or a non-uniform quantization (non-uniform quantization) method capable of considering dark portions and bright portions in the image, each encoding character interval is provided with an encoding character interval, so that pixels in the image are divided into a plurality of blocks having the same encoding character interval according to the encoding character interval.
Next, the circuit system receives the image, obtains a pixel value (i.e., an original value x), and temporarily stores the pixel value in a storage unit, wherein the pixel value may be a gray scale value, or a red channel value, a green channel value, and a blue channel value in a red-green-blue (RGB) color space, and may be a continuous frame image, and temporarily stores the image using a buffer in the circuit, so as to perform an anti-noise technique such as three-dimensional noise reduction (3 DNR) (step S203). Thus, the code word can be generated according to a compression scheme (e.g., encoding M-bit image data into N bits), wherein, unlike the known way of obtaining code words representing the original value encoded numerical value (e.g., rounding), the image compression method proposed in the present application adopts a way of randomly selecting code words, wherein a random number generator is proposed to generate random numbers according to the compression scheme.
In this process, an equation for forming code characters in a codebook (codebook) is first established (step S205), and when compression encoding is performed by a uniform quantization method, a fixed code character interval is used in each code character interval. For example, encoding M-bit values into N bits, the corresponding M-bit code word (e.g., c of equation one) to the original value of each pixel can be determined according to the random number obtained i ) And its index value of N bits (i of equation one). Wherein the codebook (C) is described by equation one, and the code word (C) satisfies the relation described by equation two, wherein the numerical valueN is the total number of code characters compressed into N bitmap data, a value i is the index value of each code character in the N bitmap data, and the range of the value i is 0 to N-1.
C={c i |0≤i<n}、n=2 N (equation one)
0≤c 0 <…<C n-1 <2 M (equation two)
Next, a code word selection procedure is performed for the original value x (step S207), as shown in the following process, wherein c 0 Is the smallest code word, so that all original values smaller than this are directly coded as c 0 ;c n-1 Is the largest code word, so that the original values larger than this are all directly coded as c n-1
Judging the formula (1): if x < c 0 Directly coded into c 0
Judging the formula (2): if c is n-1 < x, directly coded to c n-1
Judgment formula (3): if 0. Ltoreq. K < n-1, c is satisfied k ≤x<c k+1 (the value k is the index value of the image data to be processed at present).
At this time, the code word of the original value x is determined, i.e. the code word and the index value of the original value x are determined by the random number generated by the random number generator (step S209), wherein the determination is as follows:
judgment formula (4): to be provided with
Figure BDA0002996398800000081
Probability of selecting c k+1
Judgment formula (5): to be provided with
Figure BDA0002996398800000082
Probability of (c) is selected k
Wherein the method generates a random number r by a random number generator, the random number r satisfies 0 ≦ r < (c) k+1 -c k ) For the original value x, selecting a code character c k+1 Or c k The judgment formula (2) is as follows.
Judging the formula (6):if the random number satisfies r < (x-c) k ) Selecting c k+1
Judgment formula (7): if the random number satisfies (x-c) k ) R is less than or equal to r, c is selected k
After determining the code word (i.e., 'c') and the index value (e.g., 'k +1', 'k' in the above-mentioned decision formula), an index table is formed for querying the codebook according to the index value during decoding to obtain the code word (step S211), wherein a query index formed by each original pixel and the corresponding code word is recorded to facilitate querying the codebook and reconstructing the image.
For example, taking the case of 8-bit (8-bits) image data being reduced to (compressed) 6-bit (6-bits) data, if in RGB (red, green, blue) color mode, in the original 8-bit image, the R value, G value or B value of each pixel value of the color image ranges from 0 to 255, i.e. an 8-bit pixel can express 256 levels of darkness.
The reduction (compression) of 8-bit map data to 6-bit map data corresponds to a base-4 sampling process, and the process of determining code characters is as follows: 0 x 4, 1 x 4, \8230; 63 x 4. In other examples, encoding from 8-bit map to 5-bit map corresponds to a base-8 sampling process. In this case, assuming that the original value of 8-bit map (e.g. a frame of video) is x, the relation satisfied by the original value x according to the target to be encoded (i.e. 6-bit map data) is equation three, where c or c +1 determines the encoding character selected by the original value x, and the value 4 may be changed according to the compression scheme, for example, from 8-bit map data to 5-bit map data, which is changed to 8 (i.e. 2) 3 )。
c 4 ≦ x < (c + 1) · 4 (equation three)
At this time, the image compression method proposed in the present application uses a random number generator to generate random numbers, which in this case uniformly and randomly generates values of 0 to 3, and determines the code word corresponding to the original value as c or c +1, so as to compress the original value into an example of 6 bit map, where c is a numerical value of 0 to 63.
Then, the code word of the original value x is randomly selected according to the probabilities of equation four and equation five.
To be provided with
Figure BDA0002996398800000091
Probability of (c + 1). 4 (equation four)
To be provided with
Figure BDA0002996398800000092
Probability of (c.4) (equation five)
Referring to the above example, the same example is taken for 8-bit (8-bits) image data down to (compressed) 6-bit (6-bits) data, wherein if M =8, N-6, the code word may be c i Where (= i · 4), the value i is an index value and satisfies the relationship: i is more than or equal to 0 and less than n, n-2 N -64. Taking the original value x =65 as an example, the relation of the code characters is determined as follows:
64=c 16 ≤x<c 17 =68. The code character to determine the original value x is c 16 Or c 17 . Wherein a random number is generated by a uniform random number generator, the relationship is:
0≤r<c 17 -c 16 and =4. When a random number r =1 is obtained, that means x-c 16 =65-64=1, when x-c 16 R is not more than r, therefore c is selected 17
Based on the above image compression method flow, a uniform quantization (non-uniform quantization) method is used to determine the encoding character, but further, if the human eye is sensitive to dark portions in the image and relatively less sensitive to bright portions, a non-uniform quantization (non-uniform quantization) method may be used to determine the size of the region for selecting the encoding character according to the brightness distribution of the image. According to the embodiment of the image compression method, when compression is performed, the pixel values (original values are x) in the image can be divided into several sections, each section has different code word intervals, and non-uniform quantization processing can be performed on the perception difference of bright portions (portions with higher original pixel values) and dark portions (portions with lower original pixel values) in the image by human eyes.
The non-uniform quantization method is mainly to divide the pixels in the image into a plurality of (two or more) brightness blocks according to the brightness distribution of the pixels in the image, and the two or more brightness blocks set individual coded character intervals according to the brightness characteristics of each brightness block, so that the pixels in the image are divided into a plurality of blocks with different coded character intervals according to the two or more coded character intervals.
The flow shown in fig. 3 can be referred to as an embodiment of the image compression method for determining code characters by the non-uniform quantization method, and fig. 4 can be referred to simultaneously to show a schematic diagram of a picture having different luminance regions.
Fig. 4 shows that several luminance sections are divided according to the pixel values of each section in one image 40 (e.g., one of the continuous images), which schematically shows that the luminance sections are divided into a higher luminance block 401, a lower luminance block 403 and a normal luminance block 405.
In the method flow, a compression scheme is also initially confirmed, for example, from an 8-bit map to a 6-bit or other format image (step S301), and then an input image is obtained (step S303), pixel values in the image are obtained by an image processing circuit, and a brightness and darkness distribution of the image is obtained from the pixel values (step S305), as schematically shown in fig. 4, which is a distribution map of several different brightness blocks. Next, the code word after compressing the image is determined according to the non-uniform quantization method, and some preliminary processes may be performed before that (step S307).
In the preliminary processing, because the brightness distribution in the image is uneven, i.e., a random quantization method, i.e., a non-uniform quantization method, several code word intervals to be distinguished can be determined according to the image information, and each interval can set different code word intervals according to the brightness characteristics therein, for example, if a general brightness interval (e.g., for the general brightness block 405 of fig. 4) is set with a general code word interval, a code word set for a darker interval (e.g., for the lower brightness block 403 of fig. 4) of the image is set with a smaller interval, and a code word set for a brighter interval (e.g., for the higher brightness block 401 of fig. 4) of the image is set with a larger interval, so that a plurality of intervals with different code word intervals can be distinguished according to the brightness. The above-mentioned general, brighter or darker segments and the corresponding code word interval can be set according to the actual requirement, and there is no absolute setting rule, wherein the code words with smaller interval (such as dark region blocks) are set in the blocks to provide smaller compression rate (better quality) for the portions of the image that are more sensitive to human eyes, otherwise, the portions that are less sensitive to human eyes can obtain better compression rate (relatively worse quality) for the code words with larger interval.
Then, according to the setting of the above preliminary processing, a plurality of intervals of different code character intervals are cut according to the brightness distribution of each pixel or each area (such as the average value of the brightness of the pixels in the area). In another embodiment, the pixels in the image may be reordered according to the luminance values to distinguish the regions to which the pixels belong for operation.
After the preliminary processing, an equation for forming code characters in the codebook can be established according to the set content (step S309), i.e. the equation one and the equation two as described in the above embodiment, and the decision equations (1) to (7) are matched, and similarly, a step of determining the code character of the original value of each pixel according to the random number for each code character interval, wherein c is the code character, n is the total number of the code characters in each code character interval, c is the number n 0 The original value of the minimum code character is directly coded as c 0 ,c n-1 For the largest code word, the original value greater than the largest code word is directly coded as c n-1 The value k is the index of the image data to be processed, and x is also the original value. Thus, the process of selecting code characters according to the original value of each pixel is started (step S311), which includes generating random numbers to determine the code characters and index values of the original value x (step S313), and finally forming an index table for the image, so as to query the codebook according to the index values during decoding to obtain the code characters (step S315).
After selecting the code characters according to the above conditions, it can be found that after a plurality of random (non-uniform) quantization results are compressed, the variance (variance) becomes smaller, the average is still equal to x, which is equivalent to the expected value of the quantization error (quantization error) being 0, so as to achieve the effect of almost lossless (lossless) quantization.
For example, an 8-bit (8-bits) image is compressed into a 6-bit (6-bits) image, each pixel value in the 8-bit map is between 0 and 255, and each pixel value in the 6-bit map is between 0 and 63, for example: the original pixel value x is in the interval 0-63 using the code word interval of 2 (random number is 0-1), this interval is as the lower luminance block 403 schematically shown in FIG. 4; the original pixel value x is in the interval of 64-127 using the code word interval of 4 (random number is 0-3), this interval is as the general luminance block 405 schematically shown in FIG. 4; the original pixel value x uses a codeword pitch of 8 (random numbers used from 0 to 7) in the 128-255 interval, which is schematically shown as a higher luminance block 401 in FIG. 4.
When the original pixel value x falls within the interval from 0 to 63, it can be expressed as:
c 2 is less than x < (c + 1). 2, and the probability of the following equations six and seven is adopted to select the code character.
To be provided with
Figure BDA0002996398800000131
Probability of (c + 1). 2 (equation six)
To be provided with
Figure BDA0002996398800000132
Probability of (2) is selected
When the original pixel value x falls within the interval of 64 to 127, it can be expressed as:
c 4 is less than x < (c + 1). 4, and the probability of the following equation eight and nine is used to select the code character.
To be provided with
Figure BDA0002996398800000133
Probability of (c + 1). 4 (equation eight)
To be provided with
Figure BDA0002996398800000134
Probability of (2) selecting c.4 (equation nine)
When the original pixel value x falls in the interval of 128 to 255, it can be expressed as:
c 8 is less than x (c + 1). 8, and the probability of using the following equation ten and eleven is adopted to select the code character.
To be provided with
Figure BDA0002996398800000135
Probability of (c + 1) · 8 (equation ten)
To be provided with
Figure BDA0002996398800000136
Probability of (c.8) (equation eleven)
Finally, the code character and the index value in each brightness interval are generated to form an index table.
In summary, according to the embodiments of the image compression method proposed above, the fixed length encoding technique for images or films based on random and non-uniform quantization is implemented, which has the greatest advantages that the circuit system can determine the bandwidth used for transmission, the design of the circuit system can have clear basis, and the circuit design is convenient, for example, when the image processing circuit is designed according to the requirements of different products, the design can be clearly proposed according to the requirements. Furthermore, the compression effect achieved by the method is non-biased and reduces the negative effect of the compression program on the image, and also considers the perception of human eyes on the brightness of the image and adopts the non-uniform quantization compression method to reduce the distortion problem, and with the increase of the number of continuous images, the effect of approximately lossless by human eyes can be obtained, which can meet the requirements of larger image size, higher quality requirement and high-speed processing, if the anti-noise technology such as three-dimensional noise suppression (3 DNR) is required to be realized, a large number of images need to be generated, and under the requirement of reducing the space of the storage buffer, the method can provide good compression ratio under the approximately lossless effect.
The above disclosure is only a preferred embodiment of the present invention and is not intended to limit the scope of the claims, therefore, all modifications and equivalents of the present invention as described and illustrated herein are included in the scope of the present invention.

Claims (10)

1. An image compression method, comprising:
obtaining pixel values in an image, wherein each pixel has an original value;
determining a code character interval according to a compression scheme, wherein each code character interval is provided with a code character interval;
generating a random number by a random number generator, wherein the range of generating the random number is determined according to the code character interval;
determining the code character and index value of the original value of each pixel according to the random number; and
after determining the code characters and index values of the original pixel values in the image, an index table is formed, wherein the index table records a query index formed by each original pixel and the corresponding code character, so that a code book is conveniently queried and the image is reconstructed.
2. The method of claim 1, wherein the compression scheme indicates encoding the image from M-bit image data into N-bit image data and using a uniform quantization method or a non-uniform quantization method.
3. The image compression method as claimed in claim 2, wherein the uniform quantization method employs a fixed code word interval in each code word interval, and the pixels in the image are divided into a plurality of blocks having the same code word interval according to the code word interval.
4. The method of claim 3, wherein the codebook (C) is expressed by C = { C = i |0≤i<n}、n=2 N Description, where c is a code character, satisfies 0 ≦ c 0 <…<c n-1 <2 M The relation is that the value N is the total number of code characters compressed into N bitmap data, the value i is the index value of each code character in the N bitmap data, the value i ranges from 0 to N-1, c 0 The original value of the minimum code character is directly coded as c 0 ,c n-1 Is the maximum code character, greater than the original value of the maximum code characterIs coded as C n-1
5. The method of claim 4, wherein the step of determining the code word of the original value of each pixel according to the random number comprises the following decision formula, wherein the value k is the index of the image data to be processed, and x is the original value:
if x < c 0 Directly coded into c 0
If c is n-1 < x, directly coded to c n-1
If 0. Ltoreq. K < n-1, c is satisfied k ≤x<c k+1 And determining the code character of the original value x by the random number r generated by the random number generator, wherein:
to be provided with
Figure FDA0002996398790000021
Probability of (c) is selected k+1
To be provided with
Figure FDA0002996398790000022
Probability of (c) is selected k
Wherein the method generates a random number by a random number generator, the random number r satisfying 0 ≦ r < (c) k+1 -c k ) For the original value x, selecting a code character c k+1 Or c k The judgment formula (2) is as follows:
if the random number r < (x-c) k ) Selecting c k+1
If a random number (x-c) k ) R is less than or equal to r, c is selected k
6. The method as claimed in claim 2, wherein the non-uniform quantization method is divided into a plurality of luma blocks according to the luminance distribution of pixels in the image, the luma blocks are configured to have respective code word intervals according to the luminance characteristics of each luma block, and the pixels in the image are divided into a plurality of blocks with different code word intervals according to the code word intervals.
7. The method of claim 6, wherein in the non-uniform quantization method, regular code word spacing is set for regular luminance intervals in the image, smaller code words are set for lower luminance intervals, and larger code words are set for higher luminance intervals.
8. The image compression method as claimed in claim 7, wherein the step of determining the code word of the original value of each pixel according to the random number for each code word segment includes the following decision formula, wherein c is the code word, the number n is the total number of code words in the code word segment, c is the total number of code words in the code word segment 0 The original value smaller than the minimum code character is directly coded as c 0 ,c n-1 For the maximum code character, the original value larger than the maximum code character is directly coded as c n-1 The value k is the index of the image data to be processed, x is the original value:
if x < c 0 Directly coded into c 0
If c is n-1 < x, directly coded to c n-1
If 0. Ltoreq. K < n-1, c is satisfied k ≤x<c k+1 And determining the code character of the original value x by the random number r generated by the random number generator, wherein:
to be provided with
Figure RE-FDA0003057711480000031
Probability of selecting c k+1
To be provided with
Figure RE-FDA0003057711480000032
Probability of selecting c k
Wherein the method generates a random number r by a random number generator, the random number r satisfying 0 ≦ r < (c) k+1 -c k ) For the original valuex selected code characters c k+1 Or c k The judgment formula (2) is as follows:
if the random number r < (x-c) k ) Selecting c k+1
If a random number (x-c) k ) R is less than or equal to r, c is selected k
9. The method of any one of claims 1-8, wherein the pixel values are gray-scale values, or red channel values, green channel values, and blue channel values in a red-green-blue color space.
10. Circuitry, comprising:
an image processing circuit, disposed in an electronic device, for performing an image compression method, comprising:
receiving an image, obtaining pixel values in the image, and temporarily storing the pixel values in a storage unit, wherein each pixel has an original value;
determining a code character interval according to a compression scheme, wherein each code character interval is provided with a code character interval;
generating a random number by a random number generator, wherein the range of generating the random number is determined according to the code character interval;
determining the code character and index value of the original value of each pixel according to the random number; and
after determining the code characters and index values of the original pixel values in the image, an index table is formed, wherein the index table records a query index formed by each original pixel and the corresponding code character, so that a code book is conveniently queried and the image is reconstructed.
CN202110333562.8A 2021-03-29 2021-03-29 Image compression method and circuit system Pending CN115150624A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110333562.8A CN115150624A (en) 2021-03-29 2021-03-29 Image compression method and circuit system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110333562.8A CN115150624A (en) 2021-03-29 2021-03-29 Image compression method and circuit system

Publications (1)

Publication Number Publication Date
CN115150624A true CN115150624A (en) 2022-10-04

Family

ID=83404207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110333562.8A Pending CN115150624A (en) 2021-03-29 2021-03-29 Image compression method and circuit system

Country Status (1)

Country Link
CN (1) CN115150624A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116489368A (en) * 2023-06-21 2023-07-25 禹创半导体(深圳)有限公司 Image dynamic compression method and image dynamic compression device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116489368A (en) * 2023-06-21 2023-07-25 禹创半导体(深圳)有限公司 Image dynamic compression method and image dynamic compression device
CN116489368B (en) * 2023-06-21 2023-09-01 禹创半导体(深圳)有限公司 Image dynamic compression method and image dynamic compression device

Similar Documents

Publication Publication Date Title
KR101844732B1 (en) Signal refinement approximation
KR101368120B1 (en) Method and system for weighted encoding
JP4927888B2 (en) Lossless intraframe coding using Golomb-Rice
US7127116B2 (en) Image data compression
CN106095351B (en) Apparatus and method for improving image data exchange between different display capabilities based on perceived illumination nonlinearity
US7010170B2 (en) Image coding device and method
CN101142821A (en) New compression format and apparatus using the new compression format for temporarily storing image data in a frame memory
JP4360416B2 (en) Image compression method, image compression apparatus, and program
US5805226A (en) Method and apparatus for encoding a video signal by using a block truncation coding method
KR20070046952A (en) Methods and systems for rate control in image compression
EP0733294B1 (en) Video processing method
JP7065594B2 (en) Image coding device and its control method, and program
CN111131828B (en) Image compression method and device, electronic equipment and storage medium
CN115150624A (en) Image compression method and circuit system
TWI788805B (en) Method for image compression and circuit system thereof
CN114467298B (en) Image signal conversion processing method and device and terminal equipment
JP2006086965A (en) Image processor and its method, image transmitting device and its method, and display unit
JP4552400B2 (en) Image display device, image display method, and image display program
US7414757B2 (en) Method for compressing printing hint data sent to a printer
KR20070111111A (en) Method of compressing and decompressing image and equipment thereof
US20230262210A1 (en) Visual lossless image/video fixed-rate compression
CN107888944A (en) Image procossing
JP3642158B2 (en) Image encoding device, image encoding method, image decoding device, image decoding method, and transmission method
KR102025494B1 (en) Apparatus based on visually lossless compression method for compression of bayer image and method therefor
JP2002209111A (en) Image encoder, image communication system and program recording medium

Legal Events

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