Finding a function to perform a specific mapping is an extremely difficult mathematical problem. There are lots of mappings that are quite easy to do (look up, for instance, Chebychev functions). But there are an infinite number of possible functions (aleph-one infinity, I think), that leaves plenty of mappings that aren’t so easy.
If you’ve got the data that generated your images, you could just poke~ the numbers into a waveform and use that for your mapping. But presumably life isn’t that convenient for what you want to do. You could approximate by drawing into a table object. That won’t be super accurate, but might be, as they say, good enough for jazz.