Oh, sorry. I didn't try your test build because somebody took that laptop with her for a couple of weeks. But otherwise what about a calibration mode like this: The calibration starts by measuring 3x256 (256xR,G,B) patches to identify the usable device value ranges and make the first iteration of the calibration curves. A few points are measured with that LUT to plan the next measurement set (very low error -> finished , low errors -> use a few more sample for a new iteration , very high errors -> use a lot of patches for the next iteration).