当前位置:网站首页>Feature extraction and detection 14 plane object recognition
Feature extraction and detection 14 plane object recognition
2022-07-06 14:12:00 【QT Visual Science】
Plane object recognition
Object deformation and position transformation
Code demonstration
Object deformation and position transformation
1. findHomography – Find the perspective transformation of two planes , Generating transformation matrix
2. perspectiveTransform Perspective transformation
Code demonstration
#include <opencv2/opencv.hpp>
#include <opencv2/xfeatures2d.hpp>
#include <iostream>
#include <math.h>
using namespace cv;
using namespace std;
using namespace cv::xfeatures2d;
int main(int argc, char** argv) {
Mat img1 = imread("D:/vcprojects/images/box.png", IMREAD_GRAYSCALE);
Mat img2 = imread("D:/vcprojects/images/box_in_scene.png", IMREAD_GRAYSCALE);
if (!img1.data || !img2.data) {
return -1;
}
imshow("object image", img1);
imshow("object in scene", img2);
// surf featurs extraction
int minHessian = 400;
Ptr<SURF> detector = SURF::create(minHessian);
vector<KeyPoint> keypoints_obj;
vector<KeyPoint> keypoints_scene;
Mat descript
边栏推荐
猜你喜欢
记一次edu,SQL注入实战
How to turn wechat applet into uniapp
Build domain environment (win)
Hackmyvm target series (7) -tron
Matlab opens M file garbled solution
Programme de jeu de cartes - confrontation homme - machine
《英特尔 oneAPI—打开异构新纪元》
Attach the simplified sample database to the SQLSERVER database instance
Poker game program - man machine confrontation
[dark horse morning post] Shanghai Municipal Bureau of supervision responded that Zhong Xue had a high fever and did not melt; Michael admitted that two batches of pure milk were unqualified; Wechat i
随机推荐
Canvas foundation 1 - draw a straight line (easy to understand)
HackMyvm靶机系列(1)-webmaster
实验七 常用类的使用(修正帖)
HackMyvm靶机系列(2)-warrior
WEB漏洞-文件操作之文件包含漏洞
HackMyvm靶机系列(3)-visions
强化学习基础记录
Programme de jeu de cartes - confrontation homme - machine
TypeScript快速入门
Safe driving skills on ice and snow roads
Wei Shen of Peking University revealed the current situation: his class is not very good, and there are only 5 or 6 middle-term students left after leaving class
[MySQL database learning]
网络层—简单的arp断网
Canvas foundation 2 - arc - draw arc
[VMware abnormal problems] problem analysis & Solutions
7-14 错误票据(PTA程序设计)
Experiment 9 input and output stream (excerpt)
7-9 make house number 3.0 (PTA program design)
1. Preliminary exercises of C language (1)
强化学习基础记录