nothinglo / NISwGSP

C++ implementation of the ECCV 2016 paper, Natural Image Stitching with the Global Similarity Prior.
332 stars 124 forks source link

compile issues #2

Closed sailor-z closed 6 years ago

sailor-z commented 7 years ago

I met some problems when compiling your code.Can you tell me what is your code compilation environment?

nothinglo commented 7 years ago

I am sorry for the unclear description. As I mentioned in "Usage", It has 3 dependencies (Eigen, VLFeat, and OpenCV). After installing them and compile the code with them. Could you tell me what problems did you meet? In addition, you can find more details of my compilation environment in project.pbxproj under the *.xcodeproj. Thanks.

nothinglo commented 7 years ago

I didn't compile the code in Windows or Linux before, but I think it should be ok. Could you tell me which variables are found undefined? Thanks.

zyf12389 commented 7 years ago

MAXFLOAT M_PI M_PI_2 are not defined

nothinglo commented 7 years ago

You can define Pi and Pi^2 by yourself. Thanks.

swq-1993 commented 7 years ago

 Did you compiled the code in Linux successfully? @hust0zzcc , I met some problem just like you ever met , could you tell me you process and how do you fix it ?

sailor-z commented 7 years ago

I'm so sorry I missed your reply.My problem is as follows:'make_unique' was not declared in this scope in ImageData.cpp

nothinglo commented 7 years ago

Hi, I think you should check my compile information as below to make sure you can use some of the functions supported by the new version of C++.

My GCC_VRSION is Apple LLVM 6.0

GCC_C_LANGUAGE_STANDARD = GNU99 [-std=gnu99]
CLANG_CXX_LANGUAGE_STANDARD = GNU++14 [-std=gnu++14]
CLANG_CXX_LIBRARY = libc++ (LLVM C++ standard library with C++11 support)

Thanks.

swq-1993 commented 7 years ago

sorry, I checked it . But I do not have MacOS , so I trying to set up your compile environment in my Ubuntu 16.04,now I met some problem in setting up the compile environment , so I need someone's help who compiled succeed the code.

sailor-z commented 7 years ago

Hi! I think maybe there is an error in your code at APAP_Stitching.cpp. V(j,V.rows()-1) should be V(j,cols()-1).Besides,Can you give me the download link of your Eigen version ?I can't find it.I can't use "LeastSquaresConjugateGradient" class successfully in Eigen 3.3.3,either. Thanks!

nothinglo commented 7 years ago

Hi,

Indeed, it should be better to use cols(). I noticed it because the section of the code is followed by the APAP's author. I didn't change it because I think if it throws out the index error, it means your feature points are not enough (< 5).

The Eigen's main page has the newest version download link of the development branch. You can try it.

Thanks.

sailor-z commented 7 years ago

I have tried this version,but it still met the same error: niswgsp: /usr/include/eigen3/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h:99: const Eigen::Solve<Eigen::DiagonalPreconditioner<_Scalar>, Rhs> Eigen::DiagonalPreconditioner<_Scalar>::solve(const Eigen::MatrixBase&) const [with Rhs = Eigen::Matrix<double, -1, 1>; _Scalar = double]: Assertion `m_invdiag.size()==b.rows() && "DiagonalPreconditioner::solve(): invalid number of rows of the right hand side matrix b"' failed. I have no idea about how to solve this problem up to now.

nothinglo commented 7 years ago

Hi,

Could you tell me this is a compile error or a runtime error?

Thanks.

sailor-z commented 7 years ago

It's a runtime error.

nothinglo commented 7 years ago

Hi, Could you give me more information like which file and which line did you get the error? Thanks.

mpelang commented 7 years ago

@zyf12389 hi, may I know your choices for MAXFLOAT?

tlliao commented 7 years ago

What's your choices for MAXFLOAT? In math.h, the M_PI_2 means one-half pi, so in your code, the M_PI_2 means square of pi, or one-half pi?

nothinglo commented 7 years ago

@tlliao M_PI_2 == pi/2 Thanks.

tlliao commented 6 years ago

Hi, I find that the MAXFLOAT was used many times, so what's your choices for MAXFLOAT and what's the meaning?

nothinglo commented 6 years ago

It seems MAXFLOAT is not a standard parameter. You can change it as follow: https://stackoverflow.com/questions/28980541/error-identifier-maxfloat-is-undefined

In this project, it is used for initialization when finding the minimum number.

cl199443 commented 6 years ago

Thanks for your source code ,which is important for me to learn image stitching. Besides, I have compiled and run this code in Windows 10 successfully with VS2013.

nothinglo commented 6 years ago

@cl199443

I am glad to get this news. If you have available time, maybe you can help me to reply some issues which fail to run the code? I will be really thankful to you!

nothinglo commented 6 years ago

Thanks to @Yannnnnnnnnnnn! This is Ubuntu version: https://github.com/Yannnnnnnnnnnn/NISwGSP