资源简介
opencv实现的PCASift算法,步骤明确。在你电脑上运行可能会提示丢失cvaux.lib文件,在我的资源中提供了该文件,下载copy到你的opencv相应的库文件夹下。

代码片段和文件信息
#include “sift_includes.h“
// rotate covariance matrix
void rot_cov(CvMat *R CvMat *cov)
{
CvMat *W *U *V;
W = cvCreateMat(3 3 CV_32FC1);
U = cvCreateMat(3 3 CV_32FC1);
V = cvCreateMat(3 3 CV_32FC1);
cvSVD(cov W U V);
// u = r * u;
cvMatMul(R U U);
// v = r * v;
cvMatMul(R V V);
// v = v‘
cvTranspose(V V);
// v = w * v
cvMatMul(W V V);
// cov = u * v
cvMatMul(U V cov);
cvReleaseMat(&W);
cvReleaseMat(&U);
cvReleaseMat(&V);
}
// print temporal matches in a MATLAB friendly fashion
void show_temporal_matches(vector l)
{
unsigned int i;
for (i=0; i {
printf(“%f %f %f %f %f %f\n“
l[i].old_feature.x
l[i].old_feature.y
l[i].old_feature.z
l[i].new_feature.x
l[i].new_feature.y
l[i].new_feature.z);
}
}
// write list to file
void write_list_to_file(vector l char *filename)
{
FILE *fp = fopen(filename “w“);
unsigned int i;
for (i=0; i fprintf(fp “%f\t%f\t%f\n“ l[i].x l[i].y l[i].z);
fclose(fp);
}
// return true if matrix contains NaN values
bool isMatrixNan(CvMat *m)
{
bool ret = false;
int r c;
for (r=0; rrows; r++)
for (c=0; ccols; c++)
{
if (cvIsNaN(cvmGet(m r c)) == 1)
{
ret = true;
break;
}
}
return ret;
}
// pool covariances
void covariance_pool(vector in CvMat *out)
{
int len = (int)in.size();
if (len == 0)
{
printf(“cv_type_converter.c: WARNING covariance_pool() got a list with 0 entries\n“);
return;
}
int i;
cvSetZero(out);
for (i=0; i cvAdd(in[i] out out);
mul_inplace(out 1.0/(float)len);
}
// perform inplance multiplication of matrix dst with specified multiplier
void mul_inplace(CvMat *dst float multiplier)
{
int r c;
float tmp;
for (r=0; rrows; r++)
for (c=0; ccols; c++)
{
tmp = cvmGet(dst r c) * multiplier;
cvmSet(dst r c tmp);
}
}
void show_matlab_matrix_as_row(CvMat *m)
{
int r c;
for (r=0; rrows; r++)
for (c=0; ccols; c++)
printf(“%f\t“ cvmGet(m r c));
printf(“\n“);
}
void show_matlab_vector_as_row(CvMat *m)
{
int r;
for (r=0; rrows; r++)
printf(“%f\t“ cvmGet(m r 0));
printf(“\n“);
}
// populate float array using matrix
void populate_array_9(CvMat *src float *dst)
{
int r c i=0;
for (r=0; r<3; r++)
for (c=0; c<3; c++)
{
dst[i] = cvmGet(src r c);
i++;
}
}
// populate matrix using float array
void populate_matrix_3x3(float *src CvMat *dst)
{
int r c i=0;
for (r=0; r<3; r++)
for (c=0; c<3; c++)
{
cvmSet(dst r c src[i]);
i++;
}
}
// show matrix on screen
void show(CvMat
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 877 2006-02-09 17:01 PCASift\Backup\PCA Shift.sln
..A..H. 9728 2006-03-20 09:37 PCASift\Backup\PCA Shift.v11.suo
文件 884 2014-04-11 16:59 PCASift\Backup1\PCA Shift.sln
..A..H. 9728 2006-03-20 09:37 PCASift\Backup1\PCA Shift.v11.suo
文件 9692 2005-05-26 14:11 PCASift\cv_type_converter.c
文件 1625 2005-05-26 14:11 PCASift\cv_type_converter.h
文件 2052 2014-04-14 15:28 PCASift\Debug\BscMake.command.1.tlog
文件 1590 2014-04-14 15:28 PCASift\Debug\bscmake.read.1.tlog
文件 1438 2014-04-14 15:28 PCASift\Debug\bscmake.write.1.tlog
文件 9002 2014-04-14 15:28 PCASift\Debug\cl.command.1.tlog
文件 253820 2014-04-14 15:28 PCASift\Debug\CL.read.1.tlog
文件 6530 2014-04-14 15:28 PCASift\Debug\CL.write.1.tlog
文件 294027 2014-04-11 17:03 PCASift\Debug\edgeResponseFilter.obj
文件 0 2014-04-11 17:03 PCASift\Debug\edgeResponseFilter.sbr
文件 211949 2014-04-11 17:03 PCASift\Debug\gaussianWindow.obj
文件 0 2014-04-11 17:02 PCASift\Debug\gaussianWindow.sbr
文件 6217 2014-04-11 17:03 PCASift\Debug\km_cluster.obj
文件 0 2014-04-11 17:02 PCASift\Debug\km_cluster.sbr
文件 2 2014-04-14 15:28 PCASift\Debug\li
文件 2 2014-04-14 15:28 PCASift\Debug\li
文件 2 2014-04-14 15:28 PCASift\Debug\li
文件 2 2014-04-14 15:28 PCASift\Debug\li
文件 4392 2014-04-14 15:28 PCASift\Debug\li
文件 9698 2014-04-14 15:28 PCASift\Debug\li
文件 1630 2014-04-14 15:28 PCASift\Debug\li
文件 303623 2014-04-11 17:03 PCASift\Debug\localizer.obj
文件 0 2014-04-11 17:02 PCASift\Debug\localizer.sbr
文件 243085 2014-04-14 15:28 PCASift\Debug\main.obj
文件 0 2014-04-14 15:28 PCASift\Debug\main.sbr
文件 276327 2014-04-11 17:03 PCASift\Debug\matcher.obj
............此处省略100个文件信息
相关资源
- 基于OpenCV的数字识别468815
- 使用opencv去掉二值化图像中黑色面积
- opencv环境配置
- win10 64位下编译的opencv4.5.5库,opencv
- NVIDIAOpticalFlowSDK-79c6cee80a2df9a196f20afd6
- opencv_contrib-3.4.0.zip
- opencv2.4.9源码分析——SIFT
- 用两个摄像头实现,双目标定,双目
- opencv_traincascade训练分类器,手势识别
- opencv3.0交叉编译用parallel.cpp
- 基于opencv的图像识别识别图像中的色
- 基于openCV的识别特定颜色区域
- 基于OpenCV的分水岭算法实现
- QT+opencv+OCR 身份证号码,银行卡号识别
- opencv视频特定颜色区域识别
- 把RGB转换为HSV和HSI然后根据黄色和蓝
- opencv视觉测距
- 基于Qt和opencv的身份证号码识别系统
- opencv_ffmpeg249.dll
- SfM稀疏三维点云重建--完整工程文件
- 基于opencv的数人头程序源代码
- 利用OpenCV中的Stitcher类实现全景图像拼
- opencv实现的sift算法源码,包含了图像
- openCV 上的小波变换
- 基于OPENCV的车牌识别系统设计
- 617张国内车牌60-17bmp图片用于OpenCV正样
- hog特征提取,c版本代码
- 基于Qt5.8+OpenCV3.2的Basler多相机触发开
- 基于Opencv实现的图像纠偏
- ImageWatch2019.vsix
评论
共有 条评论