Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point2f serr = line1.getStartPoint() - line2.getEndPoint() 此处是否应该是line2.getStartPoint() #28

Open
Sunshinehaozi opened this issue Nov 19, 2022 · 2 comments

Comments

@Sunshinehaozi
Copy link

` for ( int i = 0; i < (int) lsd_matches.size(); i++ )
{
// 判断描述子的相似度是否足够高 此处的距离应该是汉明距离吧
if( lsd_matches[i].distance < 30 ){

            DMatch mt = lsd_matches[i];
            KeyLine line1 =  forwframe_->keylsd[mt.queryIdx] ;
            KeyLine line2 =  curframe_->keylsd[mt.trainIdx] ;
            Point2f serr = line1.getStartPoint() - line2.getEndPoint();
            Point2f eerr = line1.getEndPoint() - line2.getEndPoint();
            // std::cout<<"11111111111111111 = "<<abs(line1.angle-line2.angle)<<std::endl;
            if((serr.dot(serr) < 200 * 200) && (eerr.dot(eerr) < 200 * 200)&&abs(line1.angle-line2.angle)<0.1)   // 线段在图像里不会跑得特别远
                good_matches.push_back( lsd_matches[i] );
        }
    }

`

@YoungHaulk
Copy link

好兄弟,我也有同样的疑惑,请问你弄清楚了吗?

@slender1031
Copy link

赞同,我也认为是line2.getStartPoint(),分别计算起点和终点的距离

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants