skills/cv/brovey-pansharpening/SKILL.md
Fuse low-resolution multispectral bands with a high-resolution panchromatic band using the Brovey transform to produce sharp multi-band imagery
npx skillsauth add wenmin-wu/ds-skills cv-brovey-pansharpeningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Satellite sensors capture high-resolution panchromatic (single-band) and lower-resolution multispectral images. Pansharpening fuses both to get high-resolution color imagery. The Brovey transform normalizes each band by a weighted sum, then multiplies by the panchromatic intensity. This preserves spectral ratios while injecting spatial detail.
import numpy as np
from skimage.transform import rescale
def brovey_pansharpen(ms_bands, pan, nir_weight=0.1):
R, G, B, NIR = ms_bands
dnf = (pan - nir_weight * NIR) / (
nir_weight * R + nir_weight * G + nir_weight * B + 1e-10)
sharp = np.stack([R * dnf, G * dnf, B * dnf, NIR * dnf], axis=-1)
return np.clip(sharp, 0, None)
ms_upscaled = np.stack([
rescale(ms[i], 4, order=3) for i in range(4)], axis=-1)
ms_upscaled = ms_upscaled[:pan.shape[0], :pan.shape[1]]
result = brovey_pansharpen(
[ms_upscaled[..., i] for i in range(4)], pan)
data-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF