-
-
Notifications
You must be signed in to change notification settings - Fork 55.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open EXR files, how to enable? #21928
Comments
#21326 |
In VS, Set: Project -> Properties -> Debugging -> Environment -> OPENCV_IO_ENABLE_OPENEXR=1. It works. |
using python 3.9.13 on windows 10 import os i always get this error ... 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: #21326 in function 'cv::initOpenEXR' what i can do ? |
img = cv2.imread('path', cv2.IMREAD_ANYCOLOR | cv2.IMREAD_ANYDEPTH) |
Hi , here the error with python 3.11 setup in venv |
Hi, The original post talk about this environ variable two time I dont wknow if is windows related but ... |
Thanks for sharing the answer. |
Hi! I followed through, but same issue,
Do I need to install any openexr related lib for this to work? Update - Initially, I thought the solution might involve manually compiling OpenCV with specific flags. However, I discovered that setting the environment variable outside of Python resolves the issue: Setting the Environment Variable in the Shell Before running Python, use:
This ensures that the variable is available to OpenCV when it initializes. Updating Systemd Service File For systemd-managed processes, updating the service file to include following line under the [Service] section,
Global Environment Variable Also, adding the export statement to /etc/bashrc:
sets the variable globally for all bash sessions. This approach resolved the OpenEXR codec issue in OpenCV without the need for recompilation. I hope this solution can help others! |
'OPENCV_IO_ENABLE_OPENEXR' is not recognized as an internal or external command, Any help would be appreciated! |
So I fixed it 😅 I am on Windows so instead of export, I had to use set - stupid mistake lol |
I am trying to open and exr file in opencv; I know that this feature had been disabled and i also know that you are supposed to enable it with the OPENCV_IO_ENABLE_OPENEXR option. I however for the life of me cant figure out how to enable this. If someone can help me figure out how to get this enabled it would help me so much! Any advice is really appreciated!
i am using the prebuild opencv download and am running it in c++ visual studios
The text was updated successfully, but these errors were encountered: