US20230016253A1 - Image compression and decompression using controlled quality loss - Google Patents
Image compression and decompression using controlled quality loss Download PDFInfo
- Publication number
- US20230016253A1 US20230016253A1 US17/955,788 US202217955788A US2023016253A1 US 20230016253 A1 US20230016253 A1 US 20230016253A1 US 202217955788 A US202217955788 A US 202217955788A US 2023016253 A1 US2023016253 A1 US 2023016253A1
- Authority
- US
- United States
- Prior art keywords
- quality control
- image
- transform coefficients
- sequence
- control metrics
- 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.)
- Abandoned
Links
- 230000006835 compression Effects 0.000 title claims abstract description 45
- 238000007906 compression Methods 0.000 title claims abstract description 45
- 230000006837 decompression Effects 0.000 title description 21
- 238000003908 quality control method Methods 0.000 claims abstract description 289
- 238000013139 quantization Methods 0.000 claims description 93
- 238000000034 method Methods 0.000 claims description 81
- 238000012545 processing Methods 0.000 claims description 36
- 230000007246 mechanism Effects 0.000 description 66
- 230000015556 catabolic process Effects 0.000 description 25
- 238000006731 degradation reaction Methods 0.000 description 25
- 230000015654 memory Effects 0.000 description 19
- 230000009466 transformation Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 10
- 230000000007 visual effect Effects 0.000 description 10
- 239000011449 brick Substances 0.000 description 8
- 230000004438 eyesight Effects 0.000 description 8
- 230000000873 masking effect Effects 0.000 description 7
- 230000009467 reduction Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 206010052128 Glare Diseases 0.000 description 4
- 230000004075 alteration Effects 0.000 description 4
- 230000015572 biosynthetic process Effects 0.000 description 4
- 230000004313 glare Effects 0.000 description 4
- 238000003786 synthesis reaction Methods 0.000 description 4
- XOJVVFBFDXDTEG-UHFFFAOYSA-N Norphytane Natural products CC(C)CCCC(C)CCCC(C)CCCC(C)C XOJVVFBFDXDTEG-UHFFFAOYSA-N 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 239000003086 colorant Substances 0.000 description 3
- 230000000593 degrading effect Effects 0.000 description 3
- 238000004321 preservation Methods 0.000 description 3
- 238000009877 rendering Methods 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 210000001525 retina Anatomy 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 230000001131 transforming effect Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008867 communication pathway Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 235000021384 green leafy vegetables Nutrition 0.000 description 1
- 230000003116 impacting effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004576 sand Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
- 230000016776 visual perception Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/65—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using error resilience
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/154—Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/162—User input
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/18—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/184—Methods 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 bits, e.g. of the compressed video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
Definitions
- Image content represents a significant amount of online content.
- a web page may include multiple images, and a large portion of the time and resources spent rendering the web page are dedicated to rendering those images for display.
- the amount of time and resources required to receive and render an image for display depends in part on the manner in which the image is compressed. As such, an image, and therefore a web page that includes the image, can be rendered faster by reducing the total data size of the image using compression and decompression techniques.
- a method for compressing an image includes receiving an error level definition representing a maximum quantization error for compressing the image and identifying transform coefficients to quantize within an area of the image.
- a sequence of quality control metrics for controlling a quantization of the transform coefficients is selected based on the error level definition.
- a first candidate bit cost is determined by quantizing a first copy of the transform coefficients according to the error level definition and the sequence of quality control metrics.
- a second candidate bit cost is determined by quantizing a second copy of the transform coefficients according to a modified error level and the sequence of quality control metrics. A determination is made as to whether the second candidate bit cost is lower than the first candidate bit cost.
- the transform coefficients are iteratively processed according to the modified error level and the sequence of quality control metrics to produce quantized transform coefficients.
- a compressed image is produced based on the quantized transform coefficients.
- iteratively processing the transform coefficients according to the modified error level and the sequence of quality control metrics to produce the quantized transform coefficients includes quantizing the transform coefficients using a first quality control metric of the sequence of quality control metric. Quantizing the transform coefficients using the first quality control metric results in a quantization error. A determination is made that the quantization error exceeds a quality score calibration associated with the first quality control metric. Responsive to determining that the quantization error exceeds the quality score calibration, the transform coefficients are further quantizing using a second quality control metric of the sequence of quality control metrics.
- the area of the image is a first area and the sequence of quality control metrics is a first sequence of quality control metrics, and the method further comprises iteratively processing transform coefficients of a second area of the image using a second sequence of quality control metrics.
- the modified error level is a first modified error level and iteratively processing the transform coefficients of the second area of the image using the second sequence of quality control metrics includes determining a candidate bit cost by quantizing the transform coefficients of the second area of the image according to a second modified error level and the second sequence of quality control metrics.
- selecting the sequence of quality control metrics for controlling the quantization of the transform coefficients includes querying a lookup table based on the error level definition.
- the lookup table includes records associated with multiple quality control metrics and selecting the sequence of quality control metrics for controlling the quantization of the transform coefficients includes determining that a subset of the multiple quality control metrics is associated with error levels exceeding the error level definition, and excluding one or more quality control metrics of the subset of the multiple quality control metrics from the sequence of quality control metrics.
- the transform coefficients are iteratively processed according to the error level definition and the sequence of quality control metrics to produce the quantized transform coefficients.
- a quantization error represented by the modified error level is larger than the maximum quantization error.
- An apparatus for compressing an image includes a processor and a memory.
- the processor is configured to execute instructions stored in the memory to receive an error level definition representing a maximum quantization error for compressing the image, select a sequence of quality control metrics for controlling a quantization of transform coefficients of the image based on the error level definition, compress the image according to the error level definition and the sequence of quality control metrics, and output the compressed image for storage or display.
- the instructions to compress the image according to the error level definition and the sequence of quality control metrics include instructions to quantize the transform coefficients using a first quality control metric of the sequence of quality control metrics.
- the instructions include instructions to determine a first candidate bit cost by quantizing a first copy of the transform coefficients according to the error level definition and the sequence of quality control metrics, and determine a second candidate bit cost by quantizing a second copy of the transform coefficients according to a modified error level and the sequence of quality control metrics. A determination is then made, based on the first candidate bit and the second candidate bit cost, to compress the image according to one of the error level definition or the modified error level.
- the instructions to determine to compress the image according to one of the error level definition or the modified error level include instructions to determine whether the second candidate bit cost is lower than the first candidate bit cost, and the instructions include instructions to: responsive to a determination that the second candidate bit cost is lower than the first candidate bit cost, compress the image according to the modified error level and the sequence of quality control metrics; and, responsive to a determination that the second candidate bit cost is not lower than the first candidate bit cost, compress the image according to the error level definition and the sequence of quality control metrics.
- the quantized transform coefficients are first quantized transform coefficients and the quantization error is a first quantization error
- the modified error level corresponds to an area of the image
- the instructions to compress the image according to the modified error level and the sequence of quality control metrics include instructions to quantize a subset of the transform coefficients using the first quality control metric of the sequence of quality control metrics.
- the subset of the transform coefficients is located within an area of the image.
- a determination is made that a second quantization error resulting from quantizing the subset of the transform coefficients using the first quality control metric exceeds the quality score calibration associated with the first quality control metric.
- the transform coefficients are further quantized using the second quality control metric of the sequence of quality control metrics to produce second quantized transform coefficients.
- a compressed image is produced based on the second quantized transform coefficients.
- a quantization error represented by the modified error level is larger than the maximum quantization error.
- the modified error level is a first modified error level
- the second copy of the transform coefficients corresponds to a first subset of the transform coefficients located within a first area of the image
- the instructions include instructions to determine a third candidate bit cost by quantizing a second subset of the transform coefficients located within a second area of the image according to a second modified error level and the sequence of quality control metrics.
- the instructions to compress the image according to the error level definition and the sequence of quality control metrics include instructions to compress the first subset of the transform coefficients according to the first modified error level, and compress the second subset of the transform coefficients according to the second modified error level.
- the instructions to select the sequence of quality control metrics for controlling the quantization of the transform coefficients of the image include instructions to determine that a subset of quality control metrics available for compressing the image is associated with error levels exceeding the error level definition, and exclude one or more quality control metrics of the subset of the quality control metrics from the sequence of quality control metrics.
- a non-transitory computer-readable storage medium includes processor-executable routines that, when executed by a processor, facilitate a performance of operations for compressing an image.
- the operations include selecting a sequence of quality control metrics for controlling a quantization of transform coefficients of the image.
- the operations further include iteratively processing a first subset of the transform coefficients located within a first area of the image according to an error level definition and the sequence of quality control metrics to produce first quantized transform coefficients.
- the operations further include iteratively processing a second subset of the transform coefficients located within a second area of the image according to a modified error level and the sequence of quality control metrics to produce second quantized transform coefficients.
- the operations further include producing a compressed image based on the first quantized transform coefficients and the second quantized transform coefficients.
- the sequence of quality control metrics defines an order for applying one or more quality control metrics to iteratively quantize some or all of the transform coefficients of the image.
- the error level definition represents a maximum error level for compressing the image and the operations for selecting the sequence of quality control metrics for controlling the quantization of the transform coefficients of the image comprise determining that a subset of quality control metrics available for compressing the image is associated with error levels exceeding the error level definition, and excluding one or more quality control metrics of the subset of the quality control metrics from the sequence of quality control metrics.
- the operations for iteratively processing the first subset of the transform coefficients located within the first area of the image according to the error level definition and the sequence of quality control metrics to produce the first quantized transform coefficients comprise quantizing the first subset of the transform coefficients using a first quality control metric of the sequence of quality control metrics. Quantizing the first subset of the transform coefficients using the first quality control metric results in a quantization error. A determination is made that the quantization error exceeds a quality score calibration associated with the first quality control metric. Responsive to determining that the quantization error exceeds the quality score calibration, the first subset of the transform coefficients is further quantized using a second quality control metric of the sequence of quality control metrics.
- the operations for iteratively processing the first subset of the transform coefficients located within the first area of the image according to the error level definition and the sequence of quality control metrics to produce the first quantized transform coefficients comprise iteratively processing the second subset of the transform coefficients located within the second area of the image according to the error level definition and the sequence of quality control metrics to produce third quantized transform coefficients.
- a determination is made as to whether a bit cost for the second quantized transform coefficients is lower than a bit cost for the third quantized coefficients. Responsive to determining that the bit cost for the second quantized transform coefficients is not lower than the bit cost for the third quantized coefficients, the third quantized coefficients are used to produce the compressed image instead of the second quantized coefficients.
- FIG. 1 is a diagram of an image compression and decompression system.
- FIG. 2 is an example of an internal configuration of a computing device that can be used in an image compression and decompression system.
- FIG. 3 is a block diagram of an example of an image compressor and an image decompressor.
- FIG. 4 is a flowchart diagram of an example of a technique for compressing an image according to a selected error level and a sequence of quality control metrics.
- FIG. 5 is a flowchart diagram of an example of a technique for iteratively processing an image using a sequence of quality control metrics.
- FIG. 6 is an illustration of areas of an image iteratively processed using a sequence of quality control metrics.
- Lossy image compression involves reducing the amount of data within an image to compress, such as using quantization. In exchange for a decreased bit cost of the resulting compressed image, the image suffers certain quality loss. The extent of the quality loss depends largely upon the manner by which the image data was quantized during compression. A certain quantization strategy may work well at a certain scope but not at others. For example, the JPEG compression format allows for relatively efficient coding of high quality images, but can produce undesirable artifacts when its quantization strategy is used on lower quality images.
- a typical image compression format derives a quantization strategy for controlling image quality loss for an entire image.
- the quantization strategy is derived using a metric for evaluating the quality loss, examples of which include peak signal-to-noise ratio (PSNR), human visual system (HVS), a combination of PSNR and HVS (PSNRHVS), and a masked version of that combination (PSNRHVS-M).
- PSNR peak signal-to-noise ratio
- HVS human visual system
- PSNRHVS combination of PSNR and HVS
- PSNRHVS-M a masked version of that combination
- the quantization strategy derived by a typical image compression format is not limited to a particular quantization error.
- the quantization error resulting from lossy image compression corresponds to the amount of artifacts resulting from the compression. As such, the greater the quantization error, the greater the amount of artifacts, and, therefore, the greater the quality loss.
- Implementations of this disclosure address problems such as these by controlling the loss of image quality during compression using a sequence of models, or quality control metrics.
- the sequence of quality control metrics is selected for quantizing transform coefficients within a local area of the image according to an error level definition representing a maximum quantization error to result from compressing the transform coefficients.
- the transform coefficients are iteratively processed according to the error level definition and the sequence of quality control metrics to produce quantized transform coefficients.
- candidate bit costs can be determined by quantizing the transform coefficients according to the error level definition and the sequence of quality control metrics or according to a modified error level and the sequence of quality control metrics. Where the candidate bit cost resulting from using the modified error level is lower than the candidate bit cost resulting from using the error level definition, the transform coefficients are quantized according to the modified error level and the sequence of quality control metrics. Otherwise, the transform coefficients are quantized according to the error level definition and the sequence of quality control metrics.
- the implementations of this disclosure describe a holistic formalism that allows for image quality degradation along a least disruptive path. Sequences of quality control metrics are applied to transform coefficients within the image to measure the image loss. Based on that measured image loss, the compression of the image can follow a non-linear curve where bit cost and quality loss are both minimized.
- FIG. 1 is a diagram of an image compression and decompression system 100 .
- the image compression and decompression system 100 includes a transmitting station 102 , a receiving station 104 , and a network 106 .
- the transmitting station 102 is a computing device that compresses and transmits an image. Alternatively, the transmitting station 102 may include two or more distributed devices for compressing and transmitting an image.
- the receiving station 104 is a computing device that receives and decompresses a compressed image. Alternatively, the receiving station 104 may include two or more distributed devices for receiving and decompressing a compressed image. An example of a computing device used to implement one or both of the transmitting station 102 or the receiving station 104 is described below with respect to FIG. 2 .
- the network 106 connects the transmitting station 102 and the receiving station 104 for the compression, transmission, receipt, and decompression of an image.
- the network 106 can be, for example, the Internet.
- the network 106 can also be a local area network (LAN), a wide area network (WAN), a virtual private network (VPN), a cellular telephone network, or another means of transferring the image from the transmitting station 102 to the receiving station 104 .
- LAN local area network
- WAN wide area network
- VPN virtual private network
- cellular telephone network or another means of transferring the image from the transmitting station 102 to the receiving station 104 .
- Implementations of the compression and decompression system 100 may differ from what is shown and described with respect to FIG. 1 .
- the compression and decompression system 100 can omit the network 106 .
- an image can be compressed and then stored for transmission at a later time to the receiving station 104 or another device having memory.
- the receiving station 104 can receive (e.g., via the network 106 , a computer bus, and/or some communication pathway) the compressed image and store the compressed image for later decompression.
- the functionality of the transmitting station 102 and of the receiving station 104 can change based on the particular operations performed.
- the transmitting station 102 can be a computing device used to upload an image for compression to a server
- the receiving station 104 can be the server that receives the image from the transmitting station 102 and compresses the image for later use (e.g., in rendering a webpage).
- the transmitting station 102 can be a server that decompresses the compressed image
- the receiving station 104 can be a computing device that receives the decompressed image from the transmitting station 102 and renders the decompressed image (e.g., as part of a webpage).
- FIG. 2 is an example of an internal configuration of a computing device 200 that can be used in an image compression and decompression system, for example, the image compression and decompression system 100 shown in FIG. 1 .
- the computing device 200 may, for example, implement one or both of the transmitting station 102 or the receiving station 104 .
- the computing device 200 can be in the form of a computing system including multiple computing devices, or in the form of one computing device, for example, a mobile phone, a tablet computer, a laptop computer, a notebook computer, a desktop computer, or the like.
- a processor 202 in the computing device 200 can be a conventional central processing unit.
- the processor 202 can be another type of device, or multiple devices, now existing or hereafter developed, capable of manipulating or processing information.
- the disclosed implementations can be practiced with one processor as shown (e.g., the processor 202 ), advantages in speed and efficiency can be achieved by using more than one processor.
- a memory 204 in the computing device 200 can be a read-only memory (ROM) device or a random-access memory (RAM) device in an implementation. However, other suitable types of storage devices can be used as the memory 204 .
- the memory 204 can include code and data 206 that is accessed by the processor 202 using a bus 212 .
- the memory 204 can further include an operating system 208 and application programs 210 , the application programs 210 including at least one program that permits the processor 202 to perform the techniques described herein.
- the application programs 210 can include applications 1 through N, which further include image compression and/or decompression software that performs some or all of the techniques described herein.
- the computing device 200 can also include a secondary storage 214 , which can, for example, be a memory card used with a mobile computing device.
- a secondary storage 214 can, for example, be a memory card used with a mobile computing device.
- an image can be stored in whole or in part in the secondary storage 214 and loaded into the memory 204 as needed for processing.
- the computing device 200 can also include one or more output devices, such as a display 218 .
- the display 218 may be, in one example, a touch-sensitive display that combines a display with a touch-sensitive element that is operable to sense touch inputs.
- the display 218 can be coupled to the processor 202 via the bus 212 .
- Other output devices that permit a user to program or otherwise use the computing device 200 can be provided in addition to or as an alternative to the display 218 .
- the output device is or includes a display
- the display can be implemented in various ways, including as a liquid crystal display (LCD), a cathode-ray tube (CRT) display, or a light emitting diode (LED) display, such as an organic LED (OLED) display.
- LCD liquid crystal display
- CRT cathode-ray tube
- LED light emitting diode
- OLED organic LED
- the computing device 200 can also include or be in communication with an image-sensing device 220 , for example, a camera, or another image-sensing device, now existing or hereafter developed, which can sense an image such as the image of a user operating the computing device 200 .
- the image-sensing device 220 can be positioned such that it is directed toward the user operating the computing device 200 .
- the position and optical axis of the image-sensing device 220 can be configured such that the field of vision includes an area that is directly adjacent to the display 218 and from which the display 218 is visible.
- the computing device 200 can also include or be in communication with a sound-sensing device 222 , for example, a microphone or another sound-sensing device, now existing or hereafter developed, which can sense sounds near the computing device 200 .
- the sound-sensing device 222 can be positioned such that it is directed toward the user operating the computing device 200 and can be configured to receive sounds, for example, speech or other utterances, made by the user while the user operates the computing device 200 .
- Implementations of the computing device 200 may differ from what is shown and described with respect to FIG. 2 .
- the operations of the processor 202 can be distributed across multiple machines (wherein individual machines can have one or more processors) that can be coupled directly or across a local area or other network.
- the memory 204 can be distributed across multiple machines, such as a network-based memory or memory in multiple machines performing the operations of the computing device 200 .
- the bus 212 of the computing device 200 can be composed of multiple buses.
- the secondary storage 214 can be directly coupled to the other components of the computing device 200 or can be accessed via a network and can comprise an integrated unit, such as a memory card, or multiple units, such as multiple memory cards.
- FIG. 3 is a block diagram of an example of an image compressor 300 and an image decompressor 302 .
- the image compressor 300 and the image decompressor 302 may, for example, respectively be implemented using the transmitting station 102 and the receiving station 104 shown in FIG. 1 .
- the image compressor 300 compresses an input image 304 to produce a compressed image 306 .
- the image decompressor 302 receives and decompresses the compressed image 306 to produce an output image 308 that is perceptibly the same as or similar to the input image 304 .
- the image compressor 300 includes a transformation and quantization mechanism 310 , a degradation mechanism 312 , and a psychovisual modeling mechanism 314 .
- the transformation and quantization mechanism 310 transforms blocks of the input image 304 into the frequency domain and quantizes the resulting transform coefficients.
- the transformation and quantization mechanism 310 can use a discrete cosine transform (DCT) to transform the blocks of the input image 304 from the spatial domain to the frequency domain.
- DCT discrete cosine transform
- the transformation and quantization mechanism 310 can use another Fourier-related transform or a discrete Fourier transform to transform the blocks of the input image 304 from the spatial domain to the frequency domain.
- the psychovisual modeling mechanism 314 and the degradation mechanism 312 are used to determine how to reduce the amount of data in the input image 304 during compression.
- the transformation and quantization mechanism 310 quantizes the transform coefficients according to the determinations made using the psychovisual modeling mechanism 314 and the degradation mechanism 312 .
- the degradation mechanism 312 makes decisions for quantizing areas of the input image 304 using quality control metrics.
- the degradation mechanism 312 makes different quantization decisions for different areas of the input image 304 .
- the use of these different quantization decisions allows for the compression of the input image 304 to follow a non-linear quality loss curve (e.g., as opposed to a linear quality loss curve used when a single quantization decision is made for the entirety of the input image 304 ). That is, although the quality loss for a given area of the image may be expressed linearly, the overall quality loss for the image as a whole is expressed non-linearly.
- An area of an image refers to an M ⁇ N-sized region of the image, where M and N may be the same or a different value.
- an area of an image may be a single block (e.g., an 8 ⁇ 8 block) within the image.
- an area of an image may be multiple blocks within the image.
- different areas of an image to compress may be different sized blocks (e.g., some 8 ⁇ 8, some 4 ⁇ 4, some 16 ⁇ 16, etc.).
- a quality control metric refers to a model for evaluating the quality of an image after certain image content is reduced, removed, or otherwise modified.
- a quality control metric evaluates the quality of the image by determining a quality score for the quantization applied to the image.
- the quantized transform coefficients can be reconstructed to produce a decompressed image.
- the quality control metric uses a parameterized model to compare that decompressed image to the original image (e.g., the input image 304 ).
- the results of the comparison reflect the degree to which the quantization resulted in perceptible quality loss to the image.
- the quality score provides a valuation for the results of the comparison.
- Each of the quality control metrics may use the same or different parameters to model the quality loss between the decompressed image and the original image.
- the quality control metrics are applied in a particular sequence to optimize a reduction in the amount of data in the input image 304 according to an error level defined for use with the image compressor 300 .
- Applying a quality control metric refers to measuring the quality loss by quantizing transform coefficients of the image in a certain way. There may be many quality control metrics available for processing the input image 304 .
- the sequence of quality control metrics defines an order for applying one or more quality control metrics to iteratively quantize some or all of the transform coefficients within the input image 304 (e.g., within the entire input image 304 or within an area of the input image 304 ).
- the quality control metrics may include, without limitation, a pristine image quality control metric, a phase loss in high-information-density textures quality control metric, a structural similarity (SSIM) quality control metric, a cartoon image quality control metric, a color-loss quality control metric, a viewing distance loss quality control metric, a fewer pixels per bit quality control metric, a film grain and/or digital noise preservation quality control metric, a chromatic aberration quality control metric, and a texture cluster quality control metric.
- SSIM structural similarity
- Such a measurement consists of a phase-coherent representation of image textures, ridge and edge detection, visual masking, least mean squares (LMS) color modeling, and other modeling.
- LMS least mean squares
- Visual masking allows for different areas of an image to be stored at different accuracies (e.g., up to six times a quantization difference). This is because the darker areas of a visual mask require less precise reproduction of details.
- the image is compressed as a cartoon (e.g., using the Gaussian mixture model) based on the image textures.
- Textures with dense information content are compressed in log Gabor space, in which frequencies are clustered and phase is randomized.
- an image of a brick house may use large amounts of information to represent the exact location of each brick.
- the image can be compressed as a structure without a brick in every position.
- Bricks can then be modeled as textures within the compressed structure to create the appearance of a brick house without spending bits to specify the locations of the bricks.
- the same principle can be applied in other contexts, for example, using textures to represent sand on a beach.
- SSIM quality control metric
- the noise levels are reconstructed from a noise synthesis process to reproduce matching averages and variances.
- SSIM creates the same amount of noise and etched visuals in a reconstructed image as there was in the original image.
- the system may not always identify accurate noise representations. For example, if there is a thin line in the original image, using SSIM may result in a different object with a similar variance.
- color-loss quality control metric color information is lost in a way that balances the kind of color and the spatial resolution of the feature represented in that color.
- the loss is similar to a YUV420 loss, but is performed in a proper color space to avoid visible artifacts.
- High-frequency blue-yellow axis colors may be removed first, followed by high-frequency green-red axis colors.
- Use of this quality control metric may result in a flat appearance.
- a psychovisual modeling e.g., of the psychovisual modeling mechanism 314 shown in FIG. 3
- the distance may be changed (e.g., from 1,000 pixels to 2,000 pixels).
- grainy or noisy areas of an image are preserved. These areas can be preserved by using a consistent quantization across the coefficients thereof.
- chromatic aberrations and other similar spatial correlations are removed from the image.
- Such glares require bits for storing. Removing chromatic aberrations such as these glares (e.g., by calculating the shift for the red signal to match with the green signal) results in a lower bit cost.
- texture cluster quality control metric textures and rotationally invariant models of textures can be compressed as clusters in the Fast-Fourier transform (FFT) space.
- FFT Fast-Fourier transform
- the degradation mechanism 312 can degrade the input image 304 according to an error level definition representing a maximum quantization error to result from compressing the input image 304 .
- the maximum quantization error may refer to a number or amount of visual artifacts resulting from compressing the input image 304 .
- the error level definition may reflect a default value, be configured according to input received by a user of the image compressor 300 , or be determined based on characteristics of the input image 304 (e.g., using results of pre-processing performed against the input image 304 to determine a resolution or file size thereof).
- Each of the quality control metrics may be associated with an error level or a range of error levels. In such a case, only the quality control metrics associated with the error level definition defined for compressing an image will be considered for selection.
- Data associated with the quality control metrics can be stored in a lookup table (LUT). The LUT can be queried based on the error level definition. The results of the query can thus include the quality control metrics that are available for compressing the image according to the error level definition.
- the degradation mechanism 312 includes functionality for bit budgeting compression of the input image 304 based on the error level definition.
- the degradation mechanism 312 identifies a number of bits saved by reducing the data of the input image 304 according to a quality control metric using the error level definition.
- the degradation mechanism 312 can also identify a number of bits saved by reducing the data of the input image 304 according to a quality control metric using a quantization error value other than the error level definition.
- This bit budgeting technique is locally performed at areas of the input image 304 , rather than globally for the entire input image 304 .
- Bit budgeting for image degradation can include producing a globally quantized image by quantizing all transform coefficients in image according to the error level definition. Separately, transform coefficients located in different areas of the image can be quantized at different error levels.
- the number of bits saved by quantizing a given area of the image at a different error level (hereafter, a modified error level) is compared to the number of bits saved by quantizing the corresponding area in the globally quantized image. In the event that the number of bits saved by quantizing at the modified error level is greater than the number of bits saved by quantizing at the error level definition, the modified error level is used for compressing the subject area of the image. Otherwise, the error level definition is used for compressing the subject area of the image.
- the error level definition may be set to 1.3.
- the degradation mechanism 312 may quantize transform coefficients within an area of the input image 304 to result in a bit savings of 0.5 bits.
- the degradation mechanism 312 may determine that quantizing those same transform coefficients results in a bit savings of 7 bits. Given the increase in bit savings, the degradation mechanism 312 uses the error level 1.4 to degrade that area of the input image 304 .
- the psychovisual modeling mechanism 314 uses a perceptual distance metric to guide compression optimization.
- the psychovisual modeling mechanism 314 includes software rules for processing an input image 304 based on the perceptible qualities of the input image 304 .
- the software rules of the psychovisual modeling mechanism 314 focus on three properties of vision: first, that gamma correction should not be separately applied to every red-green-blue (RGB) channel; second, that high frequency changes in blue color data can be less precisely compressed; and third, that areas including larger amounts of visual noise within an image can be less precisely compressed.
- RGB red-green-blue
- the first property of vision is driven by the overlap of sensitivity spectra of the cones of the human eye. For example, because there is some relationship between the amount of yellow light seen and sensitivity to blue light, changes in blue color data in the vicinity of yellow color data can be compressed less precisely.
- luma-chrominance (YUV) color spaces are defined as linear transformations of gamma-compressed RGB and are therefore not powerful enough to model such phenomena.
- the second property of vision is driven by the color receptors of the retina of the human eye.
- the human eye has lower spatial resolution in blue than in red and green, and the retina has almost no blue receptors in the high-resolution area.
- the third property of vision is defined based on a relationship between visibility and proximal visual activity. That is, the visibility of fine structures in an area of an image may depend on the amount of visual activity in the vicinity of that area.
- the software rules of the psychovisual modeling mechanism 314 are described with reference to three properties of vision, other numbers of properties of vision, other rules related to image compression or image perceptibility, or a combination thereof may be used to define or otherwise configure the software rules of the psychovisual modeling mechanism 314 .
- the degradation mechanism 312 is used in conjunction with the psychovisual modeling mechanism 314 to reduce the total data size of the input image 304 without impacting the perceived visual quality of the input image 304 , subject to the error level definition.
- the degradation mechanism 312 can be processed in connection with a threshold defined using the psychovisual modeling mechanism 314 .
- the threshold can represent a maximum acceptable perceptual distance for color data of the input image 304 and a compressed image produced using the degradation mechanism 312 .
- the threshold can represent a range of acceptable perceptual distances for such color data.
- the particular types of data reduction may be non-linear.
- high frequency blue color data can be entirely removed since it is not perceivable by receptors of the fovea.
- the red and green receptors of the fovea may perceive blue color data when red and green color data is not present.
- a quality control metric may reflect that high frequency blue color data can be reduced or removed when values of red and green color data are high (e.g., when they meet a threshold value), but not when the value of red color data and/or the value of green color data is/are lower (e.g., when they do not meet the threshold value).
- the compressed image 306 may be stored at a server (e.g., in a database or like data store) for later retrieval and decompression.
- the compressed image 306 may be an image hosted on a website or an image provided for display on a webpage.
- the image decompressor 302 retrieves the compressed image 306 from storage or memory and decompresses it to produce the output image 308 .
- the output image 308 may look substantially the same as, but not necessarily be identical to, the input image 304 .
- the image decompressor 302 includes an inverse degradation mechanism 316 , a psychovisual modeling mechanism 318 , and a dequantization and inverse transformation mechanism 320 .
- the inverse degradation mechanism 316 uses information associated with the compressed image 306 to determine a sequence of quality control metrics that were used to produce the compressed image 306 .
- metadata included in or otherwise associated with the compressed image 306 can reflect the quality control metrics used to iteratively degrade image content from the input image 304 during compression, as well as the sequence thereof.
- the psychovisual modeling mechanism 318 is used to determine that image quality added back into the compressed image 306 using the inverse degradation mechanism 316 is consistent with rules for visual perception of an image.
- the psychovisual modeling mechanism 318 may use the same rules as the psychovisual modeling mechanism 314 ; however, the psychovisual modeling mechanism 318 is used to determine that image content added back into the compressed image 306 is perceptible by a human viewer.
- the dequantization and inverse transformation mechanism 320 dequantizes the coefficients of the compressed image 306 according to a quantization factor used to produce the compressed image 306 (e.g., the error level definition or a modified error level). The dequantization and inverse transformation mechanism 320 then inverse transforms the dequantized coefficients, such as by transforming the dequantized coefficients from the frequency domain to the spatial domain. The dequantization and inverse transformation mechanism 320 processes the compressed image 306 before the inverse degradation mechanism 316 and the psychovisual modeling mechanism 318 are used.
- a quantization factor used to produce the compressed image 306 e.g., the error level definition or a modified error level.
- the dequantization and inverse transformation mechanism 320 then inverse transforms the dequantized coefficients, such as by transforming the dequantized coefficients from the frequency domain to the spatial domain.
- the dequantization and inverse transformation mechanism 320 processes the compressed image 306 before the inverse degradation mechanism 316 and the psychovisual modeling mechanism 318 are used.
- Implementations of the image compressor 300 and/or the image decompressor 302 may differ from what is shown and described with respect to FIG. 3 .
- the image decompressor 302 may omit the psychovisual modeling mechanism 318 .
- the inverse degradation mechanism 316 of the image decompressor 302 can use quality control metrics to identify the particular quality control metrics and sequence of operations applied at the image compressor 300 to degrade the input image 304 for compression into the compressed image 306 .
- the psychovisual modeling mechanism 318 can be replaced with a sequence identification mechanism for identifying the sequence of operations and quality control metrics applied at the image compressor 300 .
- one or both of the image compressor 300 or the image decompressor 302 may include additional software mechanisms for respectively compressing or decompressing an image.
- the image compressor 300 may include an image prediction mechanism, an entropy coding mechanism, an image reconstruction mechanism, or the like, or a combination thereof.
- additional mechanisms can be combined into the transformation and quantization mechanism 310 rather than being implemented as a separate software mechanism.
- the image decompressor 302 may include an image prediction mechanism, an entropy coding mechanism, an image reconstruction mechanism, or the like, or a combination thereof, either combined into the dequantization and inverse transformation mechanism 320 or as separate software mechanisms.
- particular quality control metrics may not be selected for processing an area of an image.
- a quality control metric that, when processed against an image, results in quality loss by transmitting fewer pixels during compression and then performing an upsampling during decompression is applied at the image-level rather than at the block-level.
- a quality control metric used for noise preservation may result in strange artifacts when processed at the block-level, but perform as desired when processed at the image-level.
- the image compressor 300 can receive input representing a maximum total file size of the compressed image 306 to produce.
- the maximum total file size can be used to make decisions in regard to the error level to use to compress particular areas of the input image 304 . For example, if there are few bits remaining before the maximum total file size is reached, an area of the input image 304 that has not yet been processed may be compressed using a modified error level that is higher than the error level definition defined for the input image 304 . In doing so, that area can be compressed using fewer bits, even though the quality will be reduced slightly. This bit cost reduction will allow the image compressor 300 to remain within the maximum total file size.
- the image compressor 300 may use the transformation and quantization mechanism 310 , the degradation mechanism 312 , and the psychovisual modeling mechanism 314 to generate and evaluate candidate compressed images using different sequences of quality control metrics applied to different areas of the input image 304 .
- the image compressor 300 can thereafter process the generated candidate compressed images and select one of them. For example, the generated candidate compressed image having a lowest total data size can be selected.
- the sequence of quality control metrics applied to the areas of the input image 304 to produce the selected candidate compressed image are then used to compress the input image 304 , such as to produce the compressed image 306 .
- FIG. 4 is a flowchart diagram of an example of a technique 400 for compressing an image according to a selected error level and a sequence of quality control metrics.
- FIG. 5 is a flowchart diagram of an example of a technique 500 for iteratively processing an image using a sequence of quality control metrics.
- One or more of the technique 400 or the technique 500 can be implemented, for example, as a software program that may be executed by computing devices such as the transmitting station 102 or the receiving station 104 .
- the software program can include machine-readable instructions that may be stored in a memory such as the memory 204 or the secondary storage 214 , and that, when executed by a processor, such as the processor 202 , may cause the computing device to perform one or more of the technique 400 or the technique 500 .
- One or more of the technique 400 or the technique 500 can be implemented using specialized hardware or firmware. As explained above, some computing devices may have multiple memories or processors, and the operations described in one or more of the technique 400 or the technique 500 can be distributed using multiple processors, memories, or both.
- the technique 400 and the technique 500 are each depicted and described as a series of steps or operations. However, the steps or operations in accordance with this disclosure can occur in various orders and/or concurrently. Additionally, other steps or operations not presented and described herein may be used. Furthermore, not all illustrated steps or operations may be required to implement a technique in accordance with the disclosed subject matter.
- an error level definition is received.
- the error level definition represents a maximum quantization error for compressing an image.
- Receiving the error level definition includes identifying an error level defined for use by the image compressor to use to compress the image.
- the error level definition can reflect a default configuration of the image compressor.
- the error level definition may reflect a static value used against an image to compress.
- the error level definition can reflect a value identified based on characteristics of the image to compress (e.g., resolution, color complexity, etc.).
- the error level definition can reflect a value configured based on input received from a user. For example, a user of a computing device from which an image is uploaded to a server for compression can define the error level to use to compress the image.
- transform coefficients to quantize are identified within an area of the image.
- an area of an image refers to an M ⁇ N-sized region (e.g., one or more blocks) of the image, where M and N may be the same or a different value.
- the transform coefficients are coefficients processed using a block-based transform (e.g., DCT).
- a sequence of quality control metrics for controlling a quantization of the transform coefficients is selected.
- the sequence of quality control metrics includes one or more quality control metrics usable to iteratively process the identified transform coefficients, such as to degrade the image content therefrom by quantizing the transform coefficients according to different error levels.
- the quality control metrics included in the sequence of quality control metrics are selected based on the error level definition.
- each of the quality control metrics may be associated with an error level value or value range indicating the error levels for which that quality control metric is useful for degrading image content.
- a lookup table can be used to store records corresponding to the quality control metrics available for selection. Selecting a quality control metric may thus include querying the lookup table based on the error level definition. In response to the query, quality control metrics having error level values equal to or within a range of the error level definition are selected. Similarly, the querying can be performed to determine that a subset of the quality control metrics is associated with error levels exceeding the error level definition. Some or all of the quality control metrics of that subset may thus be excluded from the sequence of quality control metrics.
- the quality control metrics can be selected based on characteristics of the image or of the identified transform coefficients. For example, each of the quality control metrics may be associated with a particular color scale, frequency value range, resolution, or other image characteristic at which that quality control metric is useful for degrading image content. Records corresponding to the quality control metrics within a lookup table can indicate which of the quality control metrics are usable or effective for various image characteristics.
- candidate quality scores are determined for each of the multiple quality control metrics.
- a candidate quality score reflects a loss in quality that would result from quantizing the transform coefficients within an area of the image according to a given quality control metric.
- the candidate quality score for a given quality control metric is determined by quantizing the transform coefficients according to a quantization matrix associated with the quality control metric until the resulting quantization error meets the error level definition. The quantized transform coefficients are then reconstructed to produce a decompressed image.
- the quality of the decompressed image is then compared to the quality of the original image using a model of the quality control metric.
- the results of the comparison are indicated as the quality score for the quality control metric.
- the quality score can be calculated based on pixel-by-pixel differences between the decompressed image and the original image.
- the quality score can be calculated based on the number or amount of artifacts resulting from the quantization.
- the quality control metrics to include in the sequence may be ordered according to the image content that will be affected by their use.
- An image compressor processing the image can be trained to recognize the types of image content that are reduced, removed, or otherwise modified by certain quality control metrics. The order may be based on aspects of the image content that cannot be perceived by human vision (e.g., high frequency blue color data).
- Such quality control metrics may be arranged earlier in the sequence of quality control metrics.
- a psychovisual model (e.g., of the psychovisual model mechanism 314 shown in FIG. 3 ) can be used to determine the order for the sequence.
- the psychovisual model can, for example, indicate to arrange quality control metrics that result in little to no perceptible image content loss earlier in the sequence.
- the psychovisual model can indicate that a first quality control metric for reducing high frequency texture data may be arranged in the sequence of operations before a second quality control metric for reducing low frequency texture data. This may, for example, be because reductions in low frequency texture data are more noticeable to a human observer.
- bit costs for compressing the area of the image are determined according to the error level definition and according to a modified error level.
- a first bit cost can be determined according to the error level definition and the sequence of quality control metrics
- a second bit cost can be determined according to the modified error level and the sequence of quality control metrics.
- the modified error level represents a value of a quantization error that is different from the value of the error level definition.
- the modified error level represents a quantization error that, if used instead of the error level definition, would result in a potentially different image quality and bit cost for compressing the image.
- the modified error level can be a few decimal points above or below the error level definition (e.g., where the error level definition is 1.3, the modified error level can be 1.4). In another example, the modified error level can be a whole number or more in difference from the error level definition. Determining the bit costs includes determining a first bit cost for compressing a first copy of the identified transform coefficients according to the error level definition and the selected sequence of quality control metrics. Determining the bit costs also includes determining a second bit cost for compressing a second copy the identified transform coefficients according to the modified error level and the selected sequence of quality control metrics. The first and second copies of the transform coefficients may represent duplicated data of the identified transform coefficients such that determining the bit costs does not change the identified transform coefficients themselves. Alternatively, the values of the identified transform coefficients may be changed and reset as part of determining the bit costs.
- the technique 400 proceeds to 414 , where the identified transform coefficients are iteratively processed according to error level definition and the selected sequence of quality control metrics to produce second quantized transform coefficients. Implementations and examples for iteratively processing an area of an image using quality control metrics are described below with respect to FIG. 5 .
- a compressed image is produced based on the first quantized transform coefficients or the second quantized transform coefficients.
- Producing the compressed image can include entropy processing or otherwise finalizing compression of the first quantized transform coefficients or the second quantized transform coefficients (as applicable) and then outputting them to a digital file.
- producing the compressed image can include storing the first quantized transform coefficients or the second quantized transform coefficients (as applicable) within a buffer for later processing.
- the technique 400 can include identifying a maximum data size value and constraining the compression of the input image based thereon.
- the maximum data size value can represent a maximum file size of the compressed image (e.g., 150 kilobytes).
- the maximum data size value can be received as input from a user causing a performance of the technique 400 , set by default (e.g., as a default configuration of software used to perform the technique 400 ), or determined based on characteristics of the input image (e.g., the size or contents thereof).
- the maximum data size value can be used to control the value of the error level definition, the modified error level, or both.
- selecting the sequence of quality control metrics can include comparing expected bit reductions from using various combinations and sequences of quality control metrics to degrade the image content within the identified area of the image. For example, there may be N candidates evaluated, where each candidate includes M quality control metrics in a given order of performance.
- the M quality control metrics in a given candidate sequence may be ordered based on the particular type of image content it degrades.
- a quality control metric for removing high frequency blue color data from the area of the image may be arranged earlier in a candidate sequence than a quality control metric for augmenting quantization using noise synthesis.
- the candidate sequence that would result in a greatest expected bit reduction can be selected as the sequence to use to iteratively process the transform coefficients identified within the area of the image.
- the modified error level may reflect a value selected from a range of possible modified error levels.
- the modified error level may reflect a value that is 0.1 greater or less than a value of the error level definition.
- Multiple candidate modified error levels can be evaluated, such as by determining bit costs for each of those candidates. The candidate associated with the lowest one of those bit costs can then be selected as the modified error level.
- the modified error level may be the same value or range of values for processing each area of the image. In some implementations, each area of the image may be processed using different values or ranges of values as the modified error level.
- the technique 400 can be performed for multiple areas of the image to compress. For example, transform coefficients identified within a second area of the image can be compressed using the same sequence of quality control metrics as was selected for the transform coefficients of the first area. In another example, transform coefficients identified within a second area of the image can be compressed using a sequence of quality control metrics different from the one selected for the transform coefficients of the first area.
- the technique 400 may omit the operations for determining whether the use of the error level definition or the modified error level results in a lower bit cost for compressing the identified transform coefficients.
- the technique 400 may include operations for compressing an image by selecting a sequence of quality control metrics for compressing transform coefficients and then using the selected sequence to iteratively quantize the transform coefficients.
- the technique 400 may omit the operations for selecting the sequence of quality control metrics.
- the technique 400 may include operations for using a provided (e.g., by default or according to a configuration) sequence of quality control metrics to determine whether the use of an error level definition or a modified error level results in a lower bit cost for compressing the identified transform coefficients.
- a flowchart diagram of an example of the technique 500 for iteratively processing an image using a sequence of quality control metrics is shown.
- a first quality control metric is selected.
- the first quality control metric is the first in a sequence of quality control metrics selected for iteratively processing an identified area of an image to compress.
- transform coefficients identified within the area of the image to compress are quantized using the first quality control metric.
- Quantizing those transform coefficients using the first quality control metric includes degrading the image content represented by those transform coefficients based on the model of the first quality control metric. For example, where the first quality control metric is a quality control metric for removing high frequency blue color data from the area of the image, the first quality control metric is processed against the transform coefficients to remove high frequency blue color data therefrom. In another example, where the first quality control metric is a cartoon image quality control metric, the transform coefficients are processed to remove fine detail but retain edges.
- a degradation failure is detected with respect to the selected quality control metric.
- a new quality control metric replaces a current quality control metric when the current quality control metric begins to fail.
- a current quality control metric begins to fail when a quantization error resulting from processing transform coefficients using that current quality control metric exceeds a quality score calibration associated with that current quality control metric. For example, when the quantization error resulting from the use of the current quality control metric is two or more times larger than a quality score for which that quality control metric is calibrated, the current quality control metric is deemed to have failed. In such a case, a next quality control metric according to the sequence of operations is selected to replace the current quality control metric.
- the processed area of the image is output.
- the resulting quantized transform coefficients are output to another part of an image compressor that performs the technique 500 , such as to prepare the processed area for compression.
- the technique 500 can be performed to determine a sequence of quality control metrics to use to iteratively process the area of the image. For example, multiple candidate sequences can be individually evaluated using the technique 500 by processing each of the quality control metrics thereof against a given area of an image to compress. As a result of evaluating such a candidate sequence, a total bit reduction can be determined for that candidate sequence as the output of the technique 500 .
- FIG. 6 is an illustration of areas of an image 600 iteratively processed using a sequence of quality control metrics.
- the image 600 may, for example, be the input image 304 shown in FIG. 3 .
- the image 600 may be iteratively processed using one or more quality control metrics.
- a first quality control metric is processed against the image 600 to produce an image 600 A.
- the image 600 A has the same textures as the image 600 , but with the high frequency blue-yellow axis removed (e.g., with a sigma of five pixels). This may be a typical first information removal when processing an image, as the fovea does not have blue receptors.
- a second quality control metric is processed against the image 600 A to produce an image 600 B.
- the image 600 B represents the image 600 A after red-green high frequency information is removed (e.g., with a sigma of five pixels).
- a third quality control metric is processed against the image 600 B to produce an image 600 C.
- the image 600 C represents the image 600 B after the textures are reconstructed using phase and frequency quantization (e.g., to make the textures more approximate).
- a fourth quality control metric is processed against the image 600 C to produce an image 600 D.
- the image 600 D represents the image 600 C after more quantization is applied, which more quantization may be augmented with noise synthesis.
- a fifth quality control metric is processed against the image 600 D to produce an image 600 E.
- the image 600 E represents the image 600 D after further high frequency information is removed and after the image is processed based purely on noise synthesis.
- the images 600 F and 600 G represent further sequentially-produced images resulting from a total removal of high frequency information.
- the image 600 G thus represents a reconstructed image produced responsive to processing an original image (e.g., the image 600 ) using multiple quality control metrics.
- the quantized transform coefficients of the image 600 G may be compressed and output for transmission.
- different error levels can be used to quantize the different areas of the image 600 (or subsequently-produced images 600 A-G).
- an error level definition e.g., 1.3
- an image compressor processing the image 600 can instead use a modified error level (e.g., 1.4) upon determining that the modified error level will result in a greater bit savings (e.g., a lower bit cost) for compressing the subject area.
- the white brick texture in the leftmost area of the image 600 may be compressed at the error level definition, while the area with the leafy green texture towards the right side of the image 600 may be compressed at a modified error level.
- compression and decompression illustrate some examples of compression and decompression techniques and hardware components configured to perform all or a portion of those examples of compression and/or decompression techniques.
- compression and decompression could mean encoding, decoding, transforming, or another processing or changing of data.
- example is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “example” is not necessarily to be construed as being preferred or advantageous over other aspects or designs. Rather, use of the word “example” is intended to present concepts in a concrete fashion.
- the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless specified otherwise or clearly indicated otherwise by the context, the statement “X includes A or B” is intended to mean any of the natural inclusive permutations thereof. That is, if X includes A; X includes B; or X includes both A and B, then “X includes A or B” is satisfied under any of the foregoing instances.
- All or a portion of the implementations of this disclosure can take the form of a computer program product accessible from, for example, a computer-usable or computer-readable medium.
- a computer-usable or computer-readable medium can be any device that can, for example, tangibly contain, store, communicate, or transport the program for use by or in connection with any processor.
- the medium can be, for example, an electronic, magnetic, optical, electromagnetic, or semiconductor device. Other suitable mediums are also available.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
- This application is a divisional of U.S. patent application Ser. No. 16/970,499, filed Aug. 17, 2020, now issued as U.S. Pat. No. 11,463,733, which is a national stage entry of International Application Ser. No. PCT/2019/018352, filed Feb. 15, 2019, which claims the benefit of U.S. Provisional Application No. 62/631,725, filed Feb. 17, 2018, the disclosures of which are herein incorporated by reference in their entirety.
- Image content represents a significant amount of online content. A web page may include multiple images, and a large portion of the time and resources spent rendering the web page are dedicated to rendering those images for display. The amount of time and resources required to receive and render an image for display depends in part on the manner in which the image is compressed. As such, an image, and therefore a web page that includes the image, can be rendered faster by reducing the total data size of the image using compression and decompression techniques.
- A method for compressing an image according to an implementation of this disclosure includes receiving an error level definition representing a maximum quantization error for compressing the image and identifying transform coefficients to quantize within an area of the image. A sequence of quality control metrics for controlling a quantization of the transform coefficients is selected based on the error level definition. A first candidate bit cost is determined by quantizing a first copy of the transform coefficients according to the error level definition and the sequence of quality control metrics. A second candidate bit cost is determined by quantizing a second copy of the transform coefficients according to a modified error level and the sequence of quality control metrics. A determination is made as to whether the second candidate bit cost is lower than the first candidate bit cost. Responsive to determining that the second candidate bit cost is lower than the first candidate bit cost, the transform coefficients are iteratively processed according to the modified error level and the sequence of quality control metrics to produce quantized transform coefficients. A compressed image is produced based on the quantized transform coefficients.
- In some implementations of the method, iteratively processing the transform coefficients according to the modified error level and the sequence of quality control metrics to produce the quantized transform coefficients includes quantizing the transform coefficients using a first quality control metric of the sequence of quality control metric. Quantizing the transform coefficients using the first quality control metric results in a quantization error. A determination is made that the quantization error exceeds a quality score calibration associated with the first quality control metric. Responsive to determining that the quantization error exceeds the quality score calibration, the transform coefficients are further quantizing using a second quality control metric of the sequence of quality control metrics.
- In some implementations of the method, the area of the image is a first area and the sequence of quality control metrics is a first sequence of quality control metrics, and the method further comprises iteratively processing transform coefficients of a second area of the image using a second sequence of quality control metrics.
- In some implementations of the method, the modified error level is a first modified error level and iteratively processing the transform coefficients of the second area of the image using the second sequence of quality control metrics includes determining a candidate bit cost by quantizing the transform coefficients of the second area of the image according to a second modified error level and the second sequence of quality control metrics.
- In some implementations of the method, selecting the sequence of quality control metrics for controlling the quantization of the transform coefficients includes querying a lookup table based on the error level definition.
- In some implementations of the method, the lookup table includes records associated with multiple quality control metrics and selecting the sequence of quality control metrics for controlling the quantization of the transform coefficients includes determining that a subset of the multiple quality control metrics is associated with error levels exceeding the error level definition, and excluding one or more quality control metrics of the subset of the multiple quality control metrics from the sequence of quality control metrics.
- In some implementations of the method, responsive to determining that the second bit cost is not lower than the first bit cost, the transform coefficients are iteratively processed according to the error level definition and the sequence of quality control metrics to produce the quantized transform coefficients.
- In some implementations of the method, a quantization error represented by the modified error level is larger than the maximum quantization error.
- An apparatus for compressing an image according to an implementation of this disclosure includes a processor and a memory. The processor is configured to execute instructions stored in the memory to receive an error level definition representing a maximum quantization error for compressing the image, select a sequence of quality control metrics for controlling a quantization of transform coefficients of the image based on the error level definition, compress the image according to the error level definition and the sequence of quality control metrics, and output the compressed image for storage or display. The instructions to compress the image according to the error level definition and the sequence of quality control metrics include instructions to quantize the transform coefficients using a first quality control metric of the sequence of quality control metrics. A determination is made that a quantization error resulting from quantizing the transform coefficients using the first quality control metric exceeds a quality score calibration associated with the first quality control metric. Responsive to that determination that the quantization error exceeds the quality score calibration, the transform coefficients are further quantized using a second quality control metric of the sequence of quality control metrics to produce quantized transform coefficients. The compressed image is produced based on the quantized transform coefficients.
- In some implementations of the apparatus, the instructions include instructions to determine a first candidate bit cost by quantizing a first copy of the transform coefficients according to the error level definition and the sequence of quality control metrics, and determine a second candidate bit cost by quantizing a second copy of the transform coefficients according to a modified error level and the sequence of quality control metrics. A determination is then made, based on the first candidate bit and the second candidate bit cost, to compress the image according to one of the error level definition or the modified error level.
- In some implementations of the apparatus, the instructions to determine to compress the image according to one of the error level definition or the modified error level include instructions to determine whether the second candidate bit cost is lower than the first candidate bit cost, and the instructions include instructions to: responsive to a determination that the second candidate bit cost is lower than the first candidate bit cost, compress the image according to the modified error level and the sequence of quality control metrics; and, responsive to a determination that the second candidate bit cost is not lower than the first candidate bit cost, compress the image according to the error level definition and the sequence of quality control metrics.
- In some implementations of the apparatus, the quantized transform coefficients are first quantized transform coefficients and the quantization error is a first quantization error, the modified error level corresponds to an area of the image, and the instructions to compress the image according to the modified error level and the sequence of quality control metrics include instructions to quantize a subset of the transform coefficients using the first quality control metric of the sequence of quality control metrics. The subset of the transform coefficients is located within an area of the image. A determination is made that a second quantization error resulting from quantizing the subset of the transform coefficients using the first quality control metric exceeds the quality score calibration associated with the first quality control metric. Responsive to the determination that the second quantization error exceeds the quality score calibration, the transform coefficients are further quantized using the second quality control metric of the sequence of quality control metrics to produce second quantized transform coefficients. A compressed image is produced based on the second quantized transform coefficients.
- In some implementations of the apparatus, a quantization error represented by the modified error level is larger than the maximum quantization error.
- In some implementations of the apparatus, the modified error level is a first modified error level, the second copy of the transform coefficients corresponds to a first subset of the transform coefficients located within a first area of the image, and the instructions include instructions to determine a third candidate bit cost by quantizing a second subset of the transform coefficients located within a second area of the image according to a second modified error level and the sequence of quality control metrics. The instructions to compress the image according to the error level definition and the sequence of quality control metrics include instructions to compress the first subset of the transform coefficients according to the first modified error level, and compress the second subset of the transform coefficients according to the second modified error level.
- In some implementations of the apparatus, the instructions to select the sequence of quality control metrics for controlling the quantization of the transform coefficients of the image include instructions to determine that a subset of quality control metrics available for compressing the image is associated with error levels exceeding the error level definition, and exclude one or more quality control metrics of the subset of the quality control metrics from the sequence of quality control metrics.
- A non-transitory computer-readable storage medium according to an implementation of this disclosure includes processor-executable routines that, when executed by a processor, facilitate a performance of operations for compressing an image. The operations include selecting a sequence of quality control metrics for controlling a quantization of transform coefficients of the image. The operations further include iteratively processing a first subset of the transform coefficients located within a first area of the image according to an error level definition and the sequence of quality control metrics to produce first quantized transform coefficients. The operations further include iteratively processing a second subset of the transform coefficients located within a second area of the image according to a modified error level and the sequence of quality control metrics to produce second quantized transform coefficients. The operations further include producing a compressed image based on the first quantized transform coefficients and the second quantized transform coefficients.
- In some implementations of the non-transitory computer-readable storage medium, the sequence of quality control metrics defines an order for applying one or more quality control metrics to iteratively quantize some or all of the transform coefficients of the image.
- In some implementations of the non-transitory computer-readable storage medium, the error level definition represents a maximum error level for compressing the image and the operations for selecting the sequence of quality control metrics for controlling the quantization of the transform coefficients of the image comprise determining that a subset of quality control metrics available for compressing the image is associated with error levels exceeding the error level definition, and excluding one or more quality control metrics of the subset of the quality control metrics from the sequence of quality control metrics.
- In some implementations of the non-transitory computer-readable storage medium, the operations for iteratively processing the first subset of the transform coefficients located within the first area of the image according to the error level definition and the sequence of quality control metrics to produce the first quantized transform coefficients comprise quantizing the first subset of the transform coefficients using a first quality control metric of the sequence of quality control metrics. Quantizing the first subset of the transform coefficients using the first quality control metric results in a quantization error. A determination is made that the quantization error exceeds a quality score calibration associated with the first quality control metric. Responsive to determining that the quantization error exceeds the quality score calibration, the first subset of the transform coefficients is further quantized using a second quality control metric of the sequence of quality control metrics.
- In some implementations of the non-transitory computer-readable storage medium, the operations for iteratively processing the first subset of the transform coefficients located within the first area of the image according to the error level definition and the sequence of quality control metrics to produce the first quantized transform coefficients comprise iteratively processing the second subset of the transform coefficients located within the second area of the image according to the error level definition and the sequence of quality control metrics to produce third quantized transform coefficients. A determination is made as to whether a bit cost for the second quantized transform coefficients is lower than a bit cost for the third quantized coefficients. Responsive to determining that the bit cost for the second quantized transform coefficients is not lower than the bit cost for the third quantized coefficients, the third quantized coefficients are used to produce the compressed image instead of the second quantized coefficients.
- It will be appreciated that features described above in relation to one implementation may be combined with features of another implementation.
- The disclosure is best understood from the following detailed description when read in conjunction with the accompanying drawings. It is emphasized that, according to common practice, the various features of the drawings are not to scale. On the contrary, the dimensions of the various features are arbitrarily expanded or reduced for clarity.
-
FIG. 1 is a diagram of an image compression and decompression system. -
FIG. 2 is an example of an internal configuration of a computing device that can be used in an image compression and decompression system. -
FIG. 3 is a block diagram of an example of an image compressor and an image decompressor. -
FIG. 4 is a flowchart diagram of an example of a technique for compressing an image according to a selected error level and a sequence of quality control metrics. -
FIG. 5 is a flowchart diagram of an example of a technique for iteratively processing an image using a sequence of quality control metrics. -
FIG. 6 is an illustration of areas of an image iteratively processed using a sequence of quality control metrics. - Lossy image compression involves reducing the amount of data within an image to compress, such as using quantization. In exchange for a decreased bit cost of the resulting compressed image, the image suffers certain quality loss. The extent of the quality loss depends largely upon the manner by which the image data was quantized during compression. A certain quantization strategy may work well at a certain scope but not at others. For example, the JPEG compression format allows for relatively efficient coding of high quality images, but can produce undesirable artifacts when its quantization strategy is used on lower quality images.
- A typical image compression format derives a quantization strategy for controlling image quality loss for an entire image. The quantization strategy is derived using a metric for evaluating the quality loss, examples of which include peak signal-to-noise ratio (PSNR), human visual system (HVS), a combination of PSNR and HVS (PSNRHVS), and a masked version of that combination (PSNRHVS-M). These metrics are designed to linearly measure image quality for a given point along a quality loss curve. As such, the image quality loss evaluated using one of these metrics is extrapolated across the entire image. Thus, even where quality loss is evaluated using multiple models, the same models are applied against the entire image. However, because different areas of an image include different image content, the use of a linear image quality measurement is suboptimal.
- Furthermore, the quantization strategy derived by a typical image compression format is not limited to a particular quantization error. The quantization error resulting from lossy image compression corresponds to the amount of artifacts resulting from the compression. As such, the greater the quantization error, the greater the amount of artifacts, and, therefore, the greater the quality loss. However, it may be desirable to limit lossy image compression to a particular quantization error value, such as to control the quality of the image that will later be decompressed and output for display.
- Implementations of this disclosure address problems such as these by controlling the loss of image quality during compression using a sequence of models, or quality control metrics. The sequence of quality control metrics is selected for quantizing transform coefficients within a local area of the image according to an error level definition representing a maximum quantization error to result from compressing the transform coefficients. The transform coefficients are iteratively processed according to the error level definition and the sequence of quality control metrics to produce quantized transform coefficients.
- In some cases, candidate bit costs can be determined by quantizing the transform coefficients according to the error level definition and the sequence of quality control metrics or according to a modified error level and the sequence of quality control metrics. Where the candidate bit cost resulting from using the modified error level is lower than the candidate bit cost resulting from using the error level definition, the transform coefficients are quantized according to the modified error level and the sequence of quality control metrics. Otherwise, the transform coefficients are quantized according to the error level definition and the sequence of quality control metrics.
- The implementations of this disclosure describe a holistic formalism that allows for image quality degradation along a least disruptive path. Sequences of quality control metrics are applied to transform coefficients within the image to measure the image loss. Based on that measured image loss, the compression of the image can follow a non-linear curve where bit cost and quality loss are both minimized.
- Further details of techniques for image compression and decompression using controlled quality loss are described herein with initial reference to a system in which such techniques can be implemented.
FIG. 1 is a diagram of an image compression anddecompression system 100. The image compression anddecompression system 100 includes a transmittingstation 102, a receivingstation 104, and anetwork 106. - The transmitting
station 102 is a computing device that compresses and transmits an image. Alternatively, the transmittingstation 102 may include two or more distributed devices for compressing and transmitting an image. The receivingstation 104 is a computing device that receives and decompresses a compressed image. Alternatively, the receivingstation 104 may include two or more distributed devices for receiving and decompressing a compressed image. An example of a computing device used to implement one or both of the transmittingstation 102 or the receivingstation 104 is described below with respect toFIG. 2 . - The
network 106 connects the transmittingstation 102 and the receivingstation 104 for the compression, transmission, receipt, and decompression of an image. Thenetwork 106 can be, for example, the Internet. Thenetwork 106 can also be a local area network (LAN), a wide area network (WAN), a virtual private network (VPN), a cellular telephone network, or another means of transferring the image from the transmittingstation 102 to the receivingstation 104. - Implementations of the compression and
decompression system 100 may differ from what is shown and described with respect toFIG. 1 . In some implementations, the compression anddecompression system 100 can omit thenetwork 106. In some implementations, an image can be compressed and then stored for transmission at a later time to the receivingstation 104 or another device having memory. In some implementations, the receivingstation 104 can receive (e.g., via thenetwork 106, a computer bus, and/or some communication pathway) the compressed image and store the compressed image for later decompression. - In some implementations, the functionality of the transmitting
station 102 and of the receivingstation 104 can change based on the particular operations performed. For example, during operations for compressing an image, the transmittingstation 102 can be a computing device used to upload an image for compression to a server, and the receivingstation 104 can be the server that receives the image from the transmittingstation 102 and compresses the image for later use (e.g., in rendering a webpage). In another example, during operations for decompressing a compressed image, the transmittingstation 102 can be a server that decompresses the compressed image, and the receivingstation 104 can be a computing device that receives the decompressed image from the transmittingstation 102 and renders the decompressed image (e.g., as part of a webpage). -
FIG. 2 is an example of an internal configuration of acomputing device 200 that can be used in an image compression and decompression system, for example, the image compression anddecompression system 100 shown inFIG. 1 . Thecomputing device 200 may, for example, implement one or both of the transmittingstation 102 or the receivingstation 104. Thecomputing device 200 can be in the form of a computing system including multiple computing devices, or in the form of one computing device, for example, a mobile phone, a tablet computer, a laptop computer, a notebook computer, a desktop computer, or the like. - A
processor 202 in thecomputing device 200 can be a conventional central processing unit. Alternatively, theprocessor 202 can be another type of device, or multiple devices, now existing or hereafter developed, capable of manipulating or processing information. For example, although the disclosed implementations can be practiced with one processor as shown (e.g., the processor 202), advantages in speed and efficiency can be achieved by using more than one processor. - A
memory 204 in thecomputing device 200 can be a read-only memory (ROM) device or a random-access memory (RAM) device in an implementation. However, other suitable types of storage devices can be used as thememory 204. Thememory 204 can include code anddata 206 that is accessed by theprocessor 202 using abus 212. Thememory 204 can further include anoperating system 208 andapplication programs 210, theapplication programs 210 including at least one program that permits theprocessor 202 to perform the techniques described herein. For example, theapplication programs 210 can includeapplications 1 through N, which further include image compression and/or decompression software that performs some or all of the techniques described herein. Thecomputing device 200 can also include a secondary storage 214, which can, for example, be a memory card used with a mobile computing device. For example, an image can be stored in whole or in part in the secondary storage 214 and loaded into thememory 204 as needed for processing. - The
computing device 200 can also include one or more output devices, such as adisplay 218. Thedisplay 218 may be, in one example, a touch-sensitive display that combines a display with a touch-sensitive element that is operable to sense touch inputs. Thedisplay 218 can be coupled to theprocessor 202 via thebus 212. Other output devices that permit a user to program or otherwise use thecomputing device 200 can be provided in addition to or as an alternative to thedisplay 218. When the output device is or includes a display, the display can be implemented in various ways, including as a liquid crystal display (LCD), a cathode-ray tube (CRT) display, or a light emitting diode (LED) display, such as an organic LED (OLED) display. - The
computing device 200 can also include or be in communication with an image-sensingdevice 220, for example, a camera, or another image-sensing device, now existing or hereafter developed, which can sense an image such as the image of a user operating thecomputing device 200. The image-sensingdevice 220 can be positioned such that it is directed toward the user operating thecomputing device 200. For example, the position and optical axis of the image-sensingdevice 220 can be configured such that the field of vision includes an area that is directly adjacent to thedisplay 218 and from which thedisplay 218 is visible. - The
computing device 200 can also include or be in communication with a sound-sensing device 222, for example, a microphone or another sound-sensing device, now existing or hereafter developed, which can sense sounds near thecomputing device 200. The sound-sensing device 222 can be positioned such that it is directed toward the user operating thecomputing device 200 and can be configured to receive sounds, for example, speech or other utterances, made by the user while the user operates thecomputing device 200. - Implementations of the
computing device 200 may differ from what is shown and described with respect toFIG. 2 . In some implementations, the operations of theprocessor 202 can be distributed across multiple machines (wherein individual machines can have one or more processors) that can be coupled directly or across a local area or other network. In some implementations, thememory 204 can be distributed across multiple machines, such as a network-based memory or memory in multiple machines performing the operations of thecomputing device 200. In some implementations, thebus 212 of thecomputing device 200 can be composed of multiple buses. In some implementations, the secondary storage 214 can be directly coupled to the other components of thecomputing device 200 or can be accessed via a network and can comprise an integrated unit, such as a memory card, or multiple units, such as multiple memory cards. -
FIG. 3 is a block diagram of an example of animage compressor 300 and animage decompressor 302. Theimage compressor 300 and theimage decompressor 302 may, for example, respectively be implemented using the transmittingstation 102 and the receivingstation 104 shown inFIG. 1 . Theimage compressor 300 compresses aninput image 304 to produce acompressed image 306. Theimage decompressor 302 receives and decompresses thecompressed image 306 to produce anoutput image 308 that is perceptibly the same as or similar to theinput image 304. - The
image compressor 300 includes a transformation andquantization mechanism 310, adegradation mechanism 312, and apsychovisual modeling mechanism 314. The transformation andquantization mechanism 310 transforms blocks of theinput image 304 into the frequency domain and quantizes the resulting transform coefficients. For example, the transformation andquantization mechanism 310 can use a discrete cosine transform (DCT) to transform the blocks of theinput image 304 from the spatial domain to the frequency domain. Alternatively, the transformation andquantization mechanism 310 can use another Fourier-related transform or a discrete Fourier transform to transform the blocks of theinput image 304 from the spatial domain to the frequency domain. - As will be discussed below, the
psychovisual modeling mechanism 314 and thedegradation mechanism 312 are used to determine how to reduce the amount of data in theinput image 304 during compression. The transformation andquantization mechanism 310 quantizes the transform coefficients according to the determinations made using thepsychovisual modeling mechanism 314 and thedegradation mechanism 312. - The
degradation mechanism 312 makes decisions for quantizing areas of theinput image 304 using quality control metrics. In particular, thedegradation mechanism 312 makes different quantization decisions for different areas of theinput image 304. The use of these different quantization decisions allows for the compression of theinput image 304 to follow a non-linear quality loss curve (e.g., as opposed to a linear quality loss curve used when a single quantization decision is made for the entirety of the input image 304). That is, although the quality loss for a given area of the image may be expressed linearly, the overall quality loss for the image as a whole is expressed non-linearly. - An area of an image refers to an M×N-sized region of the image, where M and N may be the same or a different value. For example, an area of an image may be a single block (e.g., an 8×8 block) within the image. In another example, an area of an image may be multiple blocks within the image. In yet another example, different areas of an image to compress may be different sized blocks (e.g., some 8×8, some 4×4, some 16×16, etc.).
- A quality control metric refers to a model for evaluating the quality of an image after certain image content is reduced, removed, or otherwise modified. A quality control metric evaluates the quality of the image by determining a quality score for the quantization applied to the image. The quantized transform coefficients can be reconstructed to produce a decompressed image. The quality control metric uses a parameterized model to compare that decompressed image to the original image (e.g., the input image 304). The results of the comparison reflect the degree to which the quantization resulted in perceptible quality loss to the image. The quality score provides a valuation for the results of the comparison. Each of the quality control metrics may use the same or different parameters to model the quality loss between the decompressed image and the original image.
- The quality control metrics are applied in a particular sequence to optimize a reduction in the amount of data in the
input image 304 according to an error level defined for use with theimage compressor 300. Applying a quality control metric refers to measuring the quality loss by quantizing transform coefficients of the image in a certain way. There may be many quality control metrics available for processing theinput image 304. The sequence of quality control metrics defines an order for applying one or more quality control metrics to iteratively quantize some or all of the transform coefficients within the input image 304 (e.g., within theentire input image 304 or within an area of the input image 304). - Examples of the quality control metrics may include, without limitation, a pristine image quality control metric, a phase loss in high-information-density textures quality control metric, a structural similarity (SSIM) quality control metric, a cartoon image quality control metric, a color-loss quality control metric, a viewing distance loss quality control metric, a fewer pixels per bit quality control metric, a film grain and/or digital noise preservation quality control metric, a chromatic aberration quality control metric, and a texture cluster quality control metric.
- With the pristine quality control metric, a reproduction cannot be distinguished from an original even in an in-place flip test. Such a measurement consists of a phase-coherent representation of image textures, ridge and edge detection, visual masking, least mean squares (LMS) color modeling, and other modeling.
- Visual masking allows for different areas of an image to be stored at different accuracies (e.g., up to six times a quantization difference). This is because the darker areas of a visual mask require less precise reproduction of details. There may be one or more masking models used by the pristine quality control metric. For example, a first masking model can be used for low spatial frequency color modeling, and a second masking model can be used for high spatial frequency color modeling. The first masking model and the second masking model may be applied individually or in combination.
- With the phase loss in high-information-density textures quality control metric, the image is compressed as a cartoon (e.g., using the Gaussian mixture model) based on the image textures. Textures with dense information content are compressed in log Gabor space, in which frequencies are clustered and phase is randomized. For example, an image of a brick house may use large amounts of information to represent the exact location of each brick. In such a case, since the exact location of each brick is not essential information to a human viewer, the image can be compressed as a structure without a brick in every position. Bricks can then be modeled as textures within the compressed structure to create the appearance of a brick house without spending bits to specify the locations of the bricks. The same principle can be applied in other contexts, for example, using textures to represent sand on a beach.
- With the SSIM quality control metric, SSIM is used to preserve high-information-density textures through their approximate noise levels. The noise levels are reconstructed from a noise synthesis process to reproduce matching averages and variances. SSIM creates the same amount of noise and etched visuals in a reconstructed image as there was in the original image. However, the system may not always identify accurate noise representations. For example, if there is a thin line in the original image, using SSIM may result in a different object with a similar variance.
- With the cartoon image quality control metric, material information about the image disappears, but edges and average colors are preserved, such that the image looks median filtered. Fine details of textures (e.g., of tree leaves, stones, cloth, skin, hair) are lost and may instead have a plastic-like look as a result of this transform.
- With the color-loss quality control metric, color information is lost in a way that balances the kind of color and the spatial resolution of the feature represented in that color. The loss is similar to a YUV420 loss, but is performed in a proper color space to avoid visible artifacts. High-frequency blue-yellow axis colors may be removed first, followed by high-frequency green-red axis colors. Use of this quality control metric may result in a flat appearance.
- With the viewing distance loss quality control metric, the increasing loss needed for lower bit rates is considered as something that matches with a person moving farther away from the image. The resulting differences are barely noticeable and used for the coding. For example, a psychovisual modeling (e.g., of the
psychovisual modeling mechanism 314 shown inFIG. 3 ) used to compress an image may typically compare original and reconstructed images at a distance of 1,000 pixels. However, further quality loss may be observed when the distance is changed (e.g., from 1,000 pixels to 2,000 pixels). - With the fewer pixels per bit quality control metric, fewer pixels instead of fewer bits per pixel also results in fewer bytes to transfer. When the use of fewer pixels results in better image quality, it indicates how and when to choose to use fewer pixels when a user requests extreme loss. In this way, the resulting image can have better overall quality, even at a lower resolution.
- With the film grain and/or digital noise preservation quality control metric, grainy or noisy areas of an image are preserved. These areas can be preserved by using a consistent quantization across the coefficients thereof.
- With the chromatic aberration quality control metric, chromatic aberrations and other similar spatial correlations are removed from the image. Often in images, there is a shift of red and green color data from each other. For example, when there is an object against a black background in the image, it may be perceived to have a slight red glare on one side and a slight green glare on the other side. Such glares require bits for storing. Removing chromatic aberrations such as these glares (e.g., by calculating the shift for the red signal to match with the green signal) results in a lower bit cost.
- With the texture cluster quality control metric, textures and rotationally invariant models of textures can be compressed as clusters in the Fast-Fourier transform (FFT) space. This quality control metric may be particularly effective for images where cartoon and texture models have already been separated.
- The
degradation mechanism 312 can degrade theinput image 304 according to an error level definition representing a maximum quantization error to result from compressing theinput image 304. For example, the maximum quantization error may refer to a number or amount of visual artifacts resulting from compressing theinput image 304. The error level definition may reflect a default value, be configured according to input received by a user of theimage compressor 300, or be determined based on characteristics of the input image 304 (e.g., using results of pre-processing performed against theinput image 304 to determine a resolution or file size thereof). - Each of the quality control metrics may be associated with an error level or a range of error levels. In such a case, only the quality control metrics associated with the error level definition defined for compressing an image will be considered for selection. Data associated with the quality control metrics can be stored in a lookup table (LUT). The LUT can be queried based on the error level definition. The results of the query can thus include the quality control metrics that are available for compressing the image according to the error level definition.
- The
degradation mechanism 312 includes functionality for bit budgeting compression of theinput image 304 based on the error level definition. Thedegradation mechanism 312 identifies a number of bits saved by reducing the data of theinput image 304 according to a quality control metric using the error level definition. However, thedegradation mechanism 312 can also identify a number of bits saved by reducing the data of theinput image 304 according to a quality control metric using a quantization error value other than the error level definition. This bit budgeting technique is locally performed at areas of theinput image 304, rather than globally for theentire input image 304. - Bit budgeting for image degradation can include producing a globally quantized image by quantizing all transform coefficients in image according to the error level definition. Separately, transform coefficients located in different areas of the image can be quantized at different error levels. The number of bits saved by quantizing a given area of the image at a different error level (hereafter, a modified error level) is compared to the number of bits saved by quantizing the corresponding area in the globally quantized image. In the event that the number of bits saved by quantizing at the modified error level is greater than the number of bits saved by quantizing at the error level definition, the modified error level is used for compressing the subject area of the image. Otherwise, the error level definition is used for compressing the subject area of the image.
- For example, the error level definition may be set to 1.3. Using a given quality control metric at error level 1.3, the
degradation mechanism 312 may quantize transform coefficients within an area of theinput image 304 to result in a bit savings of 0.5 bits. However, using the same quality control metric, but at a modified error level of 1.4, thedegradation mechanism 312 may determine that quantizing those same transform coefficients results in a bit savings of 7 bits. Given the increase in bit savings, thedegradation mechanism 312 uses the error level 1.4 to degrade that area of theinput image 304. - The
psychovisual modeling mechanism 314 uses a perceptual distance metric to guide compression optimization. Thepsychovisual modeling mechanism 314 includes software rules for processing aninput image 304 based on the perceptible qualities of theinput image 304. The software rules of thepsychovisual modeling mechanism 314 focus on three properties of vision: first, that gamma correction should not be separately applied to every red-green-blue (RGB) channel; second, that high frequency changes in blue color data can be less precisely compressed; and third, that areas including larger amounts of visual noise within an image can be less precisely compressed. - The first property of vision is driven by the overlap of sensitivity spectra of the cones of the human eye. For example, because there is some relationship between the amount of yellow light seen and sensitivity to blue light, changes in blue color data in the vicinity of yellow color data can be compressed less precisely. luma-chrominance (YUV) color spaces are defined as linear transformations of gamma-compressed RGB and are therefore not powerful enough to model such phenomena.
- The second property of vision is driven by the color receptors of the retina of the human eye. In particular, the human eye has lower spatial resolution in blue than in red and green, and the retina has almost no blue receptors in the high-resolution area.
- The third property of vision is defined based on a relationship between visibility and proximal visual activity. That is, the visibility of fine structures in an area of an image may depend on the amount of visual activity in the vicinity of that area.
- Although the software rules of the
psychovisual modeling mechanism 314 are described with reference to three properties of vision, other numbers of properties of vision, other rules related to image compression or image perceptibility, or a combination thereof may be used to define or otherwise configure the software rules of thepsychovisual modeling mechanism 314. - The
degradation mechanism 312 is used in conjunction with thepsychovisual modeling mechanism 314 to reduce the total data size of theinput image 304 without impacting the perceived visual quality of theinput image 304, subject to the error level definition. For example, thedegradation mechanism 312 can be processed in connection with a threshold defined using thepsychovisual modeling mechanism 314. The threshold can represent a maximum acceptable perceptual distance for color data of theinput image 304 and a compressed image produced using thedegradation mechanism 312. Alternatively, the threshold can represent a range of acceptable perceptual distances for such color data. - Furthermore, the particular types of data reduction may be non-linear. For example, in some cases, high frequency blue color data can be entirely removed since it is not perceivable by receptors of the fovea. However, the red and green receptors of the fovea may perceive blue color data when red and green color data is not present. As such, a quality control metric may reflect that high frequency blue color data can be reduced or removed when values of red and green color data are high (e.g., when they meet a threshold value), but not when the value of red color data and/or the value of green color data is/are lower (e.g., when they do not meet the threshold value).
- The
compressed image 306 may be stored at a server (e.g., in a database or like data store) for later retrieval and decompression. For example, thecompressed image 306 may be an image hosted on a website or an image provided for display on a webpage. Theimage decompressor 302 retrieves thecompressed image 306 from storage or memory and decompresses it to produce theoutput image 308. In that the compression of theinput image 304 is lossy, theoutput image 308 may look substantially the same as, but not necessarily be identical to, theinput image 304. - The
image decompressor 302 includes aninverse degradation mechanism 316, apsychovisual modeling mechanism 318, and a dequantization andinverse transformation mechanism 320. Theinverse degradation mechanism 316 uses information associated with thecompressed image 306 to determine a sequence of quality control metrics that were used to produce thecompressed image 306. For example, metadata included in or otherwise associated with thecompressed image 306 can reflect the quality control metrics used to iteratively degrade image content from theinput image 304 during compression, as well as the sequence thereof. - The
psychovisual modeling mechanism 318 is used to determine that image quality added back into thecompressed image 306 using theinverse degradation mechanism 316 is consistent with rules for visual perception of an image. For example, thepsychovisual modeling mechanism 318 may use the same rules as thepsychovisual modeling mechanism 314; however, thepsychovisual modeling mechanism 318 is used to determine that image content added back into thecompressed image 306 is perceptible by a human viewer. - The dequantization and
inverse transformation mechanism 320 dequantizes the coefficients of thecompressed image 306 according to a quantization factor used to produce the compressed image 306 (e.g., the error level definition or a modified error level). The dequantization andinverse transformation mechanism 320 then inverse transforms the dequantized coefficients, such as by transforming the dequantized coefficients from the frequency domain to the spatial domain. The dequantization andinverse transformation mechanism 320 processes thecompressed image 306 before theinverse degradation mechanism 316 and thepsychovisual modeling mechanism 318 are used. - Implementations of the
image compressor 300 and/or theimage decompressor 302 may differ from what is shown and described with respect toFIG. 3 . In some implementations, theimage decompressor 302 may omit thepsychovisual modeling mechanism 318. For example, theinverse degradation mechanism 316 of theimage decompressor 302 can use quality control metrics to identify the particular quality control metrics and sequence of operations applied at theimage compressor 300 to degrade theinput image 304 for compression into thecompressed image 306. Alternatively, thepsychovisual modeling mechanism 318 can be replaced with a sequence identification mechanism for identifying the sequence of operations and quality control metrics applied at theimage compressor 300. - In some implementations, one or both of the
image compressor 300 or theimage decompressor 302 may include additional software mechanisms for respectively compressing or decompressing an image. For example, in addition to the transformation andquantization mechanism 310, theimage compressor 300 may include an image prediction mechanism, an entropy coding mechanism, an image reconstruction mechanism, or the like, or a combination thereof. Alternatively, such additional mechanisms can be combined into the transformation andquantization mechanism 310 rather than being implemented as a separate software mechanism. Similarly, theimage decompressor 302 may include an image prediction mechanism, an entropy coding mechanism, an image reconstruction mechanism, or the like, or a combination thereof, either combined into the dequantization andinverse transformation mechanism 320 or as separate software mechanisms. - In some implementations, particular quality control metrics may not be selected for processing an area of an image. For example, a quality control metric that, when processed against an image, results in quality loss by transmitting fewer pixels during compression and then performing an upsampling during decompression is applied at the image-level rather than at the block-level. In another example, a quality control metric used for noise preservation may result in strange artifacts when processed at the block-level, but perform as desired when processed at the image-level.
- In some implementations, the
image compressor 300 can receive input representing a maximum total file size of thecompressed image 306 to produce. The maximum total file size can be used to make decisions in regard to the error level to use to compress particular areas of theinput image 304. For example, if there are few bits remaining before the maximum total file size is reached, an area of theinput image 304 that has not yet been processed may be compressed using a modified error level that is higher than the error level definition defined for theinput image 304. In doing so, that area can be compressed using fewer bits, even though the quality will be reduced slightly. This bit cost reduction will allow theimage compressor 300 to remain within the maximum total file size. - In some implementations, the
image compressor 300 may use the transformation andquantization mechanism 310, thedegradation mechanism 312, and thepsychovisual modeling mechanism 314 to generate and evaluate candidate compressed images using different sequences of quality control metrics applied to different areas of theinput image 304. In such a case, theimage compressor 300 can thereafter process the generated candidate compressed images and select one of them. For example, the generated candidate compressed image having a lowest total data size can be selected. The sequence of quality control metrics applied to the areas of theinput image 304 to produce the selected candidate compressed image are then used to compress theinput image 304, such as to produce thecompressed image 306. - Techniques for image compression and decompression using controlled quality loss are now described with respect to
FIGS. 4-5 .FIG. 4 is a flowchart diagram of an example of atechnique 400 for compressing an image according to a selected error level and a sequence of quality control metrics.FIG. 5 is a flowchart diagram of an example of atechnique 500 for iteratively processing an image using a sequence of quality control metrics. - One or more of the
technique 400 or thetechnique 500 can be implemented, for example, as a software program that may be executed by computing devices such as the transmittingstation 102 or the receivingstation 104. For example, the software program can include machine-readable instructions that may be stored in a memory such as thememory 204 or the secondary storage 214, and that, when executed by a processor, such as theprocessor 202, may cause the computing device to perform one or more of thetechnique 400 or thetechnique 500. One or more of thetechnique 400 or thetechnique 500 can be implemented using specialized hardware or firmware. As explained above, some computing devices may have multiple memories or processors, and the operations described in one or more of thetechnique 400 or thetechnique 500 can be distributed using multiple processors, memories, or both. - For simplicity of explanation, the
technique 400 and thetechnique 500 are each depicted and described as a series of steps or operations. However, the steps or operations in accordance with this disclosure can occur in various orders and/or concurrently. Additionally, other steps or operations not presented and described herein may be used. Furthermore, not all illustrated steps or operations may be required to implement a technique in accordance with the disclosed subject matter. - Referring first to
FIG. 4 , a flowchart diagram of an example of thetechnique 400 for compressing an image according to a selected error level and a sequence of quality control metrics is shown. At 402, an error level definition is received. The error level definition represents a maximum quantization error for compressing an image. Receiving the error level definition includes identifying an error level defined for use by the image compressor to use to compress the image. - The error level definition can reflect a default configuration of the image compressor. For example, the error level definition may reflect a static value used against an image to compress. In another example, the error level definition can reflect a value identified based on characteristics of the image to compress (e.g., resolution, color complexity, etc.). Alternatively, the error level definition can reflect a value configured based on input received from a user. For example, a user of a computing device from which an image is uploaded to a server for compression can define the error level to use to compress the image.
- At 404, transform coefficients to quantize are identified within an area of the image. As stated above with respect to
FIG. 3 , an area of an image refers to an M×N-sized region (e.g., one or more blocks) of the image, where M and N may be the same or a different value. The transform coefficients are coefficients processed using a block-based transform (e.g., DCT). - At 406, a sequence of quality control metrics for controlling a quantization of the transform coefficients is selected. The sequence of quality control metrics includes one or more quality control metrics usable to iteratively process the identified transform coefficients, such as to degrade the image content therefrom by quantizing the transform coefficients according to different error levels.
- The quality control metrics included in the sequence of quality control metrics are selected based on the error level definition. For example, each of the quality control metrics may be associated with an error level value or value range indicating the error levels for which that quality control metric is useful for degrading image content. A lookup table can be used to store records corresponding to the quality control metrics available for selection. Selecting a quality control metric may thus include querying the lookup table based on the error level definition. In response to the query, quality control metrics having error level values equal to or within a range of the error level definition are selected. Similarly, the querying can be performed to determine that a subset of the quality control metrics is associated with error levels exceeding the error level definition. Some or all of the quality control metrics of that subset may thus be excluded from the sequence of quality control metrics.
- Alternatively, the quality control metrics can be selected based on characteristics of the image or of the identified transform coefficients. For example, each of the quality control metrics may be associated with a particular color scale, frequency value range, resolution, or other image characteristic at which that quality control metric is useful for degrading image content. Records corresponding to the quality control metrics within a lookup table can indicate which of the quality control metrics are usable or effective for various image characteristics.
- In cases where multiple quality control metrics are selected, candidate quality scores are determined for each of the multiple quality control metrics. A candidate quality score reflects a loss in quality that would result from quantizing the transform coefficients within an area of the image according to a given quality control metric. The candidate quality score for a given quality control metric is determined by quantizing the transform coefficients according to a quantization matrix associated with the quality control metric until the resulting quantization error meets the error level definition. The quantized transform coefficients are then reconstructed to produce a decompressed image.
- The quality of the decompressed image is then compared to the quality of the original image using a model of the quality control metric. The results of the comparison are indicated as the quality score for the quality control metric. For example, the quality score can be calculated based on pixel-by-pixel differences between the decompressed image and the original image. In another example, the quality score can be calculated based on the number or amount of artifacts resulting from the quantization.
- After the quality control metrics to include in the sequence are selected, they may be ordered according to the image content that will be affected by their use. An image compressor processing the image can be trained to recognize the types of image content that are reduced, removed, or otherwise modified by certain quality control metrics. The order may be based on aspects of the image content that cannot be perceived by human vision (e.g., high frequency blue color data). Such quality control metrics may be arranged earlier in the sequence of quality control metrics.
- A psychovisual model (e.g., of the
psychovisual model mechanism 314 shown inFIG. 3 ) can be used to determine the order for the sequence. The psychovisual model can, for example, indicate to arrange quality control metrics that result in little to no perceptible image content loss earlier in the sequence. For example, the psychovisual model can indicate that a first quality control metric for reducing high frequency texture data may be arranged in the sequence of operations before a second quality control metric for reducing low frequency texture data. This may, for example, be because reductions in low frequency texture data are more noticeable to a human observer. - At 408, bit costs for compressing the area of the image are determined according to the error level definition and according to a modified error level. For example, a first bit cost can be determined according to the error level definition and the sequence of quality control metrics, and a second bit cost can be determined according to the modified error level and the sequence of quality control metrics. The modified error level represents a value of a quantization error that is different from the value of the error level definition. In particular, the modified error level represents a quantization error that, if used instead of the error level definition, would result in a potentially different image quality and bit cost for compressing the image.
- For example, the modified error level can be a few decimal points above or below the error level definition (e.g., where the error level definition is 1.3, the modified error level can be 1.4). In another example, the modified error level can be a whole number or more in difference from the error level definition. Determining the bit costs includes determining a first bit cost for compressing a first copy of the identified transform coefficients according to the error level definition and the selected sequence of quality control metrics. Determining the bit costs also includes determining a second bit cost for compressing a second copy the identified transform coefficients according to the modified error level and the selected sequence of quality control metrics. The first and second copies of the transform coefficients may represent duplicated data of the identified transform coefficients such that determining the bit costs does not change the identified transform coefficients themselves. Alternatively, the values of the identified transform coefficients may be changed and reset as part of determining the bit costs.
- At 410, a determination is made as to whether the second bit cost is lower than the first bit cost. Determining whether the second bit cost is lower than the first bit cost includes comparing the second bit cost to the first bit cost. Responsive to a determination that the second bit cost is lower than the first bit cost, the
technique 400 proceeds to 412, where the identified transform coefficients are iteratively processed according to the modified error level and the selected sequence of quality control metrics to produce first quantized transform coefficients. - Responsive to a determination that the second bit cost is not lower than the first bit cost, the
technique 400 proceeds to 414, where the identified transform coefficients are iteratively processed according to error level definition and the selected sequence of quality control metrics to produce second quantized transform coefficients. Implementations and examples for iteratively processing an area of an image using quality control metrics are described below with respect toFIG. 5 . - At 416, a compressed image is produced based on the first quantized transform coefficients or the second quantized transform coefficients. Producing the compressed image can include entropy processing or otherwise finalizing compression of the first quantized transform coefficients or the second quantized transform coefficients (as applicable) and then outputting them to a digital file. Alternatively, producing the compressed image can include storing the first quantized transform coefficients or the second quantized transform coefficients (as applicable) within a buffer for later processing.
- In some implementations, the
technique 400 can include identifying a maximum data size value and constraining the compression of the input image based thereon. For example, the maximum data size value can represent a maximum file size of the compressed image (e.g., 150 kilobytes). The maximum data size value can be received as input from a user causing a performance of thetechnique 400, set by default (e.g., as a default configuration of software used to perform the technique 400), or determined based on characteristics of the input image (e.g., the size or contents thereof). The maximum data size value can be used to control the value of the error level definition, the modified error level, or both. - In some implementations, selecting the sequence of quality control metrics can include comparing expected bit reductions from using various combinations and sequences of quality control metrics to degrade the image content within the identified area of the image. For example, there may be N candidates evaluated, where each candidate includes M quality control metrics in a given order of performance.
- In another example, the M quality control metrics in a given candidate sequence may be ordered based on the particular type of image content it degrades. A quality control metric for removing high frequency blue color data from the area of the image may be arranged earlier in a candidate sequence than a quality control metric for augmenting quantization using noise synthesis. The candidate sequence that would result in a greatest expected bit reduction can be selected as the sequence to use to iteratively process the transform coefficients identified within the area of the image.
- In some implementations, the modified error level may reflect a value selected from a range of possible modified error levels. For example, the modified error level may reflect a value that is 0.1 greater or less than a value of the error level definition. Multiple candidate modified error levels can be evaluated, such as by determining bit costs for each of those candidates. The candidate associated with the lowest one of those bit costs can then be selected as the modified error level.
- In some implementations, the modified error level may be the same value or range of values for processing each area of the image. In some implementations, each area of the image may be processed using different values or ranges of values as the modified error level.
- In some implementations, the
technique 400 can be performed for multiple areas of the image to compress. For example, transform coefficients identified within a second area of the image can be compressed using the same sequence of quality control metrics as was selected for the transform coefficients of the first area. In another example, transform coefficients identified within a second area of the image can be compressed using a sequence of quality control metrics different from the one selected for the transform coefficients of the first area. - In some implementations, the
technique 400 may omit the operations for determining whether the use of the error level definition or the modified error level results in a lower bit cost for compressing the identified transform coefficients. For example, thetechnique 400 may include operations for compressing an image by selecting a sequence of quality control metrics for compressing transform coefficients and then using the selected sequence to iteratively quantize the transform coefficients. - In some implementations, the
technique 400 may omit the operations for selecting the sequence of quality control metrics. For example, thetechnique 400 may include operations for using a provided (e.g., by default or according to a configuration) sequence of quality control metrics to determine whether the use of an error level definition or a modified error level results in a lower bit cost for compressing the identified transform coefficients. - Referring next to
FIG. 5 , a flowchart diagram of an example of thetechnique 500 for iteratively processing an image using a sequence of quality control metrics is shown. At 502, a first quality control metric is selected. The first quality control metric is the first in a sequence of quality control metrics selected for iteratively processing an identified area of an image to compress. - At 504, transform coefficients identified within the area of the image to compress are quantized using the first quality control metric. Quantizing those transform coefficients using the first quality control metric includes degrading the image content represented by those transform coefficients based on the model of the first quality control metric. For example, where the first quality control metric is a quality control metric for removing high frequency blue color data from the area of the image, the first quality control metric is processed against the transform coefficients to remove high frequency blue color data therefrom. In another example, where the first quality control metric is a cartoon image quality control metric, the transform coefficients are processed to remove fine detail but retain edges.
- At 506, a degradation failure is detected with respect to the selected quality control metric. A new quality control metric replaces a current quality control metric when the current quality control metric begins to fail. A current quality control metric begins to fail when a quantization error resulting from processing transform coefficients using that current quality control metric exceeds a quality score calibration associated with that current quality control metric. For example, when the quantization error resulting from the use of the current quality control metric is two or more times larger than a quality score for which that quality control metric is calibrated, the current quality control metric is deemed to have failed. In such a case, a next quality control metric according to the sequence of operations is selected to replace the current quality control metric.
- At 508, a determination is made as to whether the selected quality control metric is a last quality control metric in a sequence of quality control metrics selected for compressing the area of the image. Responsive to a determination that the selected quality control metric is not a last quality control metric, at 510, a next quality control metric is selected. The
technique 500 then returns to 504, where the identified transform coefficients are processed using the newly selected quality control metric. Upon a degradation failure of the newly selected quality control metric being detected, another determination is made as to whether that newly selected quality control metric is a last quality control metric in the sequence. Thetechnique 500 repeats accordingly until a then-currently selected quality control metric is the last in the sequence. - Responsive to a determination that the selected quality control metric is a last quality control metric, at 512, the processed area of the image is output. The resulting quantized transform coefficients are output to another part of an image compressor that performs the
technique 500, such as to prepare the processed area for compression. - In some implementations, the
technique 500 can be performed to determine a sequence of quality control metrics to use to iteratively process the area of the image. For example, multiple candidate sequences can be individually evaluated using thetechnique 500 by processing each of the quality control metrics thereof against a given area of an image to compress. As a result of evaluating such a candidate sequence, a total bit reduction can be determined for that candidate sequence as the output of thetechnique 500. -
FIG. 6 is an illustration of areas of animage 600 iteratively processed using a sequence of quality control metrics. Theimage 600 may, for example, be theinput image 304 shown inFIG. 3 . Theimage 600 may be iteratively processed using one or more quality control metrics. A first quality control metric is processed against theimage 600 to produce animage 600A. Theimage 600A has the same textures as theimage 600, but with the high frequency blue-yellow axis removed (e.g., with a sigma of five pixels). This may be a typical first information removal when processing an image, as the fovea does not have blue receptors. - A second quality control metric is processed against the
image 600A to produce animage 600B. Theimage 600B represents theimage 600A after red-green high frequency information is removed (e.g., with a sigma of five pixels). A third quality control metric is processed against theimage 600B to produce animage 600C. Theimage 600C represents theimage 600B after the textures are reconstructed using phase and frequency quantization (e.g., to make the textures more approximate). A fourth quality control metric is processed against theimage 600C to produce animage 600D. Theimage 600D represents theimage 600C after more quantization is applied, which more quantization may be augmented with noise synthesis. - A fifth quality control metric is processed against the
image 600D to produce animage 600E. Theimage 600E represents theimage 600D after further high frequency information is removed and after the image is processed based purely on noise synthesis. Theimages image 600G thus represents a reconstructed image produced responsive to processing an original image (e.g., the image 600) using multiple quality control metrics. The quantized transform coefficients of theimage 600G may be compressed and output for transmission. - In some implementations, different error levels can be used to quantize the different areas of the image 600 (or subsequently-produced
images 600A-G). For example, an error level definition (e.g., 1.3) can be defined for the entirety of theimage 600. However, an image compressor processing theimage 600 can instead use a modified error level (e.g., 1.4) upon determining that the modified error level will result in a greater bit savings (e.g., a lower bit cost) for compressing the subject area. For example, the white brick texture in the leftmost area of theimage 600 may be compressed at the error level definition, while the area with the leafy green texture towards the right side of theimage 600 may be compressed at a modified error level. - The aspects of compression and decompression described above illustrate some examples of compression and decompression techniques and hardware components configured to perform all or a portion of those examples of compression and/or decompression techniques. However, it is to be understood that compression and decompression, as those terms are used in the claims, could mean encoding, decoding, transforming, or another processing or changing of data.
- The word “example” is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “example” is not necessarily to be construed as being preferred or advantageous over other aspects or designs. Rather, use of the word “example” is intended to present concepts in a concrete fashion. As used in this application, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless specified otherwise or clearly indicated otherwise by the context, the statement “X includes A or B” is intended to mean any of the natural inclusive permutations thereof. That is, if X includes A; X includes B; or X includes both A and B, then “X includes A or B” is satisfied under any of the foregoing instances. In addition, the articles “a” and “an” as used in this application and the appended claims should generally be construed to mean “one or more,” unless specified otherwise or clearly indicated by the context to be directed to a singular form. Moreover, use of the term “an implementation” or the term “one implementation” throughout this disclosure is not intended to mean the same embodiment or implementation unless described as such.
- All or a portion of the implementations of this disclosure can take the form of a computer program product accessible from, for example, a computer-usable or computer-readable medium. A computer-usable or computer-readable medium can be any device that can, for example, tangibly contain, store, communicate, or transport the program for use by or in connection with any processor. The medium can be, for example, an electronic, magnetic, optical, electromagnetic, or semiconductor device. Other suitable mediums are also available.
- The above-described embodiments, implementations, and aspects have been described in order to facilitate easy understanding of this disclosure and do not limit this disclosure. On the contrary, this disclosure is intended to cover various modifications and equivalent arrangements included within the scope of the appended claims, which scope is to be accorded the broadest interpretation as is permitted under the law so as to encompass all such modifications and equivalent arrangements.
Claims (20)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/955,788 US20230016253A1 (en) | 2018-02-17 | 2022-09-29 | Image compression and decompression using controlled quality loss |
US18/643,085 US20240276018A1 (en) | 2018-02-17 | 2024-04-23 | Image compression and decompression using controlled quality loss |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201862631725P | 2018-02-17 | 2018-02-17 | |
PCT/US2019/018352 WO2019161303A1 (en) | 2018-02-17 | 2019-02-15 | Image compression and decompression using controlled quality loss |
US202016970499A | 2020-08-17 | 2020-08-17 | |
US17/955,788 US20230016253A1 (en) | 2018-02-17 | 2022-09-29 | Image compression and decompression using controlled quality loss |
Related Parent Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/970,499 Division US11463733B2 (en) | 2018-02-17 | 2019-02-15 | Image compression and decompression using controlled quality loss |
PCT/US2019/018352 Division WO2019161303A1 (en) | 2018-02-17 | 2019-02-15 | Image compression and decompression using controlled quality loss |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/643,085 Continuation US20240276018A1 (en) | 2018-02-17 | 2024-04-23 | Image compression and decompression using controlled quality loss |
Publications (1)
Publication Number | Publication Date |
---|---|
US20230016253A1 true US20230016253A1 (en) | 2023-01-19 |
Family
ID=65576746
Family Applications (3)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/970,499 Active 2039-07-31 US11463733B2 (en) | 2018-02-17 | 2019-02-15 | Image compression and decompression using controlled quality loss |
US17/955,788 Abandoned US20230016253A1 (en) | 2018-02-17 | 2022-09-29 | Image compression and decompression using controlled quality loss |
US18/643,085 Pending US20240276018A1 (en) | 2018-02-17 | 2024-04-23 | Image compression and decompression using controlled quality loss |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/970,499 Active 2039-07-31 US11463733B2 (en) | 2018-02-17 | 2019-02-15 | Image compression and decompression using controlled quality loss |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/643,085 Pending US20240276018A1 (en) | 2018-02-17 | 2024-04-23 | Image compression and decompression using controlled quality loss |
Country Status (4)
Country | Link |
---|---|
US (3) | US11463733B2 (en) |
EP (1) | EP3732881A1 (en) |
CN (1) | CN111819848B (en) |
WO (1) | WO2019161303A1 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020054638A1 (en) * | 2000-08-18 | 2002-05-09 | Tsuyoshi Hanamura | Coded signal separating and merging apparatus, method and computer program product |
US20060008167A1 (en) * | 2004-07-06 | 2006-01-12 | Qing Yu | Digital camera having picture quality setting |
US20120314764A1 (en) * | 2011-06-10 | 2012-12-13 | Bytemobile, Inc. | Macroblock-Level Adaptive Quantization in Quality-Aware Video Optimization |
US20130195206A1 (en) * | 2012-01-31 | 2013-08-01 | General Instrument Corporation | Video coding using eye tracking maps |
US20140169451A1 (en) * | 2012-12-13 | 2014-06-19 | Mitsubishi Electric Research Laboratories, Inc. | Perceptually Coding Images and Videos |
US20160234496A1 (en) * | 2015-02-09 | 2016-08-11 | Qualcomm Incorporated | Near visually lossless video recompression |
US20170150149A1 (en) * | 2009-10-05 | 2017-05-25 | Beamr Imaging Ltd | Apparatus and methods for recompression of digital images |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6600836B1 (en) * | 2000-01-28 | 2003-07-29 | Qualcomm, Incorporated | Quality based image compression |
US6810083B2 (en) * | 2001-11-16 | 2004-10-26 | Koninklijke Philips Electronics N.V. | Method and system for estimating objective quality of compressed video data |
US7170933B2 (en) * | 2002-12-13 | 2007-01-30 | International Business Machines Corporation | Method and system for objective quality assessment of image and video streams |
US7813564B2 (en) * | 2007-03-30 | 2010-10-12 | Eastman Kodak Company | Method for controlling the amount of compressed data |
US8515181B2 (en) * | 2009-02-11 | 2013-08-20 | Ecole De Technologie Superieure | Method and system for determining a quality measure for an image using a variable number of multi-level decompositions |
US10097851B2 (en) * | 2014-03-10 | 2018-10-09 | Euclid Discoveries, Llc | Perceptual optimization for model-based video encoding |
-
2019
- 2019-02-15 US US16/970,499 patent/US11463733B2/en active Active
- 2019-02-15 WO PCT/US2019/018352 patent/WO2019161303A1/en unknown
- 2019-02-15 CN CN201980012145.4A patent/CN111819848B/en active Active
- 2019-02-15 EP EP19708009.6A patent/EP3732881A1/en active Pending
-
2022
- 2022-09-29 US US17/955,788 patent/US20230016253A1/en not_active Abandoned
-
2024
- 2024-04-23 US US18/643,085 patent/US20240276018A1/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020054638A1 (en) * | 2000-08-18 | 2002-05-09 | Tsuyoshi Hanamura | Coded signal separating and merging apparatus, method and computer program product |
US20060008167A1 (en) * | 2004-07-06 | 2006-01-12 | Qing Yu | Digital camera having picture quality setting |
US20170150149A1 (en) * | 2009-10-05 | 2017-05-25 | Beamr Imaging Ltd | Apparatus and methods for recompression of digital images |
US20120314764A1 (en) * | 2011-06-10 | 2012-12-13 | Bytemobile, Inc. | Macroblock-Level Adaptive Quantization in Quality-Aware Video Optimization |
US20130195206A1 (en) * | 2012-01-31 | 2013-08-01 | General Instrument Corporation | Video coding using eye tracking maps |
US20140169451A1 (en) * | 2012-12-13 | 2014-06-19 | Mitsubishi Electric Research Laboratories, Inc. | Perceptually Coding Images and Videos |
US20160234496A1 (en) * | 2015-02-09 | 2016-08-11 | Qualcomm Incorporated | Near visually lossless video recompression |
Also Published As
Publication number | Publication date |
---|---|
EP3732881A1 (en) | 2020-11-04 |
US20210084339A1 (en) | 2021-03-18 |
WO2019161303A1 (en) | 2019-08-22 |
CN111819848B (en) | 2023-06-09 |
CN111819848A (en) | 2020-10-23 |
US11463733B2 (en) | 2022-10-04 |
US20240276018A1 (en) | 2024-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Johnston et al. | Improved lossy image compression with priming and spatially adaptive bit rates for recurrent networks | |
Liu et al. | An efficient contrast enhancement method for remote sensing images | |
Rabie et al. | Toward optimal embedding capacity for transform domain steganography: a quad-tree adaptive-region approach | |
US20160027148A1 (en) | Image enhancement using a patch based technique | |
CN110717868B (en) | Video high dynamic range inverse tone mapping model construction and mapping method and device | |
CN110996105A (en) | Method of variable rate compression and method of variable rate decompression | |
EP2145476B1 (en) | Image compression and decompression using the pixon method | |
US10930020B2 (en) | Texture compression using a neural network | |
US20140185104A1 (en) | Image processing device and computer-readable storage medium storing computer-readable instructions | |
CN109324778B (en) | Compression method for compensation pressure | |
Yu et al. | Perceptually optimized enhancement of contrast and color in images | |
CN110738666A (en) | discrete cosine transform-based image semantic segmentation method and device | |
CA3031546A1 (en) | Data compression by means of adaptive subsampling | |
CN116325731A (en) | Point cloud encoding and decoding method and system, point cloud encoder and point cloud decoder | |
US9979969B2 (en) | Method and system for image compression using image block characteristics | |
Qin et al. | An adaptive reversible steganographic scheme based on the just noticeable distortion | |
CN104837014B (en) | Compress the method and image processing equipment of image | |
US11568572B2 (en) | Texture compression | |
US20240276018A1 (en) | Image compression and decompression using controlled quality loss | |
KR100189542B1 (en) | Fractal image compression apparatus and method using perception distortion measure | |
Krivenko et al. | Lossy DCT-based compression of remote sensing images with providing a desired visual quality | |
US20060039619A1 (en) | Image compression using a color visual model | |
Ye et al. | Trained perceptual transform for quality assessment of high dynamic range images and video | |
EP2958103A1 (en) | Method and device for encoding a sequence of pictures | |
US20140064631A1 (en) | Resized Image Compression Based on Frequency Content |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: GOOGLE LLC, CALIFORNIA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:ALAKUIJALA, JYRKI;OBRYK, ROBERT;KLIUCHNIKOV, EVGENII;AND OTHERS;SIGNING DATES FROM 20200713 TO 20200714;REEL/FRAME:061255/0557 |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: FINAL REJECTION MAILED |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: ADVISORY ACTION MAILED |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: NON FINAL ACTION MAILED |
|
STCB | Information on status: application discontinuation |
Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION |