WO2011095116A1 - Method and apparatus for image optimization editing - Google Patents

Method and apparatus for image optimization editing Download PDF

Info

Publication number
WO2011095116A1
WO2011095116A1 PCT/CN2011/070765 CN2011070765W WO2011095116A1 WO 2011095116 A1 WO2011095116 A1 WO 2011095116A1 CN 2011070765 W CN2011070765 W CN 2011070765W WO 2011095116 A1 WO2011095116 A1 WO 2011095116A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
correction
optimized
module
contrast
Prior art date
Application number
PCT/CN2011/070765
Other languages
French (fr)
Chinese (zh)
Inventor
傅斌
王建宇
李慧
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to BR112012014666-1A priority Critical patent/BR112012014666B1/en
Priority to RU2012125065/08A priority patent/RU2535482C2/en
Publication of WO2011095116A1 publication Critical patent/WO2011095116A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/68Circuits for processing colour signals for controlling the amplitude of colour signals, e.g. automatic chroma control circuits

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to an image editing and editing method and apparatus. Background technique
  • an automatic color mode is adopted, that is, an image color is analyzed to correct a color shift problem existing in the original image.
  • the background is a light yellow image
  • the background color may turn white after optimized editing with the automatic color method.
  • the light yellow background may be due to the long discoloration of the image, or the background color of the image itself may be pale yellow, such as an artistic photo. If the background color of the image itself is light yellow, after the optimized editing with the automatic color method, a new color cast problem will occur.
  • the embodiment of the invention provides an image editing and editing method and device.
  • the technical solution is as follows:
  • an optimized editing method for an image comprising:
  • HSV conversion is performed on each point corresponding to the curve correction image to obtain converted color H, purity S and brightness
  • the H, V, and the weighted S values are RGB-converted to obtain a saturation correction image.
  • an image editing apparatus comprising:
  • a curve adjustment module configured to perform curve adjustment on the image to be optimized to obtain a curve correction image
  • a first transform module configured to perform HSV conversion on each point corresponding to the curve correction image, to obtain values of the converted color H, the purity S, and the brightness V;
  • the second transform module is configured to perform weighting on the obtained S values, and perform RGB transform on the H, V and the weighted S values to obtain a saturation corrected image.
  • the contrast correction is combined to improve the exposure quality of the image to further optimize the image display quality.
  • FIG. 1 is a flowchart of an optimized editing method for an image according to Embodiment 1 of the present invention
  • Embodiment 2 is a flowchart of an optimized editing method for an image provided by Embodiment 2 of the present invention
  • FIG. 3 is a schematic structural diagram of an apparatus for optimizing an image of a first embodiment according to Embodiment 3 of the present invention
  • FIG. 4 is a schematic structural diagram of a second image optimization editing apparatus according to Embodiment 3 of the present invention.
  • FIG. 5 is a schematic structural diagram of an apparatus for optimizing editing of a third image according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic structural diagram of a fourth image optimization editing apparatus according to Embodiment 3 of the present invention.
  • FIG. 7 is a schematic structural diagram of a fifth image optimization editing apparatus according to Embodiment 3 of the present invention. detailed description
  • this embodiment provides an optimized editing method for an image, and the method is specifically as follows:
  • HSV represents a color model
  • H represents color
  • S represents purity
  • V represents brightness
  • the method provided by the embodiment further combines contrast correction, thereby further improving the display quality of the image.
  • This embodiment does not specifically limit which combination mode is adopted.
  • the specific combination mode can be divided into the following cases:
  • Case 1 Before the curve of the image to be optimized is adjusted, the method further includes: performing contrast correction on the image to be optimized, and obtaining a contrast correction image; correspondingly, performing curve adjustment on the image to be optimized, specifically comprising: performing curve on the obtained contrast correction image Adjustment.
  • the method before the curve adjustment of the image to be optimized, the method further includes: performing contrast correction on the image to be optimized to obtain a contrast correction image; and correspondingly, performing RGB transformation on the 11 and V and the weighted S value to obtain After the saturation correction image, the method further includes: superimposing the contrast correction image and the saturation correction image.
  • Case 3 After performing RGB transformation on the H, V, and weighted S values to obtain a saturation correction image, the method further includes: performing contrast correction on the image to be optimized to obtain a contrast correction image; and contrast-correcting the image and saturating Correct the image for overlay.
  • Case 4 Optionally, after performing RGB transformation on the H, V, and weighted S values to obtain the saturation correction image, the method further includes: performing contrast correction on the saturation correction image.
  • the method provided in this embodiment performs curve adjustment and saturation correction on the image to be optimized, so that the color of the image is more vivid, and the color tone of the image is not damaged, and the contrast quality is improved to improve the image quality of the image. Optimize the effect of image display quality.
  • the embodiment provides an optimized editing method for an image, which combines curve adjustment, saturation correction and contrast correction to improve the image quality of the image to be optimized while improving the image quality of the image to be more vivid, and Does not cause damage to the hue of the image.
  • an optimized editing method for an image which combines curve adjustment, saturation correction and contrast correction to improve the image quality of the image to be optimized while improving the image quality of the image to be more vivid, and Does not cause damage to the hue of the image.
  • the contrast correction is performed on the image first, and then the contrast correction image is combined with the curve adjustment and the saturation correction.
  • the optimized editing method of the image provided in this embodiment is described in detail. Referring to Figure 2, the method flow is as follows:
  • the contrast correction of a 24-bit bitmap is a dot matrix in which RGB channels exist.
  • Each point on the image has three values of R, G, and B, which represent the values of the red component, the green component, and the blue component at that point.
  • R ( i, j ), G (i, j), B (i, j) respectively represent the three components of red, green and blue at the position (i, j). Value.
  • I(x, y) The combination of the R, G, and B components at this point is represented by I(x, y).
  • RCounter [256]; II RCounter [256] is an array of 256 elements, RCounter [0] is the first element to access
  • the R value corresponding to each point of the statistics may be first sorted from the smallest to the largest, and the R value of the first 1% position is taken as the brightness value of the darker point / For the same reason, take the R value at the 50% position as the brightness value of the uniform point, and take the R value at the 99% position as the brightness value of the brighter point / 3 ⁇ 4 3 ⁇ 4 .
  • Gamma l. Of; Among them, 0.5, 0.8 and 1.2 are all empirical coefficients. According to different image optimization standards, the empirical coefficient can be adjusted. This embodiment does not specifically limit this. In actual application, other methods can be used. Empirical coefficient.
  • mapping value F (X) is obtained by the following procedure, and the implementation process of the G channel, the B channel, and the R channel is the same, and will not be described here.
  • F (X) +(, / ⁇ - J*pow(v/(/ ⁇ ), Gamma) ⁇ If / X ⁇ / 3 ⁇ 4 , then the mapped value F (X) high Iinfact ) *P.w (v/ (I h , h - I, nM , ), Gamma), where pow (v/ ( I h , . h - I, nM , ), Gamma) represents the Gamma times of v / ( I hlgh - I low ) Square, * indicates that the multiplication operation maps the RGB values using the above mapping relationship F(X) for each RGB point on the image to be optimized, thereby obtaining a contrast corrected image.
  • the curve adjustment is a common method for digital picture correction. This embodiment does not limit the specific adjustment mode.
  • the curve adjustment of the R channel is taken as an example for description.
  • the value range of R is [0 255]
  • the definition field is [0 255]
  • the value range is [0 255]
  • the curve image is over (127 127) points, at [0 127)
  • the interval is a concave function
  • the curve of the convex function is (127 255) as an example.
  • [F (X) - X] / X is in the range of 0.95 to 1.05.
  • the HSV conversion of the points in the RGB model can be implemented by the prior art. This embodiment does not specifically limit this. In the specific implementation, it can be implemented by programming, and is only illustrated by the following procedure:
  • the specific weighting value may be determined according to the actual situation.
  • the weighting value may be adjusted according to the standard of the image optimization, which is not specifically limited in this embodiment.
  • Snew is in the range of 1S to 1.05S.
  • the RGB transform is performed on H, Snew and V.
  • the conversion of the HSV model into the RGB model is also a prior art. This embodiment does not limit the specific conversion mode. , can be realized by programming, only the following program is taken as an example:
  • the reversal film correction effect is I inversion (i, j)
  • the contrast correction effect is I to 3 ⁇ 4 (i, j)
  • the method provided by the embodiment by combining the contrast correction and the weaker reversal film correction algorithm, can not only improve the image quality of the image, but also improve the color of the image, so that the color of the image is more vivid and does not have a hue on the image. Cause damage.
  • Embodiment 3 by combining the contrast correction and the weaker reversal film correction algorithm, can not only improve the image quality of the image, but also improve the color of the image, so that the color of the image is more vivid and does not have a hue on the image. Cause damage.
  • the embodiment provides an apparatus for image optimization editing, and the apparatus includes:
  • a curve adjustment module 301 configured to perform curve adjustment on the image to be optimized to obtain a curve correction image
  • the first transform module 302 is configured to perform HSV conversion on each point corresponding to the curve correction image to obtain values of the converted color 11, purity S and brightness V;
  • the second transform module 303 is configured to perform weighting on the obtained S values, and perform RGB transform on the H, V, and weighted S values to obtain a saturation corrected image.
  • the device further includes:
  • a first contrast correction module 304 configured to perform contrast correction on the optimized image before the curve adjustment module adjusts the image to be optimized, to obtain a contrast correction image
  • the curve adjustment module 301 is specifically configured to perform curve adjustment on the obtained contrast correction image to obtain a curve correction image.
  • the apparatus further includes:
  • the first contrast correction module 304 is configured to perform contrast correction on the image to be optimized before the curve adjustment module 301 performs curve adjustment on the image to be optimized, to obtain a contrast correction image;
  • the first superimposing module 305 is configured to perform RGB transform on the H, V and the weighted S values in the second transform module 303 to obtain the saturation corrected image, and then obtain the contrast corrected image and the second transform by the first contrast correction module 304.
  • the saturation correction image obtained by the module 303 is superimposed.
  • the device further includes:
  • the second contrast correction module 306 is configured to perform RGB transformation on the H, V and the weighted S values in the second transformation module 303 to obtain a saturation correction image, and then perform contrast correction on the image to be optimized to obtain a contrast correction image;
  • the superimposing module 307 is configured to superimpose the contrast correction image obtained by the second contrast correction module 306 and the saturation correction image obtained by the second transform module 303.
  • the device further includes:
  • the third contrast correction module 308 is configured to perform RGB conversion on the H, V and the weighted S values by the second transform module 303 to obtain a saturation correction image, and then perform contrast correction on the saturation correction image.
  • the device provided in this embodiment only performs the above functions when implementing optimized editing of an image.
  • the division of the modules is exemplified.
  • the above function assignments may be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the apparatus for image optimization editing provided by this embodiment is the same as the method embodiment of the image optimization editing. The specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • the apparatus provided in this embodiment combines the contrast adjustment, the curve adjustment and the saturation adjustment to improve the original image exposure quality and color, so that the color is more vivid and does not cause damage to the color tone of the image.
  • the serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
  • All or part of the steps in the embodiments of the present invention may be implemented by using software, and the corresponding software program may be stored in a readable storage medium, such as an optical disk or a hard disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

The invention discloses a method and an apparatus for image optimization editing, which belong to image processing technical field. The method comprises: performing a curve adjustment on an image to be optimized to obtain a curve correction image (101); performing a Hue Saturation Value (HSV) conversion on each point corresponding to the obtained curve correction image to obtain the converted values of color H, purity S and brightness V (102); and after weighting the obtained value of S, performing a Red Green Blue (RGB) conversion on the values of H, V and the weighted S to obtain a saturation correction image (103). The apparatus comprises: a curve adjusting module, a first conversion module and a second conversion module. With the curve adjustment and saturation correction on the image to be optimized in the present invention, the color of the image is brighter and the hue of the image is not destroyed, thus the display quality of the image is optimized.

Description

图像的优化编辑方法及装置  Image optimization editing method and device
本申请要求于 2010年 2月 8日提交中国专利局、 申请号为 2010101122281、 发明名称 为 "图像的优化编辑方法及装置" 的中国专利申请的优先权, 其全部内容通过引用结合在 本申请中。 技术领域  The present application claims priority to Chinese Patent Application No. 2010101122281, entitled "Optimized Editing Method and Apparatus for Image" on February 8, 2010, the entire contents of which are incorporated herein by reference. . Technical field
本发明涉及图像处理技术领域, 特别涉及一种图像的优化编辑方法及装置。 背景技术  The present invention relates to the field of image processing technologies, and in particular, to an image editing and editing method and apparatus. Background technique
随着图像处理技术的日益成熟, 图像的优化编辑方式越来越多。 通过对图像进行优化 编辑, 不仅可以提高原有图像的显示质量, 还能够提高图像的整体视觉效果。  With the maturity of image processing technology, there are more and more optimized editing methods for images. By optimizing the image editing, not only can the display quality of the original image be improved, but also the overall visual effect of the image can be improved.
现有的一种对图像进行优化编辑的技术中, 采用了自动颜色方式, 即通过对图像颜色 进行分析, 以纠正原有图像中存在的色偏问题。 例如, 底色为淡黄色的图像, 采用自动颜 色方式进行优化编辑后, 底色可能变为白色。 但是, 淡黄色的底色可能是由于图像放置时 间较长变色导致, 也可能图像本身的底色就是淡黄色, 如艺术照。 如果图像本身的底色就 是淡黄色, 在采用自动颜色方式进行优化编辑后, 就会造成新的色偏问题。  In an existing technique for optimally editing an image, an automatic color mode is adopted, that is, an image color is analyzed to correct a color shift problem existing in the original image. For example, if the background is a light yellow image, the background color may turn white after optimized editing with the automatic color method. However, the light yellow background may be due to the long discoloration of the image, or the background color of the image itself may be pale yellow, such as an artistic photo. If the background color of the image itself is light yellow, after the optimized editing with the automatic color method, a new color cast problem will occur.
由于现有技术在对图像进行优化编辑时结合了颜色调整, 因此, 有可能会造成新的色 偏, 对于有些图像的色调将产生破坏性。 发明内容  Since the prior art incorporates color adjustment in the optimization editing of an image, it is possible to cause a new color shift, which is destructive to the hue of some images. Summary of the invention
为了改善图像的色泽, 使得图像的颜色更加鲜明, 且不会对图像的色调造成破坏, 本 发明实施例提供了一种图像的优化编辑方法及装置。 所述技术方案如下:  In order to improve the color of the image, the color of the image is more vivid, and the color tone of the image is not damaged. The embodiment of the invention provides an image editing and editing method and device. The technical solution is as follows:
一方面, 提供了一种图像的优化编辑方法, 所述方法包括:  In one aspect, an optimized editing method for an image is provided, the method comprising:
将待优化图像进行曲线调整, 得到曲线修正图像;  Adjusting the curve of the image to be optimized to obtain a curve correction image;
对所述曲线修正图像对应的每个点进行 HSV转换, 得到转换后的色彩 H、纯度 S和明度 HSV conversion is performed on each point corresponding to the curve correction image to obtain converted color H, purity S and brightness
V的值; The value of V;
将得到的所述 S值进行加权后, 对所述 H、 V以及加权后的 S值进行 RGB变换, 得到饱 和度修正图像。  After the obtained S values are weighted, the H, V, and the weighted S values are RGB-converted to obtain a saturation correction image.
另一方面, 提供了一种图像的优化编辑装置, 所述装置包括:  In another aspect, an image editing apparatus is provided, the apparatus comprising:
曲线调整模块, 用于将待优化图像进行曲线调整, 得到曲线修正图像; 第一变换模块, 用于对所述曲线修正图像对应的每个点进行 HSV转换, 得到转换后的 色彩 H、 纯度 S和明度 V的值; a curve adjustment module, configured to perform curve adjustment on the image to be optimized to obtain a curve correction image; a first transform module, configured to perform HSV conversion on each point corresponding to the curve correction image, to obtain values of the converted color H, the purity S, and the brightness V;
第二变换模块, 用于将得到的所述 S值进行加权后, 对所述 H、 V以及加权后的 S值进 行 RGB变换, 得到饱和度修正图像。  The second transform module is configured to perform weighting on the obtained S values, and perform RGB transform on the H, V and the weighted S values to obtain a saturation corrected image.
本发明实施例提供的技术方案的有益效果是:  The beneficial effects of the technical solutions provided by the embodiments of the present invention are:
通过对图像进行曲线调整及饱和度修正, 使得图像的颜色更加鲜明, 且不会对图像的 色调造成破坏, 另外, 再结合对比度修正, 进而改善图像的曝光质量, 达到进一步优化图 像显示质量的效果。 附图说明  By adjusting the curve and saturation of the image, the color of the image is more vivid, and the color tone of the image is not damaged. In addition, the contrast correction is combined to improve the exposure quality of the image to further optimize the image display quality. . DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中所需要使用的 附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本 领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的 附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in view of the drawings.
图 1是本发明实施例一提供的图像的优化编辑方法流程图;  1 is a flowchart of an optimized editing method for an image according to Embodiment 1 of the present invention;
图 2是本发明实施例二提供的图像的优化编辑方法流程图;  2 is a flowchart of an optimized editing method for an image provided by Embodiment 2 of the present invention;
图 3是本发明实施例三提供的第一种图像的优化编辑装置结构示意图;  3 is a schematic structural diagram of an apparatus for optimizing an image of a first embodiment according to Embodiment 3 of the present invention;
图 4是本发明实施例三提供的第二种图像的优化编辑装置结构示意图;  4 is a schematic structural diagram of a second image optimization editing apparatus according to Embodiment 3 of the present invention;
图 5是本发明实施例三提供的第三种图像的优化编辑装置结构示意图;  5 is a schematic structural diagram of an apparatus for optimizing editing of a third image according to Embodiment 3 of the present invention;
图 6是本发明实施例三提供的第四种图像的优化编辑装置结构示意图;  6 is a schematic structural diagram of a fourth image optimization editing apparatus according to Embodiment 3 of the present invention;
图 7是本发明实施例三提供的第五种图像的优化编辑装置结构示意图。 具体实施方式  FIG. 7 is a schematic structural diagram of a fifth image optimization editing apparatus according to Embodiment 3 of the present invention. detailed description
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本发明实施方式作 进一步地详细描述。  The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
实施例一  Embodiment 1
参见图 1, 本实施例提供了一种图像的优化编辑方法, 该方法流程具体如下:  Referring to FIG. 1, this embodiment provides an optimized editing method for an image, and the method is specifically as follows:
101: 将待优化图像进行曲线调整, 得到曲线修正图像;  101: Perform curve adjustment on the image to be optimized to obtain a curve correction image;
102: 对得到的曲线修正图像对应的每个点进行 HSV转换, 得到转换后的色彩 H、 纯度 S和明度 V的值;  102: performing HSV conversion on each point corresponding to the obtained curve correction image, and obtaining values of the converted color H, purity S, and brightness V;
103: 将得到的 S值进行加权后, 对 H、 V以及加权后的 S值进行 RGB变换, 得到饱和 度修正图像。 103: After weighting the obtained S values, RGB transforms the H, V, and weighted S values to obtain saturation. Degree correction image.
其中, HSV表示颜色模型, H表示色彩, S表示纯度, V表示明度。  Wherein, HSV represents a color model, H represents color, S represents purity, and V represents brightness.
进一步地, 在对待优化图像进行曲线调整及饱和度修正之后, 本实施例提供的方法还 结合了对比度修正, 从而进一步提高图像的显示质量。 本实施例不对采取哪种结合方式进 行具体限定, 具体的结合方式可分为以下几种情况:  Further, after the curve adjustment and the saturation correction are performed on the image to be optimized, the method provided by the embodiment further combines contrast correction, thereby further improving the display quality of the image. This embodiment does not specifically limit which combination mode is adopted. The specific combination mode can be divided into the following cases:
情况一: 在将待优化图像进行曲线调整之前, 还包括: 对待优化图像进行对比度修正, 得到对比度修正图像; 相应地, 将待优化图像进行曲线调整, 具体包括: 对得到的对比度 修正图像进行曲线调整。  Case 1: Before the curve of the image to be optimized is adjusted, the method further includes: performing contrast correction on the image to be optimized, and obtaining a contrast correction image; correspondingly, performing curve adjustment on the image to be optimized, specifically comprising: performing curve on the obtained contrast correction image Adjustment.
情况二: 可选地, 在将待优化图像进行曲线调整之前, 还包括: 对待优化图像进行对 比度修正, 得到对比度修正图像; 相应地, 对11、 V以及加权后的 S值进行 RGB变换, 得到 饱和度修正图像之后, 还包括: 将对比度修正图像及饱和度修正图像进行叠加。  Case 2: Optionally, before the curve adjustment of the image to be optimized, the method further includes: performing contrast correction on the image to be optimized to obtain a contrast correction image; and correspondingly, performing RGB transformation on the 11 and V and the weighted S value to obtain After the saturation correction image, the method further includes: superimposing the contrast correction image and the saturation correction image.
情况三: 可选地, 在对 H、 V以及加权后的 S值进行 RGB变换, 得到饱和度修正图像之 后, 还包括: 对待优化图像进行对比度修正, 得到对比度修正图像; 将对比度修正图像及 饱和度修正图像进行叠加。  Case 3: Optionally, after performing RGB transformation on the H, V, and weighted S values to obtain a saturation correction image, the method further includes: performing contrast correction on the image to be optimized to obtain a contrast correction image; and contrast-correcting the image and saturating Correct the image for overlay.
情况四: 可选地, 在对 H、 V以及加权后的 S值进行 RGB变换, 得到饱和度修正图像之 后, 还包括: 对饱和度修正图像进行对比度修正。  Case 4: Optionally, after performing RGB transformation on the H, V, and weighted S values to obtain the saturation correction image, the method further includes: performing contrast correction on the saturation correction image.
本实施例提供的方法, 通过对待优化图像进行曲线调整及饱和度修正, 使得图像的颜 色更加鲜明, 且不会对图像的色调造成破坏, 另外, 结合对比度修正, 改善图像的曝光质 量, 达到进一步优化图像显示质量的效果。 实施例二  The method provided in this embodiment performs curve adjustment and saturation correction on the image to be optimized, so that the color of the image is more vivid, and the color tone of the image is not damaged, and the contrast quality is improved to improve the image quality of the image. Optimize the effect of image display quality. Embodiment 2
本实施例提供了一种图像的优化编辑方法, 该方法将曲线调整、 饱和度修正与对比度 修正结合, 在改善待优化图像色泽的同时, 改善图像的曝光质量, 使图像的颜色更加鲜明, 且不会对图像的色调造成破坏。 其中, 将曲线调整、 饱和度修正与对比度修正结合的方式 有多种, 为了便于说明, 本实施例以先对图像进行对比度修正, 再对经对比度修正的图像 进行曲线调整及饱和度修正的结合方式为例, 对本实施例提供的图像的优化编辑方法进行 详细说明。 参见图 2, 方法流程具体如下:  The embodiment provides an optimized editing method for an image, which combines curve adjustment, saturation correction and contrast correction to improve the image quality of the image to be optimized while improving the image quality of the image to be more vivid, and Does not cause damage to the hue of the image. Among them, there are various ways to combine the curve adjustment, the saturation correction and the contrast correction. For convenience of description, in this embodiment, the contrast correction is performed on the image first, and then the contrast correction image is combined with the curve adjustment and the saturation correction. As an example, the optimized editing method of the image provided in this embodiment is described in detail. Referring to Figure 2, the method flow is as follows:
201: 对待优化图像进行对比度修正, 得到对比度修正图像;  201: performing contrast correction on the optimized image to obtain a contrast corrected image;
针对该步骤, 以对 24位位图进行对比度修正为例, 24位图像是一个存在 RGB通道的点 阵。 图像上每一个点, 拥有 R,G,B三个值, 分别表示该点上红色分量, 绿色分量, 蓝色分 量的值。 以下分别用 R ( i, j ),G (i, j),B (i, j)分别表示在位置(i, j)上红、 绿、 蓝三个分量 的值。 用 I(x,y)来表示该点上 R,G,B分量的组合。 下面, 详细介绍一下对待优化图像进行 对比度修正的步骤: For this step, for example, the contrast correction of a 24-bit bitmap is a dot matrix in which RGB channels exist. Each point on the image has three values of R, G, and B, which represent the values of the red component, the green component, and the blue component at that point. In the following, R ( i, j ), G (i, j), B (i, j) respectively represent the three components of red, green and blue at the position (i, j). Value. The combination of the R, G, and B components at this point is represented by I(x, y). Below, we will detail the steps to correct the image for contrast correction:
首先, 对待优化图像 I上的每一个点的 RGB值进行如下统计:  First, the RGB values of each point on the optimized image I are counted as follows:
RCounter [256]; II RCounter [256]是拥有 256 个元素的数组, RCounter [0]为访 问第 1个元素  RCounter [256]; II RCounter [256] is an array of 256 elements, RCounter [0] is the first element to access
GCounter [256];  GCounter [256];
BCounter [256];  BCounter [256];
for (图上的每一个点)  For (every point on the graph)
RCounter [R(i, j)]++; II RCounter []在 R(i, j)值的统计数上 +1 GCounter [G(i, j)]++; RCounter [R(i, j)]++; II RCounter [] on the statistic of the R(i, j) value +1 GCounter [G(i, j)]++;
BCounter [B(i, j)]++; 通过对 RGB值上的点做统计, 获得了 R值上每一个值所拥有的点的数量, 接下来, 从 中分别取出较暗点的亮度值、 均匀点的亮度值及较亮点的亮度值, 具体实现时, 可先将统 计的每个点对应的 R值从小到大排序, 取前 1%位置的 R值作为较暗点的亮度值 / , 同理, 取 50%位置的 R值作为均匀点的亮度值 , 取 99%位置的 R值作为较亮点的亮度值/¾ ¾。 还可以将统计的每个点对应的 R值从大到小排序, 取 1%位置的 R值作为较亮点的亮度值 Ihlgh, 同理, 取 50%位置的 R值作为均匀点的亮度值 /^, 取 99%位置的 R值作为较暗点的 亮度值 , 本实施例不对取出这三个值的具体方式进行限定。 BCounter [B(i, j)]++; by counting the points on the RGB values, the number of points owned by each value of the R value is obtained, and then, the brightness values of the darker points are respectively taken out from The brightness value of the uniform point and the brightness value of the brighter point, in the specific implementation, the R value corresponding to each point of the statistics may be first sorted from the smallest to the largest, and the R value of the first 1% position is taken as the brightness value of the darker point / For the same reason, take the R value at the 50% position as the brightness value of the uniform point, and take the R value at the 99% position as the brightness value of the brighter point / 3⁄4 3⁄4 . It is also possible to sort the R values corresponding to each point of the statistics from large to small, and take the R value of the 1% position as the brightness value I hlgh of the brighter point. Similarly, take the R value of the 50% position as the brightness value of the uniform point. /^, taking the R value of the 99% position as the brightness value of the darker point, this embodiment does not limit the specific manner of taking out the three values.
再利用 I 、 Imd和 Ihwh这三个值求取一个修正系数 Gamma, 本实施不对具体的求取过禾 进行限定, 具体实现时, 可通过编程实现, 以下面所示的一段程序为例: Then use the three values I, I md and I hwh to obtain a correction coefficient Gamma. This implementation does not limit the specific requirements. In the specific implementation, it can be realized by programming. Take the following program as an example. :
if low<I„ ,&&J. '〈 I high ) If low <I„ ,&&J. '< I high )
Gamma=log(0.5)/log( Umid~Ilow) / Uhlgh~Ilow)); Gamma=log(0.5)/log( U mid ~I low ) / U hlgh ~I low ));
if (Gamma<0.8)  If (Gamma<0.8)
Gamma=0.8; 〃如果 Gamma的值小于 0.8, 则令 Gamma等于 0.8 if (Gamma>l.2) Gamma=l.2; 〃如果 Gamma的值大于 1.2.则令 Gamma等于 1.2 Gamma=0.8; 〃If the value of Gamma is less than 0.8, let Gamma be equal to 0.8 if (Gamma>l.2) Gamma=l.2; 〃If the value of Gamma is greater than 1.2, then Gamma is equal to 1.2.
Gamma=l. Of; 其中, 0.5, 0.8和 1.2均为经验系数, 根据图像优化标准的不同, 该经验系数可以调 整, 本实施例对此不做具体限定, 实际应用过程中, 还可以采用其他经验系数。 Gamma=l. Of; Among them, 0.5, 0.8 and 1.2 are all empirical coefficients. According to different image optimization standards, the empirical coefficient can be adjusted. This embodiment does not specifically limit this. In actual application, other methods can be used. Empirical coefficient.
得到修正系数之后, 以 R通道为例, 对于 R颜色值为 X的点, 通过如下程序实现获取 映射值 F (X), G通道、 B通道与 R通道的实现过程相同, 这里不再赘述。  After the correction factor is obtained, taking the R channel as an example, for the point where the R color value is X, the mapping value F (X) is obtained by the following procedure, and the implementation process of the G channel, the B channel, and the R channel is the same, and will not be described here.
float v=(X-/ ) ;  Float v=(X-/ ) ;
if (v<0)  If (v<0)
F (X) 二 I 如果 X〈/, , 则映射值 F (X) =/, F (X) II I If X < /, , then map the value F (X) = /,
F (X) = / high 如果 X>=/fcrfl, 则映射值 F (X) = I high else F (X) = / high If X>=/ fcrfl , then the mapped value F (X) = I high else
F (X) = +(、/^- J*pow(v/(/ Λ ), Gamma) 〃如果 / X〈/ ¾ ,则映射值 F (X) high Iin„ ) *P。w (v/ ( Ih,。h - I,nM, ), Gamma), 其中, pow (v/ ( Ih,。h - I,nM, ), Gamma)代表 v/ ( Ihlgh - Ilow )的 Gamma次方, *表示乘法运算 对于待优化图像上的每一个 RGB点, 利用以上映射关系 F(X)进行 RGB值的映射, 从而 得到对比度修正图像。 F (X) = +(, /^- J*pow(v/(/ Λ ), Gamma) 〃 If / X</ 3⁄4 , then the mapped value F (X) high Iin„ ) *P.w (v/ (I h , h - I, nM , ), Gamma), where pow (v/ ( I h , . h - I, nM , ), Gamma) represents the Gamma times of v / ( I hlgh - I low ) Square, * indicates that the multiplication operation maps the RGB values using the above mapping relationship F(X) for each RGB point on the image to be optimized, thereby obtaining a contrast corrected image.
202: 对得到的对比度修正图像进行曲线调整, 得到曲线修正图像;  202: Perform curve adjustment on the obtained contrast correction image to obtain a curve correction image;
其中, 曲线调整是数码图片修正的一个常用方法, 本实施例不对具体的调整方式进行 限定, 此处以对 R通道进行曲线调整为例进行说明。 R的值域为 [0 255], 映射函数为 y = F (x), 定义域为 [0 255], 值域为 [0 255],其 曲线图像以过 (127 127) 点, 在 [0 127 )区间为凹函数, 在(127 255 ]上为凸函数的曲 线为例。 实际应用中, 可选用的映射函数可以有多种, 本实施例对此不作具体限定, 此处 仅以 F (X) =x-l.5*sin(x*2*3.1415926/255)为例, 其中 *表示乘法运算, 对 I (i j) 的 R 值利用函数 F(x)做映射, 记 R i j) =F(R (i j) ); 则对 G B通道做和 R值域类似通道: G (i j) = F(G (i j) ); B (i j) = F(B (i j) ), 最终得到曲线修正图像。 优选的, [F (X) -X]/ X在 0.95到 1.05的范围内。 The curve adjustment is a common method for digital picture correction. This embodiment does not limit the specific adjustment mode. Here, the curve adjustment of the R channel is taken as an example for description. The value range of R is [0 255], the mapping function is y = F (x), the definition field is [0 255], the value range is [0 255], and the curve image is over (127 127) points, at [0 127) The interval is a concave function, and the curve of the convex function is (127 255) as an example. In practical applications, there are various mapping functions that can be selected, which is not specifically limited in this embodiment, and only F ( X) =xl.5*sin(x*2*3.1415926/255) is taken as an example, where * denotes a multiplication operation, and the R value of I (ij) is mapped using the function F(x), and R ij) =F( R (ij) ); then the channel similar to the R range is made for the GB channel: G (ij) = F(G (ij) ); B (ij) = F(B (ij) ), and finally the curve corrected image is obtained. Preferably, [F (X) - X] / X is in the range of 0.95 to 1.05.
203: 对得到的曲线修正图像对应的每个点进行 HSV转换, 得到转换后的色彩 H、 纯度 S和明度 V的值;  203: performing HSV conversion on each point corresponding to the obtained curve correction image, and obtaining values of the converted color H, purity S, and brightness V;
具体地, 将 RGB模型中的点进行 HSV转换可通过现有技术实现, 本实施例对此不作具 体限定, 具体实现时, 可通过编程实现, 仅以如下程序进行举例说明:  Specifically, the HSV conversion of the points in the RGB model can be implemented by the prior art. This embodiment does not specifically limit this. In the specific implementation, it can be implemented by programming, and is only illustrated by the following procedure:
^Converts an GRB color value to HSV. Conversion formula ^Converts an GRB color value to HSV. Conversion formula
^adapted from http://en.wikipedia.org/wiki/HSV_color_space.  ^adapted from http://en.wikipedia.org/wiki/HSV_color_space.
^Assumes r, g and b are contained in the set [0, 255] and returns h, s, and *v in the set[0, 1].  ^Assumes r, g and b are contained in the set [0, 255] and returns h, s, and *v in the set[0, 1].
^iparam Number r The red color value ^iparam Number r The red color value
^iparam Number g The green color value  ^iparam Number g The green color value
^iparam Number b The blue color value  ^iparam Number b The blue color value
return Array The HSV representation  Return Array The HSV representation
Function rgb To HSV (r, g, b) { Function rgb To HSV (r, g, b) {
r=r/255, g=g/255, b=b/255; 〃将 RGB转换成 0 1之间的小数  r=r/255, g=g/255, b=b/255; 转换 Convert RGB to a decimal between 0 1
var max=Math. max (r, g, b) , min=Math. min (r, g, b); II max是 r g b中最大值, min 是 r g b中最小值  Var max=Math. max (r, g, b) , min=Math. min (r, g, b); II max is the maximum value of r g b, min is the minimum value of r g b
var h, s, v=max;  Var h, s, v=max;
var d=max-min;  Var d=max-min;
s=max==0?0 d/max; 〃如果 max==0, 那么 s结果就是 0, 否贝 lj s = d/max  s=max==0?0 d/max; 〃 If max==0, then the result of s is 0, no shell lj s = d/max
if(max==min) { II如果最大值与最小值相等, 则 h值为 0  If(max==min) { II If the maximum and minimum are equal, then the h value is 0
h=0; 11 achromat i c }else{ II否则用如下公示计算 h=0; 11 achromat ic }else{ II Otherwise use the following public calculation
switch (max) {  Switch (max) {
case r: h= (g- b) /d+ (g〈b?6: 0); break; II如果 r是最大值, 则 h= (g- b) /d+ (g〈b?6: 0) 其中 (g<b?6:0) 表示: 如果 g〈b则等于 6, 否则等于 0;  Case r: h= (g- b) /d+ (g<b?6: 0); break; II If r is the maximum value, then h= (g- b) /d+ (g<b?6: 0) Where (g<b?6:0) means: if g<b is equal to 6, otherwise equal to 0;
case g:h= (b-r)/d+2; break; // 如果 g是最大值, h=(b_r)/d+2;  Case g:h= (b-r)/d+2; break; // If g is the maximum value, h=(b_r)/d+2;
case b:h= (r-g) /d+4 ; break ; // 如果 b是最大值, b=(r_g)/d+4; h/=6; return [h, s, v] 〃 返回获得的 hsv值  Case b:h= (rg) /d+4 ; break ; // If b is the maximum value, b=(r_g)/d+4; h/=6; return [h, s, v] 〃 return obtained Hsv value
204: 将得到的 S值进行加权后, 对 H、 V以及加权后的 S值进行 RGB变换, 得到饱和 度修正图像。 204: After weighting the obtained S values, RGB transforms the H, V, and weighted S values to obtain a saturation corrected image.
针对该步骤, 将得到的 S值进行加权时, 具体的加权值可以根据实际情况决定, 根据 图像优化的标准不同, 该加权值可以调整, 本实施例对此不作具体限定, 此处仅以加权值 为 1.02, 即加权后的新的 S值 Snew =1.02S为例进行说明, 优选的, Snew在 1S到 1.05S 的范围内。  For this step, when the obtained S value is weighted, the specific weighting value may be determined according to the actual situation. The weighting value may be adjusted according to the standard of the image optimization, which is not specifically limited in this embodiment. The value is 1.02, that is, the weighted new S value Snew = 1.02S is taken as an example. Preferably, Snew is in the range of 1S to 1.05S.
得到加权后的新的 S值 Snew后, 再对 H, Snew及 V做 RGB变换, 其中, 将 HSV模型变 换成 RGB模型也是现有技术, 本实施例不对具体的变换方式进行限定, 具体实现时, 可通 过编程实现, 仅以如下程序为例进行举例说明:  After the weighted new S value Snew is obtained, the RGB transform is performed on H, Snew and V. The conversion of the HSV model into the RGB model is also a prior art. This embodiment does not limit the specific conversion mode. , can be realized by programming, only the following program is taken as an example:
^Converts an HSV color value to GRB. Conversion formula ^Converts an HSV color value to GRB. Conversion formula
^adapted from http://en.wikipedia.org/wiki/HSV_color_space.  ^adapted from http://en.wikipedia.org/wiki/HSV_color_space.
^Assumes r, g and b are contained in the set [0, 1] and returns h, s, and *v in the set [0,255].  ^Assumes r, g and b are contained in the set [0, 1] and returns h, s, and *v in the set [0,255].
^iparam Number h The hue ^iparam Number h The hue
^iparam Number s The saturation  ^iparam Number s The saturation
^iparam Number v The value  ^iparam Number v The value
return Array The GRB representation Function hsv To Rgb (h, s, v) { Return Array The GRB representation Function hsv To Rgb (h, s, v) {
var r, b, g;  Var r, b, g;
var i=Math. floor (h*6) ; 〃i = h*6的上整(比如 2.6的上整是 3)  Var i=Math. floor (h*6) ; 〃i = h*6 up (for example, 2.6 is 3)
var f=h^6-i;  Var f=h^6-i;
var p=v* (1-s);  Var p=v* (1-s);
var q=v* (1-f^s);  Var q=v* (1-f^s);
var t=v^(l-(l-f)^s);  Var t=v^(l-(l-f)^s);
switch (f%6) {  Switch (f%6) {
case 0: : r= =v, g=t, b= =p; ; break; / V如果 f被 6除余 0, 则 r=v, g: Case 0: : r = =v, g=t, b= =p; ; break; / V If f is divided by 6 by 0, then r=v, g:
case 1: : r= =q, g=v, b= =p; ; break; / Ί如果余 1, 则 r=q, g=v,b=p; Case 1: : r = =q, g=v, b= =p; ; break; / Ί If the remainder is 1, then r=q, g=v, b=p;
case 2: : r= =P, g=v, b= =t; ; break; / Ί如果余 2, 则 r=p, g=v,b=t; Case 2: : r = =P, g=v, b= =t; ; break; / Ί If the remainder is 2, then r=p, g=v, b=t;
case 3: : r= =p, g=q, b= =v; ; break; / Ί如果余 3, 则 r=p, g=q, b=v; Case 3: : r = =p, g=q, b= =v; ; break; / Ί If the remainder is 3, then r=p, g=q, b=v;
case 4: : r= =t, g=P, b= =v; ; break; / Ί如果余 4, 则 r=t, g=p, b=v; Case 4: : r = =t, g=P, b= =v; ; break; / Ί If the remainder is 4, then r=t, g=p, b=v ;
case 5: : r= =V, g=P, b= =q; ; break; / V如果余 5, 则 r=v, g=p, b=q; Case 5: : r = =V, g=P, b= =q; ; break; / V If the remainder is 5, then r=v, g=p, b=q;
}  }
Return [r*255, g*255,b*255];〃 返回获得的 RBG值, 范围是 [0, 255] 获得 R, G, B值后, 以该值作为 I ^ (x, y) 点的颜色值, 图像 I 即为处理后的结 果, 至此, 对待优化图像进行优化编辑的步骤结束。  Return [r*255, g*255,b*255];〃 Returns the obtained RBG value in the range [0, 255]. After obtaining the R, G, and B values, use this value as the I ^ (x, y) point. The color value, image I is the processed result, and thus the step of optimizing editing the image to be optimized ends.
需要说明的是, 本实施例仅以对待优化图像先进行对比度修正, 再对经对比度修正的 图像进行曲线调整及饱和度修正为例, 对本实施例提供的方法进行了详细说明。 实际应用 过程中, 将曲线调整、 饱和度修正与对比度修正结合的方式有多种, 其中, 将曲线调整及 饱和度修正结合可以达到反转片修正的效果, 除了上述将反转片修正与对比度修正结合的 方式, 达到对图像进行优化编辑的效果外, 还可先对图像进行反转片修正, 再对经反转片 修正的图像进行对比度修正, 除此之外, 还可采用对图像分别进行反转片修正及对比度修 正, 再将得到的两个修正图像进行叠加的方式, 同样可得到与上述方法类似的优化效果。 在将得到的两个修正图像进行叠加时, 本实施例不对具体叠加方式进行限定, 如果反转片 修正的效果为 I反转 (i, j), 对比度修正的效果为 I对¾ (i, j), 则将两个修正效果叠加时, 可采用对两个效果分别进行加权的方式, 如叠加后的图像 I叠加 (i, j) = I s转 (i, j) Xa + I Ά (i, j) X (255- a); 其中, a为加权值, 本实施例不对具体的加权值进行限定, 可以根 据所需要的效果进行调整。 本实施例提供的方法, 通过组合对比度修正和较弱的反转片修正算法, 不仅可以改善 图像的曝光质量, 还能改善图像的色泽, 使得图像的颜色更加鲜明, 且不会对图像的色调 造成破坏。 实施例三 It should be noted that, in this embodiment, only the contrast correction is performed on the image to be optimized, and then the curve adjustment and the saturation correction are performed on the contrast-corrected image as an example, and the method provided in this embodiment is described in detail. In the actual application process, there are various ways to combine curve adjustment, saturation correction and contrast correction. Among them, the combination of curve adjustment and saturation correction can achieve the effect of reversal film correction, except for the above-mentioned reversal film correction and contrast. Correct the combination method, in order to achieve the effect of optimizing the editing of the image, the image can be corrected by the reverse film, and then the image corrected by the reversal film can be corrected. In addition, the image can be separately used. By performing the reversal film correction and the contrast correction, and superimposing the obtained two corrected images, an optimization effect similar to the above method can be obtained. When the two corrected images obtained are superimposed, this embodiment does not limit the specific superimposing manner. If the reversal film correction effect is I inversion (i, j), the contrast correction effect is I to 3⁄4 (i, j), when the two correction effects are superimposed, the two effects can be weighted separately, such as the superimposed image I superimposed (i, j) = I s to (i, j) Xa + I Ά ( i, j) X (255- a) ; where a is a weighting value, and the specific weighting value is not limited in this embodiment, and may be adjusted according to the required effect. The method provided by the embodiment, by combining the contrast correction and the weaker reversal film correction algorithm, can not only improve the image quality of the image, but also improve the color of the image, so that the color of the image is more vivid and does not have a hue on the image. Cause damage. Embodiment 3
参见图 3, 本实施例提供了一种图像优化编辑的装置, 该装置包括:  Referring to FIG. 3, the embodiment provides an apparatus for image optimization editing, and the apparatus includes:
曲线调整模块 301, 用于将待优化图像进行曲线调整, 得到曲线修正图像;  a curve adjustment module 301, configured to perform curve adjustment on the image to be optimized to obtain a curve correction image;
第一变换模块 302, 用于对曲线修正图像对应的每个点进行 HSV转换, 得到转换后的色 彩11、 纯度 S和明度 V的值;  The first transform module 302 is configured to perform HSV conversion on each point corresponding to the curve correction image to obtain values of the converted color 11, purity S and brightness V;
第二变换模块 303, 用于将得到的 S值进行加权后, 对 H、 V以及加权后的 S值进行 RGB 变换, 得到饱和度修正图像。  The second transform module 303 is configured to perform weighting on the obtained S values, and perform RGB transform on the H, V, and weighted S values to obtain a saturation corrected image.
参见图 4, 该装置还包括:  Referring to Figure 4, the device further includes:
第一对比度修正模块 304, 用于在曲线调整模块将待优化图像进行曲线调整之前, 对待 优化图像进行对比度修正, 得到对比度修正图像;  a first contrast correction module 304, configured to perform contrast correction on the optimized image before the curve adjustment module adjusts the image to be optimized, to obtain a contrast correction image;
相应地, 曲线调整模块 301, 具体用于对得到的对比度修正图像进行曲线调整, 得到曲 线修正图像。  Correspondingly, the curve adjustment module 301 is specifically configured to perform curve adjustment on the obtained contrast correction image to obtain a curve correction image.
可选地, 参见图 5, 该装置还包括:  Optionally, referring to FIG. 5, the apparatus further includes:
第一对比度修正模块 304, 用于在曲线调整模块 301将待优化图像进行曲线调整之前, 对待优化图像进行对比度修正, 得到对比度修正图像;  The first contrast correction module 304 is configured to perform contrast correction on the image to be optimized before the curve adjustment module 301 performs curve adjustment on the image to be optimized, to obtain a contrast correction image;
第一叠加模块 305, 用于在第二变换模块 303对 H、 V以及加权后的 S值进行 RGB变换, 得到饱和度修正图像之后, 将第一对比度修正模块 304得到对比度修正图像及第二变换模 块 303得到的饱和度修正图像进行叠加。  The first superimposing module 305 is configured to perform RGB transform on the H, V and the weighted S values in the second transform module 303 to obtain the saturation corrected image, and then obtain the contrast corrected image and the second transform by the first contrast correction module 304. The saturation correction image obtained by the module 303 is superimposed.
可选地, 参见图 6, 该装置还包括:  Optionally, referring to FIG. 6, the device further includes:
第二对比度修正模块 306,用于在第二变换模块 303对 H、 V以及加权后的 S值进行 RGB 变换, 得到饱和度修正图像之后, 对待优化图像进行对比度修正, 得到对比度修正图像; 第二叠加模块 307,用于将第二对比度修正模块 306得到的对比度修正图像及第二变换 模块 303得到的饱和度修正图像进行叠加。  The second contrast correction module 306 is configured to perform RGB transformation on the H, V and the weighted S values in the second transformation module 303 to obtain a saturation correction image, and then perform contrast correction on the image to be optimized to obtain a contrast correction image; The superimposing module 307 is configured to superimpose the contrast correction image obtained by the second contrast correction module 306 and the saturation correction image obtained by the second transform module 303.
可选地, 参见图 7, 该装置还包括:  Optionally, referring to Figure 7, the device further includes:
第三对比度修正模块 308,用于在第二变换模块 303对 H、 V以及加权后的 S值进行 RGB 变换, 得到饱和度修正图像之后, 对饱和度修正图像进行对比度修正。  The third contrast correction module 308 is configured to perform RGB conversion on the H, V and the weighted S values by the second transform module 303 to obtain a saturation correction image, and then perform contrast correction on the saturation correction image.
需要说明的是: 本实施例提供的装置在实现对图像进行优化编辑时, 仅以上述各功能 模块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功能分配由不同的功能模 块完成, 即将装置的内部结构划分成不同的功能模块, 以完成以上描述的全部或者部分功 能。 另外, 本实施例提供的图像优化编辑的装置与图像优化编辑的方法实施例属于同一构 思, 其具体实现过程详见方法实施例, 这里不再赘述。 It should be noted that: the device provided in this embodiment only performs the above functions when implementing optimized editing of an image. The division of the modules is exemplified. In practical applications, the above function assignments may be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for image optimization editing provided by this embodiment is the same as the method embodiment of the image optimization editing. The specific implementation process is described in detail in the method embodiment, and details are not described herein again.
综上所述, 本实施例提供的装置, 通过将对比度调整、 曲线调整和饱和度调整进行结 合, 改善了原来图像曝光质量和色泽, 使得颜色更加鲜明, 且不会对图像的色调造成破坏。 上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。  In summary, the apparatus provided in this embodiment combines the contrast adjustment, the curve adjustment and the saturation adjustment to improve the original image exposure quality and color, so that the color is more vivid and does not cause damage to the color tone of the image. The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
本发明实施例中的全部或部分步骤, 可以利用软件实现, 相应的软件程序可以存储在 可读取的存储介质中, 如光盘或硬盘等。  All or part of the steps in the embodiments of the present invention may be implemented by using software, and the corresponding software program may be stored in a readable storage medium, such as an optical disk or a hard disk.
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的精神和原则 之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims

权利要求书 Claim
1、 一种图像的优化编辑方法, 其特征在于, 所述方法包括: An optimized editing method for an image, the method comprising:
将待优化图像进行曲线调整, 得到曲线修正图像;  Adjusting the curve of the image to be optimized to obtain a curve correction image;
对所述曲线修正图像对应的每个点进行 HSV转换, 得到转换后的色彩 H、纯度 S和明度 V 的值;  Performing HSV conversion on each point corresponding to the curve correction image to obtain values of the converted color H, purity S, and brightness V;
将得到的所述 S值进行加权后, 对所述 H、 V以及加权后的 S值进行 RGB变换, 得到饱和 度修正图像。  After the obtained S values are weighted, the H, V, and the weighted S values are RGB-converted to obtain a saturation corrected image.
2、 根据权利要求 1所述的方法, 其特征在于, 所述将待优化图像进行曲线调整之前, 还 包括: The method according to claim 1, wherein before the adjusting the image to be optimized, the method further includes:
对所述待优化图像进行对比度修正, 得到对比度修正图像;  Performing contrast correction on the image to be optimized to obtain a contrast correction image;
相应地, 所述将待优化图像进行曲线调整, 具体包括:  Correspondingly, the adjusting the image to be optimized comprises:
对所述得到的对比度修正图像进行曲线调整。  Curve adjustment is performed on the obtained contrast corrected image.
3、 根据权利要求 1所述的方法, 其特征在于, 所述将待优化图像进行曲线调整之前, 还 包括: The method according to claim 1, wherein before the adjusting the image to be optimized, the method further includes:
对所述待优化图像进行对比度修正, 得到对比度修正图像;  Performing contrast correction on the image to be optimized to obtain a contrast correction image;
相应地, 对所述 H、 V以及加权后的 S值进行 RGB变换, 得到饱和度修正图像之后, 还包 括:  Correspondingly, after performing the RGB transformation on the H, V, and the weighted S values to obtain the saturation correction image, the method further includes:
将所述对比度修正图像及所述饱和度修正图像进行叠加。  The contrast correction image and the saturation correction image are superimposed.
4、 根据权利要求 1所述的方法, 其特征在于, 所述对所述 H、 V以及加权后的 S值进行 RGB变换, 得到饱和度修正图像之后, 还包括: The method according to claim 1, wherein the RGB transforming the H, V, and the weighted S values to obtain a saturation correction image further includes:
对所述待优化图像进行对比度修正, 得到对比度修正图像;  Performing contrast correction on the image to be optimized to obtain a contrast correction image;
将所述对比度修正图像及所述饱和度修正图像进行叠加。  The contrast correction image and the saturation correction image are superimposed.
5、 根据权利要求 1所述的方法, 其特征在于, 所述对所述 H、 V以及加权后的 S值进行 RGB变换, 得到饱和度修正图像之后, 还包括: The method according to claim 1, wherein the RGB transforming the H, V, and the weighted S values to obtain a saturation correction image further includes:
对所述饱和度修正图像进行对比度修正。 Contrast correction is performed on the saturation corrected image.
6、 一种图像的优化编辑装置, 其特征在于, 所述装置包括: 6. An image optimization editing apparatus, wherein the apparatus comprises:
曲线调整模块, 用于将待优化图像进行曲线调整, 得到曲线修正图像;  a curve adjustment module, configured to perform curve adjustment on the image to be optimized to obtain a curve correction image;
第一变换模块, 用于对所述曲线修正图像对应的每个点进行 HSV转换, 得到转换后的色 彩11、 纯度 S和明度 V的值;  a first transform module, configured to perform HSV conversion on each point corresponding to the curve correction image, to obtain values of the converted color 11, purity S, and brightness V;
第二变换模块, 用于将得到的所述 S值进行加权后, 对所述 H、 V以及加权后的 S值进行 RGB变换, 得到饱和度修正图像。  The second transform module is configured to weight the obtained S values, perform RGB transform on the H, V, and the weighted S values to obtain a saturation corrected image.
7、 根据权利要求 6所述的装置, 其特征在于, 所述装置, 还包括: The device according to claim 6, wherein the device further comprises:
第一对比度修正模块, 用于在所述曲线调整模块将待优化图像进行曲线调整之前, 对所 述待优化图像进行对比度修正, 得到对比度修正图像;  a first contrast correction module, configured to perform contrast correction on the image to be optimized before the curve adjustment module performs curve adjustment on the image to be optimized, to obtain a contrast correction image;
相应地, 所述曲线调整模块, 具体用于对所述得到的对比度修正图像进行曲线调整, 得 到曲线修正图像。  Correspondingly, the curve adjustment module is specifically configured to perform curve adjustment on the obtained contrast correction image to obtain a curve correction image.
8、 根据权利要求 6所述的装置, 其特征在于, 所述装置, 还包括: The device according to claim 6, wherein the device further comprises:
第一对比度修正模块, 用于在所述曲线调整模块将待优化图像进行曲线调整之前, 对所 述待优化图像进行对比度修正, 得到对比度修正图像;  a first contrast correction module, configured to perform contrast correction on the image to be optimized before the curve adjustment module performs curve adjustment on the image to be optimized, to obtain a contrast correction image;
第一叠加模块, 用于在所述第二变换模块对所述 H、 V以及加权后的 S值进行 RGB变换, 得到饱和度修正图像之后, 将所述第一对比度修正模块得到的所述对比度修正图像及第二变 换模块得到的所述饱和度修正图像进行叠加。  a first superimposing module, configured to perform RGB transformation on the H, V, and weighted S values by the second transform module to obtain the contrast obtained by the first contrast correction module after obtaining a saturation correction image The corrected image and the saturation corrected image obtained by the second transform module are superimposed.
9、 根据权利要求 6所述的装置, 其特征在于, 所述装置, 还包括: The device according to claim 6, wherein the device further comprises:
第二对比度修正模块, 用于在所述第二变换模块对所述 H、 V以及加权后的 S值进行 RGB 变换, 得到饱和度修正图像之后, 对所述待优化图像进行对比度修正, 得到对比度修正图像; 第二叠加模块, 用于将所述第二对比度修正模块得到的所述对比度修正图像及所述第二 变换模块得到的所述饱和度修正图像进行叠加。  a second contrast correction module, configured to perform RGB transformation on the H, V, and weighted S values by the second transform module to obtain a saturation correction image, and perform contrast correction on the image to be optimized to obtain a contrast And a second superimposing module, configured to superimpose the contrast correction image obtained by the second contrast correction module and the saturation correction image obtained by the second transformation module.
10、 根据权利要求 6所述的装置, 其特征在于, 所述装置, 还包括: The device according to claim 6, wherein the device further comprises:
第三对比度修正模块, 用于在所述第二变换模块对所述 H、 V以及加权后的 S值进行 RGB 变换, 得到饱和度修正图像之后, 对所述饱和度修正图像进行对比度修正。  The third contrast correction module is configured to perform RGB transformation on the H, V and the weighted S values by the second transform module to obtain a saturation correction image, and then perform contrast correction on the saturation correction image.
PCT/CN2011/070765 2010-02-08 2011-01-28 Method and apparatus for image optimization editing WO2011095116A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
BR112012014666-1A BR112012014666B1 (en) 2010-02-08 2011-01-28 METHOD AND APPARATUS FOR EDITING OPTIMIZATION IN AN IMAGE
RU2012125065/08A RU2535482C2 (en) 2010-02-08 2011-01-28 Method and apparatus for editing with image optimisation

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2010101122281A CN101742340B (en) 2010-02-08 2010-02-08 Method and device for optimizing and editing image
CN201010112228.1 2010-02-08

Publications (1)

Publication Number Publication Date
WO2011095116A1 true WO2011095116A1 (en) 2011-08-11

Family

ID=42465106

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/070765 WO2011095116A1 (en) 2010-02-08 2011-01-28 Method and apparatus for image optimization editing

Country Status (4)

Country Link
CN (1) CN101742340B (en)
BR (1) BR112012014666B1 (en)
RU (1) RU2535482C2 (en)
WO (1) WO2011095116A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742340B (en) * 2010-02-08 2012-05-30 腾讯科技(深圳)有限公司 Method and device for optimizing and editing image
CN102169585A (en) * 2011-03-31 2011-08-31 汉王科技股份有限公司 Method and device for detecting image color cast
CN102568437B (en) 2012-01-20 2014-07-30 华为终端有限公司 Image displaying method and equipment
CN103294429A (en) * 2012-03-05 2013-09-11 联想(北京)有限公司 Display method and device
TWI510101B (en) * 2013-09-12 2015-11-21 Au Optronics Corp Method for adjusting saturation degree and color adjusting system
CN104954767B (en) * 2014-03-26 2017-08-29 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN104505035A (en) * 2014-12-18 2015-04-08 深圳市华星光电技术有限公司 Conversion method and conversion system of RGB (Red, Green, Blue) data
CN111615714B (en) * 2018-06-27 2023-12-15 华为技术有限公司 Color adjustment method of RGB data
CN109447958B (en) * 2018-10-17 2023-04-14 腾讯科技(深圳)有限公司 Image processing method, image processing device, storage medium and computer equipment
EP3924933A1 (en) * 2019-03-21 2021-12-22 Huawei Technologies Co., Ltd. Image processor
CN109859299B (en) * 2019-03-27 2020-12-22 腾讯科技(深圳)有限公司 Portrait picture processing method and device, computer readable storage medium and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2838169Y (en) * 2005-09-08 2006-11-15 上海广电(集团)有限公司中央研究院 Image color enhancing device
CN1929551A (en) * 2005-09-07 2007-03-14 逐点半导体(上海)有限公司 Image contrast reinforcing means and method
US7583838B2 (en) * 2003-08-25 2009-09-01 Samsung Electronics Co., Ltd. Color saturation adjusting apparatus and method used for a display system
CN101742340A (en) * 2010-02-08 2010-06-16 腾讯科技(深圳)有限公司 Method and device for optimizing and editing image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5450217A (en) * 1994-05-23 1995-09-12 Xerox Corporation Image-dependent color saturation correction in a natural scene pictorial image
JP2005006049A (en) * 2003-06-12 2005-01-06 Konica Minolta Medical & Graphic Inc Method for adjusting color, program for implementing the same, recording medium for storing the same program, and image output system
JP2006261968A (en) * 2005-03-16 2006-09-28 Ricoh Co Ltd Luminance adjusting device, image processing device, luminance adjustment method, computer program and recording medium
RU2320011C1 (en) * 2006-07-05 2008-03-20 Самсунг Электроникс Ко., Лтд. Method for automatic correction of red-eye effect

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7583838B2 (en) * 2003-08-25 2009-09-01 Samsung Electronics Co., Ltd. Color saturation adjusting apparatus and method used for a display system
CN1929551A (en) * 2005-09-07 2007-03-14 逐点半导体(上海)有限公司 Image contrast reinforcing means and method
CN2838169Y (en) * 2005-09-08 2006-11-15 上海广电(集团)有限公司中央研究院 Image color enhancing device
CN101742340A (en) * 2010-02-08 2010-06-16 腾讯科技(深圳)有限公司 Method and device for optimizing and editing image

Also Published As

Publication number Publication date
BR112012014666A2 (en) 2016-04-05
CN101742340A (en) 2010-06-16
BR112012014666B1 (en) 2021-09-08
RU2535482C2 (en) 2014-12-10
CN101742340B (en) 2012-05-30
RU2012125065A (en) 2014-03-20

Similar Documents

Publication Publication Date Title
WO2011095116A1 (en) Method and apparatus for image optimization editing
US8929654B2 (en) Spectral image processing
US8547450B2 (en) Methods and systems for automatic white balance
US8311355B2 (en) Skin tone aware color boost for cameras
TW200530949A (en) Image data processing in color spaces
CN101983510B (en) The System and method for of adaptive local white balance adjusting
US8717460B2 (en) Methods and systems for automatic white balance
CN101355634B (en) Method and system for regulating image chromaticity
CN101212693A (en) White balancing method and image adjusting device
TW201444336A (en) Method and device of skin tone optimization in color gamut mapping system
US8994848B2 (en) Method and system for handling mixed illumination in video and photography
US20050201634A1 (en) System and process for automatic exposure correction in an image
US7750919B2 (en) Apparatus and method for enhancing device-adaptive color
CN112200747B (en) Image processing method and device and computer readable storage medium
US20130093915A1 (en) Multi-Illuminant Color Matrix Representation and Interpolation Based on Estimated White Points
JP2010021791A (en) Image capturing apparatus, and image processing method therefor, and program
TWI415480B (en) Image processing method and image processing system
US20170180694A1 (en) Method of encoding raw color coordinates provided by a camera representing colors of a scene having two different illuminations
CN115550575B (en) Image processing method and related device
TW201929529A (en) Generating a monochrome image
WO2007032324A1 (en) Imaging device, image processing device, image processing method, and image processing program
TWI383333B (en) Method and system for adjusting saturation of image
JP2008085975A (en) Imaging element characteristic evaluating method and imaging element characteristics evaluating apparatus
CN117408872B (en) Color image data conversion method, device, equipment and storage medium
JPH09130815A (en) Method and device for processing picture

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11739395

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 4236/CHENP/2012

Country of ref document: IN

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2012125065

Country of ref document: RU

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112012014666

Country of ref document: BR

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14/12/2012)

122 Ep: pct application non-entry in european phase

Ref document number: 11739395

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 112012014666

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20120615