当前位置:网站首页>Gee: remote sensing image composite and mosaic
Gee: remote sensing image composite and mosaic
2022-07-02 05:11:00 【Gee water ecological space】
Catalog
To learn, you must be rigid and constant , If it's not rigid, it's easy , If it doesn't last, it will fall back .—— The song dynasty . Fengzixian
Preface
GEE, How to realize the synthesis of remote sensing images (composite) And inlay (mosaic)? What's the difference between them ?
The analysis area is as follows :
One 、 Analysis steps
Main analysis steps :
Two 、python Code
1、 Image synthesis Composite
python The code is as follows
Be careful : synthesis composite It mainly reflects the synthesis of multi-phase images in the same area
Map = geemap.Map()
# Load image data
naip2004_2012 = ee.ImageCollection('USDA/NAIP/DOQQ') \
.filterBounds(ee.Geometry.Point(-71.09, 42.4)) \
.filterDate('2004-07-01', '2012-12-31') \
.select(['R', 'G', 'B'])
# Maximum value synthesis
composite = naip2004_2012.max()
Map.addLayer(composite, {
}, 'max value composite')
Map.setCenter(-71.09, 42.4, 14)
Map
give the result as follows :
2、 Image mosaic Mosaic
- ee.ImageCollection.mosaic()
Be careful : set mosaic It mainly reflects the synthesis operation of images in different regions
You need to splice four different DOQQ, But in different places
python The code is as follows
# Load span 4 Data of images
naip2012 = ee.ImageCollection('USDA/NAIP/DOQQ') \
.filterBounds(ee.Geometry.Rectangle([-71.18, 42.35, -71.09, 42.41])) \
.filterDate('2012-01-01', '2012-12-31')
# Image mosaic mosaic
mosaic = naip2012.mosaic()
Map.addLayer(naip2012, {
}, 'naip2012')
Map.setCenter(-71.12532, 42.3712, 12)
give the result as follows :
3、 Dig further Mosaic Characteristics of
a key :mosaic() Methods according to their order in the set ( Finally at the top ) Composite overlapping image . To control tessellation ( Or synthesis ) The source of pixels in , Image masks can be used mask.
for example , The following uses spectral threshold to mosaic new image data
python The code is as follows :
# Load image , Show
naip = ee.Image('USDA/NAIP/DOQQ/m_4207148_nw_19_1_20120710')
Map.setCenter(-71.0915, 42.3443, 12)
Map.addLayer(naip, {
}, 'naip')
# Generate NDVI、NDWI Index
ndvi = naip.normalizedDifference(['N', 'R']).rename('ndvi')
ndwi = naip.normalizedDifference(['G', 'N']).rename('ndwi')
# Use the above 2 Indices , Use different threshold conditions , The detection area is naked
# Naked land 1, Vegetation index is lower than 0.2, At the same time, the water index is lower than 0.3 Region
bare1 = ndvi.lt(0.2).And(ndwi.lt(0.3))
# Naked land 2, Vegetation index is lower than 0.2, At the same time, the water index is lower than 0.8 Region . It can be seen that its sensitivity is lower than the previous threshold
bare2 = ndvi.lt(0.2).And(ndwi.lt(0.8))
# Display parameters
vis_ndvi = {
'min':-1, 'max':1, 'palette':['red', 'green']}
vis_ndwi = {
'min':0.5, 'max':1, 'palette':['gray', 'blue']}
# Load display
Map.addLayer(ndvi, vis_ndvi, 'ndvi')
Map.addLayer(ndwi, vis_ndwi, 'ndwi')
Map.addLayer(bare1, {
}, 'bare1')
Map.addLayer(bare2, {
}, 'bare2')
Show results :
# Mask and embed visual images , You can see that the last layer is on the top ( This is a Mosaic Characteristics )
mosaic = ee.ImageCollection([
ndwi.updateMask(ndwi.gte(0.5)).visualize(**vis_ndwi),
ndvi.updateMask(ndvi.gte(0.2)).visualize(**vis_ndvi),
bare2.updateMask(bare2.And(bare1.Not())).visualize(**{
'palette':['gray']}),
bare1.updateMask(bare1).visualize(**{
'palette':['white']})
]).mosaic()
Map.addLayer(mosaic, {
}, 'visualization mosaic')
give the result as follows :
3、 ... and 、 Summary
- Two different influence synthesis methods of image synthesis and image mosaic are analyzed , among Image synthesis composite It is more manifested in the combination of images in the same area at different times , The most commonly used synthesis methods are maximization synthesis (MVC,max value composite)、 Median synthesis (median)、 Mean synthesis (mean) And other synthetic methods , In specific work, different synthesis methods can be adopted according to actual needs ; set (mosaic) More performance in the synthesis of multiple images in different areas .
- The feature of mosaic is that the last layer is on the top , This is also Mosaic One of the characteristics of .
Reference resources :
- https://developers.google.com/earth-engine/apidocs/ee-image-visualize?hl=en
- https://github.com/giswqs/earthengine-py-notebooks/blob/master/ImageCollection/mosaicking.ipynb
- https://developers.google.com/earth-engine/guides/ic_composite_mosaic?hl=en
边栏推荐
猜你喜欢
Fabric.js IText设置指定文字的颜色和背景色
黑马笔记---Set系列集合
Using Kube bench and Kube hunter to evaluate the risk of kubernetes cluster
Solution: the agent throws an exception error
C# 基于MQTTNet的服务端与客户端通信案例
Line by line explanation of yolox source code of anchor free series network (7) -- obj in head_ loss、Cls_ Loss and reg_ Calculation and reverse transmission of loss I
Fabric.js IText 手动设置斜体
2022 Alibaba global mathematics competition, question 4, huhushengwei (blind box problem, truck problem) solution ideas
LeetCode 241. Design priorities for operational expressions (divide and conquer / mnemonic recursion / dynamic programming)
Application d'un robot intelligent dans le domaine de l'agroécologie
随机推荐
ansible安装与使用
Draw a wave chart_ Digital IC
Fabric.js 更换图片的3种方法(包括更换分组内的图片,以及存在缓存的情况)
Video cover image setting, put cover images into multiple videos in the simplest way
Leetcode18题 【四数之和】递归解法
Summary of MySQL key challenges (2)
leetcode存在重复元素go实现
Fabric.js 圆形笔刷
Express logistics quick query method, set the unsigned doc No. to refresh and query automatically
Knowledge arrangement about steam Education
Mathematical knowledge -- understanding and examples of fast power
Latest: the list of universities and disciplines for the second round of "double first-class" construction was announced
Oracle和MySQL的基本区别(入门级)
创新永不止步——nVisual网络可视化平台针对Excel导入的创新历程
【pyinstaller】_get_sysconfigdata_name() missing 1 required positional argument: ‘check_exists‘
Implementation of go language for deleting duplicate items in sorting array
Global and Chinese market of cell culture freezers 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets for marine selective catalytic reduction systems 2022-2028: Research Report on technology, participants, trends, market size and share
Paddlepaddle project source code
Fabric.js IText 上标和下标