# Hidden Conversions

**URL:** <https://community.wolfram.com/t/hidden-conversions/7553>\
**Category:** Questions\
**Tags:** image-processing, mathematica, import-and-export\
**Created:** [December 29, 2015, 12:15am UTC](https://community.wolfram.com/t/hidden-conversions/7553 "2015-12-29T00:15:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![waltfrench](https://avatars.discourse-cdn.com/v4/letter/w/ce7236/32.png) [@waltfrench](https://community.wolfram.com/u/waltfrench)\
**Post date:** [December 29, 2015, 12:15am UTC](https://community.wolfram.com/t/hidden-conversions/7553/1 "2015-12-29T00:15:33Z")

</div>

I’m quite pleased with the conversions that Mathematica uses when importing (Canon) RAW image files, e.g.,  
RI = Import[“/IMG\_6257.CR2”, “RawImage”]  
and  
RJ = Import[“/IMG\_6257.CR2”, “Image”].

(The former brings in the sensor data essentially exactly as my camera recorded it into the CR2 file; the latter converts that info into an attractive, gamma corrected image.)

I’ve been able to reverse engineer the conversions partially. E.g., I have formulas that accurately predict the **Image** values for each of R, G and B, given the **RawImage** data of nearby values.  
But other areas of greatest interest to me, specifically for points with low luminosity where the general formula is not computable, and the interpolation functions for areas of small details, escape me.

Can anybody steer me to documentation of what is going on? I’ve scoured the web for standard approaches, but it seems Mathematica is using some unique approaches to make nice, appropriate-contrast images.

---

<div class="post-metadata">

**Author:** ![piotrw](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/piotrw/32/6225_2.png) [@piotrw](https://community.wolfram.com/u/piotrw)\
**Post date:** [January 4, 2016, 2:54pm UTC](https://community.wolfram.com/t/hidden-conversions/7553/2 "2016-01-04T14:54:04Z")

</div>

Mathematica uses libraw library: [http://www.libraw.org/](http://www.libraw.org/).

---

<div class="post-metadata">

**Author:** ![waltfrench](https://avatars.discourse-cdn.com/v4/letter/w/ce7236/32.png) [@waltfrench](https://community.wolfram.com/u/waltfrench)\
**Post date:** [January 4, 2016, 5:33pm UTC](https://community.wolfram.com/t/hidden-conversions/7553/3 "2016-01-04T17:33:16Z")

</div>

Many thanks!
