CN104392419B - A kind of method that dark angle effect is added for image - Google Patents

A kind of method that dark angle effect is added for image Download PDF

Info

Publication number
CN104392419B
CN104392419B CN201410730020.4A CN201410730020A CN104392419B CN 104392419 B CN104392419 B CN 104392419B CN 201410730020 A CN201410730020 A CN 201410730020A CN 104392419 B CN104392419 B CN 104392419B
Authority
CN
China
Prior art keywords
masking
image
value
color value
ndrakvalue
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
CN201410730020.4A
Other languages
Chinese (zh)
Other versions
CN104392419A (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.)
Xiamen Meitu Technology Co Ltd
Original Assignee
Xiamen Meitu Technology Co Ltd
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 Xiamen Meitu Technology Co Ltd filed Critical Xiamen Meitu Technology Co Ltd
Priority to CN201410730020.4A priority Critical patent/CN104392419B/en
Publication of CN104392419A publication Critical patent/CN104392419A/en
Application granted granted Critical
Publication of CN104392419B publication Critical patent/CN104392419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method that dark angle effect is added for image, it is by presetting masking-out image, the periphery of masking-out image is white, center is black, and center to periphery is from black to white gradual transition, and default masking-out image is zoomed in and out, make it consistent with the size of pending image, then processing is adjusted to the pixel of pending image according to masking-out image, obtain result images, so as to be dimmed to image surrounding, and image center is lightened, make the dark angle after adjustment better, tone transition is more natural, appreciating is more preferable, and constituency need not be defined, it is swift to operate.

Description

