如何找到差异的两个图像之间的矩形

人气:1,044 发布:2022-09-10 标签: image .net c# comparison algorithm

问题描述

我有两个图像相同的大小。这是在其中找到它们的不同的矩形的最佳方式。很显然,我会4次经过图像在不同的方向,但我不知道是否有一个更简单的方法。

I have two images the same size. What is the best way to find the rectangle in which they differ. Obviously I could go through the image 4 times in different directions, but i'm wondering if there's an easier way.

例如:

推荐答案

我不认为有一个更简单的方法。

I don't think there is an easier way.

其实这样做只会是一个(非常)的code几行,所以,除非你发现,它对于直接,你不会找到一个更短的方法库。

In fact doing this will just be a (very) few lines of code, so unless you find a library that does that for you directly you won't find a shorter way.

527