nothinglo / niswgsp Goto Github PK
View Code? Open in Web Editor NEWC++ implementation of the ECCV 2016 paper, Natural Image Stitching with the Global Similarity Prior.
C++ implementation of the ECCV 2016 paper, Natural Image Stitching with the Global Similarity Prior.
Hi, i am trying to modify and run your xcode project. Xcode shows "clang: error: cannot specify -o when generating multiple output files", which setting shall I look for to fix this issue? Thanks
the snapshot of the error info: "https://www.dropbox.com/s/5idcfnafiyw5j3z/Screenshot%202017-08-04%2013.09.10.png?dl=0"
I have made a cmake version of this project, maybe it will be helpful for guys who have no MAC.
https://github.com/Yannnnnnnnnnnn/NISwGSP
Hi! I have compiled your program successfully, but I can't run it well. Could you tell me what the format of the running program is? Best to give me an example, thanks.
If I want to stitch my own images,what should I do?And how to generate the xxx-STITCH-GRAPH.txt?Your input-42-data contains the xxx-STITCH-GRAPH.txt!
Hi, i have this error when folder contains more than 2 images. Where could be wrong?
File: C:...\vc\include\xtree
Line"237
Expression: map/set iterator not dereferencable
#if _ITERATOR_DEBUG_LEVEL == 2
if (this->_Getcont() == 0
|| this->_Ptr == 0
|| this->_Ptr == ((_Mytree *)this->_Getcont())->_Myhead)
{ // report error
_DEBUG_ERROR("map/set iterator not dereferencable");
_SCL_SECURE_OUT_OF_RANGE;
}
Hi, when I was following the steps from Yannnnnnnnnn, there is an error saying LINE_AA was not declared in this scope. So how should I solve it?
I am new to Xcode and C++. I tried to compile this project in Xcode. I am running on macOS 10.13 with Xcode 9.4.1. I installed opencv 3.4.2 through Homebrew. I don't have openmp so I changed the code a little bit. Xcode suggested that there is error during the build process with error message:
ld: library not found for -lopencv_adas.3.0.0
clang: error: linker command failed with exit code 1 (use -v to see invocation).
Ld /Users//Library/Developer/Xcode/DerivedData/UglyMan_NISwGSP_Stitching-hhiwctdecvbhimdppxzbugtfuybs/Build/Products/Debug/UglyMan_NISwGSP_Stitching normal x86_64
cd /Users//Downloads/NISwGSP-master/UglyMan_NISwGSP_Stitching
export MACOSX_DEPLOYMENT_TARGET=10.9
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users//Library/Developer/Xcode/DerivedData/UglyMan_NISwGSP_Stitching-hhiwctdecvbhimdppxzbugtfuybs/Build/Products/Debug -L/usr/local/lib -L/Users//Downloads/NISwGSP-master/UglyMan_NISwGSP_Stitching -L/Users//Downloads/NISwGSP-master/UglyMan_NISwGSP_Stitching/UglyMan_NISwGSP_Stitching/vlfeat-0.9.21/bin/maci64 -L/usr/local/Cellar -F/Users//Library/Developer/Xcode/DerivedData/UglyMan_NISwGSP_Stitching-hhiwctdecvbhimdppxzbugtfuybs/Build/Products/Debug -filelist /Users//Library/Developer/Xcode/DerivedData/UglyMan_NISwGSP_Stitching-hhiwctdecvbhimdppxzbugtfuybs/Build/Intermediates.noindex/UglyMan_NISwGSP_Stitching.build/Debug/UglyMan_NISwGSP_Stitching.build/Objects-normal/x86_64/UglyMan_NISwGSP_Stitching.LinkFileList -mmacosx-version-min=10.9 -Xlinker -object_path_lto -Xlinker /Users//Library/Developer/Xcode/DerivedData/UglyMan_NISwGSP_Stitching-hhiwctdecvbhimdppxzbugtfuybs/Build/Intermediates.noindex/UglyMan_NISwGSP_Stitching.build/Debug/UglyMan_NISwGSP_Stitching.build/Objects-normal/x86_64/UglyMan_NISwGSP_Stitching_lto.o -Xlinker -no_deduplicate -stdlib=libc++ -liomp5 -lopencv_adas.3.0.0 -lopencv_adas.3.0.0 -lopencv_adas.3.0.0 -lopencv_bgsegm.3.0.0 -lopencv_bgsegm.3.0.0 -lopencv_bgsegm.3.0.0 -lopencv_bioinspired.3.0.0 -lopencv_bioinspired.3.0.0 -lopencv_bioinspired.3.0.0 -lopencv_calib3d.3.0.0 -lopencv_calib3d.3.0.0 -lopencv_calib3d.3.0.0 -lopencv_ccalib.3.0.0 -lopencv_ccalib.3.0.0 -lopencv_ccalib.3.0.0 -lopencv_core.3.0.0 -lopencv_core.3.0.0 -lopencv_core.3.0.0 -lopencv_datasets.3.0.0 -lopencv_datasets.3.0.0 -lopencv_datasets.3.0.0 -lopencv_face.3.0.0 -lopencv_face.3.0.0 -lopencv_face.3.0.0 -lopencv_features2d.3.0.0 -lopencv_features2d.3.0.0 -lopencv_features2d.3.0.0 -lopencv_flann.3.0.0 -lopencv_flann.3.0.0 -lopencv_flann.3.0.0 -lopencv_hal -lopencv_highgui.3.0.0 -lopencv_highgui.3.0.0 -lopencv_highgui.3.0.0 -lopencv_imgcodecs.3.0.0 -lopencv_imgcodecs.3.0.0 -lopencv_imgcodecs.3.0.0 -lopencv_imgproc.3.0.0 -lopencv_imgproc.3.0.0 -lopencv_imgproc.3.0.0 -lopencv_latentsvm.3.0.0 -lopencv_latentsvm.3.0.0 -lopencv_latentsvm.3.0.0 -lopencv_line_descriptor.3.0.0 -lopencv_line_descriptor.3.0.0 -lopencv_line_descriptor.3.0.0 -lopencv_ml.3.0.0 -lopencv_ml.3.0.0 -lopencv_ml.3.0.0 -lopencv_objdetect.3.0.0 -lopencv_objdetect.3.0.0 -lopencv_objdetect.3.0.0 -lopencv_optflow.3.0.0 -lopencv_optflow.3.0.0 -lopencv_optflow.3.0.0 -lopencv_photo.3.0.0 -lopencv_photo.3.0.0 -lopencv_photo.3.0.0 -lopencv_reg.3.0.0 -lopencv_reg.3.0.0 -lopencv_reg.3.0.0 -lopencv_rgbd.3.0.0 -lopencv_rgbd.3.0.0 -lopencv_rgbd.3.0.0 -lopencv_saliency.3.0.0 -lopencv_saliency.3.0.0 -lopencv_saliency.3.0.0 -lopencv_shape.3.0.0 -lopencv_shape.3.0.0 -lopencv_shape.3.0.0 -lopencv_stereo.3.0.0 -lopencv_stereo.3.0.0 -lopencv_stereo.3.0.0 -lopencv_stitching.3.0.0 -lopencv_stitching.3.0.0 -lopencv_stitching.3.0.0 -lopencv_superres.3.0.0 -lopencv_superres.3.0.0 -lopencv_superres.3.0.0 -lopencv_surface_matching.3.0.0 -lopencv_surface_matching.3.0.0 -lopencv_surface_matching.3.0.0 -lopencv_text.3.0.0 -lopencv_text.3.0.0 -lopencv_text.3.0.0 -lopencv_tracking.3.0.0 -lopencv_tracking.3.0.0 -lopencv_tracking.3.0.0 -lopencv_ts -lopencv_video.3.0.0 -lopencv_video.3.0.0 -lopencv_video.3.0.0 -lopencv_videoio.3.0.0 -lopencv_videoio.3.0.0 -lopencv_videoio.3.0.0 -lopencv_videostab.3.0.0 -lvl -lopencv_videostab.3.0.0 -lopencv_videostab.3.0.0 -lopencv_xfeatures2d.3.0.0 -lopencv_xfeatures2d.3.0.0 -lopencv_xfeatures2d.3.0.0 -lopencv_ximgproc.3.0.0 -lopencv_ximgproc.3.0.0 -lopencv_ximgproc.3.0.0 -lopencv_xobjdetect.3.0.0 -lopencv_xobjdetect.3.0.0 -lopencv_xobjdetect.3.0.0 -lopencv_xphoto.3.0.0 -lopencv_xphoto.3.0.0 -lopencv_xphoto.3.0.0 -Xlinker -dependency_info -Xlinker /Users//Library/Developer/Xcode/DerivedData/UglyMan_NISwGSP_Stitching-hhiwctdecvbhimdppxzbugtfuybs/Build/Intermediates.noindex/UglyMan_NISwGSP_Stitching.build/Debug/UglyMan_NISwGSP_Stitching.build/Objects-normal/x86_64/UglyMan_NISwGSP_Stitching_dependency_info.dat -o /Users//Library/Developer/Xcode/DerivedData/UglyMan_NISwGSP_Stitching-hhiwctdecvbhimdppxzbugtfuybs/Build/Products/Debug/UglyMan_NISwGSP_Stitching
I am wondering what may be wrong with my setup? Thanks!
When I run the program, thear are NANs in the vector b of least square problem Ax=b. How to deal with the problem?
You are handsome guy, not ugly~
I'm trying to get the information of matching points and their matches, just like the sample image in the paper.
I have tried using pairwise_matches
but the matching seemed incorrectly:
Mat img1 = images_data[m1].img;
Mat img2 = images_data[m2].img;
Mat result = Mat::zeros(max(img1.rows, img2.rows),
img1.cols + img2.cols,
CV_8UC3);
// 分割矩阵
Mat left (result, Rect(0, 0, img1.cols, img1.rows));
Mat right(result, Rect(img1.cols, 0, img2.cols, img2.rows));
// 复制矩阵
img1.copyTo(left);
img2.copyTo(right);
for (int i = 0; i < pairwise_matches[pm_index].matches.size(); i ++) {
int src = pairwise_matches[pm_index].matches[i].queryIdx;
int dest = pairwise_matches[pm_index].matches[i].trainIdx;
Point2 src_p = images_data[m1].mesh_2d->getVertices()[src];
Point2 dest_p = images_data[m2].mesh_2d->getVertices()[dest];
Scalar color(rand() % 256, rand() % 256, rand() % 256);
circle(result, src_p, 3, color, -1);
line(result, src_p, dest_p + Point2(img1.cols, 0), color, 1, LINE_AA);
circle(result, dest_p + Point2(img1.cols, 0), 3, color, -1);
}
imwrite(parameter.debug_dir + "matching_points" + to_string(i) + ".png", result);
Could you tell me the right way to do this? Besides, how to display only the good matches(how to judge the quality of a match)?
Hi, would you mind tell me the way you collected the images? By one camera or a multi-camera integrated device? If one, which kind of camera do you use? Thank you.
I met some problems when compiling your code.Can you tell me what is your code compilation environment?
you've mentioned here like this
use the CMake to configure the project and make sure set the VLFEAT_LIBRARY with the "./vlfeat-0.9.20/bin/(the name depend on you system)/libvl"*
I don't quite understand how to configure,while I change the CMakeLists.txt like this
set(VLFEAT_LIBRARY ./vlfeat-0.9.20/bin/glnxa64/libvl), it turns to be /usr/bin/ld: cannot find -l./vlfeat-0.9.20/bin/glnxa64/libvl
Hi, I would like to ask which code to change to output the original image size instead of the image size after scaling. For example, I have 6 images of 5472×3078 size, and I want the final stitching to be around 5000×8000 size, not 900×1300.
I set up the project in xcode. But encounter an error like this "dyld: Library not loaded: /usr/local/opt/libiomp/lib/libiomp5.dylib
Referenced from: /Users/riverhe/Library/Developer/Xcode/DerivedData/UglyMan_NISwGSP_Stitching-bhrpeieucbxnghfxqtdnsahboivz/Build/Products/Debug/UglyMan_NISwGSP_Stitching
"
what's wrong with this?
Thank you for your great work!
When I tried to run the project, I encountered the porblem
dyld: Library not loaded: @loader_path/libvl.dylib
Referenced from: /Users/edgar/Library/Developer/Xcode/DerivedData/UglyMan_NISwGSP_Stitching-avkbgtjifaqusvduuahpvnwdybht/Build/Products/Debug/UglyMan_NISwGSP_Stitching
Reason: image not found```
Hello
The log displayed by the running program is nthreads = 1. I need to modify where I can control the number of threads. I hope to be able to implement multi-core CPU to run the program.
Speed If you want to speed up, MATLAB solver is significantly faster than Eigen.
I see it in readme.
So how to change the Eigen?
Dear Author.
Thank you for your great work.
I have complied the repo, however, when I run the exe file, an error occured that "Assertion failed: rgba_img.channels() >= 3, file F:\User\zhouxian\ImageStitching\NISwGSP-master\NISwGSP\Feature\ImageData.cpp, line 68".
I have no idea, could you please help me to fix it?
I have built the project under VS2017 15.7 here:
https://github.com/firdauslubis88/NISwGSP.git
I hope this will be useful. I have not done many tests, just try to run some examples and it seems fine until now. I will do more test later.
I also wanna thanks for the author for creating and sharing such awesome project 👍
Someone help me plz. This project requires a lot of external libraries.
It seems that I can't compile your project with my xcode. It always appears the following sentence: "error: can't exec '/usr/local/bin/clang-omp' (No such file or directory)" when I am trying to compile it. I tried to download clang-omp and llvm via brew. However, it seems both of them didn't work. So could you give me a way to ignore omp in a clear way or just give me the exe file? Thanks a lot.
Hello, This is a good work! I am interested in your work.
I have successfully compile your code in Win7 system. But when I run with images you provided, I found there are no "***STITCH-GRAPH.txt" file. Could you give me some examples about STITCH-GRAPH file, or how to prepare this file? Thank you very much.
CMakeFiles/NISwGSP.dir/Feature/FeatureController.cpp.o:在函数‘FeatureController::detect(cv::Mat const&, std::vector<cv::Point_, std::allocator<cv::Point_ > >&, std::vector<FeatureDescriptor, std::allocator >&)’中:
FeatureController.cpp:(.text+0x483):对‘vl_sift_new’未定义的引用
FeatureController.cpp:(.text+0x4af):对‘vl_sift_process_first_octave’未定义的引用
FeatureController.cpp:(.text+0x4d1):对‘vl_sift_detect’未定义的引用
FeatureController.cpp:(.text+0x548):对‘vl_sift_calc_keypoint_orientations’未定义的引用
FeatureController.cpp:(.text+0x5e9):对‘vl_sift_calc_keypoint_descriptor’未定义的引用
FeatureController.cpp:(.text+0xa58):对‘vl_sift_process_next_octave’未定义的引用
FeatureController.cpp:(.text+0xa69):对‘vl_sift_delete’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/NISwGSP.dir/build.make:553: recipe for target 'NISwGSP' failed
make[2]: *** [NISwGSP] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/NISwGSP.dir/all' failed
make[1]: *** [CMakeFiles/NISwGSP.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I managed to compile and run on linux with gcc 6 but met a runtime error. The debugging feature pair and line result files were well generated, but not the stitching files. It was nothing wrong when processing some example images like AANAP-skyline and APAP-railtracks. But when I tried some other examples e.g. AANAP-roundabout, an OOM happened in MultiImages::textureMapping, at this line:
Mat polygon_index_mask(rects[i].height + shift.y, rects[i].width + shift.x, CV_32SC1, Scalar::all(NO_GRID));
roundabout0 rect = [1.17309e+06 x 1.58113e+06 from (2.06305e+06, 1.13368e+06)]
roundabout3 rect = [2.15131e+06 x 3.12946e+06 from (765193, 0)]
roundabout1 rect = [1.88212e+06 x 1.3209e+06 from (952085, 1.66553e+06)]
roundabout2 rect = [5.51731e+06 x 3.61797e+06 from (0, 36694.4)]
OpenCV Error: Insufficient memory (Failed to allocate 7419210561064 bytes) in OutOfMemoryError, file /UglyMan_NISwGSP_Stitching/opencv-3.0.0/modules/core/src/alloc.cpp, line 52
OpenCV Error: Assertion failed (u != 0) in create, file /UglyMan_NISwGSP_Stitching/opencv-3.0.0/modules/core/src/matrix.cpp, line 411
terminate called after throwing an instance of 'cv::Exception'
what(): /UglyMan_NISwGSP_Stitching/opencv-3.0.0/modules/core/src/matrix.cpp:411: error: (-215) u != 0 in function create
When processing APAP-garden, the output is:
DSC02931 rect = [9153.74 x 7622.71 from (9500.55, 56574)]
DSC02933 rect = [93026.5 x 130673 from (0, 0)]
DSC02930 rect = [4716.9 x 4616.46 from (7974, 57841.4)]
DSC02932 rect = [4582.3 x 5106.73 from (8343.71, 57186.2)]
DSC02934 rect = [1329.46 x 1211.29 from (11132, 60498.9)]
other errors are the same
I tried to debug and found if I comment these lines in MultiImages::getCameraParams, the program can run without error, but with a wrong result:
if (!(*adjuster)(images_features, pairwise_matches, camera_params)) {
printError("F(getCameraParams) camera parameters adjuster failed");
}
It seems that when these codes executed, the value of one of camera_params's member becomes illegal. I'm not sure about this, but it might be useful.
nThreads = 1
[#Images : 1]
i = 1, [Images : dataset25]
[ERROR] F(getImageFileFullNamesInDir) could not open directory
[ERROR] F(getImagesMatchGraph) image match graph verification [2] didn't be implemented yet
[ERROR] F(getImagesMatchGraph) image match graph verification [2] didn't be implemented yet
[ERROR] F(getImagesMatchGraph) image match graph verification [2] didn't be implemented yet
[ERROR] F(getImagesMatchGraph) image match graph verification [2] didn't be implemented yet
A = [2, 0]
NISwGSP: /usr/include/eigen3/Eigen/src/SparseCore/SparseMatrix.h:916: void Eigen::internal::set_from_triplets(const InputIterator&, const InputIterator&, SparseMatrixType&, DupFunctor) [with InputIterator = __gnu_cxx::__normal_iterator<Eigen::Triplet*, std::vector<Eigen::Triplet > >; SparseMatrixType = Eigen::SparseMatrix; DupFunctor = Eigen::internal::scalar_sum_op]: Assertion `it->row()>=0 && it->row()<mat.rows() && it->col()>=0 && it->col()<mat.cols()' failed.
Aborted (core dumped)
I compiled the code in linux system,I follow the Usage , but I met some problem, I want to know your compiler and it's version, I use gcc-4.9, it reports "/projects/NISwGSP_Stitching/Stitching/../Mesh/../Feature/../Mesh/Mesh2D.h:36:17: error: ‘class std::vector’ has no member named ‘emplace_back’",it looks like the compiler issue , would you have linux version or can you tell me you compiler and it's version,Thanks!
Hello, how can I get input-42- data.zip , web link cannot be accessed.
As the title asks, I want to try to replace the eigen solver with the MATLAB solver, but I don't know much about the use of the MATLAB solver in C++. Can someone help me?
sorry to bother you again, I found missing constructor function in ImageData.h, and after adding it in this file, there exists an error, I found the error is in the function of doFeatureMatching() which in the file named MultiImages.cpp. And the error is map/set iterator not dereferencable, I am feeling confused. Looking forward to your reply. Thanks!
My OpenCV version is 3.4.14, because it gives me the "No LineSegmentDetector error" when I execute the exe file, so I use FastLineDetector instead, this time no error accur, but there was no results in "0_results" dir. Just feature_pairs-sRANSAC-09-10-398.jpg type image in "1_debug" dir.
Hi:
Thanks for your code. It is a really good work. But when I stitch UAV images using your code, I get a bad result. There are large distortions as follows. What's wrong with it?
3D result
2D result
My data:
link:https://pan.baidu.com/s/1uPS70rvgyj9Z1R_QoRKxrg
Extraction code:bs8j
in line 201:R.at(j / 3, j % 3) = V(j, V.rows() - 1); should be R.at(j / 3, j % 3) = V(j, V.cols() - 1);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.