CN111654705A - Mosaic image compression method based on novel color space conversion - Google Patents
Mosaic image compression method based on novel color space conversion Download PDFInfo
- Publication number
- CN111654705A CN111654705A CN202010505297.2A CN202010505297A CN111654705A CN 111654705 A CN111654705 A CN 111654705A CN 202010505297 A CN202010505297 A CN 202010505297A CN 111654705 A CN111654705 A CN 111654705A
- Authority
- CN
- China
- Prior art keywords
- color space
- space conversion
- component
- cfa
- inverse
- 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.)
- Granted
Links
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/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/186—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 colour or a chrominance component
-
- 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
- H04N19/625—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
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 uses G of CFA1RBG2The 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.
Description
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 neighboring 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 achieve 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 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
Step 5, comparing the brightness component in the step 4DCT and JPEG brightness quantization are performed to generate brightness component
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 toJPEG 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:
further, the step 7 specifically includes:
s71, receiving data, and performing inverse coding, inverse quantization and IDCT to generate componentDg″、Co″、Cg″;
S72, component pairDg ', Co ', Cg ' are inverse color space converted to obtain a component G1″、R″、B″′、G″2:
S73, component G1″、R″、B″′、G″2The 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 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:
wherein, Y is a brightness component, Dg, Co, Cg are chrominance components, Dg represents green color difference: dg ═ G2-G1;
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:
the distortion generated at this time with respect to the original CFA is:
to minimize distortion:
finding a singular point, and according to the practical significance, the point is the minimum value point:
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(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 isThe components are obtained by DCT, quantization and codingThen, the code is subjected to inverse coding, inverse quantization and IDCT to obtain the codeAndthere is still a gap, but this gap isMuch smaller than the sum of Y' generated by directly encoding Y and decodingThe difference in (a).
In conclusion, the beneficial effects of the invention are as follows:
the invention provides a mosaic image compression method based on novel color space conversion, which is used for compressing G of CFA1RBG2The 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 image1RBG2The 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, which divides the Bayer-CFA into 2 × 2 pixel blocks3, selecting all the elements in the upper left corner of the 2 × 2 pixel block to be combined into G1Component, choosing all the elements in the upper right corner of the 2 × 2 pixel block to combine into an R component, choosing all the elements in the lower left corner of the 2 × 2 pixel block to combine into a B component, choosing all the elements in the lower right corner of the 2 × 2 pixel block to combine into a G component2A component;
step S2, converting the four channels G1RBG2The model is switched to the four-channel YDgCoCg model, shown in FIG. 3, eliminating G1RBG2The correlation among the four channels reduces the bit number required by coding;
step S3, DCT and JPEG chroma quantization are carried out on the Dg, Co and Cg components in the step S2 to generate Dg ', Co ' and Cg ';
step S4, IDCT, reverse quantization Cg 'generation Cg', mathematical optimization, calculation generationThe recovered luminance component is closer toWill introduce less distortion;
Step S6, JPEG-chroma coding the Dg ', Co' and Cg 'generated in S3, and JPEG-chroma coding the Dg', Co 'and Cg' produced in S5JPEG brightness coding is carried out, and the code stream is sent;
step S7, receiving the code stream, performing inverse coding, inverse quantization, IDCT and inverse color space conversion, and recovering the CFA image; the method specifically comprises the following steps:
s71, receiving data, and sequentially performing inverse coding, inverse quantization and IDCT generationDg″、Co″、Cg″;
s73, the reverse operation of S1 is performed to recover Bayer-CFA.
The present invention has higher restoration quality by calculating the restoration quality of the compressed image by restoring the CFA 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 (4)
1. The mosaic image compression method based on the novel color space conversion comprises the following steps:
step 1, G in RGGB type CFA image1、R、B、G2The 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;
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
Step 5, comparing the brightness component in the step 4DCT and JPEG brightness quantization are performed to generate brightness component
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 toJPEG 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.
4. the method for compressing a mosaic image based on novel color space conversion according to claim 1, wherein said step 7 specifically comprises:
s71, receiving data, and performing inverse coding, inverse quantization and IDCT to generate componentDg″、Co″、Cg″;
S72, component pairDg ', Co ', Cg ' are inverse color space converted to obtain a component G1″、R″、B″′、G″2:
S73, component G1″、R″、B″′、G″2The reverse operation of step 1 is performed to recover the RGGB type CFA image.
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 true CN111654705A (en) | 2020-09-11 |
CN111654705B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114066736A (en) * | 2022-01-17 | 2022-02-18 | 电子科技大学 | Template information assisted color image demosaicing method |
CN117579839A (en) * | 2024-01-15 | 2024-02-20 | 电子科技大学 | Image compression method based on rate-distortion optimized color space conversion matrix |
Citations (13)
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 |
US20070252850A1 (en) * | 2006-04-26 | 2007-11-01 | Sharp Kabushiki Kaisha | Image processing method and image processing apparatus |
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 |
US20200014923A1 (en) * | 2018-07-06 | 2020-01-09 | Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. | Compression of a raw image |
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 |
-
2020
- 2020-06-05 CN CN202010505297.2A patent/CN111654705B/en active Active
Patent Citations (13)
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 |
US20070252850A1 (en) * | 2006-04-26 | 2007-11-01 | Sharp Kabushiki Kaisha | Image processing method and image processing apparatus |
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 |
US20200014923A1 (en) * | 2018-07-06 | 2020-01-09 | Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. | Compression of a raw image |
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 (4)
Title |
---|
STEPHY SEBASTIAN: "color image compression using JPEG2000 with adaptive color space transform", 《2014 INTERNATIONAL CONFERENCE ON ELECTRONICS AND COMMUNICATION SYSTEM》 * |
崔唱: "新型图像压缩及优化算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
王世根: "《多媒体技术教程》", 30 November 1994, 上海科学普及出版社 * |
郭建湘等: "基于CMOS图像传感器DCT算法的JPEG压缩研究", 《现代制造技术与装备》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114066736A (en) * | 2022-01-17 | 2022-02-18 | 电子科技大学 | Template information assisted color image demosaicing method |
CN114066736B (en) * | 2022-01-17 | 2022-05-03 | 电子科技大学 | Template information assisted color image demosaicing method |
CN117579839A (en) * | 2024-01-15 | 2024-02-20 | 电子科技大学 | Image compression method based on rate-distortion optimized color space conversion matrix |
CN117579839B (en) * | 2024-01-15 | 2024-03-22 | 电子科技大学 | Image compression method based on rate-distortion optimized color space conversion matrix |
Also Published As
Publication number | Publication date |
---|---|
CN111654705B (en) | 2022-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200195851A1 (en) | Compression and decoding of single sensor color image data | |
US8428120B2 (en) | Method and apparatus of Bayer pattern direct video compression | |
CN101107838B (en) | Image processing device, image processing method, and imaging device | |
CN107580222B (en) | Image or video coding method based on linear model prediction | |
US20150125075A1 (en) | Method, medium, and system encoding and/or decoding an image using image slices | |
CN101170707B (en) | Image format conversion and recovery method and device | |
CN111654705B (en) | Mosaic image compression method based on color space conversion | |
CN107483850B (en) | low-delay high-definition digital image transmission method | |
CN102356635A (en) | Video acquisition and processing systems | |
CN1695381A (en) | Sharpness enhancement in post-processing of digital video signals using coding information and local spatial features | |
CN107105208A (en) | A kind of lossless coding and coding/decoding method of Bayer images | |
CN112995664B (en) | Image sampling format conversion method, computer-readable storage medium, and encoder | |
JP2003046786A (en) | Digital image system for reducing color aliasing artifact | |
CN110868603B (en) | Bayer image compression method | |
CN101656889B (en) | High definition video real time compressing as well as coding and decoding method | |
US7194129B1 (en) | Method and system for color space conversion of patterned color images | |
WO2022141515A1 (en) | Video encoding method and device and video decoding method and device | |
CN112509071B (en) | Chroma information compression and reconstruction method assisted by luminance information | |
WO2019237659A1 (en) | Blind compressive sampling method, apparatus and imaging system | |
CN107257493A (en) | Handle the method and device of image/video data | |
CN113852820B (en) | Novel color space conversion matrix generation method | |
CN110636304B (en) | YCbCr444 and YCbCr422 conversion method | |
Lin et al. | Adjusted 4: 2: 2 chroma subsampling strategy for compressing mosaic videos with arbitrary RGB color filter arrays in HEVC | |
CN114189688B (en) | Chrominance component prediction method based on luminance template matching | |
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 |