#include "opencv2/imgproc.hpp"
#include "opencv2/core.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/xfeatures2d.hpp"
#include <vector>
#include <chrono>
|
| void | extractSiftFeatures (const Mat &img, vector< KeyPoint > &keypoints, Mat &descriptor, int intervals=SIFT_INTERVALS, double sigma=SIFT_SIGMA, double contrast_thres=SIFT_CONTRAST_THRES, int curvature_thres=SIFT_CURVATURE_THRES, bool img_dbl=SIFT_IMG_DBL, int descr_width=SIFT_DESCR_WIDTH, int descr_hist_bins=SIFT_DESCR_HIST_BINS) |
| |
| void | convertGrayAndNormalize (const Mat &input, Mat &output) |
| |
| void | resizeHalf (const Mat &input, Mat &output, Size outSize) |
| |
| void | filterCreation (double **GKernel, int kSize, double sigma) |
| |
| void | filterCreation1D (float *GKernel, int kSize, double sigma) |
| |
| void | gaussianBlur (const Mat &src, Mat &output, int kSize, double **kernel) |
| |
| void | start_time (system_clock::time_point &startTime) |
| |
| void | end_time (system_clock::time_point &startTime, system_clock::time_point &endTime, const char *step_name) |
| |
| void | statusBarUpdate (Mat &part, Mat &totalResult, int idx, int portion, bool is_left) |
| |
◆ SIFT_CONTRAST_THRES
| #define SIFT_CONTRAST_THRES 0.03 |
◆ SIFT_CURVATURE_THRES
| #define SIFT_CURVATURE_THRES 10 |
◆ SIFT_DESCR_HIST_BINS
| #define SIFT_DESCR_HIST_BINS 8 |
◆ SIFT_DESCR_WIDTH
| #define SIFT_DESCR_WIDTH 4 |
◆ SIFT_IMG_DBL
| #define SIFT_IMG_DBL false |
◆ SIFT_INTERVALS
◆ SIFT_SIGMA
◆ STATUS_BAR
◆ convertGrayAndNormalize()
| void convertGrayAndNormalize |
( |
const Mat & |
input, |
|
|
Mat & |
output |
|
) |
| |
Change 3Channel RGB image to normalized gray image.
- Parameters
-
| input | 3Channel RGB input image |
| output | normalized grayscale output image with pixel values in 0.0f~1.0f |
◆ end_time()
| void end_time |
( |
system_clock::time_point & |
startTime, |
|
|
system_clock::time_point & |
endTime, |
|
|
const char * |
step_name |
|
) |
| |
◆ extractSiftFeatures()
[Detect & extract sift features for an image]
- Parameters
-
| img | [source image for extract sift features : grayscale image with pixel values in 0.0f~1.0f] |
| keypoints | [vector for store sift feature point] |
| descriptor | [Mat for store sift descriptor, each row for a keypoint] |
| intervals | [the number of sampled intervals per octave] |
| sigma | [sigma for initial gaussian smoothing] |
| contrast_thres | [threshold on keypoint contrast] |
| curvature_thres | [threshold on keypoint ratio of principle curvatures] |
| img_dbl | [double image size before pyramid construction?] |
| descr_width | [width of descriptor histogram array] |
| descr_hist_bins | [number of bins per histogram in descriptor array] |
◆ filterCreation()
| void filterCreation |
( |
double ** |
GKernel, |
|
|
int |
kSize, |
|
|
double |
sigma |
|
) |
| |
Create 2D gaussian filter
- Parameters
-
| GKernel | output 2D gaussian filter |
| kSize | gaussian kernel size |
| sigma | gaussian sigma |
◆ filterCreation1D()
| void filterCreation1D |
( |
float * |
GKernel, |
|
|
int |
kSize, |
|
|
double |
sigma |
|
) |
| |
Create 1D gaussian filter
- Parameters
-
| GKernel | output 1D gaussian filter |
| kSize | gaussian kernel size |
| sigma | gaussian sigma |
◆ gaussianBlur()
| void gaussianBlur |
( |
const Mat & |
src, |
|
|
Mat & |
output, |
|
|
int |
kSize, |
|
|
double ** |
kernel |
|
) |
| |
Blurs an image using a Gaussian filter using padding
Assume that dst already copy the data of src
- Parameters
-
| src | input image; Normalized grayscale input image |
| output | output image of the same size and type as src. |
| kSize | width of the input image |
| kernel | Gaussian 2D kernel |
◆ resizeHalf()
| void resizeHalf |
( |
const Mat & |
input, |
|
|
Mat & |
output, |
|
|
Size |
outSize |
|
) |
| |
Resize image using Nearest neighbor sampling. Reduce width and height in half. (Native)
- Parameters
-
| input | normalized grayscale input image |
| output | resized output image |
| outSize | output image size |
◆ start_time()
| void start_time |
( |
system_clock::time_point & |
startTime | ) |
|
◆ statusBarUpdate()
| void statusBarUpdate |
( |
Mat & |
part, |
|
|
Mat & |
totalResult, |
|
|
int |
idx, |
|
|
int |
portion, |
|
|
bool |
is_left |
|
) |
| |
◆ gKernel
◆ global_elapsed_Time
| std::chrono::duration<double> global_elapsed_Time[4] |
|
extern |
◆ is_left
◆ kSize
◆ partM
◆ totalResult