We have a pan-sharpening tool, but it was written a while ago, and I am not fully sure how it works. Here's the doc:
https://stereopipeline.readthedocs.io/en/latest/tools/pansharp.htmlMy best guess would be that it would work as follows:
- Run stereo with PAN images. Likey stereo with 1st and 3rd image (with highest stereo convergence angle) will give best results. Stereo with mapprojected images is highly recommended, and using the asp_mgm algorithm (the doc has the info).
- Avoid bundle adjustment for now, because pan-sharpening would involve both PAN and multi-spectral images, I think, and then they all better be bundle-adjusted together or not.
- Mapproject onto the produced stereo DEM the left PAN image at the known GSD as inferred from image metadata.
- Mapproject onto the same DEM the left multispectral image (pick a band first, it can be pulled out with gdal_translate -b). Use the known GSD for the multispectral image. Use the multispectral camera (not sure now how this works for Pleiades, but I think they provide all this).
If these two images have big registration errors between themselves or other problems, likely pansharpening will fail. My best guess is that also need to mapproject onto the same extent, using the option --t_projwin.
It may also be best if the multispectral image GSD is say 4x or 2x PAN image GSD, but I don't know if that is important. Maybe it interpolates properly in either case, if the mapprojected images agree if overlaid with georef info such as in a GIS program.
If all good so far, pansharpening can happen. I think this tool expects an RGB image, not multispectral. So one has to go back to the original multispectral image, pull 3 bands, not 1 as before, with gdal_translate -b 1 -b 2 -b 3 (or so, not sure). Then mapproject.
It is good to inspect the produced PAN mapprojected and RGB mapprojected image. Then call this tool.
I hope it works, but no guarantees.