📄 scenechangedetection.cpp
字号:
#include "scenechangedetection.h"
#include "PreProcess.h"
#include "StdAfx.h"
#include <math.h>
int getHistogramDifference(IplImage* X, IplImage* Y)
{
ASSERT(X!=NULL && Y!=NULL);
int histX[3][256];//单个通道的直方图
int histY[3][256];
int diff=0;
getHistogram3D(X,histX);
getHistogram3D(Y,histY);
for(int i=0;i<256;i++)
{
diff+=(abs(histX[0][i]-histY[0][i])+abs(histX[1][i]-histY[1][i])
+abs(histX[2][i]-histY[2][i]));
}
return diff;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -