We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
不久前,我编写了一个名为 rawpy 的 libraw/dcraw 包装器。它非常容易使用:
它原生地与 numpy 数组一起工作,并支持很多选项,包括直接访问未处理的拜耳数据。
A while ago I wrote a libraw/dcraw wrapper called rawpy. It is quite easy to use:
It works natively with numpy arrays and supports a lot of options, including direct access to the unprocessed Bayer data.
ImageMagick 支持大多数 RAW 格式 并提供 Python 绑定。
至于Python的dcraw绑定:dcraw是用C编写的,因此您可以通过
ctypes 访问它
模块。ImageMagick supports most RAW formats and provides Python bindings.
As for dcraw bindings for Python: dcraw is written in C, so you can access it through
ctypes
module.这是一种使用 rawkit 将佳能 CR2 图像转换为友好格式的方法,适用于其当前的实现:
使用 numpy 数组在这里不是很优雅,但至少它可以工作,我不知道如何使用 PIL 构造函数来实现相同的目的。
Here is a way to convert a canon CR2 image to a friendly format with rawkit, that works with its current implementation:
Using a numpy array is not very elegant here but at least it works, I could not figure how to use PIL constructors to achieve the same.
尝试 http://libopenraw.freedesktop.org/wiki/GettingTheCode
Git 存储库:
git://anongit.freedesktop.org/git/libopenraw.git
源代码树中有一个 python 目录。 ;-)
Try http://libopenraw.freedesktop.org/wiki/GettingTheCode
Git repo:
git://anongit.freedesktop.org/git/libopenraw.git
There is a python directory in the source tree. ;-)
我不确定 Python 成像库 (PIL http://www.pythonware .com/products/pil/)是,但您可能想检查一下。
否则,你可以直接调用 dcraw,因为它已经很好地解决了这个问题。
I'm not sure how extensive the RAW support in Python Imaging Library (PIL http://www.pythonware.com/products/pil/) is, but you may want to check that out.
Otherwise, you could just call dcraw directly since it already solves this problem nicely.
我发现了这个: https://gitorious.org/dcraw-thumbnailer/mainline /blobs/master/dcraw-thumbnailer
它从 python 调用 dcraw 作为进程,并将其转换为 PIL 对象。
I found this: https://gitorious.org/dcraw-thumbnailer/mainline/blobs/master/dcraw-thumbnailer
It calls dcraw as a process from python and converts it to a PIL object.