Interpolating missing values in 3D LUT (3D Lookup Table)
4 次查看(过去 30 天)
显示 更早的评论
Hi
I'm trying to create a 3D LUT to transform the colors of Image.
The LUT file contains 512 lines.
Each line contains 3 values, one for Red, one for Green and one for Blue channels of Image.
Basically, size of 3D LUT is 8 so its index starts at 0 0 0 and ends at 7 7 7. (8*8*8 combinations = 512 points/lines)
Out of 512 points, I have created 42 points.
Now, I want to create values for remaining 470 points using interpolation.
I'm aware of Linear interpolation, but I have no clue how a 3D LUT missing values are calculated.
I would be grateful if anyone help me in filling the missing values. Thank you.
0 个评论
采纳的回答
John D'Errico
2017-6-17
编辑:John D'Errico
2017-6-17
I think I wrote over 400 pages of technical reports while at Kodak on this, just on how to build, use, populate, estimate, validate, visualize, all applied to 3D luts. :) Plus two US patents on the subject, that should now be expired, at least given the application dates.
There are many possible schemes to populate n-d LUTS, some more viable than others. My gridfit tool (on the file exchange) is essentially one of them, although it is limited to 2 independent variables, thus only 2-d luts. (When I wrote gridfit, my patents on the idea were not yet expired, so I chose not to write it for higher dimensional problems.)
Don't forget there are often issues with color & device gamuts when populating these luts. In fact, I invested man-years of my career in developing methods for gamut mapping. Lots of interesting issues there to trip over, but also some pretty mathematical approaches.
In terms of a tool that can be simply used to solve your problem, since my old tools for 3d LUT estimation are not in the public domain, I'd suggest you might look at the 3-d inpaint NaNs tool I wrote. It too is on the file exchange. You would need to replace the empty cells in a 3-D array with NaNs, then call the tool three times, once for each output channel of your 3D-LUT. The method used in that tool will be important. Thus, to avoid extrapolation, use method 1: the 'springs' option.
Again, beware gamut issues.
4 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!