Re: mnf and masks [message #44612] |
Fri, 01 July 2005 09:51 |
msauer
Messages: 4 Registered: July 2005
|
Junior Member |
|
|
Thanks Peter,
It seems that ENVI did do the MNF reduction on the image scene only and
that the masked area that surrounded this image scene all had values of
0 as seen in the forward MNF individual band gray scale results. I'm
hypothesizing that the masked section in the forward MNF did not have
the mean spectra subtracted from its constant 0 value across all bands
since the very definition of the mask basically says dont use this part
in any calculations, but upon its reintroduction in the inversion, the
mean spectra is applied to zero where the mask is no longer valid and
is applied directly(unfortunately). Where then is the data for these
masked values after the MNF inversion coming from especially since it
seems that the low data values (0.002) could be attributable to
rounding errors induced when a spectra is subtracted and then added
back to produce a slight diversion from zero for these masked image
data values. I guess my interpretation of this would be that the mean
spectra has data values of 0 and different pixel spectra deviations
from this gives particular data values which is seemingly based on the
definition of how MNF theoretically works as described below. For
masked pixels it would, the spectra would be the result of the mean
spectra + 0 for masked pixels that do not have an inv transform matrix
applied to it.
It certainly would be nice if the inversion could have some 'higher'
calling, that would allow a mask to be supported in the inversion since
not having one evidently might have effects on down the line processing
of this particular image.
Peter Mason wrote:
> msauer@calpoly.edu wrote:
>> I've recently applied forward mnf in ENVI to an image in which I've
>> employed a mask to knock out the region surrounding the one I'm
>> interested in. The MNF output shows that the masked area has values of
>> zero while the region I'm interested in has + or - values. Good.
>> However, when I apply the inversion using the stats from this
>> transform, the image that results shows that the previously masked
>> areas have values, the same throughout, and z-profiles that appear to
>> approximate the mean spectra of the whole region I'm interested in.
>> Thought that these previously masked areas should still be 0 with a
>> flat line for a spectrum, indicating no data. I've done a map
>> difference image thru band math which seems to indicate a difference
>> of ~0.002 (rounding error?). Why does area in the inversion
>> corresponding to the mask employed in the mnf have a spectrum and
>> data values?
>
> The inverse MNF transform is done with a calculation like this (shown here
> for one spectrum):
> inv_mnf_spec = (mnf_spec ## inv_mnf_trans_matrix) + scene_mean_spec
> "Scene_mean_spec" is the mean spectrum, calculated over the masked-on pixels
> in the (earlier) forward MNF stats step.
> MNF is driven by differences from a mean spectrum, so this mean is
> subtracted from all the spectra when going into MNF space and added back
> when going out. It's stored in the MNF stats file.
>
> The mask option in ENVI's forward-MNF module is a bit confusing, as this
> module's work is done in four stages: estimation of noise stats,
> calculation of signal stats, calculation of transformation matrices from the
> signal & noise stats, actually transforming the image. It might look like
> the mask is just for tidying up the result in the last stage but it is also
> used to focus the signal stats in the second stage. (IMHO this is its
> *main* use and it should get a mention in the docs.) I don't think that
> the noise stats are done through the mask (they never used to be in the
> past) - they (now) have a separate spatial subsetting option of their own.
>
> ENVI's inverse-MNF module has no knowlege of whether or not a mask was used
> in the forward transform. (It isn't safe to assume that an all-zero MNF
> spectrum means "this one was masked off so the inverse-MNF spectrum should
> be all-zero as well".)
> The lack of a mask option in this module is probably an oversight. It's
> much more straightforward than the forward module and has no "higher reason"
> for a mask option. I imagine that no-one has asked RSI to put one in yet.
>
> HTH
> Cheers
> Peter Mason
|
|
|
Re: mnf and masks [message #44616 is a reply to message #44612] |
Thu, 30 June 2005 17:25  |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
msauer@calpoly.edu wrote:
> I've recently applied forward mnf in ENVI to an image in which I've
> employed a mask to knock out the region surrounding the one I'm
> interested in. The MNF output shows that the masked area has values of
> zero while the region I'm interested in has + or - values. Good.
> However, when I apply the inversion using the stats from this
> transform, the image that results shows that the previously masked
> areas have values, the same throughout, and z-profiles that appear to
> approximate the mean spectra of the whole region I'm interested in.
> Thought that these previously masked areas should still be 0 with a
> flat line for a spectrum, indicating no data. I've done a map
> difference image thru band math which seems to indicate a difference
> of ~0.002 (rounding error?). Why does area in the inversion
> corresponding to the mask employed in the mnf have a spectrum and
> data values?
The inverse MNF transform is done with a calculation like this (shown here
for one spectrum):
inv_mnf_spec = (mnf_spec ## inv_mnf_trans_matrix) + scene_mean_spec
"Scene_mean_spec" is the mean spectrum, calculated over the masked-on pixels
in the (earlier) forward MNF stats step.
MNF is driven by differences from a mean spectrum, so this mean is
subtracted from all the spectra when going into MNF space and added back
when going out. It's stored in the MNF stats file.
The mask option in ENVI's forward-MNF module is a bit confusing, as this
module's work is done in four stages: estimation of noise stats,
calculation of signal stats, calculation of transformation matrices from the
signal & noise stats, actually transforming the image. It might look like
the mask is just for tidying up the result in the last stage but it is also
used to focus the signal stats in the second stage. (IMHO this is its
*main* use and it should get a mention in the docs.) I don't think that
the noise stats are done through the mask (they never used to be in the
past) - they (now) have a separate spatial subsetting option of their own.
ENVI's inverse-MNF module has no knowlege of whether or not a mask was used
in the forward transform. (It isn't safe to assume that an all-zero MNF
spectrum means "this one was masked off so the inverse-MNF spectrum should
be all-zero as well".)
The lack of a mask option in this module is probably an oversight. It's
much more straightforward than the forward module and has no "higher reason"
for a mask option. I imagine that no-one has asked RSI to put one in yet.
HTH
Cheers
Peter Mason
|
|
|