问题描述
cv2.error: OpenCV(4.6.0) /io/opencv/modules/imgcodecs/src/grfmt_exr.cpp:103: error: (-213:The function/feature is not implemented) imgcodecs: OpenEXR codec is disabled. You can enable it via 'OPENCV_IO_ENABLE_OPENEXR' option. Refer for details and cautions here: https://github.com/opencv/opencv/issues/21326 in function 'initOpenEXR'
问题解决
两种解决途径:
OPENCV_IO_ENABLE_OPENEXR=1 python my_script.py
or
using os
before importing cv2
works
os.environ["OPENCV_IO_ENABLE_OPENEXR"]="1"