How to pan sharpen an image

Pan sharpening an image

By using a higher resolution of a single-band image, you can fuse with a multiband image of the same scene to increase the spatial resolution. See the following code example:
static void PanSharpening(IRasterDataset panDataset, IRasterDataset multiDataset)
    throws Exception{
    //panDataset, a RasterDataset created from a single band higher resolution image
    //multiDataset, a RasterDataset created from a multiband image

    IRaster2 panRaster = new IRaster2Proxy(panDataset.createDefaultRaster());
    IRaster2 multiRaster = new IRaster2Proxy(multiDataset.createDefaultRaster());

    //set parameters
    IPansharpeningFilter pansharpenFilter = new PansharpeningFilter();
    pansharpenFilter.setPanImageByRef(new IRasterProxy(panRaster));
    pansharpenFilter.putWeights(0.166, 0.167, 0.167, 0.5);

    //set the pansharpen filter to Raster
    IPixelOperation pixelOperation = new IPixelOperationProxy(multiRaster);
    pixelOperation.setPixelFilterByRef(new IPixelFilterProxy(pansharpenFilter));

    //save the result
    ISaveAs saveas = new ISaveAsProxy(multiRaster);
    saveas.saveAs("c:\\temp\\pansharpen_output.img", null, "IMAGINE Image");

Development licensingDeployment licensing
ArcGIS for Desktop AdvancedArcGIS for Desktop Advanced
ArcGIS for Desktop StandardArcGIS for Desktop Standard
ArcGIS for Desktop BasicArcGIS for Desktop Basic
Engine Developer KitEngine