日期:2014-05-17 浏览次数:20940 次
/// <summary>
/// 递归函数
/// </summary>
/// <param name="bm">位图数组</param>
/// <param name="sort">排序数组</param>
/// <param name="start">左侧待匹配图片</param>
/// <param name="present">当前与右侧匹配的图片</param>
/// <param name="length">筛选出的长度</param>
/// <param name="minCount">最小偏差值</param>
/// <param name="minNum">最小偏差对应位图数组的下标</param>
/// <returns></returns>
private bool Fit(ref Bitmap[] bm,ref int[][] sort,int start,int present,int length,int minCount,int minNum)
{
if(present >= length || start == 18)//匹配到第19位时,退出递归
{
if (minCount >= 10)
{
return false;//如果最小偏差大于等于10,表明start不是最佳的
}
else
{
return true;
}
}
bool flag;//标志最小匹配是否为符合
int fitfulCount = Fitful(bm[start], bm[present]);//保存偏差数