Stretching MODIS data [message #79144] |
Tue, 31 January 2012 03:36  |
titan
Messages: 59 Registered: March 2006
|
Member |
|
|
Hi everybody,
I'm trying to obtain an RGB image using MODIS data channel 01,02,06
(daytime) and channels 20, 21 and 32 (night time).
My code is working fine except for the stretching result in the sense
that for the images obtained using "daytime channels" are darker than
the ones obtained with the "nighttime channels" and this happens only
for images belonging to winter season.
In the following you can find a piece of the code I'm using
ch01_modis_meteo_fname='ch01'
RESTORE, path+ch01_modis_meteo_fname
ch01_v=ch01[where(ch01 gt 0.0)]
print, 'min(ch01_v)', MIN(ch01_v)
print, 'max(ch01_v)', MAX(ch01_v)
ch01_modis_meteo_fname_ENVI_format_outname='modis_meteo_ch01 '
ENVI_WRITE_ENVI_FILE, ch01, DATA_TYPE=4,NS=4400, NL=3300, NB=1,
OFFSET=0, INTERLEAVE=0, PIXEL_SIZE=ch01_fname_ps,$
MAP_INFO=ch01_map_info_create,
OUT_NAME=ch01_modis_meteo_fname_ENVI_format_outname,
R_FID=ch01_modis_meteo_fname_ENVI_format_r_fid
ch01_bs=BYTSCL(ch01, min = MIN(ch01_v), max = MAX(ch01_v))
ch01_modis_meteo_fname_ENVI_format_bs_outname='modis_meteo_c h01_bs'
ENVI_WRITE_ENVI_FILE, ch01_bs, DATA_TYPE=1,NS=4400, NL=3300, NB=1,
OFFSET=0, INTERLEAVE=0, PIXEL_SIZE=ch01_fname_ps,$
MAP_INFO=ch01_map_info_create,
OUT_NAME=ch01_modis_meteo_fname_ENVI_format_bs_outname,
R_FID=ch01_modis_meteo_fname_ENVI_format_bs_r_fid
ch01_bs2 = BYTSCL(ch01_bs, min = 3, max = 157)
ch01_modis_meteo_fname_ENVI_format_bs2_outname='modis_meteo_ ch01_bs2'
ENVI_WRITE_ENVI_FILE, ch01_bs2, DATA_TYPE=1,NS=4400, NL=3300, NB=1,
OFFSET=0, INTERLEAVE=0, PIXEL_SIZE=ch01_fname_ps,$
MAP_INFO=ch01_map_info_create,
OUT_NAME=ch01_modis_meteo_fname_ENVI_format_bs2_outname,
R_FID=ch01_modis_meteo_fname_ENVI_format_bs2_r_fid
the same code is used for the other channels except for the value in
the bytscl function
ch02_bs = bytscl(ch02_bs, min = 3, max = 169)
ch06_bs = bytscl(ch06_bs, min = 2, max = 121)
Since at this moment I'm only interested in a visual inspection of my
result, Is there a way to harmonize the different results?
If you need other info please let me know
thanks in advance
|
|
|
|
Re: Stretching MODIS data [message #79211 is a reply to message #79144] |
Mon, 13 February 2012 05:45  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
titan writes:
> Anyway if I apply the scalemodis code the result I obtain is
> characterized by yellow cloud and not white like the one you obtain
> in your example..
> do you have any idea why I obtain this result?
I would guess maybe the range of data in your
images is different from the range of data in
the MODIS images I was using. I've never seen
yellow clouds in MODIS images I processed with
ScaleModis. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Stretching MODIS data [message #79216 is a reply to message #79175] |
Mon, 13 February 2012 02:34  |
titan
Messages: 59 Registered: March 2006
|
Member |
|
|
On 7 Feb, 07:34, David Fanning <n...@idlcoyote.com> wrote:
> titan writes:
>> Since I would like to have a standard reference color is there a way
>> to define an histogram of reference to which all the images can be
>> referred??
>
> I don't know what this means. You could certainly
> take a histogram of a "standard image" and use
> that for the histogram matching. Is that what you
> mean?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Yes you are right. I was thinking that the difficulty is in
determining a "standard image" containing all the value you can find
in a meteo image (clouds, snow, land, sea ....) because, in my
opinion,it could be feasible to compare the histogram of images
belonging to the same area in the same period (or season) but not if
they belong to different period of the year.
Am I correct??
Anyway if I apply the scalemodis code the result I obtain is
characterized by yellow cloud and not white like the one you obtain
in your example..
do you have any idea why I obtain this result?
thanks a lot
cheers,
titan
|
|
|
Re: Stretching MODIS data [message #84655 is a reply to message #79175] |
Tue, 07 February 2012 07:58  |
titan
Messages: 59 Registered: March 2006
|
Member |
|
|
On 7 Feb, 07:34, David Fanning <n...@idlcoyote.com> wrote:
> titan writes:
>> Since I would like to have a standard reference color is there a way
>> to define an histogram of reference to which all the images can be
>> referred??
>
> I don't know what this means. You could certainly
> take a histogram of a "standard image" and use
> that for the histogram matching. Is that what you
> mean?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Yes you are right. I was thinking that the difficulty is in
determining a "standard image" containing all the value you can find
in a meteo image (clouds, snow, land, sea ....).
Because it is problematic to find an image including all the features
and to be used as template with respect to its histogram.
For example I cannot choose a cloudy image or a cloud free image as
template because in this (extreme) case the histogram will be affected
by this.
Am I correct??
I hope I was able to describe better my doubt and now it is clearer!!
Cheers,
titan
|
|
|