Re:Using Principal Component Analysis on Images
by geb on Tuesday August 18, 2015 @12:08AM
(#10077555)
Good suggestion! Added a section to the post about this (and gave you credit for the suggestion at the bottom of the article).
[ Parent
| on HN ]
Re:Using Principal Component Analysis on Images
by leni536 on Tuesday August 18, 2015 @03:53AM
(#10078010)
Nice! Now these look plausible but it's still surprising how accurate these are.
Note since this is a linear approach, the choice of the colorspace can have a large impact on the results. You didn't mention the colorspace, my best bet is that you used sRGB. Maybe you can try it on a linear colorspace too.
Edit: According to the source you use PIL.Image.getdata(), which according to the doc returns "pixel values", then they have an RGB->XYZ conversion example that only works for linear colorspace. So it suggests that they already return linear RGB values, but many software mess these things up so I'm not 100% sure.