Google Earth Engine(GEE):使用纹理特征glcm无结果解决方案?

问题:我的主要目标是从 glcm parameters(glcm_bands) 制作 主成分分分析pca。我怀疑是否使用第 16 或 18 行来制作 glcm。
同样不幸的是,主成分对象的方差不返回任何属性?

这里用到的函数:
toDictionary(properties)
Extract properties from a feature as a dictionary.
从一个字典中提取属性
Arguments:
this:element (Element):
The feature to extract the property from.

properties (List, default: null):
The list of properties to extract. Defaults to all non-system properties.

Returns: Dictionary
无法正常显示方差结果

错误代码:

var dataset = ee.Image("users/ghadiri1979/Turky_L5/DATASET_L5_1990"),
    roi = ee.FeatureCollection("users/ghadiri1979/Aras/Tutkiye/Turkiye38"),
    geometry = 
    /* color: #d63000 */
    /* shown: false */
    ee.Geometry.Polygon(
        [[[43.53403894203186, 39.54777593191963],
          [43.59995691078186, 39.40361118214464],
          [43.70982019203186, 39.293166047554664],
          [44.07236902015686, 39.24213251104003],
          [44.30308191078186, 39.26765392457906],
          [44.46787683265686, 39.378139337522285],
          [44.54478112953186, 39.62397745402726],
          [44.64365808265686, 39.64089974420364],
          [44.79746667640686, 39.539303923934014],
          [44.91831628578186, 39.63243911654894],
          [44.80845300453186, 39.75923983809085],
          [44.64365808265686, 39.953214934801224],
          [44.32505456703186, 40.10463891429906],
          [43.84165612953186, 40.188618052818406],
          [43.69883386390686, 40.339518770828455],
          [43.74277917640686, 40.51514395758591],
          [43.79771081703186, 40.70696888582695],
          [43.73179284828186, 40.96464369880349],
          [43.51206628578186, 41.1965208710284],
          [43.19346277015686, 41.221316322150514],
          [42.89683191078186, 41.05583586157205],
          [42.62217370765686, 40.773561483185865],
          [42.27061120765686, 40.54019582530807],
          [41.83115808265686, 40.34789227251791],
          [41.38071862953186, 40.18022481127478],
          [41.12803308265686, 39.944792637108],
          [41.10606042640686, 39.327167756641884],
          [41.29282800453186, 39.24213251104003],
          [41.58945886390686, 39.327167756641884],
          [42.09482995765686, 39.49692837183376],
          [42.19370691078186, 39.59012045643216],
          [42.45737878578186, 39.809894886780505],
          [43.17149011390686, 39.86894530191177],
          [43.44614831703186, 39.65781789468061]]]);
         //Map.addLayer(roi)
//Map.addLayer(geometry,{},'geometry')

//Create and rescale a grayscale image for GLCM 
var gray = dataset.expression(
      '(0.3 * NIR) + (0.59 * R) + (0.11 * G)', {
   
      'NIR': dataset.select('SR_B4'),
        'R': dataset.select('SR_B3'),
        'G': dataset.select('SR_B2')
}).rename('gray');

// the glcmTexture size (in pixel) can be adjusted considering the spatial resolution and the object textural characteristics

// which one line   16  or  18  is correct ? 

var glcm = gray.unitScale(0, 0.30).multiply(100).toInt().glcmTexture({
   size: 2});
 
//var glcm2= gray.unitScale(0, 0.30).multiply(255).toByte().glcmTexture({size: 2}); 

print('glcm',glcm
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

此星光明

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值