paniwani 的回答是一个好的开始——就他建议的纹理分析而言。Imagemagick 不常用于纹理分析,但它绝对是一种可能的工具。看一下这个:
$ cat get_images.sh
#!/bin/bash
base_url='http://maps.googleapis.com/maps/api/staticmap?center='
other_params='&zoom=12&size=400x400&maptype=satellite&sensor=false'
curl -o desert1.png "$base_url"'41.660000,112.900000'"$other_params" 2>/dev/null
curl -o desert2.png "$base_url"'40.660000,112.900000'"$other_params" 2>/dev/null
curl -o rural1.png "$base_url"'40.714728,-74.400000'"$other_params" 2>/dev/null
curl -o rural2.png "$base_url"'41.714728,-74.400000'"$other_params" 2>/dev/null
curl -o suburban1.png "$base_url"'40.614728,-74.300000'"$other_params" 2>/dev/null
curl -o suburban2.png "$base_url"'40.714728,-74.200000'"$other_params" 2>/dev/null
curl -o urban1.png "$base_url"'40.744728,-73.831672'"$other_params" 2>/dev/null
curl -o urban2.png "$base_url"'40.754728,-73.930672'"$other_params" 2>/dev/null
echo -e "\nEntropy:"
for t in "desert1" "desert2" "rural1" "rural2" "suburban1" "suburban2" "urban1" "urban2"; do
echo -e " " $t "\t" `./entropy "$t".png | grep Aver | sed -e 's/.*= //'`
done
echo -e "\nStd Dev:"
for t in "desert1" "desert2" "rural1" "rural2" "suburban1" "suburban2" "urban1" "urban2"; do
echo -e " " $t "\t" `convert "$t".png -format '%[fx:standard_deviation]' info:`
done
echo -e "\nRatio of hi freq to low freq:"
for t in "desert1" "desert2" "rural1" "rural2" "suburban1" "suburban2" "urban1" "urban2"; do
convert "$t".png -fft +depth +adjoin "$t"_fft_%d.png
convert "$t"_fft_1.png -fill none -stroke black -strokewidth 100 -draw "rectangle 50,50,350,350" "$t"_fft_1b.png
convert "$t"_fft_1.png -fill none -stroke black -strokewidth 100 -draw "rectangle 150,150,250,250" "$t"_fft_1c.png
lo=`./entropy "$t"_fft_1b.png | grep Average | sed -e 's/.*= //'`
hi=`./entropy "$t"_fft_1c.png | grep Average | sed -e 's/.*= //'`
echo -e " " $t "\t" `echo "scale=8; $lo / $hi" | bc`
done
$ ./get_images.sh
Entropy:
desert1 0.557244
desert2 0.586651
rural1 0.652486
rural2 0.709812
suburban1 0.69883
suburban2 0.727527
urban1 0.746479
urban2 0.765279
Std Dev:
desert1 0.0756219
desert2 0.0881424
rural1 0.107279
rural2 0.140878
suburban1 0.125647
suburban2 0.143765
urban1 0.150628
urban2 0.185245
Ratio of hi freq to low freq:
desert1 .41319501
desert2 .41337079
rural1 .41333309
rural2 .41335422
suburban1 .41326120
suburban2 .41339882
urban1 .41327271
urban2 .41326168
这三个不同的指标(图像熵、图像标准偏差、图像中高频与低频内容的比率)都与从沙漠到农村到郊区到城市的频谱密切相关。如果您将这些放入分类器(例如神经网络)中,我敢打赌您可以开发出一个不错的预测器来判断谷歌地图卫星图像是沙漠、农村、郊区还是城市土地。