Are there any tools that can do the equivalent of a “git diff” with images (to see what's changed?)

三世轮回 提交于 2019-12-24 16:00:20

问题


I'm trying to figure out a way to more rapidly determine where new construction is happening by comparing annual satellite imagery.

In Google Earth, you can roll back the clock on satellite imagery, for whatever reason, and determine what has changed over the years. One thing thats interesting is you can determine new construction. Currently, I'm doing it manually which is very slow.

I know satellite photos can vary greatly due to weather, photo exposure variations, seasonal changes, etcetera so my plan is to run some photoshop filters on satellite photos to try and normalize the imagery, then run some kind of "diff" process to highlight where changes have occurred.

Here's an example of two satellite photos, the first taken in May 2013, the other taken in January 2015.

It would be really neat if I could run some process that would highlight the areas that have changed dramatically, such that the new houses, in this case, would be easily identifiable. Maybe the output would look something like this on the more recent (2015) photo....

OK, obviously it wouldn't look like that, but I think the last image outlines my purpose here.

Thanks


回答1:


Unfortunately the lighting on the two images you have is vastly different. On the May 2013 image it is near midday and the sun is directly overhead meaning there are no shadows - as such, the houses that were standing then are virtually indistinguishable from the surrounding ground. On the January 2015 image the lighting is from the bottom of the image and the shadows are harsh. As such, any differencing you do is not going to detect the changes in the number of houses, but rather the changes in the lighting are going to dominate.

There is a tool called flicker_compare on the ImageMagick website that can rapidly flick between images that may help you do the differencing manually. I used it like this:

flicker_cmp -d 100 -o animated.gif jan2015.jpg may2013.jpg

Sorry, I have no other suggestions.




回答2:


Yes, such tools are available. For example, you can use the comparel method in ImageMagick to compare two images. It isn't a visual diff tool per se, but rather a library upon which you can build your own tool. It has an incredible array of options for highlighting differences.




回答3:


Check out git-diff-image. An extension to 'git diff' that provides support for diffing images. It can also be run as a direct CLI command for diffing two image files.



来源:https://stackoverflow.com/questions/32719545/are-there-any-tools-that-can-do-the-equivalent-of-a-git-diff-with-images-to-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!