CN104851115B - It is a kind of that the method that arbitrary image color maps filter is calculated by Function Fitting - Google Patents
It is a kind of that the method that arbitrary image color maps filter is calculated by Function Fitting Download PDFInfo
- 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
- parameter
- function
- filter
- arbitrary image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 230000000694 effects Effects 0.000 claims abstract description 24
- 238000013461 design Methods 0.000 claims abstract description 19
- 238000013507 mapping Methods 0.000 claims abstract description 16
- 238000012360 testing method Methods 0.000 claims abstract description 11
- 238000004088 simulation Methods 0.000 claims abstract description 5
- 230000009466 transformation Effects 0.000 claims abstract description 5
- 230000010354 integration Effects 0.000 claims abstract description 4
- 238000007689 inspection Methods 0.000 claims description 7
- 238000000546 chi-square test Methods 0.000 claims description 3
- 238000007619 statistical method Methods 0.000 claims description 3
- 238000013528 artificial neural network Methods 0.000 claims description 2
- 235000013399 edible fruits Nutrition 0.000 claims 1
- 238000004364 calculation method Methods 0.000 abstract description 8
- 230000008901 benefit Effects 0.000 description 4
- 230000007812 deficiency Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a kind of method that arbitrary image color mapping filter is calculated by Function Fitting, specific steps include, are ready for output figure, the input figure of same dimension and the point range of output effect figure are obtained respectively;Digital simulation parameter, a parameter is obtained using the method for various fittings, and the function of parameter makes input figure closest with design sketch after parameter transformation;Statistical check fitting effect, carries out hypothesis testing and numerical statistic, to examine the effect of fitting to the parameter calculated;Using fitting parameter, the parameter integration that comes will be fitted among the program's source code needed to use, and examine the satisfaction of fitting.Mode inverting or simplified filter calculation formula of the present invention using fitting, by the filter params so that it can be calculated;Simpler filter calculation formula is obtained, the operand of several times can be reduced, so as to reduce CPU/GPU occupancies, very high performance is obtained.
Description
Technical field
The present invention relates to image procossing, more particularly to a kind of arbitrary image color is calculated by Function Fitting map filter
Method.
Background technology
Color of image mapping filter is highly important a kind of operation in image processing program and imaging program.It is such as big
The light modulation of part, toning, reversal film, negative film, various Film Effects and other very many color filters are all color mappings
Filter.An important feature of the color filter is that it is to each point operation independent, the output of a point and this point
Color value it is relevant, it is and unrelated with the color value of surrounding or other points.
At present, in order to realize that a kind of color of image maps filter, it is necessary to which the formula for being known a priori by computing can be exactly
Calculate.If only know an input figure, and an output figure, the calculation formula without knowing wherein color mapping, just
Have no idea to design a filter, reach identical effect.And for some special-effects, it is known that possibility there was only an artwork
And design sketch, due to not knowing calculation formula therein, so wherein the overwhelming majority can not obtain calculating parameter, also cannot
Enough it is applied in program.In addition, for filter complicated known to some formula, such as containing a large amount of exponential functions, logarithm letter
Number, trigonometric function, or the filter comprising some color notation conversion spaces, because its calculating is complicated, are calculated very according to former formula
Slowly, performance is more low.
The content of the invention
The purpose of the present invention, which is that, provides a kind of method that arbitrary image color mapping filter is calculated by Function Fitting,
Mode inverting or simplified filter calculation formula using fitting, can effectively solve above-mentioned deficiency of the prior art.
In view of the deficiencies of the prior art, the present invention provides following technical scheme:
A kind of method that arbitrary image color mapping filter is calculated by Function Fitting of the present invention, it is characterised in that
Comprise the following steps that:
101st, output figure is ready for, the input figure of same dimension and the point range of output effect figure are obtained respectively;By a face
Color (r, g, b) value is as a three-dimensional vector, a height of w*h of breadth image, just can as a w*h length point range;
102nd, digital simulation parameter, a parameter is obtained using the method for various fittings, and the function of parameter schemes input
Closest with design sketch after parameter transformation;R, g, b passage of output are fitted respectively, used based on multinomial,
Supplemented by exponential function and logarithmic function, parameter fitting is carried out, it is a three dimensions point to [0,1.0] to fit the function come
Interval mapping;
103rd, statistical check fitting effect, carries out hypothesis testing and numerical statistic, to examine plan to the parameter calculated
The effect of conjunction;
104th, using fitting parameter, among the parameter integration that will be fitted to the program's source code needed to use, and examine
The satisfaction of fitting.
Further, the multigroup input figure of the step 101 and design sketch are needed multiple figures according to corresponding order, difference
Input figure and output effect figure are stitched together with one-dimensional point range.
Further, the method that the step 102 is fitted includes but is not limited to logistic recurrence, ANN
Network, least square method.
Further, the step 102 first calculates nonlinear unit, i.e., when fit non-linear maps
Multinomial unit more than secondary, and the unit such as exponential function and logarithmic function, then enter line based on these non-linear units
Property fitting, to obtain nonlinear mapping effect.
Yet further, step 103 hypothesis testing includes but is not limited to t- inspections, F inspections, Chi-square Test.
Further, the step 103, which fits the parameter come, needs to carry out t- inspections and statistical analysis, it is necessary to meet
The threshold value of p- values.
Compared with prior art, the advantage of the invention is that:
A kind of method that arbitrary image color mapping filter is calculated by Function Fitting of the present invention, utilizes the side of fitting
Formula inverting simplifies filter calculation formula, mainly there is 2 advantages:
1st, the present invention can be in the case of only one input figure and a design sketch, and acquisition most approaches this design sketch
Fitting parameter so that by the filter params so that it can be calculated;And then can with the substantial amounts of the color filter of quick obtaining,
And it is no longer limited to the color filter of the precognition calculation formula of minority.
2nd, the present invention can obtain simpler filter calculation formula, for some by being fitted input figure and design sketch
The higher filter of computation complexity, can reduce the operand of several times, so as to reduce CPU/GPU occupancies, obtain very high
Performance.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations write
Specifically noted structure is realized and obtained in book, claims and accompanying drawing.
Below by drawings and examples, technical scheme is described in further detail.
Brief description of the drawings
Accompanying drawing is used for providing a further understanding of the present invention, and constitutes a part for specification, the reality with the present invention
Applying example is used to explain the present invention together, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is a kind of flow of method that arbitrary image color mapping filter is calculated by Function Fitting of the present invention
Figure;
Fig. 2 is the input figure of the embodiment of the present invention;
Fig. 3 is the output effect figure of the embodiment of the present invention;
Fig. 4 is the fitted figure of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the invention will be further described.
Embodiment:
The preferred embodiments of the present invention are illustrated below in conjunction with accompanying drawing, it will be appreciated that preferred reality described herein
Apply example to be merely to illustrate and explain the present invention, be not intended to limit the present invention.
It is shown in Figure 1.
A kind of method that arbitrary image color mapping filter is calculated by Function Fitting of the present invention, it is characterised in that
Comprise the following steps that:
Step 101, output figure is ready for, the input figure of same dimension and the point range of output effect figure are obtained respectively;By one
Individual color (r, g, b) value is as a three-dimensional vector, a height of w*h of breadth image, just can as a w*h length point
Row;
Input and output design sketch is obtained, input and the design sketch exported there must be same dimension.If multigroup defeated
Enter and design sketch, then only need to multiple figures according to corresponding order, respectively by input figure and output effect figure with one-dimensional point range
It is stitched together, forms longer point range.
Step 102, digital simulation parameter, obtain a parameter using the method for various fittings, and the function of parameter makes defeated
Enter figure closest with design sketch after parameter transformation;R, g, b passage of output are fitted respectively, use using multinomial as
It is main, supplemented by exponential function and logarithmic function, carry out parameter fitting, fit the function come be a three dimensions point to [0,
1.0] interval mapping;
Obtained using the approximating method of including but not limited to logistic recurrence, artificial neural network, least square method
One parameter model.The object function of this parameter model is input figure is being passed through parameter transformation(I.e. color maps)Afterwards, with
Design sketch is closest.
When fit non-linear maps, nonlinear unit, i.e. secondary multinomial unit above are first calculated, with
And the unit such as exponential function and logarithmic function, then linear fit is carried out based on these non-linear units, to obtain nonlinear reflect
Penetrate effect.
Step 103, statistical check fitting effect, hypothesis testing and numerical statistic are carried out to the parameter calculated, to examine
Test the effect of fitting;
Hypothesis testing, and numerical statistic are carried out to the parameter calculated, to examine the effect of fitting.Hypothesis testing bag
Include but t- is examined, F is examined and Chi-square Test etc..
Need to carry out t- inspections for fitting the parameter come, and need to carry out statistical analysis, it is necessary to meet p- values
Threshold value, generally meets worst error no more than 0.05 simultaneously, and mean error is no more than 0.01.
Step 104, using fitting parameter, the parameter integration that comes will be fitted among the program's source code needed to use, it is defeated
Go out fitted figure, examine the satisfaction of fitting.
The present invention for formula it is unknown but with input and output figure filter, can with fitting mode inversion formula;
For known to formula but complex filter, then more easy formula can be used with raising property by way of fitting
Energy.
The present invention can calculate one group of parameter to any one group of input and output figure, and color mapping is carried out using the parameter
Calculate, the effect approached with design sketch can be obtained with very small error.
The retrievable a large amount of special efficacys of the present invention, and it is often fairly simple due to fitting next formula, so the formula
Calculating it is generally very quick, very high performance can be obtained.
Embodiment:It is fitted Wagashi effect.
Step 1:It is ready for figure.In order to obtain complete mapping, we can prepare the test figure of a standard, this
Open test and 256*256*256 point is generated with figure function, contain 8 color points of any one possible value, and deposit
Store up as 4096*4096 picture, see Fig. 2.
Step 2:Prepare output figure.In certain reference software, input is schemed, using Wagashi effects, Fig. 3 is seen.
Step 3:The parameter of digital simulation is returned using Logistic, following fitting unit is used("1.0","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*r*r","b*g*
g","b*b*b","g*r*r","g*g*g","g*b*b","r*g*b").
Step 4:Following parameter can be obtained(Opengl shader representations), wherein rr, gg, bb is all r, and g, b's is flat
Side.
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.405057778585149 ) + 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 )
Step 5:Statistical check and mathematical statistics are carried out to parameter, to confirm error within limits, and examined
The level of signifiance is higher.
Step 6:Formula calculates fitted figure accordingly, and contrasts fitted figure and former design sketch, it can be found that can not lean on substantially
Difference is visually seen, Fig. 4 is seen.
What is finally illustrated is:The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, to the greatest extent
The present invention is described in detail with reference to the foregoing embodiments for pipe, for those skilled in the art, and it still can be with
Technical scheme described in foregoing embodiments is modified, or equivalent substitution is carried out to which part technical characteristic.It is all
Within the spirit and principles in the present invention, any modification, equivalent substitution and improvements made etc., should be included in the guarantor of the present invention
Within the scope of shield.
Claims (6)
1. a kind of calculate the method that arbitrary image color maps filter by Function Fitting, it is characterised in that comprises the following steps that:
101st, figure and design sketch are ready for, the input figure of same dimension and the point range of design sketch are obtained respectively;By a color (r,
G, b) value is as a three-dimensional vector, a height of w*h of breadth image, just can as a w*h length point range;
102nd, digital simulation parameter, a parameter is obtained using the method for various fittings, and the function of parameter makes input figure in warp
Cross closest with design sketch after parameter transformation;R, g, b passage of output are fitted respectively, used based on multinomial, to refer to
Supplemented by number function and logarithmic function, parameter fitting is carried out, it is that a three dimensions point is interval to [0,1.0] to fit the function come
Mapping;
103rd, statistical check fitting effect, carries out hypothesis testing and numerical statistic, to examine fitting to the parameter calculated
Effect;
104th, using fitting parameter, among the parameter integration that will be fitted to the program's source code needed to use, and fitting is examined
Satisfaction.
2. a kind of according to claim 1 calculate the method that arbitrary image color maps filter, its feature by Function Fitting
It is:The multigroup input figure of step 101 and design sketch are needed multiple figures according to corresponding order, and input is schemed and imitated respectively
Fruit figure is stitched together with one-dimensional point range.
3. a kind of according to claim 1 calculate the method that arbitrary image color maps filter, its feature by Function Fitting
It is:The method that the step 102 is fitted includes but is not limited to logistic recurrence, artificial neural network, least square method.
4. a kind of according to claim 1 calculate the method that arbitrary image color maps filter, its feature by Function Fitting
It is:The step 102 first calculates nonlinear unit when fit non-linear maps, i.e., it is secondary more than it is multinomial
Formula unit, and exponential function and logarithmic function unit, then linear fit is carried out based on these non-linear units, to obtain non-thread
The mapping effect of property.
5. a kind of according to claim 1 calculate the method that arbitrary image color maps filter, its feature by Function Fitting
It is:Step 103 hypothesis testing includes but is not limited to t- inspections, F inspections, Chi-square Test.
6. a kind of according to claim 1 or 5 calculate the method that arbitrary image color maps filter by Function Fitting, it is special
Levy and be:The step 103, which fits the parameter come, needs to carry out t- inspections and statistical analysis, it is necessary to meet the threshold value of p- values.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510252484.3A CN104851115B (en) | 2015-05-18 | 2015-05-18 | It is a kind of that the method that arbitrary image color maps filter is calculated by Function Fitting |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510252484.3A CN104851115B (en) | 2015-05-18 | 2015-05-18 | It is a kind of that the method that arbitrary image color maps filter is calculated by 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 Active CN104851115B (en) | 2015-05-18 | 2015-05-18 | It is a kind of that the method that arbitrary image color maps filter is calculated by Function Fitting |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104851115B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108256136B (en) * | 2016-12-29 | 2021-07-16 | 北京金风科创风电设备有限公司 | Thread tooth optimization method and device, connecting piece and manufacturing method thereof |
Citations (6)
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4253335B2 (en) * | 2006-07-13 | 2009-04-08 | 株式会社東芝 | Method and apparatus for filtering and clustering by means of image mean shift using kernel function values |
-
2015
- 2015-05-18 CN CN201510252484.3A patent/CN104851115B/en active Active
Patent Citations (6)
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 |
---|---|---|
CN109447994B (en) | Remote sensing image segmentation method combining complete residual error and feature fusion | |
CN109191424B (en) | Breast mass detection and classification system and computer-readable storage medium | |
US11776202B2 (en) | Image processing method and apparatus, computer storage medium, and electronic device | |
CN111043988B (en) | Single stripe projection measurement method based on graphics and deep learning | |
US10922852B2 (en) | Oil painting stroke simulation using neural network | |
CN109144988A (en) | A kind of detection method and device of abnormal data | |
Maestre-Deusto et al. | ADART: An adaptive algebraic reconstruction algorithm for discrete tomography | |
CN109766896B (en) | Similarity measurement method, device, equipment and storage medium | |
Kuzyakina et al. | Assessment of Potential Forest Biomass Resource on the Basis of Data of Air Laser Scanning | |
CN109785242B (en) | Hyperspectral image unmixing method based on band-by-band generalized bilinear model | |
CN111862040B (en) | Portrait picture quality evaluation method, device, equipment and storage medium | |
KR20080114379A (en) | Method and apparatus for illumination normalization | |
CN110992366A (en) | Image semantic segmentation method and device and storage medium | |
CN105405100B (en) | A kind of sparse driving SAR image rebuilds regularization parameter automatic selecting method | |
CN109801242A (en) | A kind of grating image vectorization method based on the unrestrained water filling algorithm of improvement | |
CN104851115B (en) | It is a kind of that the method that arbitrary image color maps filter is calculated by Function Fitting | |
Smolik et al. | Radial basis function and multi-level 2D vector field approximation | |
CN106570928B (en) | A kind of heavy illumination method based on image | |
CN112734673B (en) | Low-illumination image enhancement method and system based on multi-expression fusion | |
CN111199345B (en) | Method for measuring and calculating design rainfall of sponge city and terminal equipment | |
CN110473183A (en) | A kind of evaluation method, device, electronic equipment and medium towards the full link simulation image of visible light | |
CN109145379B (en) | Intelligent drawing system and management method for building layer height map | |
CN111833395A (en) | Direction-finding system single target positioning method and device based on neural network model | |
CN117115225B (en) | Intelligent comprehensive informatization management platform for natural resources | |
Jiang et al. | Research on an Improvement of Images Haze Removal Algorithm Based on Dark Channel Prior |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20240604 Address after: 411202 Xinsha Group, Shuijing Village, Xiangtang Town, Yuhu District, Xiangtan City, Hunan Province Patentee after: Zou Jinlian Country or region after: China Address before: No. 19, Zijing North Road, high tech Zone, Chengdu, Sichuan 610000 Patentee before: CHENGDU PINGXINGSHIYE TECHNOLOGY CO.,LTD. Country or region before: China |