CN111654705B - Mosaic image compression method based on color space conversion - Google Patents

Mosaic image compression method based on color space conversion Download PDF

Info

Publication number
CN111654705B
CN111654705B CN202010505297.2A CN202010505297A CN111654705B CN 111654705 B CN111654705 B CN 111654705B CN 202010505297 A CN202010505297 A CN 202010505297A CN 111654705 B CN111654705 B CN 111654705B
Authority
CN
China
Prior art keywords
color space
component
space conversion
inverse
components
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010505297.2A
Other languages
Chinese (zh)
Other versions
CN111654705A (en
Inventor
朱树元
贺康
王忠荣
刘光辉
王正宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN202010505297.2A priority Critical patent/CN111654705B/en
Publication of CN111654705A publication Critical patent/CN111654705A/en
Application granted granted Critical
Publication of CN111654705B publication Critical patent/CN111654705B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Color Television Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention belongs to the technical field of image processing, and particularly provides a mosaic image compression method based on novel color space conversion, which is used for solving the problems that the recovered image quality is low, the algorithm is complex and the method is only suitable for RGGB type CFA images with a certain specific format in the prior art. The invention converts G of CFA into G 1 RBG 2 The four-channel model is converted, then the novel color space conversion is used, the correlation among pixels is eliminated, and the digit of the coded code stream is greatly reduced, so that the coded code stream can be directly coded through a traditional coding frame; moreover, the invention is applicable to RGGB type CFA of any format; meanwhile, the color space conversion matrix and the inverse conversion matrix are both true values, but not approximate results, so that rounding errors caused by the conversion matrix are eliminated; in addition, the invention updates the brightness component to be coded in a mathematical optimization mode, thereby bringing better recovery quality.

Description

Mosaic image compression method based on color space conversion
Technical Field
The invention belongs to the technical field of image processing, particularly relates to the field of RGGB type CFA compression coding, and particularly provides a mosaic image compression method based on novel color space conversion.
Background
To produce color images, most digital cameras use a single CMOS board with several different color filters and use interpolation techniques to produce full color images. RGGB type Color Filter Array (CFA), refers to the generic name of a CFA having two green filters, one red Filter and one blue Filter in a 2 × 2 region; among them, bayer-CFA is most commonly used, and it has green filters at the upper left and lower right, red filters at the upper right, and filters at the lower left in each 2 × 2 region. If a full-color image is interpolated, there is only one color component in each pixel of the CFA, so the other two color components of a given pixel must be interpolated using adjacent pixel information; although there are several possible interpolation algorithms, it is clear that they all lead to an increase in redundancy from an information-theoretic point of view.
At present, most of compression methods of CMOS images on a civil digital camera carry out image compression after interpolation of the images, the compression data volume is three times of CFA, and the image compression real-time performance of a space camera is not facilitated. The existing compression methods of RGGB type CFA, which either convert two green pixels into one, reduce the quality of the restored image; or a complex structural transformation or numerical filling is designed for the Y matrix, the algorithm is complex and is only suitable for RGGB type CFA of a specific format.
Based on the method, the invention provides a mosaic image compression method based on novel color space conversion.
Disclosure of Invention
The invention aims to solve the problems that the prior art is low in restored image quality, complex in algorithm and only suitable for RGGB type CFA images in a certain specific format, and provides a mosaic image compression method based on novel color space conversion, which is simple to implement, can bring higher restored quality under the condition that the bit number of coded code streams is the same, and is suitable for RGGB type CFA in any format.
In order to realize the purpose, the invention adopts the technical scheme that:
the mosaic image compression method based on the novel color space conversion comprises the following steps:
step 1, G in RGGB type CFA image 1 、R、B、G 2 The components are respectively and independently spliced to form a channel, and a four-channel model is generated;
step 2, performing color space conversion on the four-channel model generated in the step 1, and converting the four-channel model into an YDgCoCg model to obtain a brightness component Y, a chrominance component Dg, co and Cg;
step 3, performing DCT and JPEG chroma quantization on the chroma components Dg, co and Cg in the step 2 to generate chroma components Dg ', co ' and Cg ';
step 4, inverse quantization is carried out on the chrominance component Cg 'in the step 3, the IDCT generates the chrominance component Cg', mathematical optimization is carried out, and the luminance component is generated through calculation
Figure GDA0003801451350000021
Step 5, comparing the brightness component in the step 4
Figure GDA0003801451350000022
DCT and JPEG brightness quantization are performed to generate brightness component
Figure GDA0003801451350000023
Step 6, JPEG chroma coding is carried out on the chroma components Dg ', co ' and Cg ' in the step 3, and the brightness component in the step 5 is subjected to
Figure GDA0003801451350000024
JPEG brightness coding is carried out, and the code stream is sent;
and 7, receiving the code stream, performing inverse coding, inverse quantization, IDCT and inverse color space conversion, and recovering the CFA image.
Further, the color space in step 2 is converted into:
Figure GDA0003801451350000025
further, in the step 4, the mathematics is optimized as follows:
Figure GDA0003801451350000026
further, the step 7 specifically includes:
s71, receivingData, and sequentially performing inverse coding, inverse quantization and IDCT to generate components
Figure GDA0003801451350000027
Dg″、Co″、Cg″;
S72, component pair
Figure GDA0003801451350000028
Dg ', co ', cg ' are inverse color space converted to obtain a component G 1 ″、R″、B″′、G″ 2
Figure GDA0003801451350000029
S73, component G 1 ″、R″、B″′、G″ 2 The reverse operation of step 1 is performed to recover the RGGB type CFA image.
The working principle of the invention is as follows:
the invention provides a four-channel model, the component size of the brightness code is changed into 1/4 of the size of the CFA through color space conversion, and the bit number of the code stream generated by the chroma code is very small, so that the bit number of the code stream is effectively reduced;
the color space conversion method comprises the following steps:
Figure GDA0003801451350000031
wherein Y is a luminance component, dg, co, cg are chrominance components, dg represents green color difference: dg = G 2 -G 1
Assuming that the Y, dg, co and Cg components are DCT, quantized and encoded to obtain Y ', dg ', co ' and Cg ' respectively, then inverse coding, inverse quantization and IDCT are restored to obtain Y ', dg ', co ', cg ', and Cg ', which are subjected to inverse color space conversion:
Figure GDA0003801451350000032
the distortion generated at this time with respect to the original CFA is:
Figure GDA0003801451350000033
to minimize distortion:
Figure GDA0003801451350000034
finding a singular point, and according to the practical significance, the point is the minimum value point:
Figure GDA0003801451350000035
it can be seen that the compression coding causes severe distortion of the chrominance channels, resulting in the inverse quantization of the luminance component at the decoding end to be closer
Figure GDA0003801451350000036
(instead of Y), it can bring less overall distortion, i.e. higher recovery quality; therefore, the luminance component processed at the encoding end by the present invention is
Figure GDA0003801451350000037
Figure GDA0003801451350000038
The components are obtained by DCT, quantization and coding
Figure GDA0003801451350000039
Then, the code is subjected to inverse coding, inverse quantization and ID CT to obtain the code
Figure GDA00038014513500000310
And with
Figure GDA00038014513500000311
There is still a gap, but this gap is far less than that of directly encoding Y and decodingY' is formed with
Figure GDA00038014513500000312
The difference in (a).
In conclusion, the invention has the beneficial effects that:
the invention provides a mosaic image compression method based on novel color space conversion, which is used for compressing G of CFA 1 RBG 2 The four-channel model is converted, then the novel color space conversion is used, the correlation among pixels is eliminated, and the bit number of the coded code stream is greatly reduced, so that the coded code stream can be directly coded through a traditional coding frame; moreover, the invention is suitable for RGGB type CFA with any format; meanwhile, the color space conversion matrix and the inverse conversion matrix are both true values, but not approximate results, so that rounding errors caused by the conversion matrix are eliminated; in addition, the invention updates the brightness component to be coded in a mathematical optimization mode, thereby bringing better recovery quality.
Drawings
Fig. 1 is a schematic flow chart of a mosaic image compression method based on novel color space conversion according to the present invention.
Fig. 2 is a schematic diagram of colors of each pixel point of the Bayer-format CFA according to an embodiment of the present invention.
FIG. 3 is a schematic diagram of color space conversion according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
The embodiment provides a mosaic image compression method based on novel color space conversion, and the flow of the method is shown in fig. 1; this embodiment takes Bayer-CFA as an example, and specifically includes the following steps:
step S1, G in RGGB type CFA image 1 RBG 2 The components are respectively and independently spliced into a channel and are changed into a four-channel model, so that each component independently forms a matrix, and the complex structure of CFA is eliminated;
specifically, the Bayer-CFA is shown in FIG. 2, and is divided into 2 x 2 pixel blocks; as shown in FIG. 3, pick the top left corner of all 2 × 2 pixel blocksAre combined into G 1 Component, selecting all the elements of the upper right corner of the 2 x 2 pixel block to be combined into R component, selecting all the elements of the lower left corner of the 2 x 2 pixel block to be combined into B component, selecting all the elements of the lower right corner of the 2 x 2 pixel block to be combined into G component 2 A component;
step S2, four channels G 1 RBG 2 The model is switched to the four-channel YDgCoCg model, shown in FIG. 3, eliminating G 1 RBG 2 The correlation among the four channels reduces the bit number required by coding;
Figure GDA0003801451350000041
step S3, DCT and JPEG chroma quantization are carried out on the Dg, co and Cg components in the S2 to generate Dg ', co ' and Cg ';
s4, generating Cg 'by IDCT and Cg' inverse quantization, mathematical optimization and calculation generation
Figure GDA0003801451350000051
The recovered luminance component is closer to
Figure GDA0003801451350000052
Will introduce less distortion;
specifically, IDCT, inverse quantization Cg' generates Cg ″, and a new component is calculated
Figure GDA0003801451350000053
Figure GDA0003801451350000054
Step S5, pair
Figure GDA0003801451350000055
DCT and JPEG luminance quantization are performed to generate
Figure GDA0003801451350000056
Step S6, JPEG chroma coding is carried out on the Dg ', co ' and Cg ' generated in the step S3, and the data produced in the step S5 are coded
Figure GDA0003801451350000057
Carrying out JP EG brightness coding and transmitting a code stream;
s7, receiving the code stream, performing inverse coding, inverse quantization, IDCT and inverse color space conversion, and recovering the CFA image; the method comprises the following specific steps:
s71, receiving data, and sequentially performing inverse coding, inverse quantization and IDCT generation
Figure GDA0003801451350000058
Dg″、Co″、Cg″;
S72, mixing
Figure GDA0003801451350000059
Dg ", co", cg "for the inverse color-space conversion:
Figure GDA00038014513500000510
s73, the operation is reversed from S1, and Bayer-CFA is recovered.
The invention has higher recovery quality by recovering the CFA image to calculate the recovery quality of the compressed image. In the invention, the size of the component needing brightness coding is 1/4 of the size of CFA, so the bit number of the coding code stream is less; the traditional coding frame can be directly used for direct coding, and the robustness is high; finally, it should be noted that, although the Bayer format CFA is taken as an example in the present embodiment, the present invention is also effective for any RGGB type CFA.
While the invention has been described with reference to specific embodiments, any feature disclosed in this specification may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise; all of the disclosed features, or all of the method or process steps, may be combined in any combination, except mutually exclusive features and/or steps.

Claims (1)

1. The mosaic image compression method based on color space conversion comprises the following steps:
step 1, G in RGGB type CFA image 1 、R、B、G 2 The components are respectively and independently spliced to form a channel, and a four-channel model is generated;
step 2, performing color space conversion on the four-channel model generated in the step 1, and converting the four-channel model into an YDgCoCg model to obtain a brightness component Y, chrominance components Dg, co and Cg; the color space conversion is specifically:
Figure FDA0003843809960000011
step 3, performing DCT and JPEG chroma quantization on the chroma components Dg, co and Cg in the step 2 to generate chroma components Dg ', co ' and Cg ';
step 4, inverse quantization is carried out on the chrominance component Cg 'in the step 3, IDCT is carried out to generate chrominance component Cg', mathematical optimization is carried out, and the luminance component is generated through calculation
Figure FDA0003843809960000012
The mathematical optimization specifically comprises the following steps:
Figure FDA0003843809960000013
step 5, comparing the brightness component in step 4
Figure FDA0003843809960000014
DCT and JPEG brightness quantization are performed to generate brightness components
Figure FDA0003843809960000015
Step 6, JPEG chroma coding is carried out on the chroma components Dg ', co ' and Cg ' in the step 3, and the brightness component in the step 5 is subjected to
Figure FDA0003843809960000016
JPEG brightness coding is carried out, and the code stream is sent;
step 7, receiving the code stream, performing inverse coding, inverse quantization, IDCT and inverse color space conversion, and recovering the CFA image; the method comprises the following specific steps:
s71, receiving data, and sequentially performing inverse coding, inverse quantization and IDCT to generate components
Figure FDA0003843809960000017
Dg″、Co″、Cg″;
S72, component pair
Figure FDA0003843809960000018
Dg ', co ', cg ' are inverse color space converted to obtain a component G 1 ″、R″、B″′、G″ 2
Figure FDA0003843809960000019
S73, component G 1 ″、R″、B″′、G″ 2 And (4) performing the reverse operation of the step 1 to recover the RGGB type CFA image.
CN202010505297.2A 2020-06-05 2020-06-05 Mosaic image compression method based on color space conversion Active CN111654705B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010505297.2A CN111654705B (en) 2020-06-05 2020-06-05 Mosaic image compression method based on color space conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010505297.2A CN111654705B (en) 2020-06-05 2020-06-05 Mosaic image compression method based on color space conversion

Publications (2)

Publication Number Publication Date
CN111654705A CN111654705A (en) 2020-09-11
CN111654705B true CN111654705B (en) 2022-11-11

Family

ID=72345092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010505297.2A Active CN111654705B (en) 2020-06-05 2020-06-05 Mosaic image compression method based on color space conversion

Country Status (1)

Country Link
CN (1) CN111654705B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114066736B (en) * 2022-01-17 2022-05-03 电子科技大学 Template information assisted color image demosaicing method
CN117579839B (en) * 2024-01-15 2024-03-22 电子科技大学 Image compression method based on rate-distortion optimized color space conversion matrix

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07327232A (en) * 1994-05-31 1995-12-12 Asahi Optical Co Ltd Picture compression device
JP2002354266A (en) * 2001-05-22 2002-12-06 Canon Inc Image processor, image processing system, image processing method, recording medium, and program
CN1764232A (en) * 2004-10-19 2006-04-26 微软公司 System and method for encoding mosaiced image data employing a reversible color transform
CN101796843A (en) * 2008-07-08 2010-08-04 松下电器产业株式会社 Image coding method, image decoding method, image coding device, image decoding device, program, and integrated circuit
CN101977330A (en) * 2010-11-12 2011-02-16 北京空间机电研究所 Bayer image compression method based on YUV conversion
WO2013063638A2 (en) * 2011-10-30 2013-05-10 Hd2 Technologies Pty. Ltd. Perceptually lossless and perceptually enhanced image compression system & method
CN103414903A (en) * 2013-08-28 2013-11-27 清华大学 Compressing method and device for Bayer format images
CN104427349A (en) * 2013-08-20 2015-03-18 清华大学 Bayer image compression method
CN107211128A (en) * 2015-03-10 2017-09-26 苹果公司 Adaptive chroma down-sampling and color space switch technology
CN110868603A (en) * 2019-11-04 2020-03-06 电子科技大学 Bayer image compression method
CN111225213A (en) * 2020-01-21 2020-06-02 北京空间机电研究所 Bayer format image color-divided channel compression method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4156631B2 (en) * 2006-04-26 2008-09-24 シャープ株式会社 Image processing method and image processing apparatus
US10721470B2 (en) * 2018-07-06 2020-07-21 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Compression of a raw image

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07327232A (en) * 1994-05-31 1995-12-12 Asahi Optical Co Ltd Picture compression device
JP2002354266A (en) * 2001-05-22 2002-12-06 Canon Inc Image processor, image processing system, image processing method, recording medium, and program
CN1764232A (en) * 2004-10-19 2006-04-26 微软公司 System and method for encoding mosaiced image data employing a reversible color transform
CN101796843A (en) * 2008-07-08 2010-08-04 松下电器产业株式会社 Image coding method, image decoding method, image coding device, image decoding device, program, and integrated circuit
CN101977330A (en) * 2010-11-12 2011-02-16 北京空间机电研究所 Bayer image compression method based on YUV conversion
WO2013063638A2 (en) * 2011-10-30 2013-05-10 Hd2 Technologies Pty. Ltd. Perceptually lossless and perceptually enhanced image compression system & method
CN104427349A (en) * 2013-08-20 2015-03-18 清华大学 Bayer image compression method
CN103414903A (en) * 2013-08-28 2013-11-27 清华大学 Compressing method and device for Bayer format images
CN107211128A (en) * 2015-03-10 2017-09-26 苹果公司 Adaptive chroma down-sampling and color space switch technology
CN110868603A (en) * 2019-11-04 2020-03-06 电子科技大学 Bayer image compression method
CN111225213A (en) * 2020-01-21 2020-06-02 北京空间机电研究所 Bayer format image color-divided channel compression method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
color image compression using JPEG2000 with adaptive color space transform;Stephy Sebastian;《2014 international conference on electronics and communication system》;20140214;全文 *
基于CMOS图像传感器DCT算法的JPEG压缩研究;郭建湘等;《现代制造技术与装备》;20160215(第02期);全文 *
新型图像压缩及优化算法研究;崔唱;《中国优秀硕士学位论文全文数据库 信息科技辑》;20191215;全文 *

Also Published As

Publication number Publication date
CN111654705A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN101107838B (en) Image processing device, image processing method, and imaging device
US8428120B2 (en) Method and apparatus of Bayer pattern direct video compression
CN107483850B (en) low-delay high-definition digital image transmission method
CN111654705B (en) Mosaic image compression method based on color space conversion
CN101170707B (en) Image format conversion and recovery method and device
CN101335902B (en) Weighting predication method and device in video frequency decoding and encoding
CN102356635A (en) Video acquisition and processing systems
CN107105208A (en) A kind of lossless coding and coding/decoding method of Bayer images
JP2003046786A (en) Digital image system for reducing color aliasing artifact
CN110868603B (en) Bayer image compression method
US20050212933A1 (en) Luminance and color difference signal generation apparatus, image data compression apparatus, and image processing system
CN112995664A (en) Image sampling format conversion method, computer-readable storage medium, and encoder
CN104144279B (en) Handle the method and device of image/video data
US7194129B1 (en) Method and system for color space conversion of patterned color images
JP2011015347A (en) Apparatus and method for processing image, program and recording medium
CN108632610A (en) A kind of colour image compression method based on interpolation reconstruction
CN101656889A (en) High definition video real time compressing as well as coding and decoding method
WO2022141515A1 (en) Video encoding method and device and video decoding method and device
CN113852820B (en) Novel color space conversion matrix generation method
CN110971913B (en) Bayer image compression method based on filling Y channel
JP4257145B2 (en) Image compression apparatus and image processing system
CN108282654A (en) A kind of compression of digital video and decompression method
CN110636304B (en) YCbCr444 and YCbCr422 conversion method
CN114205586A (en) Video processing method for carrying out rate distortion optimization based on multi-color space and application
Daho et al. A JPEG-like algorithm for compression of single-sensor camera image

Legal Events

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