首页新闻找找看学习计划

sift算法实现图像配准中的小算法问题

0
悬赏园豆:160 [待解决问题]

谁能帮忙解释一下程序所用的原理??是关于图像配准的,把特征点分类的算法。谢谢!

static void check_dense( CvSeq* features, int* dense_array, unsigned char check_distance[458][501])
{
struct feature* feat;
long row, line, a, b;
int sum;
for(row = 42; row <= 425; row += 31)
for(line = 44; line <= 458; line += 31)
{
if((row - 233) * (row - 233)/400 + (line - 248) * (line - 248)/484 <= 100)
{
sum=0;
for(a = row - 15;a <= row + 15; ++a)
for(b = line - 15;b <= line + 15; ++b)
if(check_distance[a][b] >= 100) sum += check_distance[a][b] - 99;
else sum += check_distance[a][b];
if( sum > 20)//纯绿
{
for(a = row - 15;a <= row + 15; ++a)
for(b = line - 15;b <= line + 15;++b)
if(check_distance[a][b] >= 100)
{
feat = CV_GET_SEQ_ELEM( struct feature, features, *(dense_array + b * 458 + a) );
feat->dense = 4;
}
}
else if( sum > 14)//淡红
{
for(a = row - 15;a <= row + 15; ++a)
for(b = line - 15;b <= line + 15;++b)
if(check_distance[a][b] >= 100)
{
feat = CV_GET_SEQ_ELEM( struct feature, features, *(dense_array + b * 458 + a) );
feat->dense = 3;
}
}
else if( sum > 7)//纯蓝
{
for(a = row - 15;a <= row + 15; ++a)
for(b = line - 15;b <= line + 15;++b)
if(check_distance[a][b] >= 100)
{
feat = CV_GET_SEQ_ELEM( struct feature, features, *(dense_array + b * 458 + a) );
feat->dense = 2;
}
}
else //灰色
{
for(a = row - 15;a <= row + 15; ++a)
for(b = line - 15;b <= line + 15;++b)
if(check_distance[a][b] >= 100)
{
feat = CV_GET_SEQ_ELEM( struct feature, features, *(dense_array + b * 458 + a) );
feat->dense = 1;
}
}
}
}

jamesli1234的主页 jamesli1234 | 初学一级 | 园豆:42
提问于:2014-06-07 17:33
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册