A kind of method that dark angle effect is added for image
Technical field
The present invention relates to a kind of image processing techniques, particularly a kind of method that dark angle effect is added for image.
Background technology
Dark angle one word belongs to photographic terms, and against brightness uniformity scenery, there is dimmed phenomenon picture corner, is called and " loses Light ", it is commonly called as at " dark angle ".Often occurring photo picture burnt hair in portrait photo, level shows indefinite situation, so that Theme does not protrude, and whole picture looks dull, and current image processing software is mainly four corners for image Increase low key tone, so as to realize the effect at dark angle, to show mystique and a kind of sensation of particular surroundings, but it is this adjust it is past Toward the complete visual impression of adjustment can be made partially dark, so as to influence the appreciating of image.
The content of the invention
The present invention makes dark after adjustment to solve the above problems, provide a kind of method that dark angle effect is added for image Angle effect is more preferable, and tone transition is more natural, and appreciating is more preferable.
To achieve the above object, the technical solution adopted by the present invention is:
A kind of method that dark angle effect is added for image, it is characterised in that comprise the following steps:
10. default masking-out image, the periphery of masking-out image is white, and center is black, and center to periphery from black to White gradual transition;
20. load pending image and default masking-out image;
30. a pair default masking-out image zooms in and out, make it consistent with the size of pending image;
40. being adjusted processing to the pixel of pending image according to masking-out image, result images are obtained.
Preferably, masking-out image, the mainly dark angle color by presetting pending image are preset in described step 10 Value and center color value, and according to the transparence value and effect of dark angle color value and center color value calculating masking-out image Brightness value.
Preferably, processing is adjusted to the pixel of pending image according to masking-out image in described step 40, it is main If the masking-out brightness value of each pixel of masking-out image is worth to according to the transparence value of masking-out image and effect brightness, and root Brightness adjustment processing is carried out to the corresponding pixel points of pending image according to the masking-out brightness value, obtains result images.
Preferably, the computational methods of the transparence value of the masking-out image are as follows:
If dark angle color value is less than 13,
Reverse=0.024*nDrakValue*nDrakValue-1.2*nDrakValue+13.2;
If dark angle color value is more than or equal to 13 and less than or equal to 50,
Reverse=0.001*nDrakValue*nDrakValue-0.09*nDrakValue+3.26;
If dark angle color value is more than 50, less than or equal to 75, then
Reverse=-0.037*nDrakValue+2.886;
If dark angle color value is more than 75, less than or equal to 100, then
Reverse=0.001*nDrakValue*nDrakValue-0.04*nDrakValue+2.18;
Wherein, Reverse is the transparence value of masking-out image, and nDrakValue is dark angle color value.
Preferably, the computational methods of the effect brightness value of the masking-out image are as follows:
Light=0.0001*nCenter*nCenter-0.022*nCenter+1.82;
Wherein, light is the effect brightness value of masking-out image, color value centered on nCenter.
Preferably, the computational methods of described masking-out brightness value are as follows:
MaskLight=((1.0-mask) * light+mask) * (mask*alpha+1.0-mask);
Wherein, masklight is described masking-out brightness value, and mask is in the corresponding pixel points of described masking-out image Color value, light are the effect brightness value of masking-out image, and alpha is masking-out transparency.
Preferably, in described step 40, the corresponding pixel points of pending image are carried out according to the masking-out brightness value bright Adjustment processing is spent, mainly the pixel of pending image is adjusted according to default mapping table, adjustment formula is as follows:
Result=map [i] [l];
Wherein, result is the color value of result images corresponding pixel points, and map is default mapping table, and i is pending figure As the color value of corresponding pixel points;L is described masking-out brightness value.
Preferably, in described step 10, dark the angle color value and center color value of pending image are preset, wherein, in advance If dark angle color value be 30, default center color value be 60.
The beneficial effects of the invention are as follows:
A kind of method that dark angle effect is added for image of the present invention, it passes through default masking-out image, the week of masking-out image Side is white, and center is black, and center to periphery is from black to white gradual transition, and default masking-out image is contracted Put, make it consistent with the size of pending image, place is then adjusted to the pixel of pending image according to masking-out image Reason, obtains result images, so as to be dimmed to image surrounding, and image center is lightened, imitates the dark angle after adjustment More preferably, tone transition is more natural, and appreciating is more preferable for fruit, and need not define constituency, swift to operate.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, forms the part of the present invention, this hair Bright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is a kind of general flow chart for the method for being the dark angle effect of image addition of the present invention;
Fig. 2 is the schematic diagram of the default masking-out image of the present invention;
Fig. 3 is the schematic diagram of the default mapping table of the present invention.
Embodiment
In order that technical problems, technical solutions and advantages to be solved are clearer, clear, tie below Closing drawings and Examples, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used To explain the present invention, it is not intended to limit the present invention.
As shown in figure 1, a kind of method that dark angle effect is added for image of the present invention, it comprises the following steps:
10. default masking-out image, the periphery of masking-out image is white, and center is black, and center to periphery from black to White gradual transition, as shown in Figure 2;
20. load pending image and default masking-out image;
30. a pair default masking-out image zooms in and out, make it consistent with the size of pending image;
40. being adjusted processing to the pixel of pending image according to masking-out image, result images are obtained.
Masking-out image is preset in described step 10, mainly passes through the dark angle color value for presetting pending image and center Color value, and according to the transparence value and effect brightness value of dark angle color value and center color value calculating masking-out image; Default dark angle color value is 30 in the present embodiment, and default center color value is 60, and user can make by oneself according to being actually needed Justice is adjusted, and their adjusting range is all 0 to 100.
White in masking-out image represents selected region, and the region containing gray scale is then that part is chosen, in other words The opacity in the region is between 0 to 100.For example, if color change, filter are used to a certain specific region of image During with other effects, the region (namely black region) not being chosen will be protected and isolate and be not edited.This reality Example is applied from the gray level image of black and white gradual change as masking-out image, the periphery of masking-out image is white, and center is black, so as to just In the processing that dark angle effect is carried out to the periphery of pending image, and the center of masking-out image to periphery is from black to white gradual change Transition, the dark angle effect after processing can be made more natural.
Processing, mainly basis are adjusted to the pixel of pending image according to masking-out image in described step 40 The transparence value of masking-out image and effect brightness are worth to the masking-out brightness value of each pixel of masking-out image, and according to the masking-out Brightness value carries out brightness adjustment processing to the corresponding pixel points of pending image, is mainly according to default mapping in the present embodiment Table is adjusted to the pixel of pending image, obtains result images.It is as follows that it adjusts formula:
Result=map [i] [l];
Wherein, result is the color value of result images corresponding pixel points, and map is default mapping table (as shown in Figure 3), I is the color value of pending image corresponding pixel points;L is described masking-out brightness value.
The computational methods of the transparence value of the masking-out image are as follows:
If dark angle color value is less than 13,
Reverse=0.024*nDrakValue*nDrakValue-1.2*nDrakValue+13.2;
If dark angle color value is more than or equal to 13 and less than or equal to 50,
Reverse=0.001*nDrakValue*nDrakValue-0.09*nDrakValue+3.26;
If dark angle color value is more than 50, less than or equal to 75, then
Reverse=-0.037*nDrakValue+2.886;
If dark angle color value is more than 75, less than or equal to 100, then
Reverse=0.001*nDrakValue*nDrakValue-0.04*nDrakValue+2.18;
Wherein, Reverse is the transparence value of masking-out image, and nDrakValue is dark angle color value.
The computational methods of the effect brightness value of the masking-out image are as follows:
Light=0.0001*nCenter*nCenter-0.022*nCenter+1.82;
Wherein, light is the effect brightness value of masking-out image, color value centered on nCenter.
The computational methods of described masking-out brightness value are as follows:
MaskLight=((1.0-mask) * light+mask) * (mask*alpha+1.0-mask);
Wherein, masklight is described masking-out brightness value, and mask is in the corresponding pixel points of described masking-out image Color value, light are the effect brightness value of masking-out image, and alpha is masking-out transparency.
The preferred embodiments of the present invention have shown and described in described above, it should be understood that the present invention is not limited to this paper institutes The form of disclosure, the exclusion to other embodiment is not to be taken as, and can be used for various other combinations, modification and environment, and energy Enough in this paper invented the scope of the idea, it is modified by the technology or knowledge of above-mentioned teaching or association area.And people from this area The change and change that member is carried out do not depart from the spirit and scope of the present invention, then all should be in the protection of appended claims of the present invention In the range of.

