-
Notifications
You must be signed in to change notification settings - Fork 4
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
seg fault with raw_image #1
Comments
you actually want to post it here: https://github.com/neothemachine/rawpy |
At the risk of sounding spammy, you might also try rawkit, which this library was originally based on. It may not have the same problem (or it may, in which case we'd love to fix it). |
Hi SamWhited. I installed it but couldn't find a way to get to the raw values of each photosite as a numpy.array from rawkit library. |
In case anybody wants wants to use the code from this project, you can get a numpy array like: proc = libraw.LibRaw() # create RAW processor
proc.open_file("file.dng") # open file
proc.unpack() # extract mosaic from file
np_array = proc.imgdata.rawdata.raw_image |
There is also a PR in the works (which I will merge soon hopefully, been busy) that will add this to the higher level APIs so that you don't have to dig down into libraw land and can take advantage of the automatic memory management and what not that rawkit provides. See: photoshell/rawkit#104 If you notice any of these issues in rawkit/libraw let us know. I'd love to figure out what the differences are, and contribute the fix back to this project if possible since we both started from Cameron's same snippet, IIRC. |
Thanks paroj & SamWhited. |
Hi,
In case I want to access straight to the data contained in a raw file:
dummy = rawpy.imread('myimage.NEF').raw_image
I have a segmentation fault, and python crashes.
I tried without success:
dummy = rawpy.imread('myimage.NEF').raw_image.copy()
Doing it in 2 steps works fine:
dummy = rawpy.imread('myimage.NEF')
dummy = dummy.raw_image
So my solution now is to create a loading function:
def loadraw(im):
dummy = rawpy.imread(im)
return dummy.raw_image.copy()
Not too much of a big issue for me, but I thought you my want to have a look :-)
BTW, is there any way to include reading the EXIF data of a file in rawpy?
Cheers, and thanks a lot for that very nice library !
G
The text was updated successfully, but these errors were encountered: