math - Conversion between RGB and RYB color spaces -


i trying convert colours between rgb (red, green, blue) colour space , ryb (red, yellow, blue) colour space , again.

based on details in following paper, able convert ryb rgb using trilinear interpolation - parametric weightings (s,t,u) ryb colors, , vertices of cube 3d points in rgb space.

paint inspired color mixing , compositing visualisation - gossett , chen - section 2.1 - realization details

my difficulties in reversing conversion process.

a second paper references use of technique , indicates reverse conversion achieved using newton's method. provides no further details. indicate root finding in solving trilinear interpolation equations.

on transfer of painting style photographic images through attention colour contrast - xiaoyan zhang; constable, m.; ying he;

before expand on question equations, has seen or solved in language such java/c/c++/c# ?

my current approach take forward equations of trilinear interpolation (ryb rgb), expand , rearrange provide 3 simultaneous equations 3 unknowns (the parametric weightings: s,t , u) work out how find roots using newton-raphson method. going in right way?

i edit question shortly provide equations.

many time,

ben

i managed solve in end.

take equations trilinear interpolation: wikipedia

substitute first equations last, expand , collect coefficients for: xd, yd, zd, xdyd, xdzd, ydzd, zdydzd , constant.

then find partial differentiation of equation in each of 3 dimensions each in respect xd, yd , zd. use these new equations populate (3x3) jacobian matrix , use newton's method solve in software.

newton-raphson method


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -