Running Windows 10 on i9 with 3080ti
Here is the code:
import cv2
from cv2 import dnn_superres
print("cv2 version",cv2.__version__)
image = cv2.imread("zebra.png")
cv2.imshow("image",image)
cv2.waitKey(0)
# Create an SR object
sr = dnn_superres.DnnSuperResImpl_create()
# Read the desired model
path = "models/LapSRN_x8.pb"
sr.readModel(path)
# Set the desired model and scale to get correct pre- and post-processing
sr.setModel("LapSRN", 8)
# Upscale the image
result = sr.upsample(image)
cv2.imshow("Output",result)
The version shows as cv2 version 4.5.5
The image appears in imshow as expected
The program terminates with:
Traceback (most recent call last):
File "C:\Users\Conda\HelloWorld\opencv-super-resolution\Show_image.py", line 20, in <module>
result = sr.upsample(image)
cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv_contrib\modules\dnn_superres\src\dnn_superres.cpp:172: error: (-213:The function/feature is not implemented) Unknown/unsupported superres algorithm: LapSRN in function 'cv::dnn_superres::DnnSuperResImpl::upsample'
Process finished with exit code 1
Please advise.
THanks