Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
Main Photography Discussion
DXO modules faking it.
Mar 25, 2017 14:05:41   #
blackest Loc: Ireland
 
nothing worse than an unsupported lens, lightroom & photoshop are ok about it just pick a brand pick a lens and there you go.
Ok maybe not perfect but then extremely wrong lens models can make interesting photographs try using a short focal length lens profile on a longer lens photo and it can get really wild and interesting.

still back to the problem in hand what to do with an unsupported lens.

I’ve a couple easy ways to hack the tags in a raw image file to “fake” a different kind of lens. This worked for me. I make no guarantees it will work for you. In my case, I have a Canon 8-15mm Fisheye, which isn’t supported by DxO. The fixed 15mm Fisheye is, however, and since I only ever shoot at 15mm, I’d like to use the fixed module to correct. As it turns out, the module does a decent job once you fake DxO into thinking you actually used that lens.

This isn’t as easy as it would appear. You have two choices. You can clone the tags from a raw file that perfectly matches the lens, camera, and resolution of your own photos, but finding an exact match to this is difficult. In my case, I couldn’t find a fixed 15mm Fisheye anywhere, because it’s discontinued. Nobody online posted any sample pics using a 5D III, and the resolution was lower (forcing me to shrink my image if i wanted to fake it this way). If you’re lucky enough, however, to find an exact match to serve as a donor raw, you can simply do:

exiftool -all= -tagsfromfile donor.cr2 -exif:all mypic.cr2

This also comes in handy if you’re editing photos that you’ve already edited, whose MakerNotes have been dropped by Photoshop or whatever other program you used. You can simply use an unedited image straight from your camera and copy the tags back into the edited photo; it will load into DxO with no problems, and recognize the correct module.

As for me, I needed to do something a little more drastic. If you run exiftool with the -args argument, it will print out the list of exiftool commands to actually set the tags for a particular image. Not all of these can be simply copied and pasted, but a lot of the time you can tweak them to read what you want. Using this, I was able to figure out how to take one of my CR2 images, taken with an 8-15mm Fisheye, and rewrite the tags to simulate the exact ones you’d expect for a fixed 15mm. In fact, I wrote it into a little bash function that you can stick in your .profile on a mac.

function fisheye_raw {
exiftool -LensModel=”EF15mm f/2.8 Fisheye” “$1″
exiftool -LensType=”Canon EF 15mm f/2.8 Fisheye” “$1”
exiftool -LensInfo= “$1”
exiftool -LensSerialNumber= “$1″
exiftool -FocalLength=”15.0 mm” -MinFocalLength=”15 mm” “$1″
exiftool -MaxFocalLength=”15 mm” “$1”
}

Now to fake out DxO, all I have to do is run:

fisheye_raw myimage.cr2

Then load it into DxO. The software will assume you’re using the fixed fisheye, and give you access to all of its optics correction modules. It’s not perfect, but they do work relatively well with the 8-15mm Fisheye @ 15mm. Of course, you could do this to fake any lens if you have the right information.

Once you’ve built a single working CR2, however, I found it easier to just clone the tags (unless the remaining exif data is particularly important to you). The function works on raw, but doesn’t on jpg, so you’d need to create a donor raw file from this first, then clone the tags over from your raw to your jpg.

That’s it, really.

Reply
Mar 25, 2017 14:40:34   #
blackest Loc: Ireland
 
this may be handy :)
https://github.com/hvdwolf/pyExifToolGUI/releases

Reply
Mar 25, 2017 17:33:30   #
blackest Loc: Ireland
 
blackest wrote:


it is actually easier than I thought at least for Pentax :)
http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Pentax.html

here is what is needed at the commandline

> exiftool -LensType /Volumes/K-5/DCIM/103_2503/_IGP3465.DNG
(exiftool -option where the rawfile is)

Lens Type : PENTAX-F 28-80mm F3.5-4.5 or Sigma or Tokina Lens

now thats the lens recorded in the exif of my unsupported lens now to change it :)
>exiftool -LensType="Sigma 24-70mm F2.8 IF EX DG HSM" /Volumes/K-5/DCIM/103_2503/_IGP3465.DNG
1 image files updated
and just to check
>exiftool -LensType /Volumes/K-5/DCIM/103_2503/_IGP3465.DNG
Lens Type : Sigma 24-70mm F2.8 IF EX DG HSM

And yes dx0 prepares the image with the module selected :)
success

