LabKit MATLAB Workbench

reference

API ReferenceImage Match

image_match.analysisRun.applyPipeline

Replay ordered reference-match steps over source images.

Syntax

processed = image_match.analysisRun.applyPipeline(images, steps) processed = image_match.analysisRun.applyPipeline( ... images, steps, referenceImage)

Description

Normalizes each source image and applies the ordered reference-match history independently to every source. A step sees the output of the preceding step. The reference image is normalized once, remains separate from the source batch, and is never included in the returned cell array.

Inputs

images
One numeric image or a cell array of source images. Each source is converted to RGB double data in [0,1]. Cell order is preserved.
steps
Structure array created by image_match.analysisRun.makeStep. Steps are reshaped to a column and executed in array order. An empty array performs source normalization only.
referenceImage
Optional numeric reference image. Its dimensions may differ from the sources. Empty or omitted input makes every match step a no-op after source normalization. Default: [].

Step Fields

kind
History category; makeStep sets it to "Reference match".
matchMethod
"Balanced", "White balance", "Tone only", "Protected tone", "Lab style", or "Histogram".
amount
Overall match blend percentage.
secondary
Tone-match percentage.
colorStrength
Color-match percentage.
label
Display text retained for history and export; it does not control the calculation.

Outputs

processed
Column cell array containing only processed source images. Each entry is an M-by-N-by-3 double image in [0,1] and keeps its own source height and width.

Failure Behavior

Empty images returns an empty cell column; empty steps or referenceImage performs normalization only. An invalid image container, unsupported image value, or malformed step propagates the originating normalization or applyMatch error and no partial output is returned.

Example

sourceA = cat(3, 0.2*ones(6), 0.4*ones(6), 0.7*ones(6));
sourceB = 0.6*ones(4, 5);
reference = cat(3, 0.7*ones(8), 0.5*ones(8), 0.3*ones(8));
step = image_match.analysisRun.makeStep("Balanced", 75, 100, 80);
processed = image_match.analysisRun.applyPipeline( ...
{sourceA, sourceB}, step, reference);
assert(numel(processed) == 2 && isequal(size(processed{2}), [4 5 3]))

Source

This page is generated from the MATLAB help text in apps/image_measurement/image_match/+image_match/+analysisRun/applyPipeline.m.