标签: openexr

使用visual-studio 2010为Windows7 64编译OpenEXR失败

我在使用CMake为Windows 7构建OpenEXR时遇到问题.

我按照这里描述的方向

运行cmake命令后的cmd输出如下:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

D:\openexr-2.2.0>setlocal

D:\openexr-2.2.0>cmake -DZLIB_ROOT="C:\Program Files\zlib" -DILMBASE_PACKAGE_PREFIX="d:\ilmbase-2.2.0\builds" -DCMAKE_INSTALL_PREFIX="d:\openexr-2.2.0" -G "Visual Studio 10 Win64" ..\openexr-2.2.0
-- The C compiler identification is MSVC 16.0.40219.1
-- The CXX compiler identification is MSVC 16.0.40219.1
-- Check for working C compiler using: Visual Studio 10 Win64
-- Check for working C compiler using: Visual Studio 10 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler …
Run Code Online (Sandbox Code Playgroud)

c++ cmake visual-studio-2010 openexr visual-c++

9
推荐指数
1
解决办法
4572
查看次数

Windows上的CMake zlib依赖性错误

我正在尝试在Windows上构建OpenEXR 2.2,但下载附带的说明没有按预期工作.IlmBase的指令有效,但是一旦我得到OpenEXR指令,它就会因为zlib而失败.此时的步骤是:

3. Go to http://www.zlib.net and download zlib 
Run Code Online (Sandbox Code Playgroud)

所以我去了这个网站,开头的部分是:当前版本在这里公开发布:我下载了 zlib源代码,版本1.2.8,zipfile格式......

然后,我转到下一步,这是我得到错误的地方:

4. Launch a command window, navigate to the OpenEXR folder with 
CMakeLists.txt, and type command:     
    setlocal
    del /f CMakeCache.txt
    cmake 
      -DZLIB_ROOT=<zlib location>
      -DILMBASE_PACKAGE_PREFIX=<where you installed the ilmbase builds>
      -DCMAKE_INSTALL_PREFIX=<where you want to instal the openexr builds>
      -G "Visual Studio 10 Win64" ^
      ..\openexr
Run Code Online (Sandbox Code Playgroud)

所以这是我输入的命令:

cmake -DZLIB_ROOT=C:\Users\erik\Documents\zlib-1.2.8 -DILMBASE_PACKAGE_PREFIX=C:\Users\erik\Documents\ilmbase-2.2.0\bin -DCMAKE_INSTALL_PREFIX=C:\Users\erik\Documents\ilmbase-2.2.0\bin -G "Visual Studio 10 Win64" ^..\openexr-2.2.0
Run Code Online (Sandbox Code Playgroud)

这是我得到的错误:

找不到ZLIB(缺少:ZLIB_LIBRARY)(找到版本"1.2.8")

第一个问题是,指令没有说明任何关于ZLIB_LIBRARY的内容.其次,zlib下载看起来像是所有源代码.不涉及.lib或.dll文件.

c++ zlib cmake openexr

7
推荐指数
1
解决办法
3052
查看次数

在 Windows 上使用 pip 为 python 安装 OpenEXR

我正在尝试使用 pip 为 python 安装 OpenEXR 模块。

C:\Python27_64\Scripts\pip.exe install openexr
Run Code Online (Sandbox Code Playgroud)

但我收到以下错误:

Collecting openexr
  Using cached OpenEXR-1.2.0.tar.gz
Installing collected packages: openexr
  Running setup.py install for openexr ... error
    Complete output from command c:\python27_64\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\tuket
\\appdata\\local\\temp\\pip-build-r6zwty\\openexr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().r
eplace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\tuket\appdata\local\temp
\pip-lledgs-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-2.7
    copying Imath.py -> build\lib.win-amd64-2.7
    running build_ext
    building 'OpenEXR' extension
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    C:\Users\tuket\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox …
Run Code Online (Sandbox Code Playgroud)

windows openexr python-2.7

6
推荐指数
1
解决办法
5466
查看次数

在python中安装openexr不起作用

我已成功安装OpenEXR的使用pip install openexr我的Mac,但相同的命令在Ubuntu上失败:

OpenEXR.cpp:9:22: fatal error: ImathBox.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for openex
Run Code Online (Sandbox Code Playgroud)

我尝试使用apt-get install openexr似乎没有错误的安装,但是当我尝试使用import OpenEXRpython时,它不起作用。

有人知道为什么吗?

python ubuntu apt-get openexr python-import

6
推荐指数
3
解决办法
4397
查看次数

iOS / macOS 是否支持 OpenEXR?

我想知道在 iOS 和 macOS 上是否支持读取 OpenEXR 文件。

这是我发现的:

  1. 文档几乎没有提到 OpenEXR,他们在哪里说它只在最近的 macOS 上受支持。
  2. 然而,ARKit 的官方 WWDC 2017 示例只是简单地加载 .exr 图像:

    UIImage(named: "image.exr")
    
    Run Code Online (Sandbox Code Playgroud)

这可以在以下官方示例中找到:

  • 在增强现实中处理 3D 交互和 UI 控件
  • 与 ARKit 交互的内容
  • ARKit 中的音频

iOS 和 macOS 上的 OpenEXR 支持如何?

macos cocoa cocoa-touch openexr ios