Claims (3)

  1. A kind of 1. method that dark angle effect is added for image, it is characterised in that comprise the following steps:
    10. default masking-out image, the periphery of masking-out image is white, and center is black, and center to periphery is from black to white Gradual transition, by presetting dark the angle color value and center color value of pending image, and according to the dark angle color value and center Color value calculates the transparence value and effect brightness value of the masking-out image;
    20. load pending image and default masking-out image;
    30. a pair default masking-out image zooms in and out, make it consistent with the size of pending image;
    40. processing is adjusted to the pixel of pending image according to masking-out image, i.e. according to the transparence value of masking-out image The masking-out brightness value of each pixel of masking-out image is worth to effect brightness, and according to the masking-out brightness value to pending image Corresponding pixel points carry out brightness adjustment processing, obtain result images;Wherein:
    The computational methods of the transparence value of the masking-out image are as follows:
    If dark angle color value is less than 13,
    Reverse=0.024*nDrakValue*nDrakValue-1.2*nDrakValue+13.2;
    If dark angle color value is more than or equal to 13 and less than or equal to 50,
    Reverse=0.001*nDrakValue*nDrakValue-0.09*nDrakValue+3.26;
    If dark angle color value is more than 50, less than or equal to 75, then
    Reverse=-0.037*nDrakValue+2.886;
    If dark angle color value is more than 75, less than or equal to 100, then
    Reverse=0.001*nDrakValue*nDrakValue-0.04*nDrakValue+2.18;
    Wherein, Reverse is the transparence value of masking-out image, and nDrakValue is dark angle color value;
    The computational methods of the effect brightness value of the masking-out image are as follows:
    Light=0.0001*nCenter*nCenter-0.022*nCenter+1.82;
    Wherein, light is the effect brightness value of masking-out image, color value centered on nCenter;
    The computational methods of described masking-out brightness value are as follows:
    MaskLight=((1.0-mask) * light+mask) * (mask*alpha+1.0-mask);
    Wherein, masklight is described masking-out brightness value, and mask is the color in the corresponding pixel points of described masking-out image Value, light are the effect brightness value of masking-out image, and alpha is masking-out transparency.
  2. A kind of 2. method that dark angle effect is added for image according to claim 1, it is characterised in that:Described step 40 In, brightness adjustment processing is carried out to the corresponding pixel points of pending image according to the masking-out brightness value, mainly according to default Mapping table is adjusted to the pixel of pending image, and adjustment formula is as follows:
    Result=map [i] [l];
    Wherein, result is the color value of result images corresponding pixel points, and map is default mapping table, and i is pending image pair Answer the color value of pixel;L is described masking-out brightness value.
  3. A kind of 3. method that dark angle effect is added for image according to claim 1, it is characterised in that:Described step 10 In, dark the angle color value and center color value of default pending image, wherein, default dark angle color value is 30, in default Heart color value is 60.
CN201410730020.4A 2014-12-04 2014-12-04 A kind of method that dark angle effect is added for image Active CN104392419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410730020.4A CN104392419B (en) 2014-12-04 2014-12-04 A kind of method that dark angle effect is added for image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410730020.4A CN104392419B (en) 2014-12-04 2014-12-04 A kind of method that dark angle effect is added for image

Publications (2)

Publication Number Publication Date
CN104392419A CN104392419A (en) 2015-03-04
CN104392419B true CN104392419B (en) 2017-11-24

Family

ID=52610317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410730020.4A Active CN104392419B (en) 2014-12-04 2014-12-04 A kind of method that dark angle effect is added for image

Country Status (1)

Country Link
CN (1) CN104392419B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732475B (en) * 2015-03-18 2018-01-12 厦门美图之家科技有限公司 It is a kind of based on the image interfusion method smeared manually and system
CN106169177A (en) * 2016-06-27 2016-11-30 北京金山安全软件有限公司 Image buffing method and device and electronic equipment
CN106815846B (en) * 2016-12-30 2019-07-02 歌尔科技有限公司 The dark angle of image cuts method of determining range, image vignetting compensation method and device
CN107808363B (en) * 2017-11-23 2020-12-25 杭州电魂网络科技股份有限公司 Image mask processing method and device
CN109726302A (en) * 2018-12-10 2019-05-07 广州景骐科技有限公司 Mask method, device, computer equipment and the storage medium of image

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7953275B1 (en) * 2007-08-20 2011-05-31 Adobe Systems Incorporated Image shader for digital image modification
CN202205012U (en) * 2011-07-13 2012-04-25 杨轶 Extrafocal imaging filter
CN103593834A (en) * 2013-12-03 2014-02-19 厦门美图网科技有限公司 Image enhancement method achieved by intelligently increasing field depth

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7953275B1 (en) * 2007-08-20 2011-05-31 Adobe Systems Incorporated Image shader for digital image modification
CN202205012U (en) * 2011-07-13 2012-04-25 杨轶 Extrafocal imaging filter
CN103593834A (en) * 2013-12-03 2014-02-19 厦门美图网科技有限公司 Image enhancement method achieved by intelligently increasing field depth

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
用ps为图片增加暗角方法;波罗蒂海;《http://www.360doc.com/content/11/1103/15/1172802_161376886.shtml》;20111103;1-9 *
让照片呈现电影胶片效果;PHOTOSHOP教程.摄影;《http://blog.qiubio.com:8080/archives/680/3》;20100111;1-2 *

Also Published As

Publication number Publication date
CN104392419A (en) 2015-03-04

Similar Documents

Publication Publication Date Title
CN104392419B (en) A kind of method that dark angle effect is added for image
RU2647636C2 (en) Video display control with extended dynamic range
US11455516B2 (en) Image lighting methods and apparatuses, electronic devices, and storage media
US8224086B2 (en) Methods and apparatuses for restoring color and enhancing electronic images
CN109447910A (en) A kind of low-luminance color image enchancing method based on fuzzy theory
CN105488793B (en) Image display method and image processing method
CN106997584A (en) A kind of haze weather image enchancing method
TWI533661B (en) Method and device of skin tone optimization in color gamut mapping system
CN103390395A (en) Method and electronic equipment for adjusting brightness of display
TWI520101B (en) Method for making up skin tone of a human body in an image, device for making up skin tone of a human body in an image, method for adjusting skin tone luminance of a human body in an image, and device for adjusting skin tone luminance of a human body in
CN105701773B (en) A kind of method and device of quick processing image
CN111105359A (en) Tone mapping method for high dynamic range image
US20170337671A1 (en) Method and system for processing image content for enabling high dynamic range (uhd) output thereof and computer-readable medium comprising uhd content created using same
JP2018014646A (en) Image processing apparatus and image processing method
US9990702B2 (en) Method and system for processing image content for enabling high dynamic range (UHD) output thereof and computer-readable medium comprising UHD content created using same
Meylan et al. Color image enhancement using a Retinex-based adaptive filter
CN106550227A (en) A kind of image saturation method of adjustment and device
TWI299812B (en)
CN105808185A (en) Terminal display method, terminal display apparatus, and terminal
CN104599241A (en) Full-automatic efficient calculation color conformity method
CN104469226A (en) Projection fusion method and device
TWI707307B (en) Image adjusting method
CN105718229B (en) A kind of character display effect switching method and device
WO2006106750A1 (en) Image processing device, image processing method, and image processing program
CN106887024A (en) The processing method and processing system of photo

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