.net에서 이미지 비교를 위해 코드 또는 알고리즘 (패턴 인식 사용)을 공유 할 수 있습니까?.net에서 이미지 비교를위한 패턴 인식
다른 해상도와 질감의 두 이미지를 비교해야하며 차이점을 찾아야합니다. 지금은 C#을
// Load the images.
Bitmap bm1 = (Bitmap) (Image.FromFile(txtFile1.Text));
Bitmap bm2 = (Bitmap) (Image.FromFile(txtFile2.Text));
// Make a difference image.
int wid = Math.Min(bm1.Width, bm2.Width);
int hgt = Math.Min(bm1.Height, bm2.Height);
Bitmap bm3 = new Bitmap(wid, hgt);
// Create the difference image.
bool are_identical = true;
int r1;
int g1;
int b1;
int r2;
int g2;
int b2;
int r3;
int g3;
int b3;
Color eq_color = Color.Transparent;
Color ne_color = Color.Transparent;
for (int x = 0; x <= wid - 1; x++)
{
for (int y = 0; y <= hgt - 1; y++)
{
if (bm1.GetPixel(x, y).Equals(bm2.GetPixel(x, y)))
{
bm3.SetPixel(x, y, eq_color);
}
else
{
bm1.SetPixel(x, y, ne_color);
are_identical = false;
}
}
}
// Display the result.
picResult.Image = bm1;
Bitmap Logo = new Bitmap(picResult.Image);
Logo.MakeTransparent(Logo.GetPixel(1, 1));
picResult.Image = (Image)Logo;
//this.Cursor = Cursors.Default;
if ((bm1.Width != bm2.Width) || (bm1.Height != bm2.Height))
{
are_identical = false;
}
if (are_identical)
{
MessageBox.Show("The images are identical");
}
else
{
MessageBox.Show("The images are different");
}
//bm1.Dispose()
// bm2.Dispose()
를 사용하여 두 이미지의 차이를 확인하는 코드를했지만 두 이미지가 같은 해상도이며, 일부 그림자 size.if 하나 개의 이미지에있다 (하지만이 개 이미지는 동일) 경우이 비교 그것은 이미지 간의 차이를 보여줍니다 ... 그래서 패턴 인식을 사용하여 비교하려고합니다.
"Hurray"라고 외치는 소리를 내며 다른 회사가 여전히 고심하고있는 메가 이미지 검색 엔진을 만드는 경우가 있습니다. – nkrkv