Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 2d39bcee598a0e467ffbc6d3c9f88975 > files > 32

LibRaw-devel-0.9.1-9.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Purpose and Objectives</title>
  </head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1251">

  <body>
    <a href=index-eng.html>[back to Index]</a>
    <h1>LibRaw Project Goals and Objectives</h1>
    <h2>Contents</h2>
    <ol>
      <li><a href="#audience">Who May Be Interested in This Project</a></li>
      <li><a href="#goals">Goals and Objectives</a></li>
      <li><a href="#support">LibRaw Support Principles</a></li>
      <li><a href="#better">Implemented Improvements of dcraw</a></li>
      <li><a href="#todo">Planned Improvements</a></li>
    </ol>
    
    <a name="audience"></a>
    <h2>Who May Be Interested in This Project</h2>
    <p>The proposed project and the software products generated within this project are intended for</p>
    <ul>
      <li>Developers of RAW converters, including current and new developments</li>
      <li>Those willing to write their own graphic interface for RAW file processing</li>
      <li>Developers and enthusiasts creating their own primary and auxiliary data processing algorithms,
including
        <ul>
          <li>Interpolation (de-Bayer),</li>
          <li>Noise reduction</li>
          <li>White balance</li>
          <li>Correction of aberrations and distortions</li>
          <li>Color conversions (e.g., creation, editing and application of camera profiles )</li>
          <li>RAW data analysis</li>
          <li>Comparison of cameras and lenses</li>
          <li>and so on...</li>
        </ul>
      </li>
      </ul>
    <p>Among the few existing implementations of RAW converters, those based on the 
      <A  HREF="http://cybercom.net/~dcoffin/dcraw/">dcraw</A> utility by Dave Coffin are the most used.
It is hard to find a more or less popular camera that is not supported by this 
utility; while the implementation of RAW data extraction in dcraw is of
a very high quality.
    </p>
    <P>However, developers and enthusiasts who use or are going to use dcraw for
 	fulfilling the above-listed and similar objectives encounter a
	number of difficulties. First, the author of dcraw refuses to turn his
	product into a handy library, yet permitting anybody else to do so.
	Besides, dcraw contains a number of questionable features which may
	hinder its use without modifications, as well as instances of
	distortions in the photographic sense of it. As a result, once every
	several months, virtually all developers, part of them listed on the
    	dcraw Web site, independently convert each subsequent release of the
   	software into the library.
	</p>
    <p>
        As for enthusiasts, the "entry cost" of verifying their own ideas and
        implementing their own algorithms is often unreasonably high: they have
        to either use the dcraw command line, thus being forced to use the
        unavoidable early processing stages, or understand the source code and
        maintain their own library based on it.
    </p>
    <p>
        Thus, the inconveniences of dcraw make the developers' community quite
        small and halt further evolution and improvement of RAW format
        converters.
     </p>
    <a name="goals"></a>
    <h2>Goals and Objectives</h2>
    <p>We are going to create LibRaw in order to &quot;<b>get a library based on dcraw, only better</b>&quot;. Thus:
    </p>
    <ol>
      <li>To &quot;librarize&quot; dcraw, i.e., to develop a stable and consistent API suitable for other applications
  (RAW converters, data analyzers, panorama stitchers, etc.).
      </li>
      <li>To divide processing into independent parts (groups of API calls)
        <ul>
          <li> Reading, decoding, and unpacking of RAW data: <b>this is the main functionality of LibRaw</b></li>
          <li> Data conversions: interpolation, white balance, etc.</li>
          <li> File output of the processing results.</li>
        </ul>
        The latter two groups of functions are maintained primarily for dcraw  compatibility testing.
      </li>
      <li>To improve the procedures of RAW data retrieval and decoding (see below for details)
      </li>
      <li>To supply other developers with a &quot;framework&quot; (freeware and open-source), e.g.,
for experimenting with their own methods of RAW data processing 
(interpolation, noise reduction, white balance, etc.; some directions
of the possible efforts are <a href="#audience">listed above</a>), 
so that they could create their own GUI programs and interfaces without developing the entire RAW converter.</li>
      <li>To ensure easy modification for code synchronization with dcraw releases.</li>
    </ol>

    <a name="support"></a>
    <h2>LibRaw Support Principles</h2>
      <ol>
      <li>To reproduce the functionality of dcraw using its source code as the basis for our work; to
achieve binary identity of results generated by dcraw and by LibRaw-based utilities, provided the same processing settings are used.
      </li>
      <li>To eliminate the shortcomings of dcraw (see sections 
<a href="#better">Implemented Improvements of dcraw</a> and <a  href="#todo">Planned Improvements</a>).
      </li>
      <li>To monitor future improvements in dcraw (support of new cameras,  error correction, 
use of better algorithms) and import them from dcraw to LibRaw.
      </li>
      <li>API modifications: the <a href="#todo">planned improvements</a> will <b>require</b> extending
