Resolution bug Save/load references : multiple refs
This commit is contained in:
parent
f3a81b5ce4
commit
70dbba6c70
9 changed files with 57606 additions and 19507 deletions
|
@ -528,7 +528,8 @@ bool ASIFT_matcher::distFilter(int threshold=2)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//A tester
|
//Save reference data necessary for the matching
|
||||||
|
//Doesn't save references images or Sift parameters
|
||||||
bool ASIFT_matcher::saveReferences(const char* ref_path) const
|
bool ASIFT_matcher::saveReferences(const char* ref_path) const
|
||||||
{
|
{
|
||||||
// Write all the keypoints (row, col, scale, orientation, desciptor (128 integers))
|
// Write all the keypoints (row, col, scale, orientation, desciptor (128 integers))
|
||||||
|
@ -543,7 +544,7 @@ bool ASIFT_matcher::saveReferences(const char* ref_path) const
|
||||||
// the first line contains the number of keypoints and the length of the desciptors (128)
|
// the first line contains the number of keypoints and the length of the desciptors (128)
|
||||||
// Added number of tilts
|
// Added number of tilts
|
||||||
// Added sizes
|
// Added sizes
|
||||||
file_key1 << _num_keys[j] << " " << VecLength << " " << _num_tilts[j] << " " <<_size_refs[j].first<<" "<<_size_refs[j].second<<" "<<std::endl;
|
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++)
|
for (int tt = 0; tt < (int) kps.size(); tt++)
|
||||||
{
|
{
|
||||||
for (int rr = 0; rr < (int) kps[tt].size(); rr++)
|
for (int rr = 0; rr < (int) kps[tt].size(); rr++)
|
||||||
|
@ -562,7 +563,7 @@ bool ASIFT_matcher::saveReferences(const char* ref_path) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_key1<<std::endl;
|
// file_key1<<std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -575,7 +576,9 @@ bool ASIFT_matcher::saveReferences(const char* ref_path) const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//A finir
|
//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)
|
bool ASIFT_matcher::loadReferences(const char* ref_path)
|
||||||
{
|
{
|
||||||
std::ifstream ref_file(ref_path);
|
std::ifstream ref_file(ref_path);
|
||||||
|
@ -605,10 +608,10 @@ bool ASIFT_matcher::loadReferences(const char* ref_path)
|
||||||
if(VecLength!=atoi(tmp.c_str()))
|
if(VecLength!=atoi(tmp.c_str()))
|
||||||
{
|
{
|
||||||
std::cout<<"Error VecLength doesn't correspond..."<<std::endl;
|
std::cout<<"Error VecLength doesn't correspond..."<<std::endl;
|
||||||
return false;
|
// return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::getline(iss,tmp,' ');
|
// std::getline(iss,tmp,' ');
|
||||||
// _num_tilts[i]=atoi(tmp.c_str());
|
// _num_tilts[i]=atoi(tmp.c_str());
|
||||||
|
|
||||||
std::getline(iss,tmp,' ');
|
std::getline(iss,tmp,' ');
|
||||||
|
@ -663,6 +666,7 @@ bool ASIFT_matcher::loadReferences(const char* ref_path)
|
||||||
std::vector< keypointslist > vkps(1,list);
|
std::vector< keypointslist > vkps(1,list);
|
||||||
asift_keypoints akps(1,vkps);
|
asift_keypoints akps(1,vkps);
|
||||||
_keys[i]=akps;
|
_keys[i]=akps;
|
||||||
|
// std::getline(ref_file, line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Binary file not shown.
|
@ -66,10 +66,6 @@ unixio.h
|
||||||
zconf.h
|
zconf.h
|
||||||
./io_png/libs/zlib/zconf.h
|
./io_png/libs/zlib/zconf.h
|
||||||
|
|
||||||
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.cpp
|
|
||||||
ASIFT_matcher.hpp
|
|
||||||
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.hpp
|
|
||||||
|
|
||||||
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.hpp
|
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.hpp
|
||||||
stdio.h
|
stdio.h
|
||||||
-
|
-
|
||||||
|
@ -322,6 +318,10 @@ string.h
|
||||||
vector
|
vector
|
||||||
-
|
-
|
||||||
|
|
||||||
|
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/test_ASIFT.cpp
|
||||||
|
ASIFT_matcher.hpp
|
||||||
|
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.hpp
|
||||||
|
|
||||||
/usr/include/opencv/cv.h
|
/usr/include/opencv/cv.h
|
||||||
opencv2/core/core_c.h
|
opencv2/core/core_c.h
|
||||||
/usr/include/opencv/opencv2/core/core_c.h
|
/usr/include/opencv/opencv2/core/core_c.h
|
||||||
|
|
Binary file not shown.
|
@ -1,21 +1,35 @@
|
||||||
23 1
|
39 2
|
||||||
0
|
0
|
||||||
315.018 155.736 260.177 249.244
|
362.208 184.382 279.082 122.315
|
||||||
223.913 244.816 2.56948e-38 1.12989e-38
|
335.039 109.815 103.199 302.382
|
||||||
231.964 208.605 -5.21643e-18 -3.21371e-18
|
368.527 140.516 2.28707e-06 2.7439e-06
|
||||||
309.751 165.122 1.33215e-38 1.11233e-38
|
329.485 112.667 5.27024e-39 1.418e-38
|
||||||
321.857 118.766 0 0
|
322.959 119.184 0 0
|
||||||
230.253 240.932 0 0
|
324.178 230.519 0 0
|
||||||
214.152 233.929 9.88742e-41 5.02646e-41
|
355.697 190.284 1.07784e-35 4.42979e-36
|
||||||
226.483 216.543 0 0
|
315.991 235.875 0 0
|
||||||
333.71 128.226 -1.75948e-18 -2.95041e-18
|
230.152 191.051 2.67878e-35 1.98276e-35
|
||||||
232.541 217.373 2.21343e-38 1.2881e-38
|
223.012 231.746 0 0
|
||||||
218.692 222.244 -5.68496e-18 -3.2052e-18
|
377.929 162.983 1.15745e-34 7.48296e-35
|
||||||
320.409 248.492 2.14415e-38 4.56393e-39
|
341.004 112.32 0 0
|
||||||
312.409 253.913 6.79367e-35 1.35834e-35
|
322.192 279.122 3.15062e-35 3.2204e-36
|
||||||
300.715 265.302 0 0
|
361.771 216.725 0 0
|
||||||
310.975 163.84 3.91747e-41 3.31785e-41
|
218.599 221.752 2.92356e-34 1.64035e-34
|
||||||
287.05 158.348 0 0
|
261.936 171.287 0 0
|
||||||
236.559 230.379 7.13971e-35 3.4433e-35
|
300.647 157.174 0 0
|
||||||
360.468 133.533 0 0
|
310.273 236.617 0 0
|
||||||
321.857 118.766 -1.60778e-18 -3.41162e-18
|
363.462 146.017 0 0
|
||||||
|
277.903 162.656 6438.94 5981.52
|
||||||
|
361.959 175.732 42997.8 23137
|
||||||
|
374.229 132.773 0 0
|
||||||
|
221.354 204.377 0 0
|
||||||
|
218.849 212.966 0 0
|
||||||
|
367.28 179.248 0 0
|
||||||
|
291.509 169.803 0 0
|
||||||
|
343.099 119.621 0 0
|
||||||
|
231.499 206.978 9506.8 5965.8
|
||||||
|
371.585 152.449 13102.5 11096.8
|
||||||
|
307.57 255.971 1473.99 304.215
|
||||||
|
317.773 232.706 0 0
|
||||||
|
294.302 268.305 0 0
|
||||||
|
1
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 179 KiB |
Binary file not shown.
|
@ -137,7 +137,7 @@ int main(int argc, char **argv)
|
||||||
zoom1 = 1;
|
zoom1 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int nb_ref =1;
|
unsigned int nb_ref =2;
|
||||||
std::string refData[] = {
|
std::string refData[] = {
|
||||||
"book_training/train_image_000.png",
|
"book_training/train_image_000.png",
|
||||||
"book_training/train_image_001.png",
|
"book_training/train_image_001.png",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue