I have some satellite imagery data from Himawari 8 - one image is a mono image which is 500 metres per pixel image resolution and the other image is a visible RGB image which is 1km per pixel resolution - both are GeoTIFF files. I've tried using gdal_pansharpen to merge both images however it has a horrible dark output and there is no real way to get a nice image, so been looking at ImageMagick to do it instead. To do that, first the RGB image needs to be scaled up to 200% to match the resolution of the mono image, plus adjust the contrast. This step works fine:
IDE00435.202307240340.tif is the colour GeoTIFF image, 1km/pixel resolution IDE00409.202307240340.tif is the mono GeoTIFF image, 500m/pixel resolution
convert -level 20%,100%,2.0 -resize 200% IDE00435.202307240340.tif rgb-corrected.tif
Next step which I am not sure how do to do is to use the -colorize option for the convert command to overlay the resized RGB image onto the mono image using color and preserve luminance of the RGB image.
I have tried a few different commands to attempt this but not having much luck:
convert IDE00409.202307240340.tif rgb-corrected.tif -colorize 100% -composite pansharpen.tif
convert IDE00409.202307240340.tif rgb-corrected.tif -colorize 100% pansharpen.tif
convert -colorize 100% IDE00409.202307240340.tif rgb-corrected.tif pansharpen.tif
convert IDE00409.202307240340.tif rgb-corrected.tif -colorize 100% -composite pansharpen.tif
I could be going at this totally the wrong way - but happy for pointers :)
Cheers, Mike