Basically the link above gives all the Lenstype strings embedded in the exif not all of which can be processed by dx0

you have the choice of any module that is for your camera model

>exiftool -FocalLength /Volumes/K-5/DCIM/103_2503/_IGP3465.DNG
Focal Length : 40.0 mm
>exiftool -FocalLength="40.0 mm"

may also be useful for those old k and m42 mount lenses :)

Reply
 
 
Mar 25, 2017 18:10:54   #
travisdeland Loc: deland, FL
 
thanks for the info-as a DXO user, this knowledge may come in very handy at some point. I haven't had any issues as such-yet-but this situation could still present itself to me. Thanks again.

Travis

Reply
Mar 25, 2017 20:14:18   #
blackest Loc: Ireland
 
travisdeland wrote:
thanks for the info-as a DXO user, this knowledge may come in very handy at some point. I haven't had any issues as such-yet-but this situation could still present itself to me. Thanks again.

Travis


No problems it's good for old lenses as well that have no electronics at least you can then tag the lens with the info the camera doesn't also rather useful the camera model is up for change too. I have film camera's where i have scanned the negatives and with exiftool its quite easy to set any camera model.

Reply
Mar 26, 2017 15:20:34   #
FiddleMaker Loc: Merrimac, MA
 
blackest wrote:
nothing worse than an unsupported lens, lightroom & photoshop are ok about it just pick a brand pick a lens and there you go.
Ok maybe not perfect but then extremely wrong lens models can make interesting photographs try using a short focal length lens profile on a longer lens photo and it can get really wild and interesting.

still back to the problem in hand what to do with an unsupported lens.

I’ve a couple easy ways to hack the tags in a raw image file to “fake” a different kind of lens. This worked for me. I make no guarantees it will work for you. In my case, I have a Canon 8-15mm Fisheye, which isn’t supported by DxO. The fixed 15mm Fisheye is, however, and since I only ever shoot at 15mm, I’d like to use the fixed module to correct. As it turns out, the module does a decent job once you fake DxO into thinking you actually used that lens.

This isn’t as easy as it would appear. You have two choices. You can clone the tags from a raw file that perfectly matches the lens, camera, and resolution of your own photos, but finding an exact match to this is difficult. In my case, I couldn’t find a fixed 15mm Fisheye anywhere, because it’s discontinued. Nobody online posted any sample pics using a 5D III, and the resolution was lower (forcing me to shrink my image if i wanted to fake it this way). If you’re lucky enough, however, to find an exact match to serve as a donor raw, you can simply do:

exiftool -all= -tagsfromfile donor.cr2 -exif:all mypic.cr2

This also comes in handy if you’re editing photos that you’ve already edited, whose MakerNotes have been dropped by Photoshop or whatever other program you used. You can simply use an unedited image straight from your camera and copy the tags back into the edited photo; it will load into DxO with no problems, and recognize the correct module.

As for me, I needed to do something a little more drastic. If you run exiftool with the -args argument, it will print out the list of exiftool commands to actually set the tags for a particular image. Not all of these can be simply copied and pasted, but a lot of the time you can tweak them to read what you want. Using this, I was able to figure out how to take one of my CR2 images, taken with an 8-15mm Fisheye, and rewrite the tags to simulate the exact ones you’d expect for a fixed 15mm. In fact, I wrote it into a little bash function that you can stick in your .profile on a mac.

function fisheye_raw {
exiftool -LensModel=”EF15mm f/2.8 Fisheye” “$1″
exiftool -LensType=”Canon EF 15mm f/2.8 Fisheye” “$1”
exiftool -LensInfo= “$1”
exiftool -LensSerialNumber= “$1″
exiftool -FocalLength=”15.0 mm” -MinFocalLength=”15 mm” “$1″
exiftool -MaxFocalLength=”15 mm” “$1”
}

Now to fake out DxO, all I have to do is run:

fisheye_raw myimage.cr2

Then load it into DxO. The software will assume you’re using the fixed fisheye, and give you access to all of its optics correction modules. It’s not perfect, but they do work relatively well with the 8-15mm Fisheye @ 15mm. Of course, you could do this to fake any lens if you have the right information.

Once you’ve built a single working CR2, however, I found it easier to just clone the tags (unless the remaining exif data is particularly important to you). The function works on raw, but doesn’t on jpg, so you’d need to create a donor raw file from this first, then clone the tags over from your raw to your jpg.

