Openexr alternatives

thanks, now it doesn’t kick out any errors, although I do only get a black screen in the upscaled imshow:

import cv2 as cv
from cv2 import dnn_superres
import imageio.v3 as im
from PIL import Image
from numpy import asarray



models = 'E:/programming/opencv/models'

img_path = 'E:/temp/cache/ai/render_layers/single.exr'

imio = im.imread(img_path)
imio = imio[:,:,:3]
numpydata = asarray(imio)
cv.imshow('original',imio)

cv.waitKey(0)


# Create an SR object
sr = dnn_superres.DnnSuperResImpl_create()

path = f'{models}/FSRCNN_x2.pb'
#path = "../models/EDSR_X2.pb"
sr.readModel(path)

# Set the desired model and scale to get correct pre- and post-processing
#sr.setModel("edsr", 4)
sr.setModel("fsrcnn", 2)

# Upscale the image
result = sr.upsample(imio)

cv.imshow('upscaled',result)

cv.waitKey(0)