1

I have a .jpg of a 2d colorplot & colorbar, similar to something you might make with matplotlib's pcolormesh().

I'd like to 'reverse engineer' the data from the image. Meaning, I'd like to define some sampling grid on the image, pick the color of that sample, and interpolate it to a point on the color bar to obtain a scalar value of that pixel.

I'm wondering how much of this functionality already exists in some form, and how much I'll need to develop.

Ian Gullett
  • 107
  • 9
  • Does this answer your question? [How to reverse a color map image to scalar values?](https://stackoverflow.com/questions/3720840/how-to-reverse-a-color-map-image-to-scalar-values) – JohanC Aug 03 '20 at 17:32
  • It kind of depends on whether the plot is always in the same place, the colorbar is always in the same place, the colorbar's colours are always the same... Also, given a choice, I wouldn't start with a JPEG if I wanted to analyse colours since JPEGs generally down-sample colours fairly aggressively. – Mark Setchell Aug 03 '20 at 17:35

0 Answers0