====== ICA – Independent Components Analysis ====== {{ :intermediate_level:hoku_intermediate_ica.png?nolink&600| }} **What it does.** ICA reads a multiband image, computes an Independent Components Analysis transform from a user‑selected ROI, then applies that transform to the full input image. Use ICA when you want to separate statistically independent sources (e.g., underwriting vs. overtext/substrate) that may be mixed across bands. **When to use ICA vs. PCA/MNF (at a glance).** * **PCA** orders components by **variance**; higher‑order bands may reveal low‑contrast text (see PCA page). [[basic_level:pca_principal_components_analysis|PCA — Principal Components Analysis]] * **MNF** whitens noise first, then outputs bands that often decrease in image quality with band index (see MNF page). [[intermediate_level:mnf_minimum_noise_fraction|MNF — Minimum Noise Fraction]] * **ICA** aims to **unmix independent sources**, often isolating distinct writings/materials better than PCA/MNF in some cases. ===== Inputs ===== * **input** — multiband image (**Byte**, **Integer**, or **Float**). * **roi** — a windowed **Region of Interest** (ROI) from the *same* multiband image; used to **compute** the ICA transform. * The **number of bands** on *input* **must match** the number of bands on *roi*. Image sizes may differ. {{:intermediate_level:ica:roi_dialog.png?400|ROI dialog (example)}} *Hoku reads the image twice internally: first the ROI to estimate the transform, then the full image as **input** to receive the final transform.* **Choosing an ROI for ICA** * Pick an ROI that actually contains the features you hope to separate (e.g., underwriting + overtext). * Larger ROIs and more bands can make the transform more stable, but will **increase compute time**. * If separation looks unstable, try a slightly different ROI (position/size) and/or a different **nonlinearity** (below). ===== Parameters ===== ^ Parameter ^ Meaning ^ Default / Notes ^ | **nonlinearity** | Contrast function used by ICA. Options: **logcosh** (default), **kurtosis**, **gaussian**. | Start with **logcosh**; try others if separation is poor. | | **iterations** | Maximum iteration count for transform estimation. | **200** | | **tolerance** | Early stop when change in transform falls below threshold. | **1e‑8** | | **bandsOut** | Number of output bands to create. | By default equals number of input bands; you may request fewer. | {{:intermediate_level:ica:ica_arguments.png?480|ICA argument dialog (example)}} ===== Output ===== * **output image** (Float). * Bands are ordered by **decreasing 2‑D spatial coherence** (average correlation of each pixel with its neighbors to the right and below). * If you specify fewer output bands (e.g., *M*), Hoku outputs bands **0..M‑1**. {{:intermediate_level:ica:ica_components_grid.png?600|Example: ICA components grid}} > **Interpreting bands.** > Lower‑index ICA bands tend to emphasize spatially coherent structure (e.g., text strokes); higher‑index bands often show finer texture or noise. ===== How it works (very briefly) ===== ICA estimates a linear unmixing transform that produces statistically **independent**, typically **non‑Gaussian** components. The transform is computed from the **ROI** using the chosen contrast function (nonlinearity) and iterative updates until the **tolerance** is met or **iterations** is exceeded. Hoku then applies the final transform to the full **input** image. ===== Performance considerations ===== * More **bands** and/or larger **ROIs** → longer computation. * If convergence is slow or results look unstable, try a different **nonlinearity** and/or adjust the ROI. ===== Data types ===== * **input:** Byte, Integer, or Float * **output:** Float ===== See also ===== * [[basic_level:pca_principal_components_analysis|PCA — Principal Components Analysis]] * [[intermediate_level:mnf_minimum_noise_fraction|MNF — Minimum Noise Fraction]] * [[introduction:hoku_levels|Hoku Levels (ICA is an Intermediate tool)]]