'Convert SDR image to HDR with python openCV?
I wish to do the following in python with openCV to increase the brightness of an image. The aim is to turn an SDR photo into an HDR image (to increase the dynamic range).
import cv2
img = cv2.imread("image.png")
hsv_img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
h, s, v = cv2.split(hsv_img)
v = v**3 # any function applied to v
new_hsv = cv2.merge((h, s, v))
We then get a brighter image.
The problem is that, v is only allowed to take values in the range 0-255, and 255 is not bright enough for an HDR image.
How can I increase the brightness beyond 255, any save the image as an hdr image file (in any suitable format)?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
