Image compression method and circuitry
By employing a fixed-length coding technique based on random and non-uniform quantization, the system design uncertainty and bandwidth estimation challenges of existing image compression methods are resolved, achieving near-lossless image compression results suitable for high-quality image processing and 3DNR applications.
Patent Information
- Application Number
- CN202110333562.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-29
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2041-03-29
AI Technical Summary
Existing image compression methods are mostly lossy or lossless, which leads to uncertainties in system design, and variable length coding increases the difficulty in estimating transmission bandwidth.
A fixed-length encoding technique based on random and non-uniform quantization is adopted. By using uniform or non-uniform quantization methods, the encoding character range is distinguished according to the image brightness distribution. A random number generator is used to determine the encoding character and index value to form an index table to achieve image compression.
It achieves near-lossless compression, reduces the negative impact of compression on images, determines transmission bandwidth requirements, and is suitable for high-quality image processing needs, especially in applications such as 3DNR, to maintain image details.
Smart Images

Figure CN115150624B_ABST
Abstract
Description
Technical Field
[0001] This application proposes an image compression method, particularly an image compression method and circuit system based on fixed-length encoding of random and non-uniform quantization video. Background Technology
[0002] With the widespread availability of video cameras, obtaining image data has become easier, and the image processing capabilities of these cameras have become increasingly powerful with hardware upgrades. Users can easily obtain higher-quality images, but this also results in larger image files. Furthermore, the use of specific technologies further increases storage space requirements. For example, multiple images can be combined to create a single image with High Dynamic Range (HDR), and noise reduction techniques such as 3D Noise Reduction (3DNR) can be implemented using consecutive frames in a video, achieving better results than processing a single image. However, while obtaining higher-quality images, it also increases storage costs and the burden of transmission and computational processing. Therefore, how to compress data while preserving important information and avoiding excessive distortion is a crucial issue.
[0003] Among the compression methods applied to image and video data, JPEG image compression is a widely used standard method. It uses variable length coding (VLC) based on the data content, so it usually performs well. However, the variable length characteristic makes it difficult to estimate the maximum bandwidth required for transmission, increases the uncertainty of system design, and in some extreme cases, it can actually increase the amount of data.
[0004] To address the shortcomings of JPEG, known technologies have proposed texture compression, an image compression technique. Texture compression is a vector quantization method that cleverly reduces the size of the codebook composed of code vectors based on the distribution trend of pixel values (such as the color line model) to achieve better compression efficiency. However, since assumptions such as the color line model cannot perfectly match various pixel value distributions, texture compression is a lossy compression technique. This side effect can compromise the performance of certain image processing algorithms. Taking 3DNR as an example, while averaging multiple compressed images can eliminate random noise, it cannot repair the distortion caused by compression. Therefore, it cannot effectively maintain the advantage of 3DNR in preserving static texture details, and it also needs to overcome error propagation caused by repeated compression.
[0005] As for the known lossless compression, although there is no need to worry about distortion, it is not suitable for image or video processing applications such as 3DNR because it has similar problems to variable length coding. Summary of the Invention
[0006] Given that known image compression methods can effectively perform compression, most of them are lossy compression, or even if lossless compression can be achieved, there are still problems such as variable length coding making it difficult to estimate the maximum bandwidth required for transmission and increasing the uncertainty of system design. This disclosure proposes an image compression method and circuit system. The proposed image compression method adopts a fixed-length video coding technique based on random and non-uniform quantization, which can reduce the negative impact of the compression process on images or videos.
[0007] According to an embodiment, the proposed image compression method is applied to a circuit system, such as an image processing circuit in a camera or camcorder. The image processing circuit executes the image compression method, which begins by receiving an image and obtains the pixel values in the image through the circuit, with each pixel having an original value.
[0008] First, a compression scheme is determined, which specifies that the image data is encoded from M bits to N bits, and whether a uniform quantization method or a non-uniform quantization method is used. The encoding character interval is also determined, and each encoding character interval has an encoding character spacing. In the method, a random number generator is used to generate random numbers, and then the encoding character and index value of the original value of each pixel are determined based on the random numbers. After the encoding character and index value of the original value in the image are determined, an index table is formed. The index table records the query index formed by each original pixel and the corresponding encoding character, which facilitates querying the encoding book and reconstructing the image.
[0009] Preferably, in the uniform quantization method, a fixed coded character spacing is used within each coded character interval, so that pixels in the image are divided into multiple blocks with the same coded character spacing according to the coded character interval.
[0010] In another implementation, the non-uniform quantization method can be proposed based on the characteristic that the human eye has different sensitivities to bright and dark parts of an image. It can distinguish the brightness distribution of pixels in the image into multiple brightness blocks. Each brightness block is assigned an individual coded character interval based on its brightness characteristics. Pixels in the image are then distinguished into multiple blocks with different coded character spacings based on these coded character intervals.
[0011] Furthermore, in the non-uniform quantization method, a general coded character spacing is set in the general brightness range of the image, a smaller spacing of coded characters is set in the lower brightness range, and a larger spacing of coded characters is set in the higher brightness range.
[0012] To further understand the features and technical content of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are for reference and illustration only and are not intended to limit the present invention. Attached Figure Description
[0013] Figure 1 A circuit block diagram of the display circuit system embodiment;
[0014] Figure 2 This diagram shows an embodiment of an image compression method implemented using a uniform quantization approach.
[0015] Figure 3 A flowchart illustrating an embodiment of an image compression method that uses a non-uniform quantization approach to determine encoded characters is shown; and
[0016] Figure 4 This is a diagram showing multiple areas of different brightness in a single image.
[0017] [Symbol Explanation]
[0018] 10: Electronic devices
[0019] 101: Image Processing Circuit
[0020] 103: Image Capture Unit
[0021] 105: Storage Unit
[0022] 107: Output Interface Unit
[0023] 109: Lens
[0024] 111: Display Unit
[0025] 40: Images
[0026] 401: Higher brightness block
[0027] 403: Low brightness block
[0028] 405: General brightness block
[0029] Image compression workflow of uniform quantization method in steps S201 to S211
[0030] Image compression workflow using non-uniform quantization method (steps S301-S315) Detailed Implementation
[0031] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can understand the advantages and effects of the present invention from the content disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the concept of the present invention. Furthermore, the accompanying drawings of the present invention are for simple illustrative purposes only and are not depictions of actual dimensions; this is stated beforehand. The following embodiments will further describe the relevant technical content of the present invention in detail, but the disclosed content is not intended to limit the scope of protection of the present invention.
[0032] It should be understood that while terms such as "first," "second," and "third" may be used in this document to describe various components or signals, these components or signals should not be limited by these terms. These terms are primarily used to distinguish one component from another, or one signal from another. Furthermore, the term "or" as used herein should, depending on the context, include any combination of one or more of the related listed items.
[0033] This application discloses an image compression method and a circuit system for implementing the method. The feature is that it uses a fixed-length encoding technique, but still maintains a certain degree of compression ratio and achieves a near-lossless compression method. In other words, under certain conditions, the proposed image compression method can achieve a near-lossless effect. In other words, when the image is compressed using the proposed image compression method and the restored image is used to form a series of frames, the loss is not easily perceived by the human eye.
[0034] The characteristics of the image compression method proposed in this application will be described one by one below. The image compression method can be applied to the circuit system in specific electronic devices, such as cameras, webcams, and devices that have the need to capture images or perform image compression processing. These devices are equipped with an image processing chip. When a photo or video is captured, the image compression method proposed in this application is executed through the image processing chip. Under the requirement of fixed-length encoding, a compression effect that is unbiased and almost lossless to the human eye can be obtained.
[0035] The circuit system embodiment can be referred to. Figure 1 The circuit block diagram shown shows the main circuitry of the electronic device 10.
[0036] The circuit system implements the image processing circuit 101 in an electronic device 10. The image processing circuit 101 is, for example, a digital signal processor (DSP), a microprocessor, or a specific processor. The image processing circuit 101 can broadly refer to an integrated circuit of various circuit components responsible for image processing. The electronic device 10 includes an image capturing unit 103, which is a photosensitive element, such as a CCD or CMOS sensor, capable of sensing external light from the lens 109 and forming image data. The electronic device 10 includes a storage unit 105, such as a flash memory storage device, for storing the image data processed (e.g., restored, compressed) by the image capturing unit 103. The electronic device 10 includes an external connection output interface unit 107, which can connect to a host computer via a wired connection to transmit image data, or wirelessly transmit image data to an external device.
[0037] The image capturing unit 103 receives light from the lens 109 and senses to form image data. After the image data of each pixel is obtained by the image processing circuit 101, compression is performed, specifically the image compression method proposed in this application, implemented in firmware or software within the circuit, and the compressed and encoded image data is stored 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, and displaying it through the display unit 111.
[0038] The image compression method implemented in the image processing circuit can be referred to Figure 2 The flowchart of the embodiment shown is shown.
[0039] Before executing the image compression method, the compression scheme is first confirmed (step S201). For example, the encoding target (compression ratio) of the input image is confirmed, such as encoding M-bit image data into N-bit image data. It is also confirmed that uniform quantization or non-uniform quantization method that can take into account the dark and bright parts in the image is used to determine parameters such as the codeword interval. Each codeword interval has a codeword spacing. Therefore, the pixels in the image are divided into multiple blocks with the same codeword spacing according to the codeword interval.
[0040] Next, the circuit system receives the image and obtains the pixel value (i.e., the original value x). It temporarily stores the pixel value in a storage unit. The pixel value can be a grayscale value, or the red, green, and blue channel values in the red-green-blue (RGB) color space, and can be a continuous frame image. The image is temporarily stored in a buffer within the circuit to enable noise reduction techniques such as 3DNR (step S203). Thus, encoded characters can be generated according to a compression scheme (e.g., encoding M-bit image data into N-bit data). Unlike known methods of obtaining encoded characters representing the encoded values of the original values (e.g., using rounding), the image compression method proposed in this application employs a method of randomly selecting encoded characters. A random number generator is proposed to generate random numbers according to the compression scheme.
[0041] In this process, the equations for forming coded characters in the codebook are first established (step S205). When performing compression encoding using the uniform quantization method, a fixed spacing between coded characters is used in each coded character interval. Taking encoding an M-bit value into N bits as an example, the M-bit coded character corresponding to each pixel's original value can be determined based on the obtained random number (such as c in equation one). i ) and its N-bit index value (i in Equation 1). Among them, the code book (C) is described as in Equation 1, and the encoded character (c) satisfies the relation described in Equation 2, where the value n is the total number of encoded characters compressed into N bitmap data, and the value i is the index value of each encoded character in the N bitmap data, with the value i ranging from 0 to n-1.
[0042] C = {c i |0≤i<n}、n=2 N (Equation 1)
[0043] 0≤c0<…<C n-1<2 M (Equation 2)
[0044] Next, for the original value x, a character selection procedure is executed (step S207), as follows, where c0 is the smallest character, therefore all original values smaller than this are directly encoded as c0; n-1 This is the largest encoded character; therefore, all raw values greater than this are directly encoded as 'c'. n-1 .
[0045] Judgment (1): If x < c0, encode it directly as c0.
[0046] Judgment (2): If c n-1 <x, directly encoded as c n-1 .
[0047] Judgment (3): If there exists 0≤k<n-1, that is, satisfying c k ≤x<c k+1 (The value k is the index value of the image data to be processed at this time).
[0048] At this point, the encoding character of the original value x needs to be determined, that is, the encoding character and index value of the original value x are determined by the random number generated by the random number generator (step S209), and the basis for the determination is as follows:
[0049] Judgment (4): with The probability of choosing c k+1 .
[0050] Judgment (5): with The probability of choosing c k .
[0051] The method generates a random number r using a random number generator, where the random number r satisfies 0 ≤ r < (c k+1 -c k The relationship is such that the encoded character c is selected for the original value x. k+1 or c k The judgment is as follows.
[0052] Judgment (6): If the random number satisfies r < (xc) k Select c k+1 .
[0053] Judgment (7): If the random number satisfies (xc k If r ≤ r, choose c. k .
[0054] After determining the encoded character (i.e., 'c') and index value (such as 'k+1', 'k' in the above judgment formula) of the original value in the image, an index table is formed. The index table is used to query the codebook according to the index value to obtain the encoded character during decoding (step S211). It records the query index formed by each original pixel and the corresponding encoded character, which facilitates querying the codebook and reconstructing the image.
[0055] For example, when 8-bit image data is downgraded (compressed) to 6-bit data, if it is in RGB (red, green, blue) color mode, in the original 8-bit image, the R, G or B value of each pixel value in the color image ranges from 0 to 255, that is, an 8-bit pixel can express 256 levels of brightness and darkness.
[0056] Downsampling (compressing) 8-bit image data to 6-bit image data is equivalent to a base-4 sampling process. The process of determining the encoded character is similar to a sampling process of 0*4, 1*4, ... 63*4. In other examples, encoding from 8-bit image to 5-bit image is equivalent to a base-8 sampling process. In this case, let the original value of the 8-bit image (such as a frame of video) be x. Based on the target to be encoded (i.e., 6-bit image data), the original value x satisfies the relationship Equation 3, where c or c+1 determines the encoded character selected for the original value x. The value 4 can vary depending on the compression scheme. For example, to compress 8-bit image data to 5-bit image data, this value changes to 8 (i.e., 2^4). 3 ).
[0057] c·4≤x<(c+1)·4 (Equation 3)
[0058] At this point, the image compression method proposed in this application uses a random number generator to generate random numbers. In this example, values from 0 to 3 are generated uniformly and randomly, and the encoding character corresponding to the original value is determined to be c or c+1. In this way, the image is compressed to a 6-bit image, where c is a value from 0 to 63.
[0059] Next, based on the probabilities of Equation 4 and Equation 5, the encoded character of the original value x is randomly selected.
[0060] by The probability is chosen as (c+1)·4 (Equation 4)
[0061] by The probability is chosen as c·4 (Equation 5).
[0062] Referring to the above example, again taking the reduction (compression) of 8-bit image data to 6-bit data as an example, where M=8 and N-6, the encoded characters can be c i=i·4 means that the value i is the index value, which conforms to the relation: 0≤i<n, n-2 N -64. Taking the original value x = 65 as an example, the relationship that determines its encoded characters is as follows:
[0063] 64 = c 16 ≤x<c 17 =68. To determine the encoded character of the original value x as c 16 or c 17 A random value is generated using a uniform random number generator, and the relationship is as follows:
[0064] 0≤r<c 17 -c 16 =4. When the random value r = 1 is obtained, it means xc 16 =65-64=1, at this time xc 16 ≤r, therefore choose c 17 .
[0065] Based on the above image compression method flow, uniform quantization is used to determine the encoding character method. However, considering that the human eye is more sensitive to dark areas of an image and less sensitive to bright areas, non-uniform quantization can also be used to determine the size of the interval for selecting encoding characters based on the brightness distribution of the image. In an embodiment of the image compression method, during compression, the pixel values (original value x) in the image can be divided into several intervals, each with a different encoding character spacing. This allows for non-uniform quantization processing to address the perceptual differences between bright areas (areas with higher original pixel values) and dark areas (areas with lower original pixel values) in the image.
[0066] The non-uniform quantization method mainly divides the brightness distribution of pixels in the image into multiple (two or more) brightness blocks. Each of the two or more brightness blocks is assigned an individual coded character interval based on the brightness characteristics of each brightness block. In this way, the pixels in the image are divided into multiple blocks with different coded character intervals based on two or more coded character intervals.
[0067] An example of an image compression method that uses non-uniform quantization to determine coded characters can be found in the following embodiments. Figure 3 The process shown can be referenced at the same time. Figure 4 This displays a diagram showing areas with different brightness levels in an image.
[0068] Figure 4Displaying an image 40 (such as one of a series of images) and distinguishing several brightness ranges based on the pixel values of each area, schematically showing that the brightness ranges are divided into a higher brightness block 401, a lower brightness block 403, and a normal brightness block 405.
[0069] In the method flow, the compression scheme is first confirmed, such as compressing an 8-bit image to a 6-bit or other format (step S301), and then the input image is obtained (step S303). The pixel values in the image are obtained through the image processing circuit, and the brightness distribution of the image is obtained from the pixel values (step S305). Figure 4 The diagram illustrates the distribution of several different brightness blocks. Next, the encoded characters of the compressed image are determined according to the non-uniform quantization method. Before this, some preliminary processing can be performed (step S307).
[0070] In the initial processing, because the brightness and darkness distribution in the image is uneven, a random quantization method, i.e., a non-uniform quantization method, is used. This method determines the number of coded character intervals to be distinguished based on the image information. Each interval can have different spacing between coded characters based on its brightness characteristics. For example, if a typical brightness interval (such as for...) Figure 4 The general brightness block 405 has a general coded character spacing, which is used for darker areas of the image (such as for...). Figure 4 The lower brightness blocks 403) are configured with smaller spacing for their coded characters, while the brighter areas in the image (such as those for...) are configured with smaller spacing for their coded characters. Figure 4 In the brighter areas (blocks 401), larger spacing of encoded characters is used, thus distinguishing multiple intervals with different encoded character spacing based on brightness. The above distinction between normal, bright, and dark intervals and the corresponding encoded character spacing can be set according to actual needs; there are no absolute rules. Using smaller spacing encoded characters within blocks (such as dark areas) can provide a lower compression rate (better quality) for parts of the image that are more sensitive to the human eye. Conversely, for parts that are less sensitive to the human eye, larger spacing encoded characters can achieve a better compression rate (relatively lower quality).
[0071] Subsequently, based on the settings of the preliminary processing described above, the brightness distribution of each pixel or each region (such as the average brightness of pixels within a region) is segmented into multiple intervals with different coded character spacings. In another embodiment, the pixels in the image can also be reordered according to their brightness values to distinguish the intervals to which each pixel belongs, in order to facilitate computation.
[0072] After this initial processing, the equations for forming coded characters in the encoding book can be established according to the set content (step S309), namely, equation one and equation two as described in the above embodiment, and in conjunction with judgment equations (1) to (7). Similarly, for each coded character interval, the step of determining the coded character of each pixel's original value according to a random number, where c is the coded character, the value n is the total number of coded characters in each coded character interval, c0 is the minimum coded character, and all original values less than this minimum coded character are directly encoded as c0. n-1 This is the maximum encoded character; raw values larger than this maximum encoded character are directly encoded as 'c'. n-1 The value k is the index value of the image data to be processed, and x is also the original value. Thus, the selection procedure for the encoded character is started according to the original value of each pixel (step S311), which includes generating a random number to determine the encoded character and index value of the original value x (step S313). Finally, an index table is formed for the image, which can be used to look up the encoding book according to the index value to obtain the encoded character during decoding (step S315).
[0073] After selecting the coded characters based on the above conditions, it can be found that after multiple compressions, the variation of the random (non-uniform) quantization result becomes smaller, and the average is still equal to x. This is equivalent to the expected value of the quantization error being 0, thus achieving a near-lossless effect.
[0074] Taking the compression of an 8-bit image into a 6-bit image as an example, in an 8-bit image, each pixel value is between 0 and 255, while in a 6-bit image, each pixel value is between 0 and 63. For example, when the original pixel value x is in the range of 0 to 63, the encoding character spacing is 2 (random numbers use 0 to 1). This range is as follows: Figure 4 The illustration shows the lower brightness block 403; when the original pixel value x is in the range of 64 to 127, the encoded character spacing is 4 (random numbers use 0 to 3), this range is as follows. Figure 4 The schematic representation shows a typical brightness block 405; when the original pixel value x is in the range of 128 to 255, an coded character spacing of 8 is used (random numbers use 0 to 7), this range is as follows. Figure 4 The diagram illustrates the higher brightness area 401.
[0075] When the original pixel value x falls within the range of 0 to 63, it can be represented as:
[0076] c·2≤x<(c+1)·2, select the coded character using the probabilities of equations six and seven below.
[0077] by The probability is chosen as (c+1)·2 (Equation 6)
[0078] by The probability is chosen as c·2 (Equation 7).
[0079] When the original pixel value x falls within the range of 64 to 127, it can be represented as:
[0080] c·4≤x<(c+1)·4, the following equation is used to select the encoded character with a probability of eight or nine.
[0081] by The probability is chosen as (c+1)·4 (Equation 8)
[0082] by The probability is chosen as c·4 (Equation 9).
[0083] When the original pixel value x falls within the range of 128 to 255, it can be represented as:
[0084] c·8≤x<(c+1)·8, the encoding character is selected with probabilities of 10 and 11 using the following equation.
[0085] by The probability is chosen as (c+1)·8 (Equation 10).
[0086] by The probability is chosen as c·8 (Equation 11).
[0087] Finally, the encoded characters and index values for each brightness range are generated, forming an index table.
[0088] In summary, the embodiment of the image compression method proposed above, which implements a fixed-length encoding technology for images or videos based on random and non-uniform quantization, has the greatest advantage of allowing the circuit system to determine the bandwidth used for transmission. This provides a clear basis for circuit system design, facilitating circuit design. For example, when designing image processing circuits for different products, the design can be clearly tailored to the specific requirements. Furthermore, the compression effect achieved by the method is unbiased, reducing the negative impact of the compression process on the image. It also considers the human eye's perception of image brightness and darkness by employing a non-uniform quantization compression method, reducing distortion. As the number of consecutive images increases, a near-lossless effect can be achieved from the human eye's perspective. This method is suitable for the current demands of increasingly larger image sizes, higher quality requirements, and high-speed processing. If noise reduction techniques such as three-dimensional noise suppression (3DNR) are required, a large number of images need to be generated. While reducing the storage buffer space requirement, the method can provide a good compression ratio with near-lossless performance.
[0089] The content disclosed above is only a preferred and feasible embodiment of the present invention, and is not intended to limit the scope of the patent application of the present invention. Therefore, all equivalent technical changes made using the contents of the present invention specification and drawings are included in the scope of the patent application of the present invention.
Claims
1. An image compression method, characterized in that, Comprising: Obtaining pixel values in an image, each pixel having an original value; Determining a coding character interval according to a compression scheme, each coding character interval having a coding character spacing; Generating a random number with a random number generator, wherein the range for generating the random number is determined according to the coding character interval; Determining the coding character and index value of each pixel's original value according to the random number; and After determining the coding character and index value of the pixel original value in the image, forming an index table, wherein the index table records the query index formed by each original pixel and the corresponding coding character, facilitating querying a codebook and reconstructing the image.
2. The image compression method as described in claim 1, characterized in that, The compression scheme indicates encoding the image from M-bit image data into N-bit image data, and adopting a uniform quantization method or a non-uniform quantization method.
3. The image compression method as described in claim 2, characterized in that, The uniform quantization method adopts a fixed coding character spacing within each coding character interval, and the pixels in the image are divided into multiple blocks with the same coding character spacing according to the coding character interval.
4. The image compression method as described in claim 3, characterized in that, The codebook C uses C = {c i |0≤i<n}、n=2 N Description, where c is the encoded character, satisfying 0 ≤ c, 0 < ... < c n-1 <2 M The formula is as follows: n is the total number of encoded characters compressed into N-bitmap data; i is the index value of each encoded character in the N-bitmap data, ranging from 0 to n-1; c0 is the minimum encoded character; all original values less than this minimum encoded character are directly encoded as c0. n-1 The maximum encoded character is used; raw values greater than this maximum encoded character are directly encoded as 'c'. n-1 .
5. The image compression method as described in claim 4, characterized in that, The step of determining the coding character of each pixel's original value according to the random number includes the following judgment formula, where the value k is the index value of the image data to be processed currently, and x is the original value: If x < c0, directly encode it as c0; If c n-1 <x, directly encode it as c n-1 ; If there exists 0 ≤ k < n-1, that is, satisfying c k ≤x<c k+1 The random number r generated by the random number generator determines the encoded character of the original value x, where: by The probability of choosing c k+1 ; by The probability of choosing c k ; The method generates a random number r using a random number generator, where the random number r satisfies 0 ≤ r < (c k+1 -c k Based on the relationship between x and c, the encoded character c is selected for the original value x. k+1 or c k The judgment is as follows: If the random value r < (xc) k ), select c k+1 ; If the random value (xc) k If r ≤ r, choose c. k .
6. The image compression method as described in claim 2, characterized in that, The non-uniform quantization method divides the pixels in the image into multiple brightness blocks according to the brightness distribution of the pixels, sets a single coding character interval for each brightness block according to the brightness characteristics of each brightness block, and the pixels in the image are divided into multiple blocks with different coding character spacings according to the multiple coding character intervals.
7. The image compression method as described in claim 6, characterized in that, In the non-uniform quantization method, a middle coding character spacing is provided in the middle brightness interval of the image, coding characters with a small spacing are set in the low brightness interval, and coding characters with a large spacing are set in the high brightness interval, wherein the brightness of the middle brightness interval is less than the brightness of the high brightness interval but greater than the brightness of the low brightness interval, and the middle coding character spacing is less than the large spacing but greater than the small spacing.
8. The image compression method as described in claim 7, characterized in that, For each encoded character range, the steps to determine the encoded character of each pixel's original value based on the random number include the following judgment formula, where c is the encoded character, n is the total number of encoded characters in the encoded character range, c0 is the minimum encoded character, and all original values less than this minimum encoded character are directly encoded as c0. n-1 The maximum encoded character is used; raw values greater than this maximum encoded character are directly encoded as 'c'. n-1 The value k is the index of the image data to be processed, and x is the original value: If x < c0, directly encode it as c0; If c n-1 <x, directly encode it as c n-1 ; If there exists 0 ≤ k < n - 1, that is, satisfying c k ≤ x < c k+1 , and the encoded character of the original value x is determined by the random number r generated by this random number generator, where: by The probability of choosing c k+1 ; by The probability of choosing c k ; The method generates a random number r using a random number generator, where the random number r satisfies 0 ≤ r < (c k+1 -c k Based on the relationship between x and c, the encoded character c is selected for the original value x. k+1 or c k The judgment is as follows: If the random value r < (xc) k Select c k+1 ; If the random value (xc) k If r ≤ r, choose c. k .
9. The image compression method according to any one of claims 1 to 8, characterized in that, The pixel value is a grayscale value, or a red channel value, a green channel value, and a blue channel value in the red-green-blue color space.
10. A circuit system, characterized in that, Comprising: An image processing circuit, disposed in an electronic device, which executes an image compression method, including: Receiving an image, obtaining the pixel values in the image, and temporarily storing them in a storage unit, each pixel having an original value; Determining a coding character interval according to a compression scheme, each coding character interval having a coding character spacing; Generating a random number with a random number generator, wherein the range for generating the random number is determined according to the coding character interval; Determining the coding character and index value of each pixel's original value according to the random number; and After determining the coding character and index value of the pixel original value in the image, forming an index table, wherein the index table records the query index formed by each original pixel and the corresponding coding character, facilitating querying a codebook and reconstructing the image.
Citation Information
Patent Citations
Merthod and apparatus for analzing image data to use multiple transforms for enhanced image data transmission
US20010041017A1
Method of Generating a Sequence of Display Frames For Display on a Display Device
US20090028448A1