Git Product home page Git Product logo

canon_cr3's People

Contributors

boardhead avatar cytrinox avatar hfiguiere avatar illwieckz avatar lclevy avatar lebedevri avatar markreidvfx avatar matze avatar superadm1n avatar tjkrusinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

canon_cr3's Issues

fail to install by `pip setup.py`

and, in this repo, i can't find the definition for Image.

I want to use this tool to get exif info from cr3 files.

can you wrote down some instructions, thanks

`parse_cr3.py` support for R7

I tried several example files from an R7 camera (firmware version 1.3.0), all using lossless RAW. They all fail here:

Traceback (most recent call last):
  File "/Users/agf/Desktop/canon_cr3/parse_cr3.py", line 379, in <module>
    if TiffIfd.TIFF_CANON_VIGNETTING_CORR2 in ctmd_makernote7.ifd:
                                              ^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ifd'

Full output is https://gist.github.com/AGFeldman/c484bad40cf1fbe79c6c7ac88c42f836

To download an example file and reproduce:

wget https://aaron.na31.org/EYA_0236.CR3 && python3 parse_cr3.py EYA_0236.CR3

Thanks in advance if you can take a look! As an aside, I'm interested in this tool because I'm interested in automating raw burst extraction (#14 (comment)) although my understanding is that would take more work.

Canon R8

Are you still looking for Canon R8 files?

Support for burst files

Recent models (e.g., G7X-III & G5X-II) support high-speed raw bursts which are recorded in a single cr3 file. Is there any support for parsing and extracting these individual frames?

Convert .cr3 to .tiff or .png

Can you help me on this? It seems like the library should be able to support it, but i don't even know how i should get started

Pixel Data into an array

I can extract the hd data as the output, hd00.bin. However, I have no ideal how to analyze and convert the sequential bytes into an array to recover the corresponding data on each sensors of cameras. Any suggestions or even some related articles about that? Thanks~

Canon r6mk2 samples

Do you still need samples from that camera?

It looks as if exiv2 cannot read the exif info in the raw file data but can read it in the craw format so there must be something new...

Happy to provide all sorts of samples.

Canon R3 HEIF

I can provide R3 HEIF (or any other R3 outputs) if needed, just let me know what formats you'd like.

Wrong definition for records in CTMD box

In your description, each record entry located in the CTMD box has two long values for Record Type (starting at offset 0) and Record Size (starting at 4). For most of the old cameras it is the right assumption, but I found a lot of new cameras (like EOR R3, EOS-1DXmkIII, EOS-R10, EOS-R50, EOS-R6M2, EOS-R7 and EOS-R8) using a different format. For record numbers 7, 8 and 9 these cameras writes [01 01 00 07] instead of [00 00 00 07] etc.
For this reason, I suggest to adopt the format definition and split the first value of long into two values of short, where the Record Type is taken from the second value. The first value will be 'unknown' for me.

I'm not using your software but the great CR3 format specification only, and I'm working on my own implementation. If you have any questions or comments, please let me known.

Regards,
Christoph

No mdata with Canon EOS RP image files

Hi,
I have a Canon EOS RP with which I shoot in RAW, and I would like to parse the raw data into a Python usable format.

Using the canon_cr3 lib, I'm not able to parse any data from mdat. Only preview_image (PRVW) returns me the downscaled jpeg image.

from canon_cr3 import Image
from canon_cr3 import CmtdData

image = 'IMG_0023.CR3'
img = Image(image)

print(len(img.preview_image)) # in PRVW
print(len(img.jpeg_image)) # trak1 of mdat
print(len(img.sd_crx_image)) # trak2 of mdat
print(len(img.hd_crx_image)) # trak3 of mdat

result:

92820
0
0
0

Here is a CR3 file taken with my Canon EOS RP: https://drive.google.com/file/d/1a__2VVyz1q2RhwYsGx9b5myo_ebYVfM4/view?usp=sharing

Any help on that would be much appreciated!

CMP1 structure

Correct structure of CMP1 tag (terminology and structure from internals of CRX decoder). In terms of CRX decoder this CMP1 is essentially image header for encoded image (exists for each image track). Decoder uses CMP1 data to decode image track.

CMP1

Offset type size content
0 long 1 size of this tag. 0x3c
4 char 4 "CMP1"
8 short 1 ? FF 00
10 short 1 0x30 - size of the image header to follow
12 short 1 version - always 0x100 for current CR3 (major.minor version in bytes?)
14 bytes 2 00 00
16 long 1 image width
20 long 1 image height
24 long 1 tile width
28 long 1 tile height
32 bytes 1 bits per sample - usually 0xE
33 bits 4 number of planes - 4 for RGGB
33+4bits bits 4 CFA layout (valid values 0..3) - only valid where number of planes > 1
34 bits 4 extra bits per sample - only 1 or 3
34+4bits bits 4 number of wavelet levels (set for wavelet compressed image)
35 bits 1 1 = image has more than one tile horisontally (set for wavelet compressed image)
35+1bit bits 1 1 = image has more than one tile vertically (set for wavelet compressed image)
35+2bit bits 6 unused in current version - always 0
36 long 1 mdat track header size (mdat bitstream data starts following that header)
40 long 1 0
44 bytes 16 ? 4 times "01 01 00 00"

Completing the M6 Mark II sample set

Hiya!

From what I can gather from the README the only sample you have from the M6II is a RAW burst. If you are still looking for more samples from the camera I can provide them for you. Let me know what you need, if anything.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.