is very simple
Load the image to be treated in the compositor . In this case I used a picture of a valley taken from a cableway. The reflection of the glass has ruined the picture.
add a “RGB Curves” node, click on the slot “black level” (1) and then on the dropper (2). This will allow you to go on your pictures (loaded in a UV/image editor window) and click on a point that ‘would have’ to be black (3). do the same for “white level”.
the result is already surprising.
Unfortunately, the RGB curves node does not have the slot gray level, so it is better to correct the equilibrium of the image before balancing. For this I used the “Gamma” node. Lastly let us not forget that thanks to the curves of the RGB curves node can fine-tune the final image colors.
to have fun experimenting here the .blend file with different options
download: whitebalance (493.23KB)