예제 #1
0
        private void Compute(int hitedPixelCount, int pixelIdx, UInt16[] bandValues, UInt16[][] wndValues, int[] hitedIndexes)
        {
            _featrueIndex.Add(pixelIdx);
            float        pvVis = _isNight ? float.MinValue : bandValues[_visBandIdx];
            PixelFeature fet   = _features[pixelIdx];

            fet.MidIfrAvgValue = Avg(_midIfrBandIdx, wndValues, hitedPixelCount, hitedIndexes);
            fet.FarIfrAvgValue = Avg(_farIfrBandIdx, wndValues, hitedPixelCount, hitedIndexes);
            fet.MidIfr_FarIfr_Diff_AvgValue = DiffAvg(_midIfrBandIdx, _farIfrBandIdx, wndValues, hitedPixelCount, hitedIndexes);
            fet.MidIfr_StdDev             = GetStdDev(fet.MidIfrAvgValue, _midIfrBandIdx, wndValues, hitedPixelCount, hitedIndexes);
            fet.FarIfr_StdDev             = GetStdDev(fet.FarIfrAvgValue, _midIfrBandIdx, wndValues, hitedPixelCount, hitedIndexes);
            fet.MidIfr_FarIfr_Diff_StdDev = GetStdDev(fet.MidIfr_FarIfr_Diff_AvgValue, _midIfrBandIdx, _farIfrBandIdx, wndValues, hitedPixelCount, hitedIndexes);
            CorrectLocalBackTmpMinMaxValue(pixelIdx, fet);
            CorrectStdDev(pixelIdx, fet);
            if (_solarZenithProvider != null)
            {
                if (_solarZenithProvider.GetSolarZenith(pixelIdx) > _minSolarZenithValue &&
                    _solarZenithProvider.GetSolarZenith(pixelIdx) < _maxSolarZenithValue &&
                    (!_isNight && pvVis > _glaringVIRR))
                {
                    fet.MidIfr_StdDev = Math.Min(35, fet.MidIfr_StdDev);
                    fet.MidIfr_StdDev = Math.Max(40, fet.MidIfr_StdDev);
                    //
                    fet.MidIfr_FarIfr_Diff_StdDev = Math.Min(35, fet.MidIfr_FarIfr_Diff_StdDev);
                    fet.MidIfr_FarIfr_Diff_StdDev = Math.Max(40, fet.MidIfr_FarIfr_Diff_StdDev);
                }
            }
            if (!_isNight && pvVis > Avg(_visBandIdx, wndValues, hitedPixelCount, hitedIndexes) + _wildernessCorrect)
            {
                fet.MidIfr_StdDev = Math.Min(40, fet.MidIfr_StdDev);
                fet.MidIfr_StdDev = Math.Max(45, fet.MidIfr_StdDev);
                //
                fet.MidIfr_FarIfr_Diff_StdDev = Math.Min(40, fet.MidIfr_FarIfr_Diff_StdDev);
                fet.MidIfr_FarIfr_Diff_StdDev = Math.Max(45, fet.MidIfr_FarIfr_Diff_StdDev);
            }
            //
            if (_midIfrCenterWaveNum > float.Epsilon && _farIfrCenterWaveNum > float.Epsilon)
            {
                float pixelArea = 0f;
                //计算亚像元面积
                fet.SecondPixelArea = (float)ComputeSecondPixelArea(pixelIdx, bandValues, out pixelArea);
                fet.PixelArea       = pixelArea;
                int intensityGrade = 0;
                //火点强度
                fet.FirIntensity       = (float)ComputeFirIntensity(pixelIdx, bandValues, out intensityGrade);
                fet.FireIntensityGrade = intensityGrade;
            }
            //火点可信度
            fet.FirReliability = ComputeFirReliability(pixelIdx, bandValues, fet);
        }
예제 #2
0
        public bool VertifyIsCloudPixel(int pixelIdx, int iWndPixel, UInt16[][] wndValues)
        {
            return(false);

            UInt16 minVisValue       = 0;
            int    minVisIndex       = GetMinVisPixelIndex(wndValues[_visBandIdx], out minVisValue);
            UInt16 minVisFarIfrValue = wndValues[_farIfrBandIndex][minVisIndex];

            if (minVisValue >= _minVisValue_cloud)
            {
                return(false);
            }
            if (_solarZenithProvider != null && _solarZenithProvider.GetSolarZenith(pixelIdx) > _minSolarZenithValue)
            {
                return(wndValues[_farIfrBandIndex][iWndPixel] < minVisFarIfrValue - _farIfrValue_cloud);
            }
            else
            {
                return((wndValues[_visBandIdx][iWndPixel] / _bandZoom) > _minVisValue_cloud &&
                       (wndValues[_farIfrBandIndex][iWndPixel] / _bandZoom) < (minVisFarIfrValue - _farIfrValue_cloud));
            }
        }