0

i wanted to convert .hdr file to visible format I used the Photomatrix pro and the result was following

enter image description here

i was satisfied with the result but i wanted to convert this hdr file using python code as well so i used following code

from pathlib import Path
import cv2

current_folder = Path().resolve()

filename = "hdr"
hdr_path = str(Path(current_folder, filename + ".hdr"))


img = cv2.imread(hdr_path,flags=cv2.IMREAD_ANYDEPTH)

import matplotlib.pyplot as plt

plt.imshow(img)
plt.axis('off')
result_path = Path(current_folder, filename + '.png')
plt.savefig(result_path)

But the result was following

enter image description here

I want to convert the .hdr image with full color which is written on the file.

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
Luke Ha
  • 1
  • 1

0 Answers0