CN104851115B - A method for calculating filter any image by color mapping function fitting - Google Patents

A method for calculating filter any image by color mapping function fitting Download PDF

Info

Publication number
CN104851115B
CN104851115B CN201510252484.3A CN201510252484A CN104851115B CN 104851115 B CN104851115 B CN 104851115B CN 201510252484 A CN201510252484 A CN 201510252484A CN 104851115 B CN104851115 B CN 104851115B
Authority
CN
China
Prior art keywords
fitting
filter
method
image
parameters
Prior art date
Application number
CN201510252484.3A
Other languages
Chinese (zh)
Other versions
CN104851115A (en
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 CN201510252484.3A priority Critical patent/CN104851115B/en
Publication of CN104851115A publication Critical patent/CN104851115A/en
Application granted granted Critical
Publication of CN104851115B publication Critical patent/CN104851115B/en

Links

Abstract

本发明公开了一种通过函数拟合计算任意图像颜色映射滤镜的方法,具体步骤包括,准备输入输出图,分别获取同维度的输入图和输出效果图的点列;计算拟合参数,使用各种拟合的方法来获取一个参数,参数的函数使输入图在经过参数变换后与效果图最为接近;统计检验拟合效果,对计算出来的参数进行假设检验及数值统计,以检验拟合的效果;使用拟合参数,将拟合出来的参数整合到需要使用的程序源码当中,并检验拟合的满意度。 The present invention discloses a method of calculating the image of any color mapping function fitting by a filter, comprising specific steps, FIG preparing input and output, respectively acquire the same dimension and enter dot lines in FIG output effect; calculating fitting parameters, various methods to obtain a fitting parameter, the parameter input function and effect of FIG closest FIG after transformation parameter; fitting statistical test results of calculated parameter values ​​and statistical hypothesis testing to test fitting effects; use fitting parameters, the fitting out of the parameters incorporated into the program source code need to use them and to verify satisfaction fit. 本发明利用拟合的方式反演或简化滤镜计算公式,将该滤镜参数化,使得它可以计算;获得更简单的滤镜计算公式,可以降低数倍的运算量,从而降低CPU/GPU占用率,取得非常高的性能。 Inversion of the present invention utilizes a filter fitting manner or simplified formula, the parameters of the filter, so that it can be calculated; filter to obtain a simpler calculation formula, calculation amount can be reduced several times, thereby reducing the CPU / GPU occupancy rate achieved very high performance.

Description

一种通过函数拟合计算任意图像颜色映射滤镜的方法 A method for calculating filter any image by color mapping function fitting

技术领域 FIELD

[0001]本发明涉及图像处理,尤其涉及一种通过函数拟合计算任意图像颜色映射滤镜的方法。 [0001] The present invention relates to image processing, in particular, it relates to a method for calculating any function map image color filter fitting.

背景技术 Background technique

[0002] 图像颜色映射滤镜是图像处理程序以及摄影程序中十分重要的一种操作。 [0002] The filter is a color map image operation procedure photographic image processing program, and very important. 比如大部份的调光、调色、反转片、负片、各种胶片效果以及其它十分多的颜色滤镜都是颜色映射滤镜。 For example most of dimming, color, reversal, negative, and other effects of various film very much color filters are color filters mapping. 颜色滤镜的重要一个特点是它是对每一个点独立运算的,一个点的输出只和这个点的颜色值有关,而与周围或其它点的颜色值无关。 Important characteristics of a color filter is that it is a point for each separate operation, the output of only one point and this point color value, whereas the value is independent of the color or other surrounding points.

[0003] 目前,为了实现一种图像颜色映射滤镜,需要预先知道运算的公式才能够准确地计算出来。 [0003] Currently, in order to realize a color image mapping filter, you need to know in advance the calculation formula to be able to be accurately calculated out. 如果只知道一张输入图,和一张输出图,而不知道其中颜色映射的计算公式,就没有办法设计一个滤镜,达到相同的效果。 If only one enter, and an output diagram, without knowing where the color mapping is calculated, there is no way to design a filter, to achieve the same effect. 而对于一些特殊效果,已知的可能只有一张原图和效果图,由于不知道其中的计算公式,所以其中绝大多数不能够获得计算参数,也就不能够应用到程序中。 For special effects, and the effect may be a picture of the view of a known, because they do not know where the calculation formula, so that most of the calculation parameters can not be obtained, can not be applied to the program. 另外,对于一些公式已知的复杂的滤镜,比如含有大量指数函数,对数函数,三角函数,或者包含一些颜色空间变换的滤镜,由于其计算复杂,按照原公式计算十分缓慢,性能较为低下。 In addition, the known formulas for some of the complex filter, such as containing a large amount of an exponential function, logarithmic functions, trigonometric functions, or some filters comprise color space conversion, because of its complexity, is calculated according to the original formula is very slow, the performance of the more low.

发明内容 SUMMARY

[0004] 本发明的目的就在于提供一种通过函数拟合计算任意图像颜色映射滤镜的方法, 利用拟合的方式反演或简化滤镜计算公式,能有效解决上述现有技术中的不足。 [0004] The object of the present invention is to provide a method to calculate an image of any color mapping function by fitting the filter, inversion, or using a simplified calculation formula filter fitting manner, can effectively solve the problem of the above prior art .

[0005] 本发明针对现有技术的不足,提供了以下技术方案: [0005] The present invention addresses deficiencies in the prior art, provides the following technical solutions:

[0006] 本发明所述一种通过函数拟合计算任意图像颜色映射滤镜的方法,其特征在于, 具体步骤如下: [0006] A computing method of the present invention, an arbitrary image by color mapping function fitting the filter, wherein the following steps:

[0007] 101、准备输入输出图,分别获取同维度的输入图和输出效果图的点列;将一个颜色(r,g,b)值作为一个三维向量,一幅宽高为W#1的图像,便可以作为一个w*h长度的点列; [0007] 101, FIG prepare input and output, respectively acquire the same dimension and enter dot lines in FIG output effect; and a color (r, g, b) as a three-dimensional vector value, to a width W # 1 is high on an image, the length w * h as a point sequence;

[0008] 102、计算拟合参数,使用各种拟合的方法来获取一个参数,参数的函数使输入图在经过参数变换后与效果图最为接近;将输出的r、g、b通道分别拟合,使用以多项式为主, 以指数函数和对数函数为辅,进行参数拟合,拟合出来的函数是一个三维空间点到[0,1.0] 区间的映射; [0008] 102, fitting parameters calculated using various methods to acquire a fitting parameter, the input function parameters FIG After the parameter conversion closest renderings; R & lt be output, g, b are intended to channel together, the polynomial used mainly to exponential and logarithmic functions, supplemented parameter fitting function of the fitted three-dimensional space is a point [0,1.0] mapping interval;

[0009] 103、统计检验拟合效果,对计算出来的参数进行假设检验及数值统计,以检验拟合的效果; [0009] 103, the fitting statistical test results of calculated parameter values ​​and statistical hypothesis testing, to test the effect of the fitting;

[0010] 104、使用拟合参数,将拟合出来的参数整合到需要使用的程序源码当中,并检验拟合的满意度。 [0010] 104, using the fit parameters, the parameters of the fitted integrated into the program source code need to use them, and to verify satisfaction fit.

[0011] 进一步地,所述步骤101多组输入图和效果图需要将多张图按照对应的顺序,分别将输入图和输出效果图以一维点列拼接起来。 [0011] Further, the step 101 sets multiple renderings and enter various figures need to be in a corresponding order, respectively, and enter the output effect of a one-dimensional point sequence in FIG spliced ​​together.

[0012] 又进一步地,所述步骤102拟合的方法包括但不限于logistic回归、人工神经网络、最小二乘法。 [0012] Still further, the method includes the step of fitting 102, but not limited to, logistic regression, neural networks, the least squares method.

[0013]又进一步地,所述步骤102在拟合非线性映射的时候,先计算出非线性的单元,gp 二次以上的多项式单元,以及指数函数和对数函数等单元,再基于这些非线性单元进行线性拟合,以获得非线性的映射效果。 [0013] Still further, in the step 102, when fitting the nonlinear mapping, to calculate a non-linear unit, at least quadratic polynomial gp unit, and the exponential and logarithmic functions, etc. unit, and then based on these non- linear unit linear fit to obtain a non-linear mapping results.

[00M]再进一步地,所述步骤1〇3假设检验包括但不限于t-检验、F检验、卡方检验。 [00M] Still further, the step 1〇3 hypothesis testing including but not limited to t- test, F test, chi-square test.

[0015]更进一步地,所述步骤103拟合出来的参数需要进行t—检验及统计分析,需要满足P-值的阈值。 [0015] Furthermore, the step 103 parameters need to be fitted out t- test and statistical analysis, to meet the required threshold value P- value.

[0016]与现有技术相比,本发明的优点在于: [0016] Compared with the prior art, advantages of the present invention:

[0017]本发明所述一种通过函数拟合计算任意图像颜色映射滤镜的方法,利用拟合的方式反演或简化滤镜计算公式,主要有两点优点: [0017] A computing method of the present invention, any filter image by color mapping function fitting, fitting manner using filter or simplified inversion formula, there are two main advantages:

[0018] 1、本发明可以在只有一张输入图和一张效果图的情况下,获得最逼近这个效果图的拟合参数,从而将该滤镜参数化,使得它可以计算;进而可以快速获取大量的颜色滤镜, 而不再局限于少数的预知计算公式的颜色滤镜。 [0018] 1, in the case where the present invention may be in an enter and an effect diagram, the parameters of the best fit approximation to obtain this effect diagram, whereby the parameterized filters, so that it can be calculated; fast turn obtain a large number of color filters, no longer confined to a few formula to predict the color filter.

[0019] 2、本发明通过拟合输入图和效果图,可以获得更简单的滤镜计算公式,对于一些计算复杂度较高的滤镜,可以降低数倍的运算量,从而降低CPU/GPU占用率,取得非常高的性能。 [0019] 2, the present invention is by fitting enter and FIG effects can be obtained in a simpler filter calculation formula for some high computational complexity filters can be reduced amount calculation several times, thereby reducing the CPU / GPU occupancy rate achieved very high performance.

[0020] 本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。 [0020] Other features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or learned by practice of the present invention. 本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。 The objectives and other advantages of the invention may be realized and attained by the written description, claims, and drawings structure particularly pointed out.

[0021] 下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。 [0021] The following drawings and embodiments, detailed description of the further aspect of the present invention.

附图说明 BRIEF DESCRIPTION

[0022] 附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。 [0022] The accompanying drawings provide a further understanding of the present invention, and constitute part of this specification, the embodiments of the invention, serve to explain the invention, not to limit the present invention. 在附图中: In the drawings:

[0023]图1是本发明所述一种通过函数拟合计算任意图像颜色映射滤镜的方法的流程图; [0023] FIG. 1 is a flowchart of a method of the present invention provides a color mapping arbitrary image filter function by fitting calculation;

[0024]图2是本发明实施例的输入图; [0024] FIG. 2 is a view of an embodiment of the input of the present invention;

[0025] 图3是本发明实施例的输出效果图; [0025] FIG. 3 is a view of an embodiment of the output effect of the present invention;

[0026] 图4是本发明实施例的拟合图。 [0026] FIG. 4 is a view of an embodiment of the fitting according to the present invention.

具体实施方式 Detailed ways

[0027]下面将结合附图对本发明作进一步说明。 [0027] following with reference to the present invention will be further described.

[0028] 实施例: [0028] Example:

[0029]以下结合附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明。 [0029] Hereinafter, the preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, it should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention.

[0030] 参见图1所示。 [0030] Referring to FIG. 1.

[0031] 本发明所述一种通过函数拟合计算任意图像颜色映射滤镜的方法,其特征在于, 具体步骤如下: [0031] A computing method of the present invention, an arbitrary image by color mapping function fitting the filter, wherein the following steps:

[0032]步骤101、准备输入输出图,分别获取同维度的输入图和输出效果图的点列;将一个颜色(r,g,b)值作为一个三维向量,一幅宽高为w*h的图像,便可以作为一个w*h长度的点列; [0032] Step 101, FIG prepare input and output, respectively acquire the same dimension and enter dot lines in FIG output effect; and a color (r, g, b) as a three-dimensional vector value, a high width of w * h image can length w * h as a point sequence;

[0033]获取输入输出效果图,输入和输出的效果图必需具有同样的维度。 [0033] Gets O effect drawing, which inputs and outputs must have the same dimensions. 如果有多组输入和效果图,则只需要将多张图按照对应的顺序,分别将输入图和输出效果图以一维点列拼接起来,形成更长的点列。 If multiple sets of input and renderings, you only need to various figures in a corresponding order, respectively, and enter the output effect of a one-dimensional point sequence in FIG spliced ​​together to form a longer sequence of points.

[0034] 步骤1〇2、计算拟合参数,使用各种拟合的方法来获取一个参数,参数的函数使输入图在经过参数变换后与效果图最为接近;将输出的r、g、b通道分别拟合,使用以多项式为主,以指数函数和对数函数为辅,进行参数拟合,拟合出来的函数是一个三维空间点到[0, 1.0]区间的映射; [0034] Step 1〇2, fitting parameters is calculated, using various methods to acquire a fitting parameter, the input function parameters FIG After the parameter conversion closest renderings; R & lt be output, g, b fitting a channel, the polynomial used mainly to exponential and logarithmic functions, supplemented parameter fitting function of the fitted three-dimensional space is a point [0, 1.0] interval mapping;

[0035] 使用包括但不限于logistic回归、人工神经网络、最小二乘法的拟合方法来获取一个参数模型。 [0035] using logistic regression including but not limited to, artificial neural networks, the least squares fitting method to obtain a model parameter. 这个参数模型的目标函数是使输入图在经过参数变换(即颜色映射)后,与效果图最为接近。 The parameters of the model objective function is to enter after parameter conversion (i.e., color maps), and effect closest FIG.

[0036]在拟合非线性映射的时候,先计算出非线性的单元,即二次以上的多项式单元,以及指数函数和对数函数等单元,再基于这些非线性单元进行线性拟合,以获得非线性的映射效果。 [0036] In fitting the nonlinear mapping, to calculate a non-linear element, i.e., more than quadratic polynomial unit, and the exponential and logarithmic functions, etc. units, then the linear fit based on these nonlinear element to to obtain non-linear mapping results.

[0037]步骤103、统计检验拟合效果,对计算出来的参数进行假设检验及数值统计,以检验拟合的效果; [0037] Step 103, the fitting statistical test results of calculated parameter values ​​and statistical hypothesis testing, to test the effect of the fitting;

[0038] 对计算出来的参数进行假设检验,以及数值统计,以检验拟合的效果。 [0038] The calculated parameters for hypothesis testing and statistical values, to verify the effect of fitting. 假设检验包括但t-检验、F检验以及卡方检验等。 Hypothesis testing including but t- test, F test and chi-square test and the like.

[0039]对于拟合出来的参数需要进行t_检验,以及需要进行统计分析,需要满足p-值的阈值,一般情况下同时满足最大误差不超过0.05,以及平均误差不超过0.01。 [0039] For the fitted parameters required t_ testing, and the need for statistical analysis, it is necessary to meet the threshold p- value while satisfying the maximum error in general not more than 0.05, and the average error does not exceed 0.01.

[0040]步骤104、使用拟合参数,将拟合出来的参数整合到需要使用的程序源码当中,输出拟合图,检验拟合的满意度。 [0040] Step 104, using the fit parameters, the parameters of the fitted integrated into the program source code need to use them, FIG output fitting, fitting test satisfaction.

[0041] 本发明对于公式未知但是具有输入输出图的滤镜,可以用拟合的方式反演公式; 对于公式已知但较为复杂的滤镜,则可以通过拟合的方式,采用更为简便的公式以提高性能。 [0041] For the present invention having the formula unknown but the input and output of the filter of FIG., May be fitting manner inversion formula; formula known, but for more complex filters, can fit manner by using simpler the formula to improve performance.

[0042] 本发明对任意一组输入输出图,可以计算出一组参数,使用该参数进行颜色映射计算,可以以十分小的误差获得和效果图逼近的效果。 [0042] The present invention is a set of inputs and outputs for any view a set of parameters can be calculated using the color mapping parameter calculations, and effects can be obtained in approximation by the effect of a very small error.

[0043]本发明可获取的大量特效,而且由于拟合出来的公式往往比较简单,所以该公式的计算通常十分快速,可以获得非常高的性能。 [0043] The present invention can be obtained by a large number of effects, and because of the fitted equation is often relatively simple, so the calculation formula is usually very fast, very high performance can be obtained.

[0044] 实施例:拟合一个Wagashi的效果。 [0044] Example: a fitting results of Wagashi.

[0045]步骤1:准备输入图。 [0045] Step 1: Preparation enter. 为了获取完整的映射,我们可以准备一张标准的测试用图,这张测试用图函数生成了256*256*256个点,包含了任意一个可能取值的8位颜色点,并且存储为一个4096*4096的图片,见图2。 In order to obtain a complete map, we can prepare a standard test chart, this test generates 256 * 256 * 256 points with a function that contains 8-bit color at any point in a possible values, and stored as a 4096 * 4096 picture, shown in Figure 2.

[0046] 步骤2:准备输出图。 [0046] Step 2: Preparation Output FIG. 在某参考软件中,对输入图,应用Wagashi效果,见图3。 In a reference software, to enter application Wagashi effect, shown in Figure 3.

[0047] 步骤3:使用Logistic回归计算拟合的参数,使用以下拟合单元(〃1. 〇〃,〃r〃/g〃,〃 b',,"r*r 〃/g*g〃/b*b 〃/r*g〃/r*b〃,〃g*b 〃/r*r*r 〃/r*g*g〃,〃r*b*b 〃/,"b*g* g","b*b*b〃,〃g*r*r〃,〃g*g*g〃,〃g*b*b〃,〃r*g*b")。 [0047] Step 3: Logistic regression parameters fitted, following fitting unit (〃1 〇〃, 〃r〃 / g〃, 〃 b ',, "r * r 〃 / g * g〃 /. 〃 B * b / r * g〃 / r * b〃, 〃g 〃 * b / r * r * r 〃 / r * g * g〃, 〃r 〃 * b * b /, "b * g * g "," b * b * b〃, 〃g * r * r〃, 〃g * g * g〃, 〃g * b * b〃, 〃r * g * b ").

[0048] 步骤4:可以获得如下参数(opengl shader表示法),其中rr,gg,bb皆是r,g,b的平方。 [0048] Step 4: The following parameters can be obtained (opengl shader notation), where rr, gg, bb are the square of r, g, b of.

[0049] out =+ 1.0 * vec3 ( -0.00907591978384681 , 0.0165922001872328 , 0.155178868601897 ) + r * vec3 ( 2.03382238942652 , 0.258847484393451 , 0.0411956402830134 ) + g * vec3 ( 0.0828497863436964 , 1.51862665935353 ,- 0.232642456108933 ) + b * vec3( -0.223920052837933 , -0.2265332315957 , 0.95279394371724 ) + rr * vec3( -1.29360195574759 , 0.0738332214487962 , 0.194681299124784 ) + gg * vec3( -0.129292759422231 , -0.724478462689197 , 0.10318433464216 ) + bb * vec3( 0.35969899854499 , 0.319653872105339 , 0.172102999639757 ) + r*g * vec3 ( -0.0589921435241693 , -0.247633106292411 , 0.438184663073116 ) + r*b * vec3 ( -0.504408033479741 , -0.479933505994903 ,- 0.549130716898808 ) + g*b * vec3( -0.0457993184176872 , 0.22821996789042 , 0.233889611642765 ) + r*rr * vec3( 0.255283304942177 , -0.0268314195217173 , -0.0771953304011374 ) + r*gg * vec3( -0.00443726128150678 , 0.0307617976682977 , -0.0931398276926949 ) + r*bb * vec3 ( -0.148870252281681 ,0.0742275923337936 , 0.405 [0049] out = + 1.0 * vec3 (-0.00907591978384681, 0.0165922001872328, 0.155178868601897) + r * vec3 (2.03382238942652, 0.258847484393451, 0.0411956402830134) + g * vec3 (0.0828497863436964, 1.51862665935353, - 0.232642456108933) + b * vec3 (-0.223920052837933, -0.2265332315957 , 0.95279394371724) + rr * vec3 (-1.29360195574759, 0.0738332214487962, 0.194681299124784) + gg * vec3 (-0.129292759422231, -0.724478462689197, 0.10318433464216) + bb * vec3 (0.35969899854499, 0.319653872105339, 0.172102999639757) + r * g * vec3 (-0.0589921435241693, - 0.247633106292411, 0.438184663073116) + r * b * vec3 (-0.504408033479741, -0.479933505994903, - 0.549130716898808) + g * b * vec3 (-0.0457993184176872, 0.22821996789042, 0.233889611642765) + r * rr * vec3 (0.255283304942177, -0.0268314195217173, -0.0771953304011374) + r * gg * vec3 (-0.00443726128150678, 0.0307617976682977, -0.0931398276926949) + r * bb * vec3 (-0.148870252281681, 0.0742275923337936, 0.405 057778585149 ) + b*rr * vec3 ( 0.6635564501301 , 0.0740270425533082 , 0.00909827688661989 ) + b*gg * vec3( 0.017664894357892 , -0.00080716363094493 , -0.0484362033754527 ) + b*bb * vec3(-0.0942433397766149 , -0.0813475764796065 , -0.283558678862914 ) + g*rr * vec3 (0.0922045300249901 , -0.0776449886938087 , -0.0931743698977852 ) + g*gg * vec3( 0.078841976539223 , 0.176495214948229 , -0.0123270779521287 ) + g*bb * vec3( 0.0180909731898003 , -0.235214374743679 , -0.0212539674511058) +r*g*b * vec3( -0.113338398805438 , 0.333912174807809 , -0.335429864453784 ) 057778585149) + b * rr * vec3 (0.6635564501301, 0.0740270425533082, 0.00909827688661989) + b * gg * vec3 (0.017664894357892, -0.00080716363094493, -0.0484362033754527) + b * bb * vec3 (-0.0942433397766149, -0.0813475764796065, -0.283558678862914) + g * rr * vec3 (0.0922045300249901, -0.0776449886938087, -0.0931743698977852) + g * gg * vec3 (0.078841976539223, 0.176495214948229, -0.0123270779521287) + g * bb * vec3 (0.0180909731898003, -0.235214374743679, -0.0212539674511058) + r * g * b * vec3 (- 0.113338398805438, 0.333912174807809, -0.335429864453784)

[0050] 步骤5:对参数进行统计检验和数理统计,以确认误差在一定范围之内,并且检验显著水平较高。 [0050] Step 5: parameters and mathematical statistics, statistical test, to confirm that the error is within a certain range, and significantly higher levels of testing.

[0051 ]步骤6:据此公式计算出拟合图,并对比拟合图和原效果图,可以发现基本无法靠肉眼看出差别,见图4。 [0051] Step 6: According to this formula to calculate FIG fitting, the fitting and comparison of the original and FIGS renderings, differences can be found by the naked eye can not see substantially as shown in Figure 4.

[0052]最后说明的是:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。 [0052] Finally is noted that: the above embodiments are only preferred embodiments of the present invention, but not intended to limit the present invention. Although the embodiments of the present invention has been described in detail, those skilled in the art, which modifications can be made to the technical solutions described in the embodiments, or part of the technical features equivalents. 凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 Any modification within the spirit and principle of the present invention, made, equivalent substitutions, improvements, etc., should be included within the scope of the present invention.

Claims (6)

1.一种通过函数拟合计算任意图像颜色映射滤镜的方法,其特征在于,具体步骤如下: 101、 准备输入图及效果图,分别获取同维度的输入图和效果图的点列;将一个颜色(r, g,b)值作为一个三维向量,一幅宽高为w*h的图像,便可以作为一个w*h长度的点列; 102、 计算拟合参数,使用各种拟合的方法来获取一个参数,参数的函数使输入图在经过参数变换后与效果图最为接近;将输出的r、g、b通道分别拟合,使用以多项式为主,以指数函数和对数函数为辅,进行参数拟合,拟合出来的函数是一个三维空间点到[0,1.0]区间的映射; 103、 统计检验拟合效果,对计算出来的参数进行假设检验及数值统计,以检验拟合的效果; 104、 使用拟合参数,将拟合出来的参数整合到需要使用的程序源码当中,并检验拟合的满意度。 1. A method for calculating an image of any color mapping function by fitting the filter, wherein the following steps: 101, ready to enter and effect diagram, respectively acquire the same dimension and enter dot lines in FIG effect; and a color (r, g, b) as a three-dimensional vector value, a width w * h height of the image, they can be used as a point of length w * h columns; 102, fitting parameters calculated using various fitting the method to obtain a parameter, the parameter input function and effect of FIG closest FIG after transformation parameter; R & lt be output, g, b are fit channel, mainly used in a polynomial, exponential and logarithmic functions supplemented parameter fitting function of the fitted three-dimensional space is a point [0,1.0] mapping interval; 103, fitting statistical test results of calculated parameter values ​​and statistical hypothesis testing to test fitting results; 104, using the fit parameters, the parameters of the fitted integrated into the program source code need to use them, and to verify satisfaction fit.
2. 根据权利要求1所述一种通过函数拟合计算任意图像颜色映射滤镜的方法,其特征在于:所述步骤101多组输入图和效果图需要将多张图按照对应的顺序,分别将输入图和效果图以一维点列拼接起来。 The method of calculating the image of any color mapping function is fitted through the filter as claimed in claim 1, wherein: said step of multiple sets 101 and enter the required multiple renderings in accordance with the order corresponding to FIG, respectively the enter and effect a dimensional point sequence in FIG spliced ​​together.
3. 根据权利要求1所述一种通过函数拟合计算任意图像颜色映射滤镜的方法,其特征在于:所述步骤102拟合的方法包括但不限于logistic回归、人工神经网络、最小二乘法。 3. A method of fitting an arbitrary image is calculated by the color mapping function of the filter according to claim 1, characterized in that: the method comprises the step of fitting 102 but are not limited to, logistic regression, neural networks, the least square method .
4. 根据权利要求1所述一种通过函数拟合计算任意图像颜色映射滤镜的方法,其特征在于:所述步骤102在拟合非线性映射的时候,先计算出非线性的单元,即二次以上的多项式单元,以及指数函数和对数函数单元,再基于这些非线性单元进行线性拟合,以获得非线性的映射效果。 The method of calculating the image of any color mapping function is fitted through the filter as claimed in claim 1, wherein: said step of fitting 102 in the nonlinear mapping, to calculate a non-linear element, i.e., It means the above quadratic polynomial, exponential and logarithmic functions, and means, then these non-linear fit based on a linear unit, to obtain a non-linear mapping results.
5. 根据权利要求1所述一种通过函数拟合计算任意图像颜色映射滤镜的方法,其特征在于:所述步骤103假设检验包括但不限于t-检验、F检验、卡方检验。 The method of calculating the image of any color mapping function is fitted through the filter as claimed in claim 1, wherein: said step of hypothesis testing 103 include but are not limited to t- test, F test, chi-square test.
6. 根据权利要求1或5所述一种通过函数拟合计算任意图像颜色映射滤镜的方法,其特征在于:所述步骤103拟合出来的参数需要进行t-检验及统计分析,需要满足p-值的阈值。 The method of calculating the image of any color mapping function is fitted through the filter of claim 1 or 5, wherein: said step of fitting 103 out of the parameters required t- test and statistical analysis is necessary to satisfy p- value threshold value.
CN201510252484.3A 2015-05-18 2015-05-18 A method for calculating filter any image by color mapping function fitting CN104851115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510252484.3A CN104851115B (en) 2015-05-18 2015-05-18 A method for calculating filter any image by color mapping function fitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510252484.3A CN104851115B (en) 2015-05-18 2015-05-18 A method for calculating filter any image by color mapping function fitting

Publications (2)

Publication Number Publication Date
CN104851115A CN104851115A (en) 2015-08-19
CN104851115B true CN104851115B (en) 2017-09-22

Family

ID=53850742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510252484.3A CN104851115B (en) 2015-05-18 2015-05-18 A method for calculating filter any image by color mapping function fitting

Country Status (1)

Country Link
CN (1) CN104851115B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1890987A (en) * 2003-12-10 2007-01-03 日本电气株式会社 Projector color correcting method
CN101060584A (en) * 2006-04-17 2007-10-24 富士施乐株式会社 Color adjustment apparatus, color adjustment method, color conversion parameter generating apparatus, and color conversion parameter generation method
CN102360506A (en) * 2011-09-30 2012-02-22 北京航空航天大学 Local linear preserver-based scene color style uniformizing method
CN102714687A (en) * 2010-01-19 2012-10-03 阿克佐 诺贝尔国际涂料股份有限公司 Method and system for determining colour from an image
CN103581502A (en) * 2012-07-27 2014-02-12 京瓷办公信息系统株式会社 Color adjustment apparatus, color adjustment method and color adjustment program
CN103871037A (en) * 2012-12-07 2014-06-18 汤姆逊许可公司 Method and apparatus for color transfer between images

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4253335B2 (en) * 2006-07-13 2009-04-08 株式会社東芝 Using kernel function value, a method and apparatus for filtering and clustering by mean shift of the image

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1890987A (en) * 2003-12-10 2007-01-03 日本电气株式会社 Projector color correcting method
CN101060584A (en) * 2006-04-17 2007-10-24 富士施乐株式会社 Color adjustment apparatus, color adjustment method, color conversion parameter generating apparatus, and color conversion parameter generation method
CN102714687A (en) * 2010-01-19 2012-10-03 阿克佐 诺贝尔国际涂料股份有限公司 Method and system for determining colour from an image
CN102360506A (en) * 2011-09-30 2012-02-22 北京航空航天大学 Local linear preserver-based scene color style uniformizing method
CN103581502A (en) * 2012-07-27 2014-02-12 京瓷办公信息系统株式会社 Color adjustment apparatus, color adjustment method and color adjustment program
CN103871037A (en) * 2012-12-07 2014-06-18 汤姆逊许可公司 Method and apparatus for color transfer between images

Also Published As

Publication number Publication date
CN104851115A (en) 2015-08-19

Similar Documents

Publication Publication Date Title
Almeida et al. Deconvolving images with unknown boundaries using the alternating direction method of multipliers
Fialka et al. FFT and convolution performance in image filtering on GPU
Saleem et al. Image fusion-based contrast enhancement
CN101536078A (en) Improving image masks
Wolpert et al. Fractional Ornstein–Uhlenbeck Lévy processes and the Telecom process: Upstairs and downstairs
CN102693527A (en) Method and apparatus for performing a blur rendering process on an image
Blanchet et al. An explicit sharpness index related to global phase coherence
Egloff et al. A dynamic look-ahead Monte Carlo algorithm for pricing Bermudan options
CN102272798B (en) A tessellator whose tessellation time grows linearly with the amount of tessellation
Fu et al. A probabilistic method for image enhancement with simultaneous illumination and reflectance estimation
Escanciano et al. Uniform convergence of weighted sums of non and semiparametric residuals for estimation and testing
US20130136338A1 (en) Methods and Apparatus for Correcting Disparity Maps using Statistical Analysis on Local Neighborhoods
CN102576304B (en) Using a compact operation processing element for processing
Sjöberg et al. Initializing Wiener–Hammerstein models based on partitioning of the best linear approximation
US9418400B2 (en) Method and system for rendering simulated depth-of-field visual effect
CN102968772B (en) An image defogging method based on the channel information dark
JP2012503811A (en) Method and system for rendering or interactive lighting complex three-dimensional scenes
Yoshizawa et al. Fast gauss bilateral filtering
US20090052767A1 (en) Modelling
US20100272367A1 (en) Image processing using geodesic forests
JP4679817B2 (en) First-order approximation system for high-speed Opc
Eilertsen et al. A comparative review of tone‐mapping algorithms for high dynamic range video
CN102023465B (en) Balancing luminance disparity in a display by multiple projectors
JP2014529756A5 (en)
KR100897385B1 (en) Method and apparatus for illumination normalization

Legal Events

Date Code Title Description
C06 Publication
EXSB Decision made by sipo to initiate substantive examination
GR01