4

I'm attempting to pan sharpen four band images in Python with a higher resolution panchromatic band image.

I have imported them using GDAL and converted them to numpy arrays for the purpose of classification. While I'm not looking to classify the images that are pan-sharpened, I am looking to use them for comparison and display purposes.

Is there a way to re-sample the band arrays using the panchromatic array,

nmtoken
13.6k5 gold badges39 silver badges91 bronze badges
asked Feb 13, 2015 at 22:06

1 Answer 1

1

May be this is what you are looking for:

Using opencv library

height, width = img_ms.shape[:2]
img_resize=cv2.resize(img_ms ,None, fx=img_p.shape[1]/width, fy=img_p.shape[0]/height, interpolation=cv2.INTER_LINEAR)

img_p is the panchromatic image img_ms is the multispectral image This will resize the multispectral image to the exact dimensions of the panchromatic.

answered Nov 28, 2017 at 16:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.