That’s it, really.
nothing worse than an unsupported lens, lightroom ... (show quote)

Wow !!! this stuff is way over my head !!!

Reply
Mar 26, 2017 18:00:54   #
blackest Loc: Ireland
 
FiddleMaker wrote:
Wow !!! this stuff is way over my head !!!


ok i'll try and simplify its command line so its a little basic i'm assuming you don't know where things live on your computer but you can find them in finder

ok lets try:

cd [space] and then drag a folder from finder into the terminal window

e.g dragging from my sdcard makes a line K-5 is the card DCIM where the photo's go and 104_2603 is the folder i'm interested in

cd /Volumes/K-5/DCIM/104_2603 [press return]

next try

ls [press return]

my folder has

_IGP3521.DNG _IGP3527.DNG _IGP3533.DNG _IGP3539.DNG _IGP3545.DNG _IGP3551.DNG _IGP3557.DNG _IGP3563.DNG
_IGP3522.DNG _IGP3528.DNG _IGP3534.DNG _IGP3540.DNG _IGP3546.DNG _IGP3552.DNG _IGP3558.DNG _IGP3564.DNG
_IGP3523.DNG _IGP3529.DNG _IGP3535.DNG _IGP3541.DNG _IGP3547.DNG _IGP3553.DNG _IGP3559.DNG _IGP3565.DNG
_IGP3524.DNG _IGP3530.DNG _IGP3536.DNG _IGP3542.DNG _IGP3548.DNG _IGP3554.DNG _IGP3560.DNG _IGP3566.DNG
_IGP3525.DNG _IGP3531.DNG _IGP3537.DNG _IGP3543.DNG _IGP3549.DNG _IGP3555.DNG _IGP3561.DNG
_IGP3526.DNG _IGP3532.DNG _IGP3538.DNG _IGP3544.DNG _IGP3550.DNG _IGP3556.DNG _IGP3562.DNG

if I type

exiftool -s _IGP3521.DNG [press return]

I get a huge amount whizzing past the screen

starting

ExifToolVersion : 10.40
FileName : _IGP3521.DNG
Directory : .
FileSize : 19 MB
FileModifyDate : 2017:03:26 13:57:56+01:00
FileAccessDate : 2017:03:25 23:00:00+00:00
FileInodeChangeDate : 2017:03:26 13:57:56+01:00
FilePermissions : rwxrwxrwx
FileType : DNG
FileTypeExtension : dng
MIMEType : image/x-adobe-dng
ExifByteOrder : Big-endian (Motorola, MM)
Make : PENTAX
Model : PENTAX K-5
Orientation : Horizontal (normal)
Software : K-5 Ver 1.16

.................................

Aperture : 4.0
CFAPattern : [Blue,Green][Green,Red]
ImageSize : 4992x3284
LensID : Samsung/Schneider D-XENON 18-55mm F3.5-5.6
Megapixels : 16.4
PreviewImage : (Binary data 38560 bytes, use -b option to extract)
ScaleFactor35efl : 1.5
ShutterSpeed : 1/2000
ThumbnailTIFF : (Binary data 57816 bytes, use -b option to extract)
CircleOfConfusion : 0.020 mm
FOV : 46.4 deg
FocalLength35efl : 28.0 mm (35 mm equivalent: 42.0 mm)
HyperfocalDistance : 9.78 m
LightValue : 15.0


Finishing with this, there may be different things in your file.

To read just one value we pass exiftool the name of the tag we are interested in.
for example FOV to do this we type

exiftool -s -FOV _IGP3521.DNG [press return]

now this returns one line

FOV : 46.4 deg

We can read more than 1 tag at once

exiftool -s -FOV -LightValue _IGP3521.DNG [press return]

FOV : 46.4 deg
LightValue : 15.0

Ok so thats how you read a tag oh better talk about -s this is the name of the tag as exiftool wants to see it.

exiftool -FOV -LightValue _IGP3521.DNG [press return]

Field Of View : 46.4 deg

thats been expanded to be more human friendly but you need the other version to talk to exiftool

To write a tag is similar but you need to pass the new value in " " quotes
so

exiftool -s -FOV="46.2 deg" _IGP3521.DNG [press return]

Warning: Sorry, FOV is not writable
Nothing to do.

So thats a tag you are not allowed to rewrite but you get the idea.

exiftool -all= -tagsfromfile donor.cr2 -exif:all mypic.cr2

rewrires everything but it has to be a donor from exactly the same model camera or it will scramble the destination file there are a whole bunch of things which need to be decoded exactly as the camera recorded them if these chunks are in different places bad things happen.

However if you have a friend with the same camera model as you and a supported lens you can do this.

Dx0 reads some of the exif of the file to figure out which lens you used.

exiftool -LensModel=”EF15mm f/2.8 Fisheye” _IGP3521.cr2
exiftool -LensType=”Canon EF 15mm f/2.8 Fisheye” _IGP3521.cr2
exiftool -LensInfo= _IGP3521.cr2
exiftool -LensSerialNumber= _IGP3521.cr2
exiftool -FocalLength=”15.0 mm” -MinFocalLength=”15 mm” _IGP3521.cr2
exiftool -MaxFocalLength=”15 mm” _IGP3521.cr2

Thats the command line version of the canon fisheye lens hack the second to last line changed 2 tags together

I don't know if all of this is actually needed. In fact there probably isn't LensInfo or LensSerialNumber it might create blank tags that dx0 want I guess. There is no value being set for them in the function.


For Pentax its simple

exiftool -LensType="Sigma 24-70mm F2.8 IF EX DG HSM" _IGP3521.dng

dx0 only look at one tag the lens type if its a match with a lens they support they will process the raw file with that module.

I hope that helps.

Reply
 
 
Mar 26, 2017 18:11:43   #
Bill_de Loc: US
 
blackest wrote:


I’ve a couple easy ways to hack the tags in a raw image file to “fake” a different kind of lens.


Do you share them on Adobe's user site?

"Adobe Lens Profile Creator

Adobe® Lens Profile Creator is a free utility that enables the easy creation of lens profiles for use in the Photoshop family of products, such as Photoshop CC, the Camera Raw plug-in, and Lightroom. A lens profile describes the types of optical aberrations that exist in a particular lens and prescribes how to correct the lens distortions in an image captured from the same lens. For more information, read the user guide (PDF, 1.64 MB) file. Download: Mac, Win

Adobe Lens Profile Downloader

The Adobe Lens Profile Downloader is a free companion application to Photoshop, Lightroom, and the Camera Raw plug-in. It allows customers to search, download, rate, and comment on the online lens correction profiles that are created and shared by the user community. Read more (PDF, 1.64 MB) file. Download: Mac, Win"


https://helpx.adobe.com/photoshop/digital-negative.html#Adobe_Lens_Profile_Creator

--

Reply
Mar 26, 2017 19:24:02   #
blackest Loc: Ireland
 
Bill_de wrote:
Do you share them on Adobe's user site?

"Adobe Lens Profile Creator

Adobe® Lens Profile Creator is a free utility that enables the easy creation of lens profiles for use in the Photoshop family of products, such as Photoshop CC, the Camera Raw plug-in, and Lightroom. A lens profile describes the types of optical aberrations that exist in a particular lens and prescribes how to correct the lens distortions in an image captured from the same lens. For more information, read the user guide (PDF, 1.64 MB) file. Download: Mac, Win

Adobe Lens Profile Downloader

The Adobe Lens Profile Downloader is a free companion application to Photoshop, Lightroom, and the Camera Raw plug-in. It allows customers to search, download, rate, and comment on the online lens correction profiles that are created and shared by the user community. Read more (PDF, 1.64 MB) file. Download: Mac, Win"


https://helpx.adobe.com/photoshop/digital-negative.html#Adobe_Lens_Profile_Creator

--
Do you share them on Adobe's user site? br br i ... (show quote)


No Adobe is quite reasonable with lens profiles you can use any profile with any lens on any body.

Dx0 lens modules are 'special' and they will not let you use a lens module with any lens body combination other than the one they made it for. So by hacking the exif you can trick dx0 into using a module on a different lens than intended.

Reply
Mar 26, 2017 19:35:02   #
Bill_de Loc: US
 
blackest wrote:
No Adobe is quite reasonable with lens profiles you can use any profile with any lens on any body.

Dx0 lens modules are 'special' and they will not let you use a lens module with any lens body combination other than the one they made it for. So by hacking the exif you can trick dx0 into using a module on a different lens than intended.


Thanks for clearing that up. I appreciate the response.

--

Reply
If you want to reply, then register here. Registration is free and your account is created instantly, so you can post right away.
Main Photography Discussion
UglyHedgehog.com - Forum
Copyright 2011-2024 Ugly Hedgehog, Inc.