I have two devices that measure the same object, but they give slightly different results.
The result is always a set of 3 double values, but the actual values differ in a non linear way between the two devices. My question is; should I use an algorithm to convert a measurement from device A to B, and if so, which type of algorithm, or should I use machine learning to create a model that converts values from device A to B?
The double values range from -100 to 100 and each measurement is a set of three doubles.
I have a (limited) dataset available with 24 measurements from both devices.
What would be the best approach? Are there models/algorithms out there that could do a conversion?
It really depends on what you are measuring and how you are measuring it. Can you provide any more details?
if both devices are constant and firmly mounted, i would normalize the values.
that value 1 from device a is the same size 1 from device b.
(calibrate)
They’re both Spectrophotometers, measuring the same 24 colors in LAB (double) values. The geometry of the devices differ, which causes the difference in measured values for the same color between the two devices.
Both devices are calibrated before measurements and measure on a flat surface. Each measurement results in 3 double values; L, A and B. My goal is to be able to convert the values measured by device A to match those of device B for any measured color. I have the 24 measured colors to calculate the conversion. But I don’t know how that can be done best.
you speak about CIELAB color space, true?
Yes, although I don’t believe that is relevant to the conversion I’m trying to make. It’s simply 24 sets of 3 double values from both devices that I would like a conversion method for. The fact that they’re representing L* a* b* values should not matter. Spectrophotometer vendors say it cannot be done, but as both devices measure the same colors and output the same type of data, it should be possible to create an algorithm or use ML to convert from device A to B. The goal is to be able to use the values measured by one device and convert them to the other device, as that device is used in the workflow for which I’m writing software. It would avoid having to measure colors twice. For a few colors that would be no issue, but in this case it’s a collection of thousands of colors.
Can you post your measurements or plot the data obtained with one device vs those obtained with the othet one?
How repeatable are your measurements (do the measured values for a certain color differ if you measure them at different moments)?
If there is a correlation between the two measured data your goal is just a matter of finding a suitable mathematical expression for fitting the data.
You don’t need machine learning for this, in my opinion, but we would need to see the data to assess your problem better.
Julen
ML with 24 datapoints is very unlikely to give good results.
The measurements are repeatable. The difference between multiple measurements of the same color are minimal, even when measured days apart. There is a correlation between the two sets, but it’s not one easily calculated in an expression. I suspect I will need something like matrix for conversion…
I understand that. 24 would only be a starting point. More data can be obtained. But there are millions of possible combinations of L*, a* and b* and I can imagine that ML would be able to do something that gets fairly accurate with a couple of hundred data sets, and more accurate as more data is added
I assume your 24 samples are a standard color calibration target?
This is exactly why color calibration profiles exist. You’re never going to get any two color measurements to be 100% identical between two measurement devices – there’s just too much potential for variation between them. To compensate for this inherent variance, you’d want to calibrate the two sensors to a common standard, so that when you measure the same target on both sensors, you get readings that are very close to each other.
I’m not sure of your entire setup, so I don’t know how easy it would be to integrate a calibration, but this is the way it’s done in professional contexts.
It’s important to stress that you’re NOT guaranteed to get identical readings, ever, even with perfect calibrations. You’re going to have to accept some reading drift and deal with that in your code.
Yes, I used the X-Rite Color Calibration target as a reference for the 24 measurements.
Both devices are calibrated to the same standard. I know and understand that the values from the different devices will never be identical. They are however consistently different. The way the devices give slightly different values isn’t random, and therefore it should be possible to create a method that converts the values from device A to B.
It’s a similar problem for which (matrix based) ICC color transformations are used to convert input RGB values to RGB values that will give the wanted color. But ICC profiles cannot be used in this case, as the input is not integer RGB but double L*,a*,b*
I know it won’t be easy, but I can imagine a neural network being capable of learning how to convert the LAB values from A to B
It’s more than similar, it’s literally identical. This is exactly the use case for a color profile.
I think you need to reexamine this assumption. Color profiles routinely convert between different color spaces and have all sorts of different input and output spaces, including Lab.
Thanks for the interesting suggestion. I’m very familiar with color transforms using the excellent LCMS plugin from MonkeyBread Software. I’ll give it some thought on how I could provide i1Profiler with data that would create an icc profile that would allow a transform between different spectrophotometers. Normally, the choice for kind of profile is display profile or printer profile.
But it’s also possible to use custom tables, so perhaps it is possible.
Calibrite Profiler is the newer version of that software. It has a lot more options, which perhaps may be of some use. I don’t know if it would support your colorimeters/spectrophotometers but if it did and you produced a profile for both the the colourspace APIs would likely allow conversion from one profile to the other.
Thanks, I’ll have a look. At first they only supported colorimeters, not spectrophotometers, but that could have changed. I have been using X-Rite since it was still Swiss made and called Gretac McBeth. The aim is to convert to the EyeOne Pro 3, the latest model from X-Rite
Seems that Calibrate is still only for Eye One Display colorimeters and not Eye One Pro 1/2/3 Spectrophotometers, so I’ll have to use i1Profiler.
I will post the datasets tomorrow.
What are you actually trying to accomplish, by the way?