Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Match altered image to its original
#8
If you look at the histograms of the before/after pictures, you find in both the same bumps in the color channels, with roughly the same shapes.

So you can match the bump between the two, and with the histogram you can find the value of the bumps (using the little handles at the bottom). For instance, in the Red channel the three bumps at 82, 207, 243 are matched by three bumps at 100, 217, 246.

   

So if you want to compensate for the shift in the process, you change the colors of your input image to have the colors that will give them their initial color after your processing. For instance, a Red channel at 100 in the input image, should be darkened to 82 so that the process puts it back to 100. In other words, you use Curves where the inputs are the values in the "after" image and the outputs are the values in the before image.

In the Curves tool, this means selecting the red channel, clicking on the diagonal, and dragging to put your point at Input=100,Output=82. This creates a smooth curve with its ends still in the corners at (0,0) and (255,255)). By a total coincidence, the points at (217,207) and (246,243) are on that curve. If you do the same for Blue, you'll find the same coincidence (start with the value closest to middle)

   

Caveats:
  • The accuracy of the technique depends on the sharpness of the bumps.
  • In most case you can set a channe Curves with a single point, the other points are mostly use for sanity checks
  • You are going to lose colors, and create artifacts such as banding. In fact the surprising thing in the "after" image is that its histogram isn't exhibiting any hint of "haircomb", but since the image doesn't exactly overlap the original the necessary pixel interpolation has blended the colors again.
Reply


Messages In This Thread
RE: Match altered image to its original - by Ofnuts - 10-31-2021, 01:38 PM

Forum Jump: