CN102752539B - A kind of method for realizing double-color special effect - Google Patents
A kind of method for realizing double-color special effect Download PDFInfo
- Publication number
- CN102752539B CN102752539B CN201110392026.1A CN201110392026A CN102752539B CN 102752539 B CN102752539 B CN 102752539B CN 201110392026 A CN201110392026 A CN 201110392026A CN 102752539 B CN102752539 B CN 102752539B
- Authority
- CN
- China
- Prior art keywords
- color
- pixel
- maximum
- minimum value
- image display
- 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
Links
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
The invention discloses a kind of method for realizing double-color special effect, specifically include:Obtain minimum value and the maximum of image display parameters in material color space and be the different color of its setting, obtain minimum value pixel color and maximum pixel color;The numerical value of the minimum value and maximum of described image display parameters image display parameters corresponding with each pixel respectively makes the difference, and obtained absolute value is used as the first difference and the second difference;The ratio comprising the minimum value pixel color and maximum pixel color in the color of each pixel is determined according to first difference and the second difference;The color of each pixel according to the ratio-dependent of the maximum pixel color and minimum value pixel color;The color of each pixel is mapped in the material, realizes and only includes maximum pixel color and minimum value pixel color and the therebetween stunt of gradual change.
Description
Technical field
The present invention relates to the special technology making field in Non-linear Editing Technique field, more particularly to a kind of double-color special effect of realizing
Method.
Background technology
In video production technical field, the making of stunt is an indispensable part, especially handles vedio color
Stunt is also various.
In current non-linear editing software, the stunt of processing vedio color has chroma key stunt, color calibration special effect, RGB
Color calibration special effect.Chroma key is to scratch to remove a certain color in image, becomes transparent or semitransparent, with other map overlays, appears
The color of other figure layers is come;Colour correction is colourity, saturation degree, contrast by adjusting image etc., integrally-regulated image
Color;RGB color color correction is R, G, B value by adjusting image, to change the color that image is overall.
In video production technical field, required stunt is more and more diversified, is not deposited during existing special technology making
Coloured image is being changing into the image that only two kinds blend of colors are constituted.
The content of the invention
In order to solve the shortcoming of above-mentioned prior art, the main object of the present invention is to provide a kind of side for realizing double-color special effect
Method, a kind of image stunt being made up of two kinds of blend of colors is turned into realize to change coloured image.
In order to achieve the above object, the invention provides a kind of method for realizing double-color special effect, specifically include:
Obtain the minimum value and maximum of image display parameters in material color space;
The respectively minimum value of described image display parameters pixel corresponding with the maximum of described image display parameters is set
Fixed different color, obtains minimum value pixel color and maximum pixel color;
The numerical value of the minimum value of described image display parameters image display parameters corresponding with each pixel makes the difference, and obtains
Absolute value is used as the first difference;
The numerical value of the maximum of described image display parameters image display parameters corresponding with each pixel makes the difference, and obtains
Absolute value is used as the second difference;
The ratio of the minimum value pixel color is included in the color that each pixel is determined according to first difference;
The ratio of the maximum pixel color is included in the color that each pixel is determined according to second difference;
Each picture according to the ratio-dependent of the ratio of the maximum pixel color and the minimum value pixel color
The color of element;
The color of each pixel is mapped in the material, the maximum pixel color and minimum value is shown in
The stunt of gradual change between pixel color.
The present invention is its choosing by the maximum and minimum value of any one image display parameters for obtaining coloured image
Fixed two kinds of colors, it is every in the range of determining maximum and minimum value according to current pixel value and the difference of maximum and minimum value
The ratio containing maximum pixel color and minimum value pixel color of one pixel, obtain it is a kind of have fade effect and containing only
There is the image special effects of two kinds of colors.
Brief description of the drawings
For the technical scheme of the clearer explanation embodiment of the present invention, used required in being described below to embodiment
Accompanying drawing be briefly described, it is clear that, drawings in the following description are only some embodiments of the present invention, for this
For the those of ordinary skill of field, on the premise of not paying creative work, it can also obtain other according to these accompanying drawings
Accompanying drawing.
Fig. 1 is a kind of method flow diagram for realizing double-color special effect in the embodiment of the present invention one;
Fig. 2 realizes the method flow diagram of double-color special effect for another processing in the embodiment of the present invention two.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Whole description, it is clear that described embodiment is only a part of embodiment of the present invention, the embodiment being not all of, based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not paid
Example, belongs to the scope of protection of the invention.
On the one hand the embodiment of the present invention realizes the method for double-color special effect there is provided a kind of, as shown in figure 1, specifically including:
Step S101:Obtain the minimum value and maximum of image display parameters in material color space.
Wherein, image display parameters can describe the parameter of image information variable quantity for any one, such as optional color is empty
Between a certain value as reference, Y, U and V in yuv space are any;Or, H, S and I in HSI spaces are any;Or, rgb space
In R, G and B it is any.
Step S102:Respectively the minimum value of described image display parameters is corresponding with the maximum of described image display parameters
The different color of pixel placement, obtain minimum value pixel color and maximum pixel color.
Step S103:The numerical value of the minimum value of described image display parameters image display parameters corresponding with each pixel is done
Difference, obtained absolute value is used as the first difference.
Step S104:The numerical value of the maximum of described image display parameters image display parameters corresponding with each pixel is done
Difference, obtained absolute value is used as the second difference.
Step S105:Determined to include the minimum value pixel face in the color of each pixel according to first difference
The ratio of color.
Step S106:Determined to include the maximum pixel face in the color of each pixel according to second difference
The ratio of color.
Step S107:According to the ratio-dependent institute of the ratio of the maximum pixel color and the minimum value pixel color
State the color of each pixel.
Specifically, determining the method for each pixel color, calculated according to equation below:
Wherein, D1 is the first difference, and D2 is the second difference, and max is the maximum of image display parameters, and min is aobvious for image
Show the minimum value of parameter, Cmin is the image display parameters value of minimum value pixel color, and Cmax is the figure of maximum pixel color
As display parameter value.
Step S108:The color of each pixel is mapped in the material, the maximum pixel face is shown in
The stunt of gradual change between color and minimum value pixel color.
The embodiment of the present invention by obtaining the maximum and minimum value of any one image display parameters of coloured image, and
Two kinds of colors are selected for it, according to current pixel value and the difference of maximum and minimum value, determining maximum and minimum value scope
The ratio containing maximum pixel color and minimum value pixel color of interior each pixel, obtaining one kind has fade effect simultaneously
And comprise only the image special effects of two kinds of colors.
The embodiment of the present invention two is to realizing that the method for double-color special effect is further described in detail in embodiment one, this implementation
In row by taking coloured image as an example, and elect image display parameters as monochrome information, do not regard it as certainly and be limited, concrete implementation mistake
Journey is as shown in Fig. 2 as follows:
Step S201:The coloured image is divided according to the monochrome information of current color image, and obtains brightness
Maxima and minima.
It is preferred that, after the monochrome information for getting current color image, the coloured image can be drawn according to brightness value
It is divided into black and white two parts.
Step S202:Two kinds of different colors are selected according to user's request, and one of them is set as that minimum value is shown
Color, another color settings are the color that shows of maximum.
Step S203:Each brightness value between maxima and minima is made the difference with max min, obtains current
Pixel includes the percentage of the two kinds of colors included in step S202, and carries out the mixing of two kinds of colors, obtains current pixel
Color.
In this implementation row, the excursion of brightness value is [min, max], by the corresponding color of other brightness values in image
Value, new color value is mapped as by equation below.
The RGB color of current pixel is after conversion:Dr Dg Db;
The brightness of current pixel is Sl before conversion;
The color RGB definition of maximum pixel-map:LightColor_r LightColor_g LightColor_b;
The color RGB definition of minimum value pixel-map:DarkColor_r DarkColor_g DarkColor_b;
Current pixel RGB color calculating process after then converting is as follows:
Dr=(Sl-min)/(max-min) * DarkColor_r+ (1- (Sl-min)/(max-min)) * LightColor_
r;
Dg=(Sl-min)/(max-min) * DarkColor_g+ (1- (Sl-min)/(max-min)) * LightColor_
g;
Db=(Sl-min)/(max-min) * DarkColor_b+ (1- (Sl-min)/(max-min)) * LightColor_
b。
Step S204:The color of each pixel obtained after above-mentioned calculating is mapped in described image, is shown in described
The stunt of gradual change between the color that the color and minimum value pixel that maximum pixel is shown are shown.
The embodiment of the present invention selectes two kinds of face by obtaining the maximum and minimum value of the brightness value of coloured image for it
Color, according to current pixel value and maximum and the difference of minimum value, each pixel in the range of determining maximum and minimum value
Ratio containing maximum pixel color and minimum value pixel color, obtaining one kind has fade effect and comprises only two kinds of face
The image special effects of color.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can lead to
Software realization is crossed, the mode of necessary general hardware platform can also be added to realize by software.Understood based on such, this hair
Bright technical scheme can be embodied in the form of software product, and the software product can be stored in a non-volatile memories
Medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in, including some instructions are to cause a computer equipment (can be
Personal computer, server, or network equipment etc.) perform method described in each of the invention embodiment.
It is described above, be only the present invention specific embodiment, but the present invention feature be not limited thereto, it is any be familiar with should
The people of item technology is in field of the present invention, the change or modification that can be readily occurred in, and should all cover special in application of the invention below
In sharp scope.
Claims (3)
1. a kind of method for realizing double-color special effect, it is characterised in that this method includes:
Obtain the minimum value and maximum of image display parameters in material color space;
Respectively the minimum value of described image display parameters pixel placement corresponding with the maximum of described image display parameters is not
Same color, obtains minimum value pixel color and maximum pixel color;
The numerical value of the minimum value of described image display parameters image display parameters corresponding with each pixel makes the difference, and what is obtained is absolute
Value is used as the first difference;
The numerical value of the maximum of described image display parameters image display parameters corresponding with each pixel makes the difference, and what is obtained is absolute
Value is used as the second difference;
The ratio of the minimum value pixel color is included in the color that each pixel is determined according to first difference;
The ratio of the maximum pixel color is included in the color that each pixel is determined according to second difference;
Each pixel according to the ratio-dependent of the ratio of the maximum pixel color and the minimum value pixel color
Color;
The color of each pixel is mapped in the material, the maximum pixel color and minimum value pixel is shown in
The stunt of gradual change between color.
2. the as claimed in claim 1 method for realizing double-color special effect, it is characterised in that described image display parameters are specially:
Y, U and V in yuv space is any;Or,
H, S and I in HSI spaces is any;Or,
R, G and B in rgb space is any.
3. the method as claimed in claim 1 for realizing double-color special effect, it is characterised in that the color of each pixel of determination
Process is specially:
<mrow>
<mfrac>
<mrow>
<mi>D</mi>
<mn>1</mn>
</mrow>
<mrow>
<mi>m</mi>
<mi>a</mi>
<mi>x</mi>
<mo>-</mo>
<mi>m</mi>
<mi>i</mi>
<mi>n</mi>
</mrow>
</mfrac>
<mo>*</mo>
<mi>C</mi>
<mi>m</mi>
<mi>i</mi>
<mi>n</mi>
<mo>+</mo>
<mfrac>
<mrow>
<mi>D</mi>
<mn>2</mn>
</mrow>
<mrow>
<mi>m</mi>
<mi>a</mi>
<mi>x</mi>
<mo>-</mo>
<mi>m</mi>
<mi>i</mi>
<mi>n</mi>
</mrow>
</mfrac>
<mo>*</mo>
<mi>C</mi>
<mi>m</mi>
<mi>a</mi>
<mi>x</mi>
</mrow>
Wherein, D1 is the first difference, and D2 is the second difference, and max is the maximum of image display parameters, and min is that image shows ginseng
Several minimum values, Cmin is the image display parameters value of minimum value pixel color, and Cmax shows for the image of maximum pixel color
Show parameter value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110392026.1A CN102752539B (en) | 2011-11-30 | 2011-11-30 | A kind of method for realizing double-color special effect |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110392026.1A CN102752539B (en) | 2011-11-30 | 2011-11-30 | A kind of method for realizing double-color special effect |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102752539A CN102752539A (en) | 2012-10-24 |
CN102752539B true CN102752539B (en) | 2017-09-12 |
Family
ID=47032420
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110392026.1A Active CN102752539B (en) | 2011-11-30 | 2011-11-30 | A kind of method for realizing double-color special effect |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102752539B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1133165A2 (en) * | 1995-10-27 | 2001-09-12 | Ricoh Company, Ltd. | Color image forming apparatus having function for duplicating image in two desired colors |
CN101068350A (en) * | 2007-06-04 | 2007-11-07 | 北京派瑞根科技开发有限公司 | Image coding and decoding processing method based on picture element st atistical characteristic and visual characteristic |
CN101090448A (en) * | 2006-06-12 | 2007-12-19 | 株式会社东芝 | Image forming apparatus and image forming method |
CN101193319A (en) * | 2006-11-29 | 2008-06-04 | 帆宣系统科技股份有限公司 | Gain decision method and device for gray-level white balance of display device |
CN101233542A (en) * | 2005-05-27 | 2008-07-30 | 艾利森电话股份有限公司 | Weight based image processing |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4086002B2 (en) * | 2004-03-26 | 2008-05-14 | 株式会社セガ | Program, image processing apparatus and method, and recording medium |
-
2011
- 2011-11-30 CN CN201110392026.1A patent/CN102752539B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1133165A2 (en) * | 1995-10-27 | 2001-09-12 | Ricoh Company, Ltd. | Color image forming apparatus having function for duplicating image in two desired colors |
CN101233542A (en) * | 2005-05-27 | 2008-07-30 | 艾利森电话股份有限公司 | Weight based image processing |
CN101090448A (en) * | 2006-06-12 | 2007-12-19 | 株式会社东芝 | Image forming apparatus and image forming method |
CN101193319A (en) * | 2006-11-29 | 2008-06-04 | 帆宣系统科技股份有限公司 | Gain decision method and device for gray-level white balance of display device |
CN101068350A (en) * | 2007-06-04 | 2007-11-07 | 北京派瑞根科技开发有限公司 | Image coding and decoding processing method based on picture element st atistical characteristic and visual characteristic |
Also Published As
Publication number | Publication date |
---|---|
CN102752539A (en) | 2012-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105047145B (en) | Backlight brightness control method, backlight brightness control devices and display terminal | |
CN104076928B (en) | A kind of method for adjusting text importing image | |
CN108109180A (en) | The method and display device that a kind of high dynamic range images to input are handled | |
CN107705264B (en) | Image processing method, electronic equipment and device with storage function | |
CN101360250B (en) | Immersion method and system, factor dominating method, content analysis method and parameter prediction method | |
CN101866621A (en) | LED display screen correction system and method | |
CN101115211A (en) | Color independent reinforcement processing method | |
CN107438182A (en) | Method and apparatus for being encoded/decoded to HDR picture | |
CN102281381B (en) | A kind of processing method and processing unit carrying out image blend | |
CN106454303B (en) | RGBW image processing methods and device | |
CN105955754B (en) | A kind of user interface character displaying method and device | |
CN107211142A (en) | The method and apparatus decoded to coloured image | |
CN106228581A (en) | By GPU, pixel format is converted to by ARGB the method and system of NV12 | |
CN104360829B (en) | The method and apparatus for adjusting screen color temp | |
CN102750116B (en) | A kind of method of YUV color space over range signal processing | |
CN102663741A (en) | Method for carrying out visual stereo perception enhancement on color digit image and system thereof | |
CN101388203A (en) | Display method of mobile terminal and the mobile terminal | |
CN113132696A (en) | Image tone mapping method, device, electronic equipment and storage medium | |
TWI278825B (en) | Color display device, color compensation method, color compensation program, and storage medium readable by computer | |
CN109493826A (en) | Electronic console border gain system and method | |
CN103456280A (en) | Method for displaying RGB color image | |
CN110277076B (en) | Color mapping method and device, display equipment and medium | |
CN106780648B (en) | A kind of dynamic mapping method and device of color of image | |
CN104715454B (en) | A kind of antialiasing figure stacking method | |
CN100369065C (en) | Method for dynamic changing picture element colour and method for changing image colour |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |