rohit18 / dredn Goto Github PK
View Code? Open in Web Editor NEWDownscaling 500m and 1000m MODIS spectral bands to 250m
Downscaling 500m and 1000m MODIS spectral bands to 250m
Hi, I am trying to perform ATPRK to downscale a satellite image. The image to be downscaled has 460m while the covariate I am using has 100m pixel size (so the scale factor is 4.6).
I already perform the downscaling in R without accounting for the PSF. But the problem is that in R there isn't any package/library that downsamples an image using a Gaussian filter.
Matlab:
When I try to downsample the covariate to match the pixel size of my coarse resolution image I am getting all sorts of errors. Here is an example of the errors I am getting:
Error using [repmat](matlab:matlab.internal.language.introspective.errorDocCallback('repmat'))
Replication factors must be a row vector of integers or integer scalars.
Error in [Extend_plane](matlab:matlab.internal.language.introspective.errorDocCallback('Extend_plane', '/MATLAB Drive/z/Copy_of_Code-for-S2-fusion-master/Extend_plane.m', 2)) ([line 2](matlab: opentoline('/MATLAB Drive/z/Copy_of_Code-for-S2-fusion-master/Extend_plane.m',2,0)))
Z_extend1=[repmat(Z(:,1),[1,w]),Z,repmat(Z(:,end),[1,w])];%%%extend columns
Error in [dowmsample_plane](matlab:matlab.internal.language.introspective.errorDocCallback('dowmsample_plane', '/MATLAB Drive/z/Copy_of_Code-for-S2-fusion-master/dowmsample_plane.m', 2)) ([line 2](matlab: opentoline('/MATLAB Drive/z/Copy_of_Code-for-S2-fusion-master/dowmsample_plane.m',2,0)))
plane=Extend_plane(plane,w*s);
Error in [ATPRK_PANsharpen](matlab:matlab.internal.language.introspective.errorDocCallback('ATPRK_PANsharpen', '/MATLAB Drive/z/Copy_of_Code-for-S2-fusion-master/ATPRK_PANsharpen.m', 7)) ([line 7](matlab: opentoline('/MATLAB Drive/z/Copy_of_Code-for-S2-fusion-master/ATPRK_PANsharpen.m',7,0)))
PAN_upscaled=dowmsample_plane(PAN,s,w,PSF);
Error in [ATPRK_for_pan_sharpening](matlab:matlab.internal.language.introspective.errorDocCallback('ATPRK_for_pan_sharpening', '/MATLAB Drive/z/Copy_of_Code-for-S2-fusion-master/ATPRK_for_pan_sharpening.m', 22)) ([line 22](matlab: opentoline('/MATLAB Drive/z/Copy_of_Code-for-S2-fusion-master/ATPRK_for_pan_sharpening.m',22,0)))
[xrc1,RB0,Z0]=ATPRK_PANsharpen(I_MS(:,:,i),I_PAN,Sill_min,Range_min,L_sill,L_range,rate,H,w,PSFh);
I was wondering if you could help me downsample my image using the PSF. I don't need the entire ATPRK method.
Many thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.