当前位置:网站首页>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;}
边栏推荐
猜你喜欢
项目后台技术Express
Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021:解读
YGG Guild Development Plan Season 1 Summary
typescript34-class的基本使用
Win Go开发包安装配置、GoLand配置
typescript37-class的构造函数实例方法继承(extends)
Hiring a WordPress Developer: 4 Practical Ways
5年自动化测试经验的一些感悟:做UI自动化一定要跨过这10个坑
HSDC和独立生成树相关
typescript30-any类型
随机推荐
记录一次数组转集合出现错误的坑点,尽量使用包装类型数组进行转换
Constructor of typescript35-class
Navicat data shows incomplete resolution
数据链路层的数据传输
A full set of common interview questions for software testing functional testing [open thinking questions] interview summary 4-3
『网易实习』周记(三)
typescript35-class的构造函数
华为5年女测试工程师离职:多么痛的领悟...
Record the pits where an error occurs when an array is converted to a collection, and try to use an array of packaging types for conversion
当关注「互联网+」模式的时候,通常仅仅只是在关注「互联网+」模式本身
oracle查询扫描全表和走索引
雇用WordPress开发人员:4个实用的方法
6-24漏洞利用-vnc密码破解
电子制造仓储条码管理系统解决方案
『网易实习』周记(二)
3. Bean scope and life cycle
Day115. Shangyitong: Background user management: user lock and unlock, details, authentication list approval
【轮式里程计】
Entry name ‘org/apache/commons/codec/language/bm/gen_approx_greeklatin.txt’ collided
垃圾回收器CMS和G1