harmonize_composite
Composite a foreground cutout onto a background scene, automatically matching colors and adding ground contact shadows for realistic integration.
Instructions
Harmonize and composite a foreground subject cutout onto a background environment scene image using Reinhard color statistics transfer in decorrelated lαβ space, background color temperature matching, and synthesized ground contact shadows.
• Purpose: Two-image compositing and photometric harmonization. Distinct from 'generate_relight_variations' which operates on a single image, this tool resolves color mismatches and grounding between two separate image sources. • Behavior: Mutates filesystem by writing 1 composited PNG image to the output cache directory. Deterministic, local execution, no network egress, no authentication required. • When to use: Use when placing a cutout product, character, or object onto a new background environment scene, ensuring realistic color adaptation and floor shadows. • When NOT to use: Do NOT use to relight a single standalone image (use 'generate_relight_variations'), or to analyze metrics alone (use 'analyze_optical_profile'). • Alternatives: Use 'generate_relight_variations' to alter lighting on a single image, or 'synthesize_diffusion_prompt' to craft inpainting prompts for seam blending.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blend_mode | No | Blending mode: 'seamless' (applies Reinhard color transfer + contact shadow + alpha blend) or 'alpha' (standard alpha composite with contact shadow only). Defaults to 'seamless'. | seamless |
| background_path | Yes | Path to target background scene image (.png, .jpg, .jpeg). | |
| foreground_path | Yes | Path to foreground subject image. Supports transparent PNG (with alpha channel) or solid background. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| status | Yes | Execution status. | |
| summary | Yes | Human-readable executive summary of the operation. | |
| evidence | Yes | ||
| warnings | Yes | Non-fatal warnings if applicable. | |
| nextActions | Yes | Actionable follow-up guidance. |