<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.15"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>lensfun: Adding new cameras to the database</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], }); MathJax.Hub.Config({ messageStyle: "none" }); </script><script type="text/javascript" async="async" src="http://lensfun.sourceforge.net/mathjax/MathJax.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">lensfun  <span id="projectnumber">0.3.2.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div class="PageDoc"><div class="header"> <div class="headertitle"> <div class="title">Adding new cameras to the database </div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><p>Adding new cameras is very easy. You just have to know its crop factor, and the EXIF identification strings for this camera; that's all.</p> <p>If you don't know the crop factor, you can search in google for e.g. “Nikon D300 sensor size”. Let's suppose you found out that your sensor size is 23.6 × 15.8mm. Now compute the length of the diagonal using Pythagora's theorem:</p> <p class="formulaDsp"> \[ d = \sqrt{23.6^2 + 15.8^2}\,\mathrm{mm} = 28.4\,\mathrm{mm} \] </p> <p>Now you just divide the magic number 43.27 (the diagonal of a usual 35mm film frame) by the number you got:</p> <p class="formulaDsp"> \[ \mathrm{cropfactor} = \frac{43.27}{28.4} = 1.523 \] </p> <p>Now you must find out the identification string for your camera from EXIF data. For this you can use the exiv2 script:</p> <pre class="fragment"> $ exiv2 blah.nef .... Camera make : NIKON CORPORATION Camera model : NIKON D300 .... </pre><p>Now you can create a XML entry for your camera:</p> <pre class="fragment"> <camera> <maker>Nikon Corporation</maker> <maker lang="en">Nikon</maker> <model>Nikon D300</model> <model lang="en">D300</model> <mount>Nikon F AF</mount> <cropfactor>1.523</cropfactor> </camera> </pre><p>Now add this definition to a XML database file along Lensfun database search path and your camera will be detected and Lensfun will work properly with images produced by it.</p> <ul> <li> <a class="el" href="el_camera.html">Declaring cameras: <camera></a> </li> </ul> </div></div><!-- PageDoc --> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Thu Oct 3 2019 15:07:50 for lensfun by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.15 </small></address> </body> </html>