Amélioration Save/Load + Tests Robobo + modif gitIgnore

This commit is contained in:
Unknown 2018-08-08 15:45:19 +02:00
parent 09d1eeb838
commit 1cd55aba7a
6734 changed files with 102638 additions and 39401 deletions

8
.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
ASIFT_tests/demo_ASIFT_src/test/
*.jpg
*.png
*.o

View file

@ -1,6 +1,6 @@
#include "ASIFT_matcher.hpp"
ASIFT_matcher::ASIFT_matcher(): _nb_refs(0), _total_num_matchings(0), _resize_imgs(false), _showDebug(false)
ASIFT_matcher::ASIFT_matcher(): _nb_refs(0), _total_num_matchings(0), _resize_imgs(false), _showDebug(false), _showInfo(true)
{
default_sift_parameters(_siftParam);
}
@ -63,111 +63,10 @@ bool ASIFT_matcher::addReference(const char* image_path, unsigned int num_tilts)
size_t w1=gray.width(), h1=gray.height();
ipixels1.assign(gray.begin(), gray.end());
if(_showInfo)
std::cout<<"Building reference from "<< image_path << std::endl;
return addReference(ipixels1, w1, h1, num_tilts);
// ///// Resize the images to area wS*hW in remaining the apsect-ratio
// ///// Resize if the resize flag is not set or if the flag is set unequal to 0
// float wS = IM_X;
// float hS = IM_Y;
// float zoom1=0;
// int wS1=0, hS1=0;
// vector<float> ipixels1_zoom;
// if(_resize_imgs)
// {
// cout << "WARNING: The input image is resized to " << wS << "x" << hS << " for ASIFT. " << endl
// << " But the results will be normalized to the original image size." << endl << endl;
// float InitSigma_aa = 1.6;
// float fproj_p, fproj_bg;
// char fproj_i;
// float *fproj_x4, *fproj_y4;
// int fproj_o;
// fproj_o = 3;
// fproj_p = 0;
// fproj_i = 0;
// fproj_bg = 0;
// fproj_x4 = 0;
// fproj_y4 = 0;
// float areaS = wS * hS;
// // Resize image 1
// float area1 = w1 * h1;
// zoom1 = sqrt(area1/areaS);
// wS1 = (int) (w1 / zoom1);
// hS1 = (int) (h1 / zoom1);
// int fproj_sx = wS1;
// int fproj_sy = hS1;
// float fproj_x1 = 0;
// float fproj_y1 = 0;
// float fproj_x2 = wS1;
// float fproj_y2 = 0;
// float fproj_x3 = 0;
// float fproj_y3 = hS1;
// /* Anti-aliasing filtering along vertical direction */
// if ( zoom1 > 1 )
// {
// float sigma_aa = InitSigma_aa * zoom1 / 2;
// GaussianBlur1D(ipixels1,w1,h1,sigma_aa,1);
// GaussianBlur1D(ipixels1,w1,h1,sigma_aa,0);
// }
// // simulate a tilt: subsample the image along the vertical axis by a factor of t.
// ipixels1_zoom.resize(wS1*hS1);
// fproj (ipixels1, ipixels1_zoom, w1, h1, &fproj_sx, &fproj_sy, &fproj_bg, &fproj_o, &fproj_p,
// &fproj_i , fproj_x1 , fproj_y1 , fproj_x2 , fproj_y2 , fproj_x3 , fproj_y3, fproj_x4, fproj_y4);
// }
// else
// {
// ipixels1_zoom.resize(w1*h1);
// ipixels1_zoom = ipixels1;
// wS1 = w1;
// hS1 = h1;
// zoom1 = 1;
// }
// // image new_ref;
// // new_ref.img = ipixels1_zoom;
// // new_ref.width = wS1;
// // new_ref.height = hS1;
// ///// Compute ASIFT keypoints
// asift_keypoints keys;
// // vector< vector< keypointslist > >* keys = new vector< vector< keypointslist > >;
// int num_keys = 0;
// time_t tstart, tend;
// tstart = time(0);
// num_keys = compute_asift_keypoints(ipixels1_zoom, wS1, hS1, num_tilts, _showDebug, keys, _siftParam);
// tend = time(0);
// //Save data
// _im_refs.push_back(ipixels1_zoom);
// _size_refs.push_back(make_pair(wS1,hS1));
// _zoom_refs.push_back(zoom1);
// _num_keys.push_back(num_keys);
// _num_tilts.push_back(num_tilts);
// _keys.push_back(keys);
// _nb_refs++;
// cout<<"Reference built in "<< difftime(tend, tstart) << " seconds." << endl;
// cout<<" "<< num_keys <<" ASIFT keypoints found in "<< image_path << endl;
// return true;
}
//Image : Gray scale image (image size = w*h)
@ -193,6 +92,7 @@ bool ASIFT_matcher::addReference(const vector<float>& image, unsigned int w, uns
if(_resize_imgs)
{
if(_showInfo)
cout << "WARNING: The input image is resized to " << wS << "x" << hS << " for ASIFT. " << endl
<< " But the results will be normalized to the original image size." << endl << endl;
@ -273,8 +173,9 @@ bool ASIFT_matcher::addReference(const vector<float>& image, unsigned int w, uns
_nb_refs++;
cout<<"Reference built in "<< difftime(tend, tstart) << " seconds." << endl;
cout<<" "<< num_keys <<" ASIFT keypoints found."<< endl;
if(_showInfo)
cout<<"Reference built in "<< difftime(tend, tstart) << " seconds." << endl
<<" "<< num_keys <<" ASIFT keypoints found."<< endl;
return true;
}
@ -284,7 +185,7 @@ unsigned int ASIFT_matcher::match(const char* image_path, unsigned int num_tilts
{
if(_nb_refs<=0)
{
cout<<"ASIFT_matcher Error : Trying to match without reference"<<endl;
std::cerr<<"ASIFT_matcher Error : Trying to match without reference"<<std::endl;
return 0;
}
@ -327,6 +228,7 @@ unsigned int ASIFT_matcher::match(const char* image_path, unsigned int num_tilts
size_t w1=gray.width(), h1=gray.height();
ipixels1.assign(gray.begin(), gray.end());
if(_showInfo)
std::cout<<"Matching from "<<image_path<<std::endl;
return match(ipixels1, w1, h1, num_tilts);
@ -356,6 +258,7 @@ unsigned int ASIFT_matcher::match(const vector<float>& image, unsigned int w, un
if(_resize_imgs)
{
if(_showInfo)
cout << "WARNING: The input image is resized to " << wS << "x" << hS << " for ASIFT. " << endl
<< " But the results will be normalized to the original image size." << endl << endl;
@ -424,8 +327,10 @@ unsigned int ASIFT_matcher::match(const vector<float>& image, unsigned int w, un
num_keys = compute_asift_keypoints(ipixels1_zoom, wS1, hS1, num_tilts, _showDebug, keys, _siftParam);
tend = time(0);
cout<< "Keypoints computation accomplished in " << difftime(tend, tstart) << " seconds." << endl;
cout<<" "<< num_keys <<" ASIFT keypoints found."<< endl;
if(_showInfo)
cout<< "Keypoints computation accomplished in " << difftime(tend, tstart) << " seconds." << endl
<<" "<< num_keys <<" ASIFT keypoints found."<< endl;
//// Match ASIFT keypoints
_total_num_matchings=0;
@ -435,6 +340,7 @@ unsigned int ASIFT_matcher::match(const vector<float>& image, unsigned int w, un
int num_matchings = 0;
matchingslist matchings;
if(_showInfo)
cout << "Matching the keypoints..." << endl;
tstart = time(0);
try
@ -449,6 +355,7 @@ unsigned int ASIFT_matcher::match(const vector<float>& image, unsigned int w, un
// cout<< _keys[i].size()<< " " << _keys[i][0].size() <<" "<< _keys[i][0][0].size()<<endl;
tend = time(0);
if(_showInfo)
cout << "Keypoints matching accomplished in " << difftime(tend, tstart) << " seconds." << endl;
_num_matchings.push_back(num_matchings);
@ -536,6 +443,7 @@ bool ASIFT_matcher::computeCenter(int& cx, int& cy) const
//Return true if successfull
bool ASIFT_matcher::distFilter(int threshold=2)
{
if(_showInfo)
cout<<"filtering keypoint..."<<endl;
if(getNbMatch()==0)
{
@ -627,12 +535,16 @@ bool ASIFT_matcher::saveReferences(const char* ref_path) const
// Follow the same convention of David Lowe:
// the first line contains the number of keypoints and the length of the desciptors (128)
// Added number of tilts
// Added sizes
file_key1 << _num_keys[j] << " " << VecLength << " " <<_size_refs[j].first<<" "<<_size_refs[j].second<<" "<<std::endl; //<<_num_tilts[j] << " "
for (int tt = 0; tt < (int) kps.size(); tt++)
// Added sizes (* zoom_ref useful ?)
file_key1 << _num_keys[j] << " " << VecLength << " " <<_size_refs[j].first*_zoom_refs[j]<<" "<<_size_refs[j].second*_zoom_refs[j]<<" "<<_num_tilts[j] << " "<<std::endl; //<<_num_tilts[j] << " "
for (int tt = 0; tt < (int) kps.size(); tt++) //kps.size = num_tilt
{
file_key1<<kps[tt].size()<<" "<<std::endl;
for (int rr = 0; rr < (int) kps[tt].size(); rr++)
{
file_key1<<kps[tt][rr].size()<<" "<<std::endl;
keypointslist::iterator ptr = kps[tt][rr].begin();
for(int i=0; i < (int) kps[tt][rr].size(); i++, ptr++)
{
@ -662,13 +574,12 @@ bool ASIFT_matcher::saveReferences(const char* ref_path) const
//Load reference data necessary for the matching
//Doesn't load references images or Sift parameters
//TODO : split data between different tilts
bool ASIFT_matcher::loadReferences(const char* ref_path)
{
std::ifstream ref_file(ref_path);
std::string line, tmp;
std::stringstream iss;
pair<int,int> size_tmp;
pair<int,int> img_size_tmp;
if (ref_file.is_open())
{
std::getline(ref_file, line);
@ -678,7 +589,7 @@ bool ASIFT_matcher::loadReferences(const char* ref_path)
_keys = std::vector<asift_keypoints>(_nb_refs);
_num_keys = std::vector< int >(_nb_refs);
_size_refs= std::vector< pair<int,int> >(_nb_refs);
_num_tilts = std::vector< int >(_nb_refs,1);
_num_tilts = std::vector< int >(_nb_refs);
_zoom_refs = std::vector<float>(_nb_refs,1);
for(unsigned int i = 0; i<_nb_refs;i++)
{
@ -695,19 +606,38 @@ bool ASIFT_matcher::loadReferences(const char* ref_path)
return false;
}
// std::getline(iss,tmp,' ');
// _num_tilts[i]=atoi(tmp.c_str());
std::getline(iss,tmp,' ');
img_size_tmp.first=atoi(tmp.c_str());
std::getline(iss,tmp,' ');
size_tmp.first=atoi(tmp.c_str());
img_size_tmp.second=atoi(tmp.c_str());
_size_refs[i]=img_size_tmp;
std::getline(iss,tmp,' ');
size_tmp.second=atoi(tmp.c_str());
_num_tilts[i]=atoi(tmp.c_str());
_size_refs[i]=size_tmp;
asift_keypoints nakp(_num_tilts[i]);
keypointslist list;
for(unsigned int j =0; j<(unsigned int)_num_keys[i];j++)
for(unsigned int j =0; j<(unsigned int)_num_tilts[i];j++)
{
std::getline(ref_file, line);
std::stringstream iss(line);
int veclist_size_tmp = atoi(line.c_str());
std::vector< keypointslist > vkpl(veclist_size_tmp);
for(unsigned int k =0; k<(unsigned int)veclist_size_tmp;k++)
{
std::getline(ref_file, line);
std::stringstream iss(line);
int list_size_tmp = atoi(line.c_str());
keypointslist list(list_size_tmp);
for(unsigned int l =0; l<(unsigned int)list_size_tmp;l++)
{
keypoint nkp;
@ -732,24 +662,19 @@ bool ASIFT_matcher::loadReferences(const char* ref_path)
std::getline(iss,tmp,' ');
nkp.angle=atof(tmp.c_str());
for(unsigned int k=0; k<(int) VecLength; k++)
for(unsigned int m=0; m<(int) VecLength; m++)
{
std::getline(iss,tmp,' ');
nkp.vec[k]=atof(tmp.c_str());
nkp.vec[m]=atof(tmp.c_str());
}
list.push_back(nkp);
// if(j<5)
// {
// cout<<"x : "<<list[j].x<<endl;
// cout<<"y : "<<list[j].y<<endl;
// cout<<"Scale : "<<list[j].scale<<endl;
// }
list[l]=nkp;
}
std::vector< keypointslist > vkps(1,list);
asift_keypoints akps(1,vkps);
_keys[i]=akps;
vkpl[k]=list;
}
nakp[j]=vkpl;
}
_keys[i]=nakp;
// std::getline(ref_file, line);
}
}
@ -763,6 +688,156 @@ bool ASIFT_matcher::loadReferences(const char* ref_path)
return true;
}
// bool ASIFT_matcher::saveReferences(const char* ref_path) const
// {
// // Write all the keypoints (row, col, scale, orientation, desciptor (128 integers))
// std::ofstream file_key1(ref_path);
// if (file_key1.is_open())
// {
// file_key1<<_nb_refs<<" "<<std::endl;
// for(unsigned int j=0; j<_keys.size();j++)
// {
// asift_keypoints kps =_keys[j];
// // Follow the same convention of David Lowe:
// // the first line contains the number of keypoints and the length of the desciptors (128)
// // Added number of tilts
// // Added sizes
// file_key1 << _num_keys[j] << " " << VecLength << " " <<_size_refs[j].first<<" "<<_size_refs[j].second<<" "<<std::endl; //<<_num_tilts[j] << " "
// for (int tt = 0; tt < (int) kps.size(); tt++) //kps.size = num_tilt
// {
// for (int rr = 0; rr < (int) kps[tt].size(); rr++)
// {
// keypointslist::iterator ptr = kps[tt][rr].begin();
// for(int i=0; i < (int) kps[tt][rr].size(); i++, ptr++)
// {
// file_key1 << _zoom_refs[j]*ptr->x << " " << _zoom_refs[j]*ptr->y << " " << _zoom_refs[j]*ptr->scale << " " << ptr->angle;
// for (int ii = 0; ii < (int) VecLength; ii++)
// {
// file_key1 << " " << ptr->vec[ii];
// }
// file_key1 << std::endl;
// }
// }
// }
// // file_key1<<std::endl;
// }
// }
// else
// {
// std::cerr << "Unable to open the file :"<<ref_path;
// return false;
// }
// file_key1.close();
// return true;
// }
//Load reference data necessary for the matching
//Doesn't load references images or Sift parameters
//TODO : split data between different tilts
// bool ASIFT_matcher::loadReferences(const char* ref_path)
// {
// std::ifstream ref_file(ref_path);
// std::string line, tmp;
// std::stringstream iss;
// pair<int,int> size_tmp;
// if (ref_file.is_open())
// {
// std::getline(ref_file, line);
// std::string::size_type sz;
// // _nb_refs = std::stoi(line, &sz); //C++11
// _nb_refs = atoi(line.c_str());
// _keys = std::vector<asift_keypoints>(_nb_refs);
// _num_keys = std::vector< int >(_nb_refs);
// _size_refs= std::vector< pair<int,int> >(_nb_refs);
// _num_tilts = std::vector< int >(_nb_refs,1);
// _zoom_refs = std::vector<float>(_nb_refs,1);
// for(unsigned int i = 0; i<_nb_refs;i++)
// {
// std::getline(ref_file, line);
// std::stringstream iss(line);
// std::getline(iss,tmp,' ');
// _num_keys[i]=atoi(tmp.c_str());
// std::getline(iss,tmp,' ');
// if(VecLength!=atoi(tmp.c_str()))
// {
// std::cerr<<"Error VecLength doesn't correspond..."<<std::endl;
// return false;
// }
// std::getline(iss,tmp,' ');
// size_tmp.first=atoi(tmp.c_str());
// std::getline(iss,tmp,' ');
// size_tmp.second=atoi(tmp.c_str());
// _size_refs[i]=size_tmp;
// std::getline(iss,tmp,' ');
// _num_tilts[i]=atoi(tmp.c_str());
// keypointslist list;
// for(unsigned int j =0; j<(unsigned int)_num_keys[i];j++)
// {
// keypoint nkp;
// std::getline(ref_file, line);
// std::stringstream iss(line);
// // if(j==0)
// // cout<<line<<endl;
// std::getline(iss,tmp,' ');
// // std::stof(nb_ref, nkp.x); //C++11
// nkp.x=atof(tmp.c_str());
// // if(j<5)
// // cout<<"x : "<<nkp.x<<endl;
// std::getline(iss,tmp,' ');
// nkp.y=atof(tmp.c_str());
// // if(j<5)
// // cout<<"y : "<<nkp.y<<endl;
// std::getline(iss,tmp,' ');
// nkp.scale=atof(tmp.c_str());
// // if(j<5)
// // cout<<"Scale : "<<nkp.scale<<endl;
// std::getline(iss,tmp,' ');
// nkp.angle=atof(tmp.c_str());
// for(unsigned int k=0; k<(int) VecLength; k++)
// {
// std::getline(iss,tmp,' ');
// nkp.vec[k]=atof(tmp.c_str());
// }
// list.push_back(nkp);
// // if(j<5)
// // {
// // cout<<"x : "<<list[j].x<<endl;
// // cout<<"y : "<<list[j].y<<endl;
// // cout<<"Scale : "<<list[j].scale<<endl;
// // }
// }
// std::vector< keypointslist > vkps(1,list);
// asift_keypoints akps(1,vkps);
// _keys[i]=akps;
// // std::getline(ref_file, line);
// }
// }
// else
// {
// std::cerr << "Unable to open the file :"<<ref_path;
// return false;
// }
// ref_file.close();
// return true;
// }
ASIFT_matcher& ASIFT_matcher::operator=(const ASIFT_matcher& m)
{
@ -792,10 +867,10 @@ void ASIFT_matcher::print() const
{
for(unsigned int i=0; i< _keys.size();i++)
{
cout<<"Ref size:"<<i<<" - size :"<<_keys[i].size()<<endl;
cout<<"Ref :"<<i<<" - Nb tilts : "<<_num_tilts[i]<< " - Nb keys : "<< _num_keys[i]<<endl;
for(unsigned int j=0; j<_keys[i].size();j++)
{
cout<<" "<<j<<" - size :"<<_keys[i][j].size()<<endl;
cout<<" Tilt "<<j<<" - size :"<<_keys[i][j].size()<<endl;
for(unsigned int k=0; k<_keys[i][j].size();k++)
{
cout<<" "<<k<<" - size :"<<_keys[i][j][k].size()<<endl;

View file

@ -66,16 +66,17 @@ public:
const siftPar& getSiftPar() const{ return _siftParam;}
void setSiftPar(const siftPar &newSiftPar){ _siftParam = newSiftPar;}
bool isResizingImg() const{ return _resize_imgs;}
void setResizeImg(bool resize_imgs){ _resize_imgs=resize_imgs;}
void resizeImg(bool resize_imgs){ _resize_imgs=resize_imgs;}
bool isShowingDebug() const{ return _showDebug;}
void showDebug(bool showDebug){ _showDebug=showDebug;}
bool isShowingInfo() const{ return _showInfo;}
void showInfo(bool showInfo){ _showInfo=showInfo;}
void print() const; //Debugging function
protected:
//Reference Images
// vector< image > _im_refs;
unsigned int _nb_refs;// = 0; //Number of reference images
vector< vector< float > > _im_refs; //Reference images used for matching
vector< pair<int,int> > _size_refs; //Width/Height
@ -96,6 +97,7 @@ protected:
//Flags
bool _resize_imgs;// = false; //Resize images to IM_X/IM_Y ?
bool _showDebug;// = 0; //Show debugging messages ?
bool _showInfo; //Show info messages
};
#endif

View file

@ -6,81 +6,3 @@
#IncludeRegexTransform:
./io_png/libs/png/png.h
../zlib/zlib.h
./io_png/libs/zlib/zlib.h
pngconf.h
./io_png/libs/png/pngconf.h
crtdbg.h
-
./io_png/libs/png/pngconf.h
pngusr.h
./io_png/libs/png/pngusr.h
config.h
./io_png/libs/png/config.h
windows.h
-
stdio.h
-
stdio.h
-
sys/types.h
-
setjmp.h
-
strings.h
-
string.h
-
stdlib.h
-
fp.h
-
math.h
-
m68881.h
-
mem.h
-
alloc.h
-
malloc.h
-
time.h
-
dos.h
-
./io_png/libs/zlib/zconf.h
windows.h
-
sys/types.h
-
unistd.h
-
unixio.h
-
./io_png/libs/zlib/zlib.h
zconf.h
./io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/io_png.c
stdlib.h
-
stdio.h
-
math.h
-
assert.h
-
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/png.h
png.h
-
io_png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/io_png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/io_png.h

View file

@ -6,3 +6,117 @@
#IncludeRegexTransform:
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/compute_asift_keypoints.cpp
assert.h
-
stdlib.h
-
stdio.h
-
math.h
-
time.h
-
compute_asift_keypoints.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/compute_asift_keypoints.h
omp.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/compute_asift_keypoints.h
library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
demo_lib_sift.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/demo_lib_sift.h
frot.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/frot.h
fproj.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/fproj.h
vector
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/demo_lib_sift.h
stdlib.h
-
assert.h
-
numerics1.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/numerics1.h
library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
filter.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/filter.h
domain.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/domain.h
splines.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/splines.h
flimage.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/flimage.h
vector
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/domain.h
numerics1.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/numerics1.h
library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
splines.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/splines.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/filter.h
library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/flimage.h
iostream
-
string
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/fproj.h
library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
vector
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/frot.h
library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
vector
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
stdio.h
-
stdlib.h
-
math.h
-
time.h
-
float.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/numerics1.h
stdio.h
-
stdlib.h
-
math.h
-
fstream
-
iostream
-
library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/splines.h
numerics1.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/numerics1.h
library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
string.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/string.h
vector
-

View file

@ -27,8 +27,6 @@ CMakeFiles/test_ASIFT.dir/ASIFT_matcher.cpp.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/library.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/numerics1.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/splines.h
/usr/include/opencv/cv.h
/usr/include/opencv/highgui.h
CMakeFiles/test_ASIFT.dir/compute_asift_keypoints.cpp.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/compute_asift_keypoints.cpp
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/compute_asift_keypoints.h

View file

@ -26,8 +26,6 @@ CMakeFiles/test_ASIFT.dir/ASIFT_matcher.cpp.o: frot.h
CMakeFiles/test_ASIFT.dir/ASIFT_matcher.cpp.o: library.h
CMakeFiles/test_ASIFT.dir/ASIFT_matcher.cpp.o: numerics1.h
CMakeFiles/test_ASIFT.dir/ASIFT_matcher.cpp.o: splines.h
CMakeFiles/test_ASIFT.dir/ASIFT_matcher.cpp.o: /usr/include/opencv/cv.h
CMakeFiles/test_ASIFT.dir/ASIFT_matcher.cpp.o: /usr/include/opencv/highgui.h
CMakeFiles/test_ASIFT.dir/compute_asift_keypoints.cpp.o: compute_asift_keypoints.cpp
CMakeFiles/test_ASIFT.dir/compute_asift_keypoints.cpp.o: compute_asift_keypoints.h

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 KiB

View file

@ -130,7 +130,7 @@ image are set to the value of the closest image pixel.
void ConvHorizontal(vector<float>& image, int width, int height, float *kernel, int ksize)
{
int rows, cols, r, c, i, halfsize;
float buffer[4000];
float buffer[5000];
vector<float> pixels(width*height);
@ -139,7 +139,7 @@ void ConvHorizontal(vector<float>& image, int width, int height, float *kernel,
halfsize = ksize / 2;
pixels = image;
assert(cols + ksize < 4000);
assert(cols + ksize < 5000);
for (r = 0; r < rows; r++) {
/* Copy the row into buffer with pixels at ends replicated for
@ -165,7 +165,7 @@ void ConvHorizontal(vector<float>& image, int width, int height, float *kernel,
void ConvVertical(vector<float>& image, int width, int height, float *kernel, int ksize)
{
int rows, cols, r, c, i, halfsize;
float buffer[4000];
float buffer[5000];
vector<float> pixels(width*height);
rows = height;
@ -173,7 +173,7 @@ void ConvVertical(vector<float>& image, int width, int height, float *kernel, in
halfsize = ksize / 2;
pixels = image;
assert(rows + ksize < 4000);
assert(rows + ksize < 5000);
for (c = 0; c < cols; c++) {
for (i = 0; i < halfsize; i++)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,6 +1,436 @@
0 5
539 7
0
315.444 258.335 287.672 258.758
426.906 295.66 440.176 317.661
306.55 228.25 274.809 227.61
312.679 317.378 268.687 338.554
311.468 251.003 283.062 249.146
309.987 301.593 266.551 319.799
312.535 318.82 268.482 339.697
283.63 241.967 0 0
343.019 242.391 0 0
395.144 313.545 0 0
303.021 195.407 8.55526e-38 5.89486e-38
314.336 253.198 0 0
321.116 255.156 74494.9 64824.8
314.134 248.42 11892.7 10251.7
364.865 309.114 571.198 564.546
310.986 314.466 -637.359 -795.004
389.821 328.222 8095.35 7442.99
388.092 268.632 781.242 551.196
310.763 317.685 1068.32 1345.51
296.858 306.912 29288.6 36097.9
359.635 237.516 41402.9 37189.9
310.25 306.607 2411.67 2911.07
359.629 259.769 706.376 536.012
311.133 252.134 5070.64 4503.94
263.032 282.079 29830.8 36533.8
261.705 281.305 644.163 786.087
290.293 324.426 477.522 665.354
306.268 240.576 2216.5 1899.34
409.254 299.176 4571.17 3548.1
404.268 337.255 2024.92 1818.79
397.534 326.475 1581.33 1413.61
343.423 242.142 40846.6 30507.3
245.403 300.282 5373.09 8106.63
427.752 290.847 393.004 137.497
265.624 279.468 0 0
427.196 278.253 0 0
269.907 286.773 1830.06 2105.53
321.196 251.016 2692.79 2255.98
319.28 280.167 284.902 292.662
272.162 279.013 5821.68 6480.73
354.189 256.061 0 0
310.978 252.721 0 0
318.32 306.393 0 0
269.128 333.098 0 0
301.284 310.745 1796.82 2253.94
394.503 314.288 8615 7180.51
341.087 247.786 657.814 504.132
369.019 263.22 0 0
319.746 255.075 887.436 772.239
343.394 276.393 0 0
309.982 244.483 0 0
387.011 252.057 3118.89 2063.11
354.904 243.256 49682.4 35674.9
267.73 317.634 14598.2 21120.3
393.302 272.704 1599.54 1132.27
325.013 309.256 1711.25 2014.27
349.2 264.32 48166.7 38595.3
365.576 269.939 1086.77 834.093
322.318 333.276 0 0
325.364 307.405 0 0
264.51 286.175 11744.5 14229.6
325.589 238.837 8160.97 6473.84
296.241 247.122 2627.53 2431.02
319.537 253.996 30963.8 26842.1
368.228 244.225 38070.8 26485.3
357.32 238.355 0 0
352.531 262.45 0 0
288.85 238.642 0 0
300.151 273.886 1590.95 1647
369.683 252.202 7800.05 5426.99
361.815 311.12 1393.12 1391.24
305.399 242.426 8114.79 7167.87
346.218 264.965 0 0
332.406 288.152 613.468 622.116
294.831 304.374 759.525 923.763
316.902 313.934 0 0
286.876 232.557 1941.8 1786.57
402.667 265.105 9143.57 6167.83
335.681 265.567 313.471 268.596
409.484 260.111 0 0
297.608 234.142 2124.83 1853.74
286.432 243.757 1744.83 1665.72
294.667 307.894 0 0
283.426 255.372 0 0
363.569 295.696 49156.8 46627.3
425.53 281.433 37971.5 15751.4
342.647 280.375 0 0
348.579 264.902 0 0
381.633 272.249 53601.6 41730
296.867 323.421 21794.2 29371.3
329.516 303.01 0 0
265.848 352.511 0 0
407.703 312.019 24882.5 20575.7
332.091 317.175 2044.53 2441.33
296.055 307.557 0 0
444.294 125.151 1565.88 416.272
342.298 296.163 33491 33843.9
300.142 285.289 5272.72 5823.2
359.754 246.222 2160.04 1530.11
353.568 268.641 1342.79 1120.49
331.55 300.466 1464.53 1635.42
290.86 317.736 988.952 1296.62
375.264 324.194 0 0
296.392 237.649 527.388 476.942
412.595 265.126 0 0
358.168 293.516 335.679 326.18
373.619 253.514 3795.93 2698.32
311.271 168.823 1111.34 639.82
401.217 261.185 2077.66 1333.29
382.668 318.73 2217.16 2097.43
346.813 281.22 0 0
373.804 300.838 0 0
374.134 303.545 3223.5 3063.42
389.348 303.899 23619.7 20811.4
408.698 261.44 2996.5 1925.09
389.632 299.192 1145.44 999.426
288.348 320.634 21743.2 29283.9
345.135 336.567 20856.5 25179.4
288.348 320.634 0 0
366.271 272.74 0 0
305.439 173.737 28347.8 16385.3
334.061 242.239 43779.6 34537.4
331.651 288.835 622.236 626.668
434.417 107.519 0 0
363.091 273.811 3438.61 3003.18
293.874 356.488 705.063 1067.37
370.197 304.97 0 0
282.805 264.13 0 0
360.322 331.099 7301.11 5067.38
334.52 293.223 7256.71 7375.52
368.493 300.185 346.867 333.365
334.061 242.239 0 0
1
399.718 288.062 277.33 326.888
396.156 187.19 411.45 231.444
295.236 216.447 348.989 232.799
294.391 216.291 346.461 238.332
335.279 108.273 363.052 244.661
288.392 161.936 354.401 243.317
331.205 316.229 308.971 278.104
353.149 271.48 0 0
420.158 130.627 0 0
287.235 150.893 0 0
281.825 107.517 9.9238e-38 8.29566e-38
334.52 293.223 0 0
295.787 239.941 84296.2 61041.8
305.174 101.745 14844.3 9246.4
380.191 150.726 607.052 355.205
382.588 284.484 -602.438 -748.12
306.001 95.6839 7700.34 4476.44
326 289.157 649.716 646.544
379.107 156.775 1451.93 883.936
370.665 137.782 49649.4 28934.7
242.405 95.8541 42214.1 37096.1
414.896 268.39 2749.2 3183.61
326.609 287.896 686.092 644.26
305.788 316.286 5741.93 6242.99
299.54 327.777 40136.5 52731.5
362.082 292.882 1143.1 883.176
181.107 38.3101 863.158 503.8
365.118 91.1141 3603.11 1967.16
249.806 171.61 4203.24 3287.7
248.845 172.232 1910.85 1495.44
265.848 352.511 1209.93 1536.16
202.375 126.468 39881 24727.4
316.741 30.4016 10443.3 9743.85
163.845 128.749 242.354 273.886
371.079 308.799 0 0
405.639 100.986 0 0
259.714 304.239 2570.62 3053.5
409.871 262.759 2825.59 3502.82
443.762 165.05 210.739 286.967
410.385 156.962 7488.55 5266.83
343.309 340.396 0 0
314.576 223.709 0 0
350.276 227.305 0 0
324.818 307.043 0 0
272.913 147.353 3248.17 1927.65
338.369 98.4246 8493.32 2579.28
408.285 291.778 693.292 269.38
365.403 307.681 0 0
332.693 230.119 1392.13 780.507
343.056 27.169 0 0
365.67 236.885 0 0
290.392 323.935 2193.52 1596.24
403.516 260.281 40128.2 24871.3
241.516 162.412 20000.5 11983.5
287.967 195.201 1184.21 672.988
334.161 106.906 2822.46 1829.35
316.116 238.015 62188 47402.3
362.775 97.8837 1347.81 1002.82
225.668 130.918 0 0
374.116 199.668 0 0
242.724 43.0635 17653 6543.99
2
335.279 108.273 293.316 320.27
297.007 307.701 278.345 299.513
426.761 279.107 432.432 229.327
419.921 312.477 418.514 259.301
426.842 290.503 429.598 250.529
373.655 148.51 292.586 283.03
418.235 284.603 421.399 222.742
420.434 264.926 0 0
352.788 335.807 0 0
415.416 313.132 0 0
263.815 294.09 1.10484e-37 6.4847e-38
305.535 110.065 0 0
412.595 265.126 106723 53235.5
427.752 290.847 17837.2 9773.14
408.305 313.745 669.344 416.753
371.823 244.933 -692.27 -730.191
402.457 146.538 6341.08 4468.78
381.789 177.569 579.074 509.046
274.875 343.767 1633.16 724.912
166.112 97.4101 32377.7 33654.5
370.878 201.527 35279.3 39546.4
397.812 314.803 3592.43 2312.06
296.884 213.551 577.334 500.25
426.188 126.052 5660.75 5655.29
427.315 314.18 59916.9 33616.2
431.397 170.804 906.726 660.777
400.686 325.265 811.16 534.716
406.86 280.189 2376.87 1954.84
416.817 179.554 3148.69 3984.16
252.425 172.859 1479.71 969.08
243.542 167.584 1054.68 1170.54
399.353 268.087 46561.3 21383.7
285.28 148.61 7844.96 7348.98
363.665 100.581 322.701 385.172
247.437 171.242 0 0
314.514 259.285 0 0
293.749 303.981 2065.82 2061.82
333.91 295 3324.34 2350.35
315.398 261.309 329.16 311.05
316.128 260.593 9633.23 5710.5
272.051 149.168 0 0
353.832 279.852 0 0
387.011 252.057 0 0
326.729 353.269 0 0
387.34 133.756 1872.7 1284.81
181.296 90.8006 8085.02 4931.67
266.011 359.243 429.942 550.296
294.12 356.712 0 0
347.414 106.03 1152.89 460.938
367.814 243.994 0 0
355.437 262.124 0 0
276.116 330.028 1952 1870.14
245.682 283.175 30593.3 40367.9
402.196 280.041 18874.5 25204.7
402.042 281.31 1094.17 1461.14
334.629 104.275 2227.37 1661.22
340.604 99.2014 53221.5 39571.3
274.939 286.578 736.908 663.669
312.246 85.0304 0 0
221.133 93.7771 0 0
406.724 181.606 13917.5 9148.03
323.202 29.8539 5857.92 6777.65
426.245 280.928 2586.42 1900.16
260.451 282.346 44694.7 27185.2
359.068 259.876 24606.2 20138.1
273.922 279.28 0 0
315.191 30.302 0 0
315.191 30.302 0 0
305.196 244.343 2197.48 2254.45
263.032 282.079 4625.92 4033.72
343.056 27.169 763.856 762.812
419.921 312.477 12555.4 7779.03
3
295.787 239.941 327.113 241.468
288.016 312.978 324.56 154.569
406.981 181.27 313.085 192.006
409.622 156.738 255.664 257.307
240.185 45.8944 326.634 199.284
192.247 38.5606 400.039 269.443
254.941 19.1675 323.848 147.479
346.521 97.2295 0 0
333.428 104.49 0 0
443.762 165.05 0 0
299.82 116.172 1.03035e-37 4.68266e-38
305.569 314.319 0 0
397.884 269.926 78667.3 48778.1
309.148 216.613 13085.2 10293.6
282.013 159.02 514.543 398.765
295.236 216.447 -750.967 -845.493
364.446 101.421 7554.75 6391.98
271.543 97.2385 610.084 181.188
181.25 54.7159 1256.32 714.692
263.994 293.329 40653 38883
408.698 261.44 41100 17804.8
353.822 279.499 2730.41 2397.22
319.348 229.23 611.064 694.17
248.303 171.551 5551.43 6253.04
343.453 350.469 42415.4 52057.9
248.103 163.264 1058.88 500.181
351.767 237.628 710.112 607.616
403.235 308.051 2840.57 2705.22
356.193 101.327 4469.91 2918.3
361.509 212.926 1789.72 746.505
326.729 353.269 1135.64 221.141
192.664 66.0166 47135.3 39752.2
422.925 305.489 10545.2 4330.54
251.919 34.0013 368.641 146.207
371.643 267.371 0 0
301.358 67.9768 0 0
338.448 297.443 2989.35 1886.22
315.191 30.302 3419.99 1696.27
282.86 225.062 274.304 166.415
392.102 332.007 9488.22 9165.17
373.4 108.098 0 0
351.356 332.102 0 0
271.845 150.977 0 0
272.826 151.95 0 0
298.303 116.572 1878.42 884.044
264.599 280.372 8349.59 3651.67
414.621 263.536 755.64 318.89
267.478 285.116 0 0
266.254 281.022 1145.67 528.936
260.7 283.611 0 0
228.901 101.484 0 0
424.669 265.691 2089.66 2893.42
296.665 111.453 37341.7 17283.1
299.041 110.262 18116.5 8033.05
261.828 292.432 1572.14 1040.04
351.247 333.123 2336.26 1221.97
369.369 137.12 37249.3 11630.9
346.973 242.49 770.226 189.503
244.898 104.021 0 0
384.189 157.394 0 0
319.406 353.887 13593 7799.06
382.779 91.4915 11543 7359.17
272.025 217.951 2564.88 3573.12
290.402 213.275 26526.3 24223.5
343.056 27.169 25479.8 12931.7
272.025 217.951 0 0
4
5
400.989 334.183 422.047 414.724
313.356 60.9414 125.826 279.853
431.595 280.967 465.697 333.614
358.61 244.591 370.732 238.845
368.31 313.691 423.186 184.998
289.624 184.547 302.475 223.25
400.686 325.265 426.843 414.985
387.881 192.38 0 0
375.877 170.355 0 0
346.689 295.032 0 0
425.693 277.997 1.36351e-37 1.01756e-37
272.132 149.347 0 0
356.018 269.283 110482 86978.2
290.113 114.274 14743.6 12418.8
310.023 326.464 679.756 655.473
434.242 221.135 -650.438 -624.074
346.789 96.6478 8450.53 6624.66
372.378 118.139 745.478 523.338
276.795 260.641 1705.25 699.672
388.234 262.424 51063.2 30217.9
357.376 317.348 46950.4 36224.3
417.924 312.039 3283.53 1964.79
268.756 275.036 780.072 620.704
284.23 148.854 3853.1 4747.09
346.422 234.012 61136.2 33666.2
399.52 166.664 1116.39 989.154
282.264 340.608 751.744 581.762
371.08 265.905 2936.82 2359.9
316.615 221.693 4062.7 3429.69
398.745 305.813 1795.16 1221.89
228.696 88.3114 1259.54 847.908
320.275 252.553 48114 42793.9
364.778 310.381 10662.8 8791.21
364.865 309.114 366.987 301.237
434.305 111.202 0 0
386.775 230.137 0 0
340.604 99.2014 3578.44 2892.94
430.824 110.997 4082.31 2029.64
167.12 107.527 165.674 273.175
350.276 227.305 11440.8 5490.88
401.504 273.88 0 0
415.668 177.131 0 0
309.488 56.6346 0 0
299.281 373.312 0 0
216.989 69.9899 3064.14 2746.17
167.12 107.527 3644.83 6009.85
6
353.822 279.499 300.108 249.188
427.54 288.564 350.247 248.64
201.598 128.841 421.513 322.452
318.787 103.48 453.075 307.593
323.629 93.6823 270.415 129.889
274.656 111.233 431.017 306.75
322.024 244.067 325.105 246.355
200.809 129.725 0 0
326.729 353.269 0 0
267.969 91.93 0 0
399.372 298.281 8.02993e-38 8.36956e-38
323.489 249.839 0 0
427.075 283.229 67052.8 56948.3
422.562 288.6 15676.3 11465.7
369.494 140.566 319.604 445.693
249.922 92.0149 -570.899 -670.775
367.161 307.536 5625.58 5952.81
365.403 307.681 533.752 571.45
341.648 335.838 1078.6 854.912
361.815 311.12 30811.6 33750
325.49 219.844 40717.4 34745.2
324.371 91.2047 2355.77 1791.4
355.735 312.588 528.806 590.144
393.514 188.838 3217.28 5336.6
290.392 323.935 51548.6 40790.1
402.457 146.538 779.775 593.856
293.749 303.981 444.03 402.9
368.606 269.915 2368.36 1575.66
293.206 177.398 4491.48 3272.23
294.888 176.516 2043.6 1493.12
355.409 99.4525 926.452 696.672
200.755 101.405 29940.4 22336.7
329.48 294.824 6627.52 9327.5
356.386 236.479 469.476 315.524
374.576 128.273 0 0
343.532 242.2 0 0
167.293 78.7971 1505.88 2610.12
264.69 301.195 2082.85 3041.78
326.46 335.593 464.791 329.794
191.405 45.3841 6087.32 8594.15
268.514 117.022 0 0
342.753 92.4752 0 0
365.118 91.1141 0 0
351.247 333.123 0 0
272.389 335.171 1356.36 2558.36
393.004 181.793 5085.28 3041.72
391.573 182.046 462.298 276.52
351.43 336.666 0 0
295.925 112.383 658.173 1067.39
184.393 42.515 0 0
354.596 105.569 0 0

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 KiB

Some files were not shown because too many files have changed in this diff Show more