当前位置:网站首页>bool框架::PosInGrid (const简历:关键点kp, int &posX, int诗句)
bool框架::PosInGrid (const简历:关键点kp, int &posX, int诗句)
2022-08-02 02:00:00 【Xiaoqiu SLAM practical tutorial】
bool Frame::PosInGrid(const cv::KeyPoint &kp, int &posX, int &posY){// The corrected four boundary points can no longer form a strict rectangle, so a frame is added to the outside of this quadrangle as the boundary of the coordinates// mnMinX = min(mat.at(0,0),mat.at(2,0));//The smallest upper left and lower left abscissa // mnMaxX = max(mat.at(1,0),mat.at(3,0));//The largest abscissa of the upper right and lower right // mnMinY = min(mat.at(0,1),mat.at(1,1));//The smallest upper left and upper right ordinate // mnMaxY = max(mat.at(2,1),mat.at(3,1));//The smallest ordinate of the lower left and lower right // mfGridElementWidthInv=static_cast(FRAME_GRID_COLS)/static_cast(mnMaxX-mnMinX); how many image grid columns are equivalent to one image pixel // mfGridElementHeightInv=static_cast(FRAME_GRID_ROWS)/static_cast(mnMaxY-mnMinY); how many image grid row heights are equivalent to one image pixel posX = round((kp.pt.x-span>mnMinX)*mfGridElementWidthInv);posY = round((kp.pt.y-span>mnMinY)*mfGridElementHeightInv);//Keypoint's coordinates are undistorted, which could cause to go out of the imageif(posX<0 || posX>=FRAME_GRID_COLS || posY<0 || posY>=FRAME_GRID_ROWS)return false;return true;}
边栏推荐
- Image fusion based on weighted 】 and pyramid image fusion with matlab code
- 『网易实习』周记(三)
- Hash collisions and consistent hashing
- 秒懂大模型 | 3步搞定AI写摘要
- Day115. Shangyitong: Background user management: user lock and unlock, details, authentication list approval
- Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021:解读
- Ask God to answer, how should this kind of sql be written?
- 3.Bean的作用域与生命周期
- typescript32-ts中的typeof
- 密码学的基础:X.690和对应的BER CER DER编码
猜你喜欢
随机推荐
『网易实习』周记(一)
【刷题篇】打家劫舍
MySQL——增删查改操作
成都openGauss用户组招募啦!
When paying attention to the "Internet +" model, you usually only focus on the "Internet +" model itself
Fundamentals of Cryptography: X.690 and Corresponding BER CER DER Encodings
求大神解答,这种 sql 应该怎么写?
typescript32-ts中的typeof
About MySQL data insertion (advanced usage)
Golang分布式应用之Redis
Centos7 安装postgresql并开启远程访问
Rust P2P网络应用实战-1 P2P网络核心概念及Ping程序
华为5年女测试工程师离职:多么痛的领悟...
Navicat data shows incomplete resolution
Handwriting a blogging platform ~ the first day
电子制造仓储条码管理系统解决方案
手写博客平台~第二天
AntPathMatcher使用
CodeTon Round 2 D. Magical Array 规律
Image fusion based on weighted 】 and pyramid image fusion with matlab code