Anyone else getting .dng's w/ Camera Model EXIF of "Canikon" when using cr2hdr?

Started by l_d_allan, January 15, 2014, 04:47:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

l_d_allan

I'm ending up with some files with the EXIF info indicating the "Camera Model" is "Canikon". Is anyone else encountering this?

My speculation is Canikon is a mix of Canon and Nikon when ExifTool or cr2hdr is confused with a possible "corner case". Or not?

I'm rusty with grep, but would a "grep" for "Canikon" in the ML or TL source code return any hits?

I'll also ask this question on the ExifTool forum.

So far, I don't have a repeatable sequence that causes this to happen. Sorry. I thought I'd check first before digging into the issue. It happens rather erratically ... maybe every 5th shooting session. I think it's happened 3 or 4 times in the past several months.

It seems to involve:

  • Shooting with both 5d2 and 6d, with one of them having a Samyang manual lenses with no EXIF for fstop or lens
  • I use ExifTool on the .cr2's to fill in this EXIF info when images from Samyang lenses are involved.
  • Seems to involve Dual-ISO, which also involves ExifTool
  • Problem could involve ExifTool, cr2hdr, or ... operator error on my part
  • There is a odd-ball work-flow involved, including multiple pass of ExifTool



Audionut

What version of cr2hdr are you using.

A search result leads to this, http://www.magiclantern.fm/forum/index.php?topic=7139.msg71079#msg71079 and carries over to the next page.

The relevant commit a1ex talks about is this one: https://bitbucket.org/hudson/magic-lantern/commits/cfd3d0b3853a2096bb5aaf65b9396d10747b261f

This looks to have been copied over to exiftool-bridge.c:  https://bitbucket.org/hudson/magic-lantern/src/2b804e8cdd3c890f8760d0eed99056ef8d651a3e/modules/dual_iso/exiftool-bridge.c?at=unified

    snprintf(exif_cmd, sizeof(exif_cmd), "exiftool -tagsFromFile \"%s\" -all:all \"-xmp:subject=Dual-ISO\" \"-UniqueCameraModel<Model\" \"%s\" -overwrite_original", source, dest);

But perhaps it's being borked by this code:

unsigned int get_model_id(const char* filename)
{
    unsigned tag = DEFAULT_MODEL_ID;
    char exif_cmd[10000];
    snprintf(exif_cmd, sizeof(exif_cmd), "exiftool -CanonModelID -b \"%s\"", filename);
    FILE* exif_file = popen(exif_cmd, "r");
    if(exif_file)
    {
        if (!fscanf(exif_file, "%u", &tag))
            goto err;
        pclose(exif_file);
    }
    else
    {
        err:
        printf("**WARNING** could not identify the camera (exiftool problem). Assuming it's a 5D Mark III\n");
    }
    return tag & 0xFFF;
}



l_d_allan

Quote from: Audionut on January 15, 2014, 05:19:46 AM
What version of cr2hdr are you using.

Latest, with date-stamp of Dec 7, 2013.

IIRC, I did update the version of ExifTool that came with the earlier bundle of cr2hdr.zip

Could they possibly be "out of sync", and I "shot myself in the foot"?

There were some other oddities ...
* Out of several hundred pano files, those with problems weren't sequential:
* 4055 then 4060 then 4061 and then 4067
* Create times were an hour after the last actual shutter activation
* ExifTool refused to rename the Lens model from "Samyang 14mm" to "Canon 35mm"
* And I'm unclear how a file with EXIF of 35mm got changed to Samyang 14mm

Also, I wonder if this is possibly related to the issue of renaming the Dual-ISO files to _UAL_####, which has the warning of "Not reliable". My somewhat convoluted workflow treats _UAL_####.cr2 differently than _MG_####.cr2


a.d.

"Canikon" is hardcoded in ML cr2hdr. However the cr2hdr use ExifTool to copy the camera model to the DNG, so in this case it's only cosmetic. ACR should recognise your right camera model. I think you are on windows, I'd recommend to use cmd for the logs.

l_d_allan

Quote from: a.d. on January 15, 2014, 08:35:23 PM
"Canikon" is hardcoded in ML cr2hdr. However the cr2hdr use ExifTool to copy the camera model to the DNG, so in this case it's only cosmetic. ACR should recognise your right camera model. I think you are on windows, I'd recommend to use cmd for the logs.

Thanks for checking. However, it may be a bit more than cosmetic. I use Adobe Bridge and its "Filter by Model" to sort out which camera was in use for which images. But not a biggie.

I suppose I should let Phil at ExifTool to ignore, at least for now.

I have been using a "double embedded for - do loop" in Windows to accomplish cr2hdr of 100's of Dual-ISO .cr2's, rather than the .vbs approach.
for %n in (0 1 2 3 4 5 6 7 8 9) do start /belownormal for %c in (YYM*%n_DI_*.cr2) do cr2hdr %c




a.d.

What about when I compile one Version for 5D2 and one version for 6D?

1%

Canikon happens to all DNGs. Its thrown in there by default from one of the CHDK raw.c files. You can hardcode it for your camera or bulk edit exif data after the fact. If its a CR2, exiftool should be copying all meta data from the original into the new DNG after its done processing the CR2.

I've only had it come up missing when exif tool returned an error or didn't run. Your bulk processing code could also be copying the DNG before cr2hdr/exiftool finishes with it.