Python snippet for image change detection

1092
4
Jump to solution
01-11-2019 08:27 PM
BrandonPrice1
Occasional Contributor

Hello :

I am trying to create a snippet to throw into the arcmap command line to recreate these steps for arcgis pro in arcmap:

Image Differencing - Image Change Detection | ArcGIS Solutions for Defense 

python snippets

ArcGIS Pro

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

I agree with Dan that it is hard (and probably not recommendable) to completely rule out "human intervention" in this process. However, to explore a histogram and determine a threshold is something that can be done. If you have a look at Python en ArcGIS Pro - CCU2015.pdf (Spanish document, sorry...) on page 33 you will find a snippet that is used to find a value to extract a zone that will hold the optimal route between two locations. Something similar could be done for your case, see screenshot below specially notice the for loop at the end of the snippet:

View solution in original post

4 Replies
DanPatterson_Retired
MVP Emeritus

There will be no one snippet

Steps 5,6 and 8 require human interaction, interpretation and decision-making.

Some of the other steps could be automated by building a model in modelbuilder but it hardly seems worthwhile if you are not doing hundreds of areas

XanderBakker
Esri Esteemed Contributor

I agree with Dan that it is hard (and probably not recommendable) to completely rule out "human intervention" in this process. However, to explore a histogram and determine a threshold is something that can be done. If you have a look at Python en ArcGIS Pro - CCU2015.pdf (Spanish document, sorry...) on page 33 you will find a snippet that is used to find a value to extract a zone that will hold the optimal route between two locations. Something similar could be done for your case, see screenshot below specially notice the for loop at the end of the snippet:

BrandonPrice1
Occasional Contributor

Thanks Xander. I will use this as one of my three methods for Monday.  I will let you know how it works. 

BrandonPrice1
Occasional Contributor

Thanks Dan.  So my three methods for Monday will be:

1. Python snippet with some manual qc

2. Cutout footprints and use the difference button in the image analysis window

3. Use the zonal statistics feature on the spatial analyst toolbar to extract the pixels of both imageries (advice from reddit community) 

0 Kudos