Add support for Canon CR3 file format

Issue #554 resolved
OK Take created an issue

[Always ] Is the issue reproducible?

[Yes 1.10BETA014 ] Are you running the latest version?

[Basically yes ] Are all prerequisites that are mentioned inside the manual met?

Description

The CanonEOS 6D connection works very consistently. I replaced the camera with a CanonEOS Ra in the same environment. It was recognized and its status was reflected. However, the snapshot fails and the RAW file fails to save.

The error message is Value cannot be null. Parameter name: dib

It fails from both the Sequence and Imaging sections.However, LiveView seems to be working correctly. However, the ASCOM Camera Driver for DSLR (connection method: (CanonSDK), the RAW files are successfully saved when connected via. Other applications, such as the EOS Utility and digiCamControl, also have CanonEOS Ra's connection is stable and functioning.It's the same situation in my other two PC set environments.
There may be a problem between CanonSDK and NINA.

Steps to Reproduce

  • Connect the CanonEOS Ra to your PC via USB.
  • Select and connect the camera to CanonEOS Ra in NINA.
  • In the Imaging section, press the Shoot button.

Expected behaviour

If normal, the captured image is displayed and the specified RAW file is saved.

Actual behaviour

An error message appears and shooting fails.

I apologize for relying on machine translation.

Comments (21)

  1. Stefan B repo owner

    Hi,

    Is this camera writing .cr3 files? These files are not compatible with NINA, as it can only digest the older .cr2 file formats.

  2. OK Take reporter

    I greatly appreciate your comments. Yes, this camera is writing a cr3 file. In Issue #414, the Canon EOS RP issue was marked RESOLVED. So I selfishly assumed that cr3 files were now supported. Like the EOS Ra, the EOS RP also writes a cr3 file. The EOS RAW file format is determined by the generation of the EOS processor (Digic engine) It seems that the Digic8 and later models seem to be dominated by the cr3 file, even if it is an entry-level machine. I'm hoping that support for cr3 will be scheduled in future versions.
    Here's some information about the format.
    https://github.com/lclevy/canon_cr3

  3. Deepanshu Arora

    I would like this done as well. I have Canon EOS Ra that does not work with NINA, just because of CR3 files. I understand that this will require some major change as freeImage has gone stale and did not update to latest LibRaw. I am not sure if NINA has plan to bypass freeImage and directly use LibRaw? LibRaw 201910 snapshot supports CR3 file format.

  4. Jim Waters

    If I install this what happens to the 1.10 release? Will I have to step-back after I complete the testing?

  5. Dale Ghent

    The content that is delivered by this installer is the current 1.10 release plus just the bits for CR3 support. It is not 1.11 code. Because it’s declaring it as the same version as what you might already have installed, you may need to uninstall NINA 1.10 first, then install this. To revert you would do the same in reverse. Settings and profiles should be preserved.

  6. Jim Waters

    Give me a few days and I will use my 5DMkIV and do some testing. Is there anything you want me to focus on?

  7. Dale Ghent

    Functional efficacy for now; does the image show up correctly in the imaging screen and the cr3 files are saved as expected.

  8. Jim Waters

    I just did a quick test with the 5DMkIV on my desk. I am running Win10 Home (Build 18363.959). I started NINA, connect the camera to my laptop and scanned for the camera. The camera was on Bulb. I connected to the camera and set the Gain (ISO) to 400. I set the Sequencer to take 3ea images and started the sequence. The sequencer started, took an image, downloaded it, displayed it then paused. It then repeated the above 2 more times. The displayed image looked out of focus. The camera was on auto-focus.

    Questions – 1.) What’s controlling / causing the ‘long pause’ between images? 2.) What setting controls the ISO? The Gain setting on the Sequence page or the Gain on the Camera Tab? These two should be linked. When you change one the other should change too?

    I just tried this again and I got 2 errors – Camera download failed. And Camera timeout.

    When I first tried this I got a camera connection error. The camera was on P. I thought it was human caused so I started over. See the attached logs.

  9. Dale Ghent

    @Jim Waters I’m not sure what you mean by “long pause”. Are we talking 10 seconds? 5 minutes? Hours? Did the pause happen between every shot or just after the first one? As for focus, the driver intentionally does not tell the camera to focus because the camera’s own focusing method does not work for astrophoto purposes.

    Gain on DSLRs is the ISO setting. The difference is that DSLRs are a list of ISO values (100, 200, 400, etc) where astro cameras are a range (0 though some higher number). So with DSLRs, the gains (ISO levels) are presented as a drop-down selection box. You select the gain (ISO) you want and the camera operates at that level. In the end it is the same thing but different way of choosing it due to that it’s a list of values instead of a range of values.

    Your first log file shows a lot of calls to the Canon SDK that it terminated with `EDS_ERR_INTERNAL_ERROR` which indicates a configuration issue with the camera or some sort of communications problem.

    In the last log file, it shows that we waited for the image to download off the camera and that never happened, so NINA timed it out and moved on. I can add some more logging to the driver but it seems like you might have an underlying issue with a USB cable perhaps.

  10. Jim Waters

    More connection timeout error messages. There’s no problem with the camera or USB3 cable. I downloaded 200 plus images of Sedona and the Grand Canyon a few days ago with the EOS Utility. I also tested with BackyardEOS Rel 3.2.0 RC8 and SGPro 3.1.0.544. Each worked as expected. The long time between images is 90 plus seconds. There's also a time delay with BackyardEOS and SGPro but not as long. BTW - with 1.10 I sometimes have connection problems with my ASI2600MC Pro. It fails to download. Do you want me to test with my 6D to see if I get errors?

    Add additional logging / tracing and I will retest.

  11. Jim Waters

    Just tested my 6D with your NINA build. It worked well. There were no errors and the time between subs was a 2 or 3 seconds. Not sure what’s causing the long time between subs with the 5DMkIV. EDIT - Could FreeImage be causing the long 5DMkIV delay between subs?

    I retested my 5DMkIV with the EOS Utility. The time between subs was 2 or 3 seconds.

  12. Dale Ghent

    I’m not really here to debug 5D4 itself, I’m looking for feedback on CR3 specifically. Once I get data points from other people, we can look at why the 5D4 is acting strange. Other than the difference in raw format there should be no other material difference between it and other camera models from a EDSDK perspective.

  13. Deepanshu Arora

    @Dale Ghent I tested my Canon EOS Ra with your build, it works fine. I did not encounter any issue. Preview in imaging tab also looked OK. I did not get chance to test my older Canon bodies (5D4, 6D, 6D2) to make sure nothing is broken on that side. At least Ra is working fine, CR3s are getting debayered fine! Thank you for adding this support! I do hope FreeImage keep updating in future!.

  14. Jim Waters

    Dale - I did more testing. When I did the testing earlier the ‘Camera Timeout’ was set to 60 sec. I increased the time to 120 sec. NINA works as intended. No errors were generated. Between NINA, SGPro and BYE the download time is between 95 to 105 seconds. Canon EOS Utility 3 download time was 16 seconds. All 4 programs - NINA, SGPro, BYE and EOS Utility saved the image as CR2. Not sure why the EOS Utility saved images as CR2. Let me know if you need anything else.

  15. OK Take reporter

    Canon EOSRa has been very stable in 1.10 HF1 RC1 and later versions. The current firmware version of my Ra is Ver.1.5.0.
    Snapshots, live views, autofocus, plate solves, sequences ... all are fine.

    Thanks to everyone who has worked hard to add this feature. Thank you!

  16. Log in to comment