CN1272745C - Colour treatment method and device - Google Patents

Colour treatment method and device Download PDF

Info

Publication number
CN1272745C
CN1272745C CN 03110264 CN03110264A CN1272745C CN 1272745 C CN1272745 C CN 1272745C CN 03110264 CN03110264 CN 03110264 CN 03110264 A CN03110264 A CN 03110264A CN 1272745 C CN1272745 C CN 1272745C
Authority
CN
China
Prior art keywords
imax
imin
ibase
value
ratio factor
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.)
Expired - Fee Related
Application number
CN 03110264
Other languages
Chinese (zh)
Other versions
CN1536530A (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.)
Silicon Integrated Systems Corp
Original Assignee
Silicon Integrated Systems Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Silicon Integrated Systems Corp filed Critical Silicon Integrated Systems Corp
Priority to CN 03110264 priority Critical patent/CN1272745C/en
Publication of CN1536530A publication Critical patent/CN1536530A/en
Application granted granted Critical
Publication of CN1272745C publication Critical patent/CN1272745C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Processing Of Color Television Signals (AREA)
  • Image Processing (AREA)

Abstract

The present invention relates to a color processing method which is mainly used for enhancing the intensity and the saturation of a color at an RGB value domain. When a pixel point is to be enhanced, a group of color values (R', G', B') are calculated according to original color values (R, G, B). The intensity values of the original red, green and blue are used for obtaining a ratio factor and an intensity basic value. Then, the ratio factor and a ratio factor controlled by a user are compared so as to obtain a final ratio factor. According to the final ratio factor and the intensity basic value, and the new group of color values, a group of new color values are calculated so as to enhance the intensity and the saturation of the pixel.

Description

Color processing method and device
Technical field
The present invention relates to computer graphic and learn and image processing, particularly a kind of computer graphic that is used for is learned method and the device of handling with the color of image processing.
Background technology
No matter be the computer screen that tame manufacturer produces, usually between pixel value and colouring intensity, show a nonlinear relation, because the characteristic of this hardware, when an image is presented on the screen, more original pixel value of giving is also dark usually for this image, in order to revise this problem, promptly there is the method for multiple enhancing colouring intensity technology to be suggested.
Traditional color processing method is indivedual red, green, as to reach blueness intensity levels that strengthen, for example the new red color intensity of a pixel is determined by its original red color intensity, the new green intensity of a pixel is determined by its original green intensity, and the new blue intensities of a pixel is determined by its original blue intensities.For example; A well-known color processing method is called gamma to be revised, and it improves each color channels according to a nonlinear function of each color channels itself.For example, the gamma to red channel revises and can be expressed as:
R i’=kRi 1/γr
Wherein Ri is the red color intensity of input, R i' be that k is a constant through the revised red color intensity of gamma, and γ rIt is the gamma correction factor of red channel.As shown in Figure 1, this gamma revises and can't change zero and maximum intensity, and only therein scope changes its intensity.Similarly gamma revises and also acts on green and blue channel respectively then.
Another traditional color processing method is to adopt the mathematical form of a simplification to carry out the effect that similar gamma revises.For example, the new intensity of red channel can be calculated as follows:
R i’=2R i-R i2,
R wherein iBe through the input red color intensity between 0 and 1 after the regularization, R i' be revised red color intensity, its value also falls between 0 and 1.On practice, if red color intensity represent with 8 bits, promptly be between 0 and 255, then its new intensity should be calculated as follows:
A function with Imin;
One difference block, be used for calculating the original intensity level of this pixel (R, G, B) as follows with the difference value of this Ibase:
Rd=R-Ibase,
Gd=G-Ibase, and
Bd=B-Ibase;
One ratio product block is used for this Rd that this difference block is produced, Gd, and Bd is on duty as follows with this ratio factor S:
Rs=S*Rd,
Gs=S*Gd, and
Bs=S*Bd;
One compensation block is revised this Rs with this Ibase value, GS, and the Bs value is as follows:
R’=Rs+Ibase,
G '=Gs+Ibase, and
B’=Bs+Ibase。
Wherein be somebody's turn to do (R ', G ', B ') be the enhancing value of this pixel.
5. color processing apparatus as claimed in claim 1 is characterized in that: wherein this function f 1 for Smax=f1 (Imax, Imin)=(511-Imax)/256.
6. color processing apparatus as claimed in claim 1 is characterized in that: wherein this function f 2 for Ibase=f2 (Imax, Imin)=Imin*Imax/256.0.
Fig. 5 is the calcspar according to the device of the embodiment of Fig. 4.
Embodiment
Be illustrated in figure 2 as the process flow diagram of color processing method of the present invention, make R, G, B represent the intensity of red, the green and blue channel of a pixel respectively.When a pixel will strengthen, import (R, the G of this pixel, B) value obtains (R, G, B) after the value, these R, G, Imax and Imin will be calculated and be made as respectively to the maximal value of B value and minimum value, wherein Imax=max (R, G, B), promptly be the maximal value of R, G and B, Imin=min (R, G B), promptly is the minimum value of R, G and B.
Next step is to calculate maximum ratio factor S max, the function that it is defined as parameter Imax and Imin, also be Smax=f1 (Imax, Imin).Following step is calculating strength basic value Ibase then, and also is defined as the function of parameter Imax and Imin, its calculate the back and be designated as Ibase=f2 (Imax, Imin).
Following step is to decide a final ratio factor according to this maximum ratio factor and the random ratio factor of controlling of user.If this user keys in the value of a ratio factor, this final ratio factor ratio factor smaller between the two of being set at this maximum ratio factor and this user control then, promptly be S=min (Smax, Suser), otherwise, this final ratio factor is set the maximum for this reason ratio factor, also is S=Smax.Actual color enhancing program comprise calculating pixel new (R, G, B) intensity level, this color enhancing program is used two parameters, S and Ibase, again according to original (R, G, B) value go to calculate the enhanced strength value (R ', G ', B '), its account form is to utilize following formula:
R’=S*(R-Ibase)+Ibase,
G’=S*(G-Ibase)+Ibase,
B’=S*(B-Ibase)+Ibase。
Be illustrated in figure 3 as a calcspar of carrying out the device of color processing according to the present invention.Ordering block 301 reads in the original R of pixel, a G, B value, exports maximal value (Imax) and minimum value (Imin) in these R, G, the B value again.Ratio judges that block 302 receives the ratio factor by user random (optional) control, the value of this ratio factor is keyed in by this user, Imax and the Imin value of being calculated by ordering block 301 also sent into ratio judgement block 302 in addition, exports the final ratio factor after judging at last again.Basic value judgement block 303 usefulness Imax and Imin value are calculated an intensity basic value Ibase value.
Color of the present invention strengthens S and the Ibase value of program according to aforementioned calculation, again according to after difference step 304, ratio product step 305 and compensation process 306 calculating, obtains the enhancing value (R ', G ', B ') of a new input pixel.This difference step 304 is to calculate the difference value of an original intensity level of pixel and the previous Ibase value of calculating, and it is calculated as follows:
Rd=R-Ibase,
Gd=G-Ibase, and
Bd=B-Ibase。
It is as follows that the output valve that ratio product step 305 item produces difference step 304 is done product:
Rs=S*Rd,
Gs=S*Gd, and
Bs=S*Bd。
306 of last compensation process are that the ratio product value of previous calculations is done correction and added the Ibase value, and it is calculated as follows:
R’=Rs+Ibase,
G '=Gs+Ibase, and
B’=Bs+Ibase。
The enhancing value of pixel is promptly imported in last output (R ', G ', B ') for this reason.
As shown in Figure 4, be the process flow diagram of another preferred embodiment of the present invention.Among this embodiment, ratio factor S max is a function that is calculated as variable Imax and Imin, also is Smax=(511-Imax)/256.Basic value Ibase is a function that is calculated as variable Imax and Imin, also is Ibase=(Imax*Imin)/256.Fig. 5 then is the device that embodiment finished according to Fig. 4.
As discussed previously, maximum ratio factor S max and intensity basic value Ibase are the functions that is defined as Imax and Imin.The preferred embodiment of Fig. 4 provides this two each example.Other may but the function that is not limited to these can be used to calculate Smax effectively and Ibase is as follows:
Smax=f1(Imax,Imin)=2-Imax/255,
Smax=f1(Imax,Imin)=(511-Imax)/255,
Smax=f1(Imax,Imin)=255/Imax,
Smax=f1(Imax,Imin)=(255-Imin)/(Imax-Imin),
Smax is a gamma fair curve,
Ibase=f2(Imax,Imin)=0,
Ibase=f2(Imax,Imin)=Imin,
Ibase=f2 (Imax, Imin)=Imin*Imax/255.0, and
Ibase=f2(Imax,Imin)=Imin*Imax/256.0。
The above person is preferred embodiment of the present invention only, is not the scope that is used for limiting the embodiment of the invention.All according to equal variation and modification that the present invention did, all covered by claim of the present invention.

Claims (6)

1. color processing method comprises the following step:
(a) read in a pixel (R, G, B) value;
(b) calculate Imax and Imin, this Imax and Imin are respectively maximal value and the minimum value in this R, G and the B value;
(c) calculate a maximum ratio factor S max=f1 (Imax, Imin), this F1 is the function of this Imax and Imin;
(d) calculate an intensity basic value Ibase=f2 (Imax, Imin), this f2 is the function of this Imax and Imin;
(e) read in the user ratio factor S user of control arbitrarily;
(f) if this Suser is keyed in a value, (Smax Suser), is the minimum value of this Smax and Suser then to set a final ratio factor S=min; If this Suser is not keyed in any one value, then set final ratio factor S=Smax; And
(g) according to following formula, calculate that this pixel strengthens (R ', G ', B ') value:
R’=S*(R-Ibase)+Ibase,
G’=S*(G-Ibase)+Ibase,
B’=S*(B-Ibase)+Ibase。
2. color processing method as claimed in claim 1 is characterized in that: this function f 1 for Smax=f1 (Imax, Imin)=(511-Imax)/256.0.
3. color processing method as claimed in claim 1 is characterized in that: this function f 2 for Ibase=f2 (Imax, Imin)=Imin*Imax/256.0.
4. the device handled of a color is characterized in that it includes:
One ordering block is used for reading in the original R of pixel, a G, B value, and output Imax and Imin, this Imax and Imin are respectively maximal value and the minimum value in this R, G and the B value;
One ratio is judged block, be used for receiving a ratio factor S user who controls arbitrarily by the user, if this Suser is keyed in a value, determine that then (Smax Suser), is keyed in any one value as if this Suser to final ratio factor S=min, then determine final ratio factor S=Smax, this Smax for this Imax and Imin calculate the maximum ratio factor S max=f1 (Imax, Imin), this f1 is the function of this Imax and Imin;
One basic value is judged block, be used for calculating Ibase=f2 (Imax, Imin), this f2 is the function of this Imax and Imin;
One difference block, be used for calculating the original intensity level of this pixel (R, G, B) as follows with the difference value of this Ibase:
Rd=R-Ibase,
Gd=G-Ibase, and
Bd=B-Ibase;
One ratio product block is used for this Rd that this difference block is produced, Gd, and Bd is on duty as follows with this ratio factor S:
Rs=S*Rd,
Gs=S*Gd, and
Bs=S*Bd;
One compensation block is revised this Rs with this Ibase value, GS, and the Bs value is as follows:
R’=Rs+Ibase,
G '=Gs+Ibase, and
B’=Bs+Ibase。
Wherein be somebody's turn to do (R ', G ', B ') be the enhancing value of this pixel.
5. color processing apparatus as claimed in claim 1 is characterized in that: wherein this function f 1 for Smax=f1 (Imax, Imin)=(511-Imax)/256.
6. color processing apparatus as claimed in claim 1 is characterized in that: wherein this function f 2 for Ibase=f2 (Imax, Imin)=Imin*Imax/256.0.
CN 03110264 2003-04-09 2003-04-09 Colour treatment method and device Expired - Fee Related CN1272745C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 03110264 CN1272745C (en) 2003-04-09 2003-04-09 Colour treatment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 03110264 CN1272745C (en) 2003-04-09 2003-04-09 Colour treatment method and device

Publications (2)

Publication Number Publication Date
CN1536530A CN1536530A (en) 2004-10-13
CN1272745C true CN1272745C (en) 2006-08-30

Family

ID=34319654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 03110264 Expired - Fee Related CN1272745C (en) 2003-04-09 2003-04-09 Colour treatment method and device

Country Status (1)

Country Link
CN (1) CN1272745C (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764910B (en) * 2008-12-08 2011-08-24 新奥特(北京)视频技术有限公司 High-efficiency image color suppression method
JP6415063B2 (en) * 2014-02-21 2018-10-31 キヤノン株式会社 Image processing apparatus, image processing method, control program, and recording medium
JP6415062B2 (en) * 2014-02-21 2018-10-31 キヤノン株式会社 Image processing apparatus, image processing method, control program, and recording medium
CN103974052B (en) * 2014-04-28 2016-08-03 深圳市云宙多媒体技术有限公司 The method of adjustment of a kind of image saturation, device and equipment
CN110672180A (en) * 2019-10-09 2020-01-10 安徽建筑大学 Automatic underpass interchange road water accumulation detection and early warning system based on image processing

Also Published As

Publication number Publication date
CN1536530A (en) 2004-10-13

Similar Documents

Publication Publication Date Title
CN109410126B (en) Tone mapping method of high dynamic range image with detail enhancement and brightness self-adaption
CN1708137A (en) Saturation-adaptive image enhancement apparatus and method
US6826310B2 (en) Automatic contrast enhancement
CN1300744C (en) Automatic method for modifying digital image and system of adopting the method
CN1135501C (en) Picture processing method and apparatus
DE602005006010T2 (en) DEVICE, SYSTEM AND METHOD FOR OPTIMIZING GAMMA CURVES FOR DIGITAL IMAGE GENERATING DEVICES
CN1910901A (en) Smart clipper for mobile displays
US10839495B2 (en) Computing devices and methods of image processing with input image data and reference tone mapping strength data
CN1753506A (en) Method of implementing CMOS image real time reinforcing pretreatment
CN1890692A (en) Image adjustment with tone rendering curve
TWI386866B (en) Gradation correction device, gradation correction method and gradation correction program
CN1774030A (en) Method for reducing noise in images
CN1731451A (en) Method of image color enhancement
US8111301B2 (en) Method of performing auto white balance in YCbCr color space
CN1905624A (en) Picture signal processor and picture signal processing method
CN1272745C (en) Colour treatment method and device
JP2021506001A5 (en)
CN101047773A (en) Imaging apparatus, video signal processing circuit, video signal processing method and computer program product
CN1298154C (en) Device and method for color reduction
US20020118889A1 (en) Image status estimating method, image correcting method, image correction apparatus, and storage medium
CN1781319A (en) Color balance adjustment conducted considering color reproducibility of specific color
CN1309247C (en) Device and method used for adaptive brightness control
TWI462575B (en) Image processing apparatus and image processing method
CN1741617A (en) Handle the equipment and the method for the shoot artifacts of picture signal
CN1469311A (en) Method for regulation processing black colour and driver thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee