当前位置:网站首页>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;}边栏推荐
- 【刷题篇】打家劫舍
- PHP 使用 PHPRedis 与 Predis
- 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
- Effects of Scraping and Aggregation
- oracle查询扫描全表和走索引
- 【轮式里程计】
- 字节给我狠狠上了一课:危机来的时候你连准备时间都没有...
- 6-25 Vulnerability Exploitation - irc Backdoor Exploitation
- LeetCode brush diary: LCP 03. Machine's adventure
- AntPathMatcher uses
猜你喜欢
随机推荐
LeetCode刷题日记:153、寻找旋转排序数组中的最小值
【ORB_SLAM2】SetPose、UpdatePoseMatrices
Redis 订阅与 Redis Stream
Effects of Scraping and Aggregation
Chengdu openGauss user group recruit!
求大神解答,这种 sql 应该怎么写?
Navicat数据显示不完全的解决方法
喜报 | AR 开启纺织产业新模式,ALVA Systems 再获殊荣!
三本毕业的我被腾讯拒绝了十四次,最终成功入职阿里
libcurl访问url保存为文件的简单示例
C language inserted into the characters of simple exercises
oracle查询扫描全表和走索引
力扣、752-打开转盘锁
使用百度EasyDL实现厂区工人抽烟行为识别
YGG 公会发展计划第 1 季总结
AOF重写
【轮式里程计】
软件测试功能测试全套常见面试题【开放性思维题】面试总结4-3
Anti-oversold and high concurrent deduction scheme for e-commerce inventory system
待读书单列表









