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.
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.
Comments
Post a Comment