6
推荐指数
1
解决办法
559
查看次数

OpenEXR图像加载

我已经开始使用OpenEXR加载EXR图像.我必须使用浮点类型获取RGB像素.

对于RGB图像,使用此代码加载时没有问题:

ImfInputFile *iFile = ImfOpenInputFile(filename);
        FrameBuffer fb;
        const Header &iHeader = iFile.header();
        bool hasRed = false, hasGreen = false, hasBlue = false;
        bool hasY = false;
        Box2i dw = iHeader.dataWindow();
        int width = dw.max.x-dw.min.x+1;
        int height = dw.max.y-dw.min.y+1;

        for (ChannelList::ConstIterator it = iHeader.channels().begin(), ite = iHeader.channels().end(); it != ite; it++) {
            if ((strcmp(it.name(), "R") == 0)) { hasRed = true; }
            if ((strcmp(it.name(), "G") == 0)) { hasGreen = true; }
            if ((strcmp(it.name(), "B") == 0)) { hasBlue = …
Run Code Online (Sandbox Code Playgroud)

c++ image-processing openexr

5
推荐指数
1
解决办法
2320
查看次数

在 Java 中将 EXR 转换为 BufferedImage

我需要读取 EXR 图像文件并将其加载到 BufferedImage 中,但 java 默认情况下不支持此文件类型。进行一些谷歌搜索也没有太大帮助,因为我还没有找到可行的解决方案。有人可以帮我解决这个问题吗?

java openexr

5
推荐指数
0
解决办法
342
查看次数

在Python脚本中导入OpenEXR时出现未定义的符号

我想在 Python 脚本中加载 EXR 图像。因此我将其导入

import OpenEXR
Run Code Online (Sandbox Code Playgroud)

但不幸的是,当我用以下命令启动脚本时出现以下错误

ipython testscript.py
Run Code Online (Sandbox Code Playgroud)

错误信息

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
PATH_TO_SCRIPT/testscript.py in <module>()
      8 import numpy as np
      9 # import matplotlib.pyplot as plt
---> 10 import OpenEXR
     11 
     12 # import dts_input

ImportError: PATH_TO_SCRIPT/OpenEXR.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZTIN7Imf_2_27OStreamE
Run Code Online (Sandbox Code Playgroud)

我已经使用 Arch Linux 的包管理器安装了 OpenEXR,并在本地安装了 python 的绑定模块

pip install --target ./ openexr
Run Code Online (Sandbox Code Playgroud)

并且脚本文件夹中已安装了一个名为 OpenEXR.cpython-37m-x86_64-linux-gnu.so 的文件。

我不知道如何解决链接问题,因为它似乎是与 OpenEXR 自己的 imf 库相关的链接错误。

python linux linker-errors openexr

5
推荐指数
0
解决办法
776
查看次数

为 python 安装 OpenEXR 失败

我正在尝试安装 OpenEXR。

使用 :

macOS 10.14.5

蟒蛇 3.6.5

Xcode 版本 10.2.1

我试过

pip install openexr
Run Code Online (Sandbox Code Playgroud)

但出现以下错误:

Collecting openexr
  Using cached https://files.pythonhosted.org/packages/7c/c4/76bf884f59d3137847edf8b93aaf40f6257d8315d0064e8b1a606ad80b1b/OpenEXR-1.3.2.tar.gz
Building wheels for collected packages: openexr
  Building wheel for openexr (setup.py) ... error
  ERROR: Complete output from command /Users/silviojin/anaconda3/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/g9/k_xb1tyd5hbg_48np5hvwh3m0000gn/T/pip-install-0_bh3qoe/openexr/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/g9/k_xb1tyd5hbg_48np5hvwh3m0000gn/T/pip-wheel-gq2luicr --python-tag cp36:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.6
  copying Imath.py -> build/lib.macosx-10.7-x86_64-3.6
  running build_ext
  building 'OpenEXR' extension
  creating build/temp.macosx-10.7-x86_64-3.6
  gcc -Wno-unused-result -Wsign-compare …
Run Code Online (Sandbox Code Playgroud)

python openexr

5
推荐指数
1
解决办法
3130
查看次数

在 OpenCV 中读取 .exr 文件

我使用搅拌机生成了一些深度图,并以 OpenEXR 格式保存了 z 缓冲区值(32 位)。有没有办法使用 OpenCV 2.4.13 和 python 2.7 从 .exr 文件(逐像素深度信息)访问值?在任何地方都找不到示例。我在文档中可以看到支持这种文件格式。但是尝试读取这样的文件会导致错误。

new=cv2.imread("D:\\Test1\\0001.exr")
cv2.imshow('exr',new)
print new[0,0]
Run Code Online (Sandbox Code Playgroud)

错误:

print new[0,0]
TypeError: 'NoneType' object has no attribute '__getitem__'
Run Code Online (Sandbox Code Playgroud)

cv2.imshow('exr',new)
cv2.error: ..\..\..\..\opencv\modules\highgui\src\window.cpp:261: error: (-215) size.width>0 && size.height>0 in function cv::imshow
Run Code Online (Sandbox Code Playgroud)

我找到的最近的是这个链接和这个链接

python opencv image zbuffer openexr

4
推荐指数
1
解决办法
8893
查看次数