Scatter plot data different resolution satellite images

I have two satellite images with different resolutions and I would like to do a scatter plot comparing pixels
for the same latitude and longitude. I have both images in netcdf format, with their correspondent latitude, longitude and band information (in this case Reflectance at 859 nm). Any ideas on how I could do this in matlab? I have inserted an image showing what I want to obtain (Vanhellemont & Ruddick 2015).

2 件のコメント

Walter Roberson
Walter Roberson 2015 年 6 月 10 日
Is the scale large enough that curvature of the Earth must be worried about, or can it be treated as flat rectangular?
SnovG
SnovG 2015 年 6 月 11 日
Yes, it can be treated as rectangular. Is not large.

サインインしてコメントする。

回答 (1 件)

Chad Greene
Chad Greene 2015 年 6 月 10 日

0 投票

If both images are the same size, and each pixel in image A corresponds to the same lat/lon of the same pixel in image B, You can get a scatter plot by
plot(A(:),B(:),'b.')
Does the color in your example image correspond to density of scattered points? If so, something like this might help.
Here's an example with some random data:
% Create lat/lon grid:
[lon,lat] = meshgrid(-180:180,-90:90);
% Create two sample data images:
A = 50*cosd(lat) + 5*sind(lon);
B = A+30*randn(size(A))./(A.^1.2);
A = A/2e3;
B = B/2e3;
B(B<0) = NaN;
% Set ocean data to NaN:
ocean = ~landmask(lat,lon);
A(ocean) = NaN;
B(ocean) = NaN;
figure
subplot(211)
pcolor(lon,lat,A);
colormap(brewermap(256,'*BrBg'))
shading flat
axis tight
borders('countries','color',rgb('dark gray'),'nomap')
title 'Image A'
subplot(212)
pcolor(lon,lat,B);
shading flat
axis tight
borders('countries','color',rgb('dark gray'),'nomap')
title 'Image B'
And to compare the two images:
figure
plot(A(:),B(:),'b.')
axis([0 0.03 0 0.03])
hold on
polyplot(A(:),B(:),'k-')
xlabel 'Rrs 859 nm (MODIS-Terra)'
ylabel 'Rrs 865 nm (OLI)'
Above, landmask, brewermap, borders, rgb, and polyplot are all available on the File Exchange site.

2 件のコメント

SnovG
SnovG 2015 年 6 月 11 日
Thank you for your answer. The only thing is that since they have diferent resolutions, I think I need to degrade the MODIS data to have both grids overlap. Or I wonder if I should coarse the grid of OLI 8, o make the MODIS grid finer, to have the same amount of pixels to compare.
Chad Greene
Chad Greene 2015 年 6 月 11 日
Ah, you mean horizontal spatial resolution. I'd use interp2 to downsample the higher resolution image. But note that simply using interp2 may result in slightly aliased data from high-spatial-frequency information, so you may want to do a low-pass filter before interp2. If you have the image processing toolbox, imresize is another option.

サインインしてコメントする。

カテゴリ

質問済み:

2015 年 6 月 10 日

コメント済み:

2015 年 6 月 11 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by