# The automatic profile loader

Noise Ninja includes an automatic profile loader that selects the "best" noise profile when you open an image. It depends on profile annotations. When it is set up correctly, it works almost transparently. However, it is recommended that you read through this entire section to be aware of some of the requirements and idiosyncrasies of the auto loader.

The auto-profiler can be enabled or disabled via an option on the Profiles page of the Preferences dialog.

In a nutshell, here's how the automatic loader works:

1. The image is scanned for embedded EXIF data like Manufacturer, Model, ISO, sharpness, and about a dozen other attributes.
2. Given EXIF Manufacturer and Model values of <manufacturer> and <model>, respectively, the automatic loader looks in the Noise Ninja installation directory for a folder named NoiseProfiles/<manufacturer>/<model>. For instance, if the Manufacturer is "Canon" and the Model is "CanonEOS-1Ds", the automatic loader will look for a folder named "NoiseProfiles/Canon/CanonEOS-1Ds/" within the Noise Ninja installation directory.
3. If the folder exists, the automatic loader scans all profiles in the folder and all child folders, and it reads the annotation data for each profile. It identifies the profile with annotations that best match the attributes of the image. This profile is loaded automatically, and the title bar of the main window will display "Matched <profile>", where <profile> is the name of the loaded profile. All the scanned profile annotations are cached, so next time the same camera model is needed, they won't be loaded from disk again.
4. If the folder does not exist or if the matching process fails for some reason, the automatic loader will reuse the last profile that was loaded. In this case, the title bar will display "Using previous". This "previous profile" is remembered across invocations of Noise Ninja.

## How attributes are weighted

During the matching process, the Maker, Model, ISO, Exposure Correction, and Megapixels attributes normally carry the most weight. For film scans, the Film and Multisampling fields also carry high weight. Sharpness, saturation, and contrast have medium influence. The remaining fields normally have low influence, though it depends on the specific profile set and the magnitude of differences between values. For more information, see the discussion about "How many profiles do I need?".

## Required and optional attributes

Matching will fail if the Maker, Model, or ISO are undefined either in the image attributes (after default substitution) or in the profile annotations. Other attributes or annotations are optional, though missing values may cause a profile to earn a lower ranking during matching.

## Guidelines for using the profile loader

Once it is set up correctly, the automatic profiler can be very effective and convenient. To ensure that it works as expected, you should adhere to the following guidelines:

- In the Preferences dialog, make sure the you have checked the options for automatically creating profile directories, and for enabling the automatic profiler.
- If you download profiles from PictureCode or some other source, use the "Install noise profiles" function in the "File" menu to copy the profiles to the correct folder. The "Install noise profiles" function reads the Manufacturer and Model annotations in each profile and ensures that the profile is copied to the correct subdirectory in the NoiseProfiles folder.
- Make sure you have both read and write permission for the NoiseProfiles folder.
- When you annotate the Manufacturer and Model fields for a profile, try to use the Auto Fill button in the annotation dialog to initialize the fields directly from the image EXIF data. This will minimize the chance of typographical mistakes or other errors that might prevent the automatic loader from matching a profile to a camera.
- Look in the title bar to see whether the auto-loader succeeded. You will see "Auto matched" and the profile name in the title bar after a successful match. "Using Previous" means the match failed and the previous profile is being used. "New profile" means there was no previous profile, or the profile has been cleared.

## Keep it simple

In general, try not to make the matching process too difficult for the auto-loader. It has to optimize within a 15-dimensional space, and that is not always an easy thing to do. The auto-loader tries to make intelligent choices when there is not an obvious match, but this can lead to some non-intuitive results. For instance, if you only have profiles for 6 megapixel images, and you use the auto loader for a 3 megapixel ISO 1600 image, the auto loader might pick an ISO 800 profile. This is because the downsampling process used to create a 3-megapixel image from a 6-megapixel sensor also reduces noise levels. There are a number of relationships like this that the auto-loader attempts to consider. However, these relationships are most reliable when they do not involve large differences in parameter values.

So, to increase the reliability of the matching process, and to make it less likely that you will be confused by the automatic selections, try to use or create profile sets that are already well matched to your shooting preferences.

## Working with crops and reduced-size images

It is recommended that you work with full-size images instead of crops. This will avoid potential ambiguity in the profile matching process.

By default, Noise Ninja assumes that the dimensions of the image denote the full resolution, not a crop. It attempts to match this value against the Megapixels annotations of existing profiles. For instance, if you have profiles for both 3 megapixel images and 6 megapixel images from the same camera, then Noise Ninja will match a 3 megapixel image against the 3 megapixel profiles.

Downsampling reduces noise levels, but cropping does not change noise characteristics. So, if you try to filter a 3 megapixel crop from a 6 megapixel original image, Noise Ninja will match the wrong set of profiles.

If you work with reduced-resolution images, it is best to create profiles specifically for that resolution. Otherwise, Noise Ninja will select a higher-resolution profile, but it will try to select a lower ISO to compensate for the reduced noise in the downsampled image. For instance, if you have profiles for 6 megapixel images and then you open a 3 megapixel ISO 400 image, Noise Ninja might select a 6 megapixel, ISO 200 profile. This is probably a better choice than the 6-megapixel ISO 400 profile, but it might not be as good as a profile created specifically for 3-megapixel ISO 400 images.

## Other comments (and a note for Sony camera owners)

Distinguishing RAW from JPEG images: Each image has a Quality field that is set based on the file extension for the image. If the file extension is ".jpg" or ".jpeg", the Quality field is set to "JPEG". Otherwise it is set to "Tiff/RAW". The automatic profile loader interprets an image quality of "JPEG" to be the same as the "Fine JPEG" when it matches against the Quality annotation in a noise profile. So, if you shoot both RAW and JPEG images, you can create one set of profiles with a Quality annotation of "Tiff/RAW" and another set of profiles with a quality annotation of "Fine JPEG", and the automatic profile loader will use the Quality field of the image to select the appropriate profile.

Exposure Correction: The Exposure Correction annotation is currently specific to Adobe Capture Raw. It is extracted from XMP data that Capture Raw embeds in converted images. It corresponds to the amount of post-capture exposure adjustment. Since the adjustment is occuring after exposure, it can change the relationship between noise levels and tones. By default the auto loader treats Exposure Correction like an ISO boost or cut, and it will try to select a higher or lower ISO profile to compensate. If you feel that this is not realistic for your particular camera, you can create camera profiles that cover different combinations of ISO and Exposure Correction, and the auto loader will try to pick the combination with the closest match to the corresponding image attributes. (Note that in-camera "exposure compensation" changes the exposure, it does not change the relationship between noise levels and tones. So, it isn't necessary to profile for this separately, and there is not a separate profile annotation for it.)

Regional variations in EXIF data: Realize that the Model field for some cameras varies in different regions of the world. For instance, if you are using a camera bought in Asia with profiles created using the American version of the same camera, you might need to change the Model annotations in the profiles and re-save them (with the automatic directory naming function enabled).

Sony camera owners: Several Sony cameras use the same name -- "Cybershot" -- for the EXIF Model field. If you use one of these cameras, then you will need to go to the NoiseProfiles/Sony/Cybershot/ directory and move the profiles for other models to another directory.

Automatic profile naming: In the Preferences dialog there is an option to automatically name profiles, using a mnemonic scheme derived from the annotation values. This feature is not necessary to use the auto loader. The auto loader ignores the actual profile names. Instead, it looks at the annotations that are stored inside the profile. The automatic naming scheme may make it easier to distinguish different sets of profiles for the same camera. However, if you prefer another naming scheme, feel free to use it.

Proprietary or missing ISO data: Some cameras store ISO and other information in a proprietary, undocumented EXIF field called the MakerNote. Noise Ninja can read some MakerNote fields, but not for all cameras. Usually, it can find enough information to make a match. However, two things in particular can interfere. First, ISO information is sometimes removed by other software applications when it is stored in the MakerNote field. Second, the "Auto ISO" mode available on some cameras might not store the actual ISO used for an image in a place where Noise Ninja can read it.