# Analyze Tab

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FNHvj7puWAH8eQRgl1CGL%2Fimage.png?alt=media&#x26;token=eca2d90a-5780-412c-bb8e-4460b71d4945" alt=""><figcaption></figcaption></figure>

## Open Image File or Folder to Analyze

To start analyzing images press the "Open File" or "Open Folder" button and select an image or folder of images to analyze.

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FD0dwL1bGH9ZCTPcdT3LI%2Fimage.png?alt=media&#x26;token=9425348e-307b-4007-a5e9-a42c6953cdb0" alt="" width="563"><figcaption></figcaption></figure>

The image will open in the image view box:

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2F9DYmaJ9lrqTuZJ89WrHZ%2Fimage.png?alt=media&#x26;token=6c5e681e-4050-4a78-a751-90985c5cceb3" alt="" width="563"><figcaption></figcaption></figure>

The above [MAPIR Survey3W RGN](https://www.mapir.camera/collections/survey3/products/survey3w-camera-red-green-nir-rgn-ndvi) example image shows our [Diffuse Reflectance Standard Calibration Target Package (T4-R50)](https://www.mapir.camera/collections/multispectral-reflectance-reference-calibration-targets/products/diffuse-reflectance-standard-calibration-target-package-t4-r50) laying on top of some grass. Our [DAQ-M](https://www.mapir.camera/collections/daq-m) light sensor was installed in the T4-R50 housing to record the ambient light spectrum. The Survey3 camera was handheld during image capture, from about 1 meter distance. There are regions in the grass ranging from dirt, to lower health grass, to higher health grass.&#x20;

This 16-bit TIFF image was previously converted from RAW+JPG and calibrated for percent reflectance using the [Process tab](https://mapir.gitbook.io/mapir-camera-control-mcc/interface-tabs/process-tab) in MCC.  The csv log file from the DAQ-M light sensor was used during calibration to account for the ambient light spectrum distribution.

## Navigation Buttons

Above the image viewer to the left side you will find the navigation buttons (from left to right):

"Toggle Left"     -     "Toggle Right "    -     "Zoom Out"     -     "Zoom In"    -    "Zoom to Fit"

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2F16o3QS4vGtzJBM5AgRTK%2Fimage.png?alt=media&#x26;token=ebd5fd29-96d7-4490-a139-23012d9b8ec9" alt=""><figcaption><p>Toggle Left     -     Toggle Right     -     Zoom Out     -     Zoom In    -    Zoom to Fit</p></figcaption></figure>

Click the left < and right > "Toggle" buttons  to cycle through the other images in the input folder. The same index and LUT will be applied to the other images as well.

Pressing the - and + "Zoom" buttons will zoom in and out of the displayed image.

Pressing the <--> "Zoom to Fit" button will scale the image back to the default fit zoom and centered.

Clicking and holding the cursor on the image while dragging around will pan the image around.

## Function Buttons

Above the image viewer to the right side you will find the function buttons (from left to right):

"Pixel Percent"     -     "Layers"     -     "Save"

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FzLyky6u7QfgsHI2mlMel%2Fimage.png?alt=media&#x26;token=5064455f-d5dd-4a60-83fe-9b6da5a6d2cf" alt=""><figcaption><p>Pixel Percent     -     Layers     -     Save</p></figcaption></figure>

Clicking the "Pixel Percent" button and enabling it (green) converts the pixels at the cursor to percent.

Click the "Layers" button to open the [Layers Window](#layers-window).

Click the "Save" button to open the [Save images Window](#saving-images).

## Pixel Values

As you move the mouse cursor around the image the current pixel values are shown in the value rows to the right of the image, and above the value legend scale.

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FoEAWbnGA6jglnYYGTSz5%2Fimage.png?alt=media&#x26;token=cb144e24-3ea2-48ad-885d-a4b834e0608d" alt=""><figcaption></figcaption></figure>

The values represent the pixel value for the pixel at the cursor location in each of the 3 image channels. The value range matches the images' bit depth.

Enabling the "Pixel Percent" button will convert the pixel values to percent.&#x20;

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FAyU3t7De493xuTJS32hM%2Fimage.png?alt=media&#x26;token=0218de48-cfe1-4953-8b11-1b6faded1a18" alt=""><figcaption></figcaption></figure>

If the images have been calibrated using [MAPIR's calibration targets](https://mapir.gitbook.io/mapir-camera-control-mcc/calibration-targets) the resulting processed pixels will represent percent reflectance.&#x20;

When the Index and LUT images are visible the cursor values represent the index image's pixel value:

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FfdoIBNVqChF7Y2CNiB3P%2Fimage.png?alt=media&#x26;token=c9562797-f31e-439b-adf7-51368ca3b09d" alt=""><figcaption></figcaption></figure>

## Layers Window

Press the "Layers" button to open the Analyze Layers Window:

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FkzQy7rR3DZSUxaz3KdEV%2Fimage.png?alt=media&#x26;token=1e89655a-3bb8-49f6-ad8f-4cd15ca6e2fe" alt=""><figcaption></figcaption></figure>

The NDVI button opens the Raster Index Calculator Window.

The Square Gradient Lut button opens the Gradient (LUT) window.

When the windows are active the left eye buttons can be toggled to show or hide the Index and Lut image layers.

## Raster Index

To apply a raster index equation, such as the NDVI index to the image, open the 'Raster Index Calculator" pop-up window. Select an [index formula name](https://mapir.gitbook.io/mapir-camera-control-mcc/multispectral-index-formulas) from the Index dropdown.

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FsJHQ2IKDcgVpXKWkYfK1%2Fimage.png?alt=media&#x26;token=0be503fb-985d-408d-9be8-ad7eabbbb67c" alt="" width="563"><figcaption></figcaption></figure>

Selecting an index from the "Index:" drop-down will display the index formula photos. The top photo shows the index formula with the X, Y, Z variables and the bottom photo shows the common colors to choose for those variables. The NDVI example above shows that we matched Y = NIR and X = Red.

Press the "Apply" button in the Raster Window to see the opened image update with the index formula.

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FVfFJ4I77oEo5sVZH3BRp%2Fimage.png?alt=media&#x26;token=a6c9eae7-5216-43f2-add7-8cdeb5c464b2" alt=""><figcaption></figcaption></figure>

On the right side you can see the pixel legend. The name at the top of the legend shows the index name that was used (NDVI), and the numbers represent the pixel value range (minimum to maximum) of the image. In our example the pixels range from -0.12 to 0.83. These are the minimum and maximum pixel end-points.&#x20;

The grayscale gradient image next to the pixel scale shows the color associated with the corresponding pixel value. This is commonly called a LUT, or "Look Up Table". The minimum value is set to black color and the maximum is set to white pixel. A gradient map is then applied to the pixels in between, with a medium gray representing a value 50% (half-way) between the minimum and the maximum.

Looking at the NDVI index image you can see the surrounding grass is mostly composed of white pixels, since the NDVI index correlates a higher NDVI value with healthy vegetation that is reflecting a lot of near infrared (NIR) light. The dirt shows up as grey since it does not reflect as much NIR light.

## LUT Color Gradient

Let's apply a new color gradient LUT (Look Up Table) to the pixels so it is easier to see the contrast in the image. Contrast is the difference between the black and white pixels.

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FiLieaAP5Jx28QQc4Vzju%2Fimage.png?alt=media&#x26;token=31bac78b-0da8-4166-b33a-93f43ab2e59a" alt=""><figcaption></figcaption></figure>

In the Analyze Layers Window press  the "Gradient (LUT)" button to open the Gradient (LUT) window:

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2Fr3aFCyuraE7tf0yk3WiD%2Fimage.png?alt=media&#x26;token=fca066ac-60a8-4dab-a0ea-5d249c03c6d7" alt="" width="375"><figcaption></figcaption></figure>

Looking again at our sample test image, the colors are now applied to the index image.

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FXbHAqOgHc8UaDYD1Lo91%2Fimage.png?alt=media&#x26;token=f05a201f-b474-4340-9414-fc6711452814" alt="" width="563"><figcaption></figcaption></figure>

### Gradient LUT Color Dropdown

Adjust the starting color gradient in the top left dropdown.

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2Fo5vRpvDgKgHQx28Sy0MB%2Fimage.png?alt=media&#x26;token=6ba0010c-6e8e-4c57-acac-eb847d6882ac" alt="" width="563"><figcaption></figcaption></figure>

### Classes Dropdown

The classes adjust the number of colors used in the gradient LUT. The more classes the higher the contrast, the less classes the lower the contrast between pixel regions.

### Clip Dropdown

When the minimum value is increased, or the maximum value is decreased, you are clipping/cutting off the pixels outside that inner clipped range. The pixels that are clipped/cut off can then have their value changed to something else. Those are the clip options explained below:

#### LUT Minimum/Maximum

Pixels outside the clipping range will be set to the LUT default minimum and maximum pixel color. For the Red-Yellow-Green LUT, lower valued pixels are all set to red, and higher valued to green.

#### Transparent

Pixels outside the clipping range will be set to transparent (see-through). This is useful to overlay the output image in other image applications, such as as a raster layer in a GIS application.

#### Background Index

Pixels outside the clipping range will be set to the pixels from the raster index image. Basically setting the LUT back to the default grayscale for only those pixels.

#### Background Original

Pixels outside the clipping range will be set to the pixels from the original image. This is a common option for us to use ourselves, as it tends to easily highlight the contrast we're looking to show.

### Adjusting LUT Colors

If you want to edit the colors used in the LUT gradient, the colored squares to the left of the LUT values can be clicked. Select a new color in the window that opens and the color will then update your LUT gradient.

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FOVwH437tu565ckDck195%2Fimage.png?alt=media&#x26;token=a0699cdb-8927-438a-be28-7739b683cd3e" alt="" width="375"><figcaption></figcaption></figure>

### Adjusting Values Range Minimum / Maximum

The green boxes around the top and bottom values show which text fields can be edited. You can edit the min and max and the other values in the range will be automatically adjusted. When pixel values fall outside the adjusted min/max values, the pixels will follow the Clip dropdown option selected.

## Saving Images

The "Save" button allows you to output the various formats of the analyzed image. Pressing the "Save" button icon you see the following options in the Save Image Window:

<figure><img src="https://2599555469-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo044KN3Ws0uIDvOmSkcR%2Fuploads%2FBnNVyRqnazhzLT5F3OhZ%2Fimage.png?alt=media&#x26;token=3d418e17-e9cb-4370-8eec-5d2ad1b84774" alt="" width="563"><figcaption></figcaption></figure>

The "Browse..." button selects the output folder to save the images to.

Selecting the "Save Index Image" option saves the processed raster index images.

Selecting the "Save LUT Image" option saves the processed LUT color images.

The drop-down allows you to choose whether you will save the open image or the entire input folder of images.

Once you have made your save option choices press the "Save" button to save the images. A progress bar will show to the right of the Cancel button while it is saving the images.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mapir.gitbook.io/mapir-camera-control-mcc/interface-tabs/analyze-tab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