of the API. Such changes will be introduced in the form of large change-sets, 
while the compatibility mode supporting older
        applications based on the legacy API set will be preserved as long
        as possible.
      </li>
      </ol>

    <a name="better"></a>
    <h2>Implemented Improvements of  dcraw</h2>
    <p>
    As of the time of writing, additional improvements to the dcraw source
       code have been introduced into LibRaw:
	</p>
    <ul>
      <li>
        All global variables have been removed (while linking the
              thread-safe version, static variables of functions have been
              removed as well).
      </li>
      <li>Thread safety. An example of its use in the multithreaded model is included into the library distribution package.
      </li>
      <li>
      Data extracted from a RAW file is already somewhat structured:
      geometry is separated from color data.
        <i>This work has not yet been completed; it will be continued simultaneously with the
<a href="#todo">work on improvement of EXIF processing</a></i>.
      </li> 
      <li>Retrieval of RAW data and thumbnail can be performed in two or three API calls with a very simple
        program interface.
      </li> 
      <li>Work with color information: color data (white balance coefficients, tone curve, etc.) has flags referencing
        the source of this information: retrieved from RAW data, calculated 
        from the image itself, or taken from the code as constants.
      </li>
      <li>ICC profile is extracted (for those RAW files that contain it).</li>
      <li>The image itself and the thumbnail can be retrieved by successive calls, without reopening the file
        or relaunching the library. 
      </li>
      <li>The required amount of RAM is somewhat lower.</li>
      <li><b>Work with masked pixels and black subtraction:</b>: it is possible to turn off all data filtering 
	and black level subtraction.</li>
      <li><b>Processing of the black frame</b>: black subtraction and zero pixel cleaning already can be turned off. 
	Code for accurate black level calculation and banding suppression is planned.
      </li>
      <li>The maximum values may also be nonidentical for different channels; accordingly, these values
        are calculated at the stage of RAW data unpacking and output within the framework of the API. Calculation of
        the maximum values for a given camera sample at a specified sensitivity (converter calibration) is to be done
        in the application that calls LibRaw.
      </li>


    </ul>

    <a name="todo"></a>
    <h2>Planned Improvements</h2>
    <p>The dcraw code needs significant modifications and additions:</p>
    <ul>
      <li><b>Output of unpacked data in various memory layouts</b>: depending on the requirements of
the calling program, the results of RAW unpacking will be output in one of the following runtime-selected formats:
        <ul>
          <li>Four-component pixels (internal dcraw data format)</li>
          <li>Bayer format: 2D array with each element corresponding to a pixel in the matrix</li>
          <li>4 two-dimensional arrays (one per component).</li>
          </ul>
        </li>
      <li><b>Single-pass unpacking of RAW files containing several image variants/planes</b>: for applicable cameras
        (Fuji cameras, cameras with 4-shot/16-shot modes), several planes of the same image will be extracted.
        </li>

      <li><b>Data unpacking verifications for the widest possible set of file formats</b>. According to some studies, dcraw
does not completely ensure correct unpacking of some data formats.
      </li>

      <li><b>Processing of the EXIF/Makernote</b> data: retrieval of large data amounts, including
        <ul>
          <li>Extraction of the maximum possible amount of color data (white balance settings, 
            profile, tone curve, contrast settings, etc.)</li>

          <li>Color data generalization: reduction of color data from different cameras 
            &quot;to a common denominator&quot; in order to facilitate color processing (without loss of quality)</li>

          <li>Extraction of camera data  (firmware version, serial number)</li>

          <li>Extraction of photographic data (lens used, focusing distance, focus points and their coordinates, etc.)</li>

          <li>Extraction of the bulk EXIF data set without analyzing the structure in order to 
            facilitate copying of that EXIF data to output files.</li>
        </ul>
      </li>
      <li>Generalization of work with complex formats, including
        <ul>
          <li>RAW files from Fuji cameras (with two sets of sensors)</li>
          <li>RAW files from digital backs with 4-shot and 16-shot modes.</li>
        </ul>
      </li>
      <li>Technical improvements, including
        <ul>
          <li>Extraction of ICC profile (for those RAW files that contain it)</li>
          <li>Cutting down on the size of the allocated memory - in cases where post-processing will not be performed in the
same buffer as the one used for reading the RAW data.</li>
        </ul>
      </li>
    </ul>
    <p>At the same time, we are not planning any modifications or extensions of the dcraw data processing code
 (de-Bayer, color conversions, etc.); all of this is up to the calling application. Standard processing modes
     included in dcraw will be preserved for an indefinite time in the set
     of dcraw-emulating API calls, with the exception of LCMS and libjpeg
     support, as well as certain processing stages of minor importance.
    </p>

    <a href=index-eng.html>[back to Index]</a>
    <hr>
    <address><a href="mailto:info@libraw.org">LibRaw Team</a></address>
<!-- Created: Sun Mar 16 09:12:42 MSK 2008 -->
<!-- hhmts start -->
Last modified: Sun Mar 28 21:23:10 MSD 2010
<!-- hhmts end -->
  </body>
</html>