以全极化和RGB多光谱数据为例,采用HSV方法,对 多光谱和SAR融合流程如下:
- We first convert our quad-polarized 4-channel SAR data to single channel by calculating the total polarimetric scattering power for each pixel. When working with polarimetric radar, this is known as a calculating the ‘SPAN’ or creating a SPAN image.
- We then convert our RGB image and transform it to the HSV color space and swap the value channel with our single-channel SAR span image.
- Finally, we convert the [Hue, Saturation, SAR SPAN] image back to RGB color space
参考:
光学和SAR数据融合与可视化:
SpaceNet 6: Data Fusion and Colorization - In-Q-Tel
代码:
核心融合代码:
import skimage.color as color
def fusion(rgb, sar, method='hsv'):
# Get rgb_bands
R = rgb[:,:,0] # red
G = rgb[:,:,1] # green
B = rgb[:,:,2] # blue
image = None
if method == 'simple_mean':
r = 0.5 * (0.5*R + sar)[:, :, np.newaxis]
g = 0.5 * (0.5*G + sar)[:, :, np.newaxis]
b = 0.5 * (0.5*B + sar)[:, :, np.newaxis]
image = np.concatenate([r,g,b], axis=2)
if method == 'hsv':
hsv = color.rgb2hsv(rgb)
hsv[:,:,2] = sar
image = color.hsv2rgb(hsv)
return image