DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Raw vs JPEG

darkneskies

Active Member
Joined
Apr 3, 2019
Messages
25
Reactions
9
Location
Cherry County, Nebraska
Hello all. I'm hopeful to get some help/explanation for what's going on here. Thank you in advance.
The image below includes screen-shots of both the .dng (upper) and the .jpg (lower) from a M2P. They were combined into a single image for ease of comparison. The camera was set to record both raw & jpeg in a single shutter button push.
.
These photos were loaded into darktable (a raw image editor) & screen-shots taken before I made any adjustments. Any processing performed was done by darktable on it's own. The first thing you notice is that the raw image has some fairly bad barrel distortion that the jpeg does not. Then you notice that the raw image has a wider FOV than the jpeg. darktable reports the raw image with dimensions 5568 x 3648 and the jpeg as being 5472 x 3648 (which are the camera's specs).
.
The Microsoft Windows 10 viewer as well as some other viewer apps seem to be opening just the Reduced-resolution image (jpeg?) embedded in the raw file and do not show the increased FOV as shown in darktable. However, CyberLink Power Media Player opens the original .dng file and shows the barrel distortion & 'bonus' FOV and looks exactly like what darktable shows. Is the camera/software causing the distortion??
.
The raw file is almost six times the size of the jpeg so much more data is available to potentially yield better pictures but the distortion is unacceptable. Any help appreciated!
 

Attachments

  • DNG vs JPG.jpg
    DNG vs JPG.jpg
    2.8 MB · Views: 446
JPG is processed (inside mavic) out of the RAW. By correcting the barrel distortion (deform + crop) you loose that extra FOV. No mistery
 
  • Like
Reactions: teebone and CJG
The barrel distortion correction is in the DNG file, but you need to open it with an image editor that understands it. Apparently darktable does not.
apparently Darktable do not applyes lens correction automatically. its a matter of settings... you can set any raw editor to not apply any automatic corrections...
 
apparently Darktable do not applyes lens correction automatically. its a matter of settings... you can set any raw editor to not apply any automatic corrections...

You can do that. Does that mean that you have fixed the distortion problem?
 
For now, I fixed it close enough. I added an xml correction file where all the others are stored & named it Hasselblad.xml
Here is what's in the file :

<lensdatabase version="1">
<camera>
<maker>Hasselblad</maker>
<model>L1D-20c</model>
<model lang="en">DJI Mavic 2 Pro</model>
<mount>l1d20c</mount>
<cropfactor>2.8</cropfactor>
</camera>
<lens>
<maker>Hasselblad</maker>
<model>L1D-20c &amp; compatibles</model>
<model lang="en">fixed lens</model>
<model lang="de">festes Objektiv</model>
<mount>l1d20c</mount>
<type>equisolid</type>
<cropfactor>2.8</cropfactor>
<aspect-ratio>3:2</aspect-ratio>
<calibration>
<distortion model="ptlens" focal="10" a="-0.05" b="0.14" c="-0.15"/>
</calibration>
</lens>
</lensdatabase>

Select Sterographic for geometry type.
Select autoscale (for this image it was 0.979)
Image attached & spending money every year on Lightroom not necessary. Perhaps in time, someone smarter than me will come up with better calibration numbers. Have fun & fly safe.
 

Attachments

  • darktable calibration fix.jpg
    darktable calibration fix.jpg
    1.4 MB · Views: 135
Last edited:
For now, I fixed it close enough. I added an xml correction file where all the others are stored & named it Hasselblad.xml
Here is what's in the file :

