Project

General

Profile

Camera Support #11653

Automatic detection of the Samyang 7.5mm f/3.5 UMC Fish-eye MFT

Added by Ramiro Téllez Sanz about 2 years ago. Updated about 2 years ago.

Status:
Closed: won't fix
Priority:
Low
Assignee:
-
Category:
Darkroom
Target version:
Start date:
06/13/2017
Due date:
% Done:

0%

Affected Version:
git stable branch

Description

I just purchased a Samyang 7.5mm fish-eye MFT. Since this lens lacks electronic contacts with the camera, I need to add an entry to the EXIF info from the RAW files so that my lens is recognized as "Samyang 7.5mm f/3.5 UMC Fish-eye MFT", as described in the corresponding lensfun xml.

The problem here is DarkTable uses exiv2's Exif.OlympusEq.LensType byte type variable to recognize the lens but, according to this thread in the exiv2 forum (http://dev.exiv2.org/boards/3/topics/2843?r=2848), it seems impossible for a user to modify a byte type variable.

I can correctly set Exif.Photo.LensModel, but Exif.OlympusEq.LensType shows this value off the camera:
$ exiv2 -pt Samyang.ORF | grep Exif.OlympusEq.LensType
Exif.OlympusEq.LensType Byte 6 None

So, I wonder: is it possible to change DarkTable Olympus lens recognition in such a way that, if Exif.OlympusEq.LensType returns an empty or weird value, then Exif.Photo.LensModel is read?

I attach a sample ORF file.

P6100377_original.ORF - OM-D E-M10 with Samyang 7.5mm f/3.5 UMC Fish-eye MFT (14.3 MB) Ramiro Téllez Sanz, 06/13/2017 02:18 PM

History

#1 Updated by Roman Lebedev about 2 years ago

  • Status changed from New to Closed: won't fix

Ramiro Téllez Sanz wrote:
0. the correct spelling is

darktable

I just purchased a Samyang 7.5mm fish-eye MFT. Since this lens lacks electronic contacts with the camera, I need to add an entry to the EXIF info from the RAW files so that my lens is recognized as "Samyang 7.5mm f/3.5 UMC Fish-eye MFT", as described in the corresponding lensfun xml.

The problem here is DarkTable uses exiv2's Exif.OlympusEq.LensType byte type variable to recognize the lens but, according to this thread in the exiv2 forum (http://dev.exiv2.org/boards/3/topics/2843?r=2848), it seems impossible for a user to modify a byte type variable.

I can correctly set Exif.Photo.LensModel, but Exif.OlympusEq.LensType shows this value off the camera:
$ exiv2 -pt Samyang.ORF | grep Exif.OlympusEq.LensType
Exif.OlympusEq.LensType Byte 6 None

So, I wonder: is it possible to change DarkTable Olympus lens recognition in such a way that, if Exif.OlympusEq.LensType returns an empty or weird value, then Exif.Photo.LensModel is read?

I attach a sample ORF file.

Modifying raw files is a heresy. If you do this, you are on your own. This will break the files, and you will loose data. DO NOT report any bugs if suddenly your modified raws no longer load.
Thus, unless there is a unmodified ORF file with such an issue, this is WONTFIX.

That being said, see #10525, and note that you write to .XMP, not the raw!!!

> exiv2 -M "reg exifEX http://cipa.jp/exif/1.0/" -M "set Xmp.exifEX.LensModel XmpText Sigma 24-60mm f/2.8 EX DG"  IMG123.RAW.xmp
or
> exiftool -LensModel="Sigma 24-60mm f/2.8 EX DG" IMG123.RAW.xmp

#2 Updated by Ramiro Téllez Sanz about 2 years ago

Roman Lebedev wrote:

Modifying raw files is a heresy. If you do this, you are on your own. This will break the files, and you will loose data. DO NOT report any bugs if suddenly your modified raws no longer load.
Thus, unless there is a unmodified ORF file with such an issue, this is WONTFIX.

