Function Repository Resource:

HDRImageEffect

Source Notebook

Apply an HDR effect to an image

Contributed by: Michael Sollami

ResourceFunction["HDRImageEffect"][img]

returns the given image img with a high-dynamic-range-like effect applied.

Details and Options

ResourceFunction["HDRImageEffect"] uses a fully convolutional NetChain and only works on 2D images (RGB and grayscale).
An HDR effect performs local adjustments on the image.

Examples

Basic Examples (3) 

Give any image an HDR effect:

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/5bc60bcb-7ea1-435c-b62c-99dde57fd2d9"]

Show the difference using FlipView:

In[2]:=
FlipView[{img, ResourceFunction["HDRImageEffect"][img]}]
Out[2]=

Apply the HDR transform to any image:

In[3]:=
img = ResourceFunction["RandomPhoto"][500, 500];
GraphicsRow[{img, ResourceFunction["HDRImageEffect"][img]}]
Out[3]=

Add HDR style to random images:

In[4]:=
Multicolumn@
 Table[i = ResourceFunction["RandomPhoto"][400, 500]; Framed@GraphicsRow[{i, ResourceFunction["HDRImageEffect"][i]}], 4]
Out[4]=

Possible Issues (1) 

The HDR effect can look bad (pixelated or grainy) in low light or when applied to smooth gradients:

In[5]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/521f4975-813d-4194-a801-5d7922a3ab74"]
Out[5]=

Publisher

Michael Sollami

Version History

  • 1.0.0 – 04 September 2020

Related Resources

License Information