<lensdatabase version="1">
<camera>
<maker>Hasselblad</maker>
<model>L1D-20c</model>
<model lang="en">DJI Mavic 2 Pro</model>
<mount>l1d20c</mount>
<cropfactor>2.8</cropfactor>
</camera>
<lens>
<maker>Hasselblad</maker>
<model>L1D-20c &amp; compatibles</model>
<model lang="en">fixed lens</model>
<model lang="de">festes Objektiv</model>
<mount>l1d20c</mount>
<type>equisolid</type>
<cropfactor>2.8</cropfactor>
<aspect-ratio>3:2</aspect-ratio>
<calibration>
<distortion model="ptlens" focal="10" a="-0.05" b="0.135" c="-0.148"/>
</calibration>
</lens>
</lensdatabase>

Select Sterographic for geometry type.
Select autoscale (for this image it was 0.979)
Image attached & spending money every year on Lightroom not necessary. Perhaps in time, someone smarter than me will come up with better calibration numbers. Have fun & fly safe.

So your software will not apply the embedded lens correction - you mentioned above that it could be set to do that?
 
Where is there a LUT for this camera in lightroom?

DJI use to have this available on their site but doesn’t appear anymore. Luckily I saved a copy.


This is for COLOR correction of the D-log profile. A LUT cannot contain lens distortion correction information it is only a color LOOK UP TABLE
 
  • Like
Reactions: Betarider
I use lightroom which applyes automaticalky the lens profile embedded in the raw file. If im not happy with the result i add manually some correction. I think - 8 value is OK
You can do that. Does that mean that you have fixed the distortion problem?
 
DJI use to have this available on their site but doesn’t appear anymore. Luckily I saved a copy.


This is for COLOR correction of the D-log profile. A LUT cannot contain lens distortion correction information it is only a color LOOK UP TABLE

I think you will find that you are wrong.

A colour look up table is called a CLUT!

A LUT can be for anything. Including sine cosine and log values...

So long as the info is available, in a supplied chart or as an embed in the file itself, the info can be extracted and used by any enabled software.

That’s my understanding. Certainly works for me in Lightroom.

..
 
  • Like
Reactions: afarkas
could you please describe for me how to apply this LUT in Lightroom? Thanks

I think you will find that you are wrong.

A colour look up table is called a CLUT!

A LUT can be for anything. Including sine cosine and log values...

So long as the info is available, in a supplied chart or as an embed in the file itself, the info can be extracted and used by any enabled software.

That’s my understanding. Certainly works for me in Lightroom.

..
 
As far as I know, all raw editors use correction files that are included in the software. The software installs new profiles/correction files during updates. This is necessary because new cameras and lenses are constantly being developed. In the case of Lightroom they are probably .lcp or maybe lcr files. Other editors like darktable use .xml files. All of them are just extensible markup language files and are lens specific. I do not believe lens correction info is inside raw files. Adobe is big and popular so updates happen more frequently and quicker. Darktable is a open source, less popular editor and xml files are often not available for new lenses immediately.
 
As far as I know, all raw editors use correction files that are included in the software. The software installs new profiles/correction files during updates. This is necessary because new cameras and lenses are constantly being developed. In the case of Lightroom they are probably .lcp or maybe lcr files. Other editors like darktable use .xml files. All of them are just extensible markup language files and are lens specific. I do not believe lens correction info is inside raw files. Adobe is big and popular so updates happen more frequently and quicker. Darktable is a open source, less popular editor and xml files are often not available for new lenses immediately.

That question seems surprisingly difficult to find a definitive answer for. Some RAW processing software, such as DxO PhotoLab, clearly has custom lens files and lists supported camera/lens combinations. Others don't appear to do that. Some software opens DJI raw image files with the distortion corrected while other software doesn't. Is all the software that applies the correction simply reading the lens details from the EXIF and then using its own correction data, or is there basic correction data embedded in the raw image file? If they are using correction files that are in the software, then where do they get those from? DxO runs tests to construct theirs - do all the software makers do that?

Under Mac OS X, even Preview opens DJI raw files with correction applied, which suggests to me that the correction data (not just the lens identifier) has to be in the image file, but maybe not.
 
  • Like
Reactions: Inspirephil
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
130,593
Messages
1,554,203
Members
159,598
Latest member
fast54