1) The RAW I provided you with in the opening post was unmodified, just as I got it out of the camera.
2) I NEVER asked you to modify a RAW file in any way, nor asked for an option in darktable to do it.
3) All I was asking for was for the possibility that darktable read an alternative exiv2 tag to recognize the lens in case the default one returned an empty or weird value. Nothing else. You provide me with one below, thanks.
4) I don't know if it's a heresy or not to modify a RAW file, but it is my choice and they are my RAW files. Anyway, adding three exif tags to identify the lens and its focal lenght and maximum aperture is not breaking the files nor loosing the image data. But, as I say, and even it it were so, in the end it is my choice and I wasn't asking you to do that.

That being said, see #10525, and note that you write to .XMP, not the raw!!!
[...]

I really appreciate the info. Yes, it works, thank you very much. However, I've only been able to add that tag by modifying the RAW files directly.

Since I love learning, and probably you will be pulling your hair out right now ;-), my new goal is to achieve this addition by creating an xmp file for each RAW file, before opening them in darktable, by running a script in the folder containing the out-of-camera files. The question is: how can I do that? If the xmp file does not previously exist, the command fails:
$ exiv2 -M "reg exifEX http://cipa.jp/exif/1.0/" -M "set Xmp.exifEX.LensModel XmpText Samyang 7.5mm f/3.5 UMC Fish-eye MFT" P6100377_original.ORF.xmp
P6100377_original.ORF.xmp: Failed to open the file

Furthermore, is it possible at all for exiv2 to create an accompanying xmp, or am I wasting my time? I've googled for it, to no avail.

#3 Updated by Roman Lebedev about 2 years ago

Ramiro Téllez Sanz wrote:

Roman Lebedev wrote:

Modifying raw files is a heresy. If you do this, you are on your own. This will break the files, and you will loose data. DO NOT report any bugs if suddenly your modified raws no longer load.
Thus, unless there is a unmodified ORF file with such an issue, this is WONTFIX.

1) The RAW I provided you with in the opening post was unmodified, just as I got it out of the camera.

2) I NEVER asked you to modify a RAW file in any way, nor asked for an option in darktable to do it.
3) All I was asking for was for the possibility that darktable read an alternative exiv2 tag to recognize the lens in case the default one returned an empty or weird value. Nothing else. You provide me with one below, thanks.

Do you have a unmodified raw file where this issue is applicable?
Where one field is empty/wierd, but there is another field with the correct data, and darktable reads the wrong field?

4) I don't know if it's a heresy or not to modify a RAW file, but it is my choice and they are my RAW files.
Anyway, adding three exif tags to identify the lens and its focal lenght and maximum aperture is not breaking the files nor loosing the image data.

Be sure to keep backups. Things will break. I'm saying that because we have already had bugs reported. And be sure to not recommend anyone to modify raw files.
The thing is, it's like a bitflip on a filesystem without integrity checking (checksum), you will not know whether it happened or not until it's too late.

But, as I say, and even it it were so, in the end it is my choice and I wasn't asking you to do that.

That being said, see #10525, and note that you write to .XMP, not the raw!!!
[...]

I really appreciate the info. Yes, it works, thank you very much. However, I've only been able to add that tag by modifying the RAW files directly.

Since I love learning, and probably you will be pulling your hair out right now ;-), my new goal is to achieve this addition by creating an xmp file for each RAW file, before opening them in darktable, by running a script in the folder containing the out-of-camera files. The question is: how can I do that? If the xmp file does not previously exist, the command fails:
$ exiv2 -M "reg exifEX http://cipa.jp/exif/1.0/" -M "set Xmp.exifEX.LensModel XmpText Samyang 7.5mm f/3.5 UMC Fish-eye MFT" P6100377_original.ORF.xmp
P6100377_original.ORF.xmp: Failed to open the file

Furthermore, is it possible at all for exiv2 to create an accompanying xmp, or am I wasting my time? I've googled for it, to no avail.

#4 Updated by Roman Lebedev about 2 years ago

  • Target version set to 2.4.0

Also available in: Atom PDF