app
Image Enhance
Image Enhance builds an ordered, reversible processing history for one image or a batch and exports the resulting images with the exact step sequence.
Requirements And Launch
All processing uses MATLAB and repository-owned code.
labkit_ImageEnhance_app
Inputs And Batch Mode
Add supported image files or a folder. In Batch shared processing mode, one shared step history is applied to every source. When batch mode is off, each image keeps a separate history and optional white ROI. Selecting another image updates the preview without recalculating unrelated files.
Basic Workflow
- Load images and select a representative source.
- Decide whether steps are shared across the batch.
- Choose a tool and set its controls.
- For White ROI calibration, draw the white-background ROI first.
- Apply the tool to history and inspect Enhanced, Original, or Before | After.
- Undo or reset history as needed.
- Choose output format/folder and export.
Each Apply tool action saves one processing step. Panner changes preview the pending tool without changing the saved history until Apply tool is chosen. ROI creation and overlay refresh preserve the current zoom.
Tools And Defaults
| Tool | Primary control | Secondary control |
|---|---|---|
| Brightness/contrast | Brightness 0% | Contrast 15% |
| Local contrast | Clarity 30% | Radius 12 px |
| Sharpen | Sharpen 35% | Radius 1.5 px |
| Hue/saturation | Hue 0 degrees | Saturation 10% |
| White balance | Strength 100% | Temperature 0% |
| White ROI calibration | Strength 100% | White target 92% |
| Subject-preserving enhance | Strength 70% | Background target 90% |
Processing converts input to RGB double in [0,1], applies steps in table order, and clamps the final image. Brightness, local contrast, sharpening, hue/saturation, and gray-world white balance call the linked labkit.image primitives.
White ROI calibration requires a valid rectangle for every affected image. It builds a softened background mask from the rectangle and adjusts luminance toward the target while limiting subject changes. Subject-preserving enhance estimates a low-saturation bright background automatically and uses a whole image fallback only when no usable background support is found.
History And Reproducibility
The history table records step kind and settings in execution order. Undo history removes the latest applied step; Reset history returns to the normalized original. Source images are not modified. Shared and per-image histories are stored separately in project state so switching batch mode does not ambiguously merge them.
Outputs
Export supports PNG, TIFF, and JPEG. Each output is rendered from the source plus its effective stored pipeline, not from a downsampled preview. The export manifest records source, ordered steps, ROI geometry, batch mode, format, and output filename. A LabKit result JSON records the complete output set and the project parameters used to create it.
Use Without The GUI
steps = [ ...
image_enhance.analysisRun.makeStep("Brightness/contrast", 0, 15), ...
image_enhance.analysisRun.makeStep("Local contrast", 30, 12), ...
image_enhance.analysisRun.makeStep("Sharpen", 35, 1.5)];
output = image_enhance.analysisRun.applyPipeline(imread("source.png"), steps);
imwrite(output{1}, "enhanced.png");
Project And State
Saved projects keep portable source references, shared and per-image step histories, white-reference ROIs, export settings, and compact result metadata. Full-size pixels and downsampled previews are loaded again from the selected source when a project opens rather than embedded in the project.
An empty launch does not choose an output directory. Adding images establishes the source-adjacent default; Choose folder remains available before export.
Errors And Limitations
- Unknown step labels are rejected.
- Reopening a project with an existing unreadable image aborts restore and preserves the current document instead of displaying an empty preview.
- White ROI calibration fails when a required image has no valid ROI.
- Enhancement changes pixel values and can invalidate quantitative intensity analysis; retain the source and manifest.
- JPEG export adds lossy compression after processing.
Related Topics
Functions And API
Open a function for exact MATLAB syntax, arguments, outputs, behavior, and source.
| Function | Purpose |
|---|---|
image_enhance.analysisRun.applyPipeline | Replay an ordered non-destructive image enhancement history. |
Change history
- 2026-07-20 - App actions require explanatory hover helpfeat | compatible
- 2026-07-19 - App SDK explicit contract replaces the retired UI runtimerefactor | breaking
- 2026-07-17 - Project restore distinguishes missing sources from damaged sourcesfix | compatible
- 2026-07-17 - Explicit layout action contractrefactor | compatible
- 2026-07-16 - Image App project validation ownershiprefactor | compatible
- 2026-07-16 - Runtime-owned session defaults across App familiesrefactor | compatible
- 2026-07-16 - Image Enhance assigns state helpers to workflow capabilitiesrefactor | compatible
- 2026-07-16 - Image Apps stop creating invalid placeholder outputsfix | compatible
- 2026-07-16 - UI 7 public runtime boundaryrefactor | breaking
- 2026-07-15 - Runtime V2 lifecycle ownership across the app fleetrefactor | breaking
- 2026-07-13 - MATLAB-compatible image conversion APIrefactor | breaking
- 2026-07-13 - Base-MATLAB image compatibilityfeat | compatible
- 2026-07-09 - Default LabKit close protectionfix | compatible
- 2026-07-06 - UI 5 facade redesign, app migration, and plot refreshrefactor | breaking
- 2026-07-03 - CSC export and viewport policyfeat | compatible
- 2026-07-03 - UI groups migrationrefactor | compatible
- 2026-07-03 - App file-selection and electrochem control fixesfix | compatible
- 2026-07-03 - Declarative app runtimerefactor | compatible
- 2026-07-01 - Debug sample packsfeat | compatible
- 2026-07-01 - Image app workflow improvementsfeat | compatible
- 2026-06-30 - Shared image facadefeat | compatible
- 2026-06-30 - Migration helper cleanuprefactor | compatible
- 2026-06-30 - App alerts through UI facadefeat | compatible
- 2026-06-30 - Close guards and caught-exception diagnosticsfeat | compatible
- 2026-06-30 - Output folder promptsfeat | compatible
- 2026-06-29 - Tool-panel hosts and image app fixesfix | compatible
- 2026-06-29 - Protected image enhancement workflowsfeat | compatible
- 2026-06-28 - App diagnostics and hardened UI workflowsfeat | compatible
- 2026-06-24 - File-panel migrationrefactor | breaking
- 2026-06-23 - Version metadata baselinefeat | compatible