IsScaterPoint(int x, int y, int width, int height, LPBYTE lpData,WORD wBytesPerLine,  int threshold,bool lab[m_HEIGHT][m_WIDTH])
{
long lOffset;
//得到数据的偏移
lOffset = y*wBytesPerLine + x*3;
//判断该点是否为白色以及是否计算过了
if(*(lpData+lOffset) == 255 && lab[y][x] == false)
{
//链长度加一
lenth++;
//更改标志位
lab[y][x] = true;
//如果链长度达到临界值则返回真
if(lenth >= threshold)
return true;
//对右边点的边界判断以及标志位判断
if(x+1<width && lab[y][x+1] == false)
{
//递归调用本函数,对右边的点进行判断
IsScaterPoint(x+1,y,width,height,lpData,wBytesPerLine,threshold,lab);
if(lenth>=threshold)
return true;

}
//处理左边的点
if(x-1>=0 && lab[y][x-1] == false)
{
(IsScaterPoint(x-1,y,width,height,lpData,wBytesPerLine,threshold,lab));
if(lenth>=threshold)
return true;

}
//处理上面的点
if(y-1>=0 && lab[y-1][x]==false)
{
(IsScaterPoint(x,y-1,width,height,lpData,wBytesPerLine,threshold,lab));
if(lenth>=threshold)
return true;

}
//处理下面的点
if(y+1<height && lab[y+1][x]==false)
{ (IsScaterPoint(x,y+1,width,height,lpData,wBytesPerLine,threshold,lab));
if(lenth>=threshold)
return true;

}
//处理右下的点
if(y+1<height  && x+1 <width && lab[y+1][x+1]==false)
{ (IsScaterPoint(x+1,y+1,width,height,lpData,wBytesPerLine,threshold,lab));
if(lenth>=threshold)
return true;

}
//处理左下的点
if(y+1<height && x-1 >=0 && lab[y+1][x-1]==false)
{ (IsScaterPoint(x-1,y+1,width,height,lpData,wBytesPerLine,threshold,lab));
if(lenth>=threshold)
return true;

}
//处理左上的点
if(y-1>=0 && x-1 >=0 &&lab[y-1][x-1]==false)
{ (IsScaterPoint(x-1,y-1,width,height,lpData,wBytesPerLine,threshold,lab));
if(lenth>=threshold)
return true;

}
//处理右上的点
if(y-1<height && x+1<width && lab[y+1][x]==false)
{ (IsScaterPoint(x+1,y-1,width,height,lpData,wBytesPerLine,threshold,lab));
if(lenth>=threshold)
return true;

}
}
//如果递归结束,长度达不到临界值,返回假
return false;
}