SIFT算法中做特征点匹配的时候就会利用到k-d树。而特征点匹配实际上就是一个通过距离函数在高维矢量之间进行相似性检索的问题。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // PSNR.cpp : 定义控制台应用程序的入口点。 | |
| // | |
| #include "stdafx.h" | |
| #include <iostream> // Console I/O | |
| #include <sstream> // String to number conversion | |
| #include <opencv2/core/core.hpp> // Basic OpenCV structures | |
| #include <opencv2/imgproc/imgproc.hpp>// Image processing methods for the CPU |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <opencv2/opencv.hpp> | |
| #include <iostream> | |
| using namespace std; | |
| using namespace cv; | |
| int main() | |
| { | |
| Mat image = imread("C:/Users/Jun/Desktop/lena.jpg",0); | |
| Mat temp(image.size(), CV_32FC1, Scalar(0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //原文:https://blog.csdn.net/zilanpotou182/article/details/68061929 | |
| #include <iostream> | |
| #include <stdio.h> | |
| #include "opencv2/core.hpp" | |
| #include "opencv2/core/utility.hpp" | |
| #include "opencv2/core/ocl.hpp" | |
| #include "opencv2/imgcodecs.hpp" | |
| #include "opencv2/highgui.hpp" | |
| #include "opencv2/features2d.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import cv2 | |
| from matplotlib import pyplot as plt | |
| from mpl_toolkits.mplot3d import axes3d | |
| FLANN_INDEX_KDTREE = 0 | |
| index_params = dict(algorithm = FLANN_INDEX_KDTREE, trees = 5) | |
| search_params = dict(checks = 50) | |
| flann = cv2.FlannBasedMatcher(index_params, search_params) |
Probably the most straight forward way to start generating Point Clouds from a set of pictures.
VisualSFM is a GUI application for 3D reconstruction using structure from motion (SFM). The reconstruction system integrates several of my previous projects: SIFT on GPU(SiftGPU), Multicore Bundle Adjustment, and Towards Linear-time Incremental Structure from Motion. VisualSFM runs fast by exploiting multicore parallelism for feature detection, feature matching, and bundle adjustment.
For dense reconstruction, this program supports Yasutaka Furukawa's PMVS/CMVS tool chain, and can prepare data for Michal Jancosek's CMP-MVS. In addition, the output of VisualSFM is natively supported by Mathias Rothermel and Konrad Wenzel's [SURE]