sift算法搭建(上半部,六,dog金字塔中干扰的极值点排除,c#实现)

看图片,看代码:

    List<int[]> 第一组dog五层金字塔 = new List<int[]>();
            第一组dog五层金字塔.Add(oct1dog2layer512);//第一组dog五层金字塔[0]
            第一组dog五层金字塔.Add(oct1dog3layer512);//第一组dog五层金字塔[1]
            第一组dog五层金字塔.Add(oct1dog4layer512);//第一组dog五层金字塔[2]
            int L = 1;
            List<Point> keyPt = new List<Point>();
            List<int> keyPtVal = new List<int>();
            for (int j = 1 + 4; j < 512 - 1 - 4; j++)  //行循环遍历//他们说靠近边缘5个像素不处理,
            {
                for (int i = 1 + 4; i < 512 - 1 - 4; i++)  //列循环遍历//他们说靠近边缘5个像素不处理
                {
                    int temp = j * 512 + i;
                    //开始寻找最值点
                    int val = 第一组dog五层金字塔[L][temp];//从第二层dog金字塔开始L=1
                    if (val >0)//极大值检测,观察后得到的门槛值
                    {
                        if(val>=10)//观察后,有关形成干扰的极值点排除,9*8*9空间26个像素对比
                        if (val < 第一组dog五层金字塔[L][temp + 1] && val < 第一组dog五层金字塔[L][temp - 1] && val < 第一组dog五层金字塔[L][temp + 1 + 512] && val < 第一组dog五层金字塔[L][temp + 512] && val < 第一组dog五层金字塔[L][temp + 512 - 1] && val < 第一组dog五层金字塔[L][temp + 1 - 512] && val < 第一组dog五层金字塔[L][temp - 512] && val < 第一组dog五层金字塔[L][temp - 512 - 1] &&
                            val < 第一组dog五层金字塔[L - 1][temp + 1] && val < 第一组dog五层金字塔[L - 1][temp - 1] && val < 第一组dog五层金字塔[L - 1][temp + 1 + 512] && val < 第一组dog五层金字塔[L - 1][temp + 512] && val < 第一组dog五层金字塔[L - 1][temp + 512 - 1] && val < 第一组dog五层金字塔[L - 1][temp + 1 - 512] && val < 第一组dog五层金字塔[L - 1][temp - 512] && val < 第一组dog五层金字塔[L - 1][temp - 512 - 1] && val < 第一组dog五层金字塔[L - 1][temp] &&
                            val < 第一组dog五层金字塔[L + 1][temp + 1] && val < 第一组dog五层金字塔[L + 1][temp - 1] && val < 第一组dog五层金字塔[L + 1][temp + 1 + 512] && val < 第一组dog五层金字塔[L + 1][temp + 512] && val < 第一组dog五层金字塔[L + 1][temp + 512 - 1] && val < 第一组dog五层金字塔[L + 1][temp + 1 - 512] && val < 第一组dog五层金字塔[L + 1][temp - 512] && val < 第一组dog五层金字塔[L + 1][temp - 512 - 1] && val < 第一组dog五层金字塔[L + 1][temp])

                        {

                            continue;
                        }
                        else
                        {
                            int r1 = j, c1 = i, layer = L;
                            double contrastThreshold = 0.04;
                            double edgeThreshold = 10.0;
                            // 关键点精确定位  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值