Automatically create color grading lookup table from pair of images

The manual here

describes how to get color grading LUT by manually adjusting image in the Photoshop and visually controlling how it looks.

I’ve got a pair of images of a photographic color grading palette (like one of these: 4 Things You’ll Need to Become a Film Colorist).
One was captured by a real photo camera, and another one comes from the SceneCaptureComponent2D.

I’ve got the PDF file with that palette, and to get the latter image I’ve put it on a wall texture inside a UE level.

Is there any method to automatically create LUT?

My main issue is the color interpolation. Physical palettes contain about 20-50 colors, but the LUT includes 16x16x16 = 4096 colors.

poke here, any solution yet on how to get a LUT or create a list of color as a palette from a texture ?

Yes. I have ended up with the neural style transfer. Sorry that I can’t describe my solution in details.