Code Monkey home page Code Monkey logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hi stephen,
it seems you use a previous version of libmv...
Can you try with the github version?

Original comment by [email protected] on 1 Aug 2011 at 9:11

  • Added labels: ****
  • Removed labels: ****

from gsoc2011sfm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
I tried it with the new version, and it still doesn't work. Possibly it is 
related to the following failures when I test libmv:

The following tests FAILED:
     19 - image_converter_test (Failed)
     20 - image_transform_linear_test (OTHER_FAULT)
     46 - homography_test (Failed)
     50 - panography_test (Failed)
     75 - similarity_parameterization_test (Failed)
     79 - euclidean_parameterization_test (Failed)
Errors while running CTest
make: *** [test] Error 8

However I think it's more likely to be related to CMake struggling to 
find/interpret the libmv library location properly. I think I have correctly 
identified the folder name for LIBMV_HEADER_DIR on my machine to be 
"/home/steve/libmv/libmv-libmv-7bef9ca/src" because when I change that I get 
more severe errors. However, I don't think my entry for LIBMV_LIB_DIR is 
correct because whatever I change it to (even a folder or file located nowhere 
near the libmv files) I get the same error.

I also noted that when in CMake and manually changing the value for 
LIBMV_LIB_DIR, it constrains me to search for a "File" rather than a "Path" 
(LIBMV_HEADER_DIR constrains me to a "Path"). Is this correct? It seems odd 
that the variable name would include "DIR" but be looking for a file. I've 
tried to type in a lot of different possible directories and ".a" files (the 
default entry for LIBMV_LIB_DIR was "/usr/local/lib/libmultiview.a"). None of 
them have worked so far. 

Just to reiterate, an example of an error I am trying to avoid is the following:

../src/libSfM_core.so.0.1.0||undefined reference to 
`libmv::FundamentalFromEssential(Eigen::Matrix<double, 3, 3, 0, 3, 3> const&, 
Eigen::Matrix<double, 3, 3, 0, 3, 3> const&, Eigen::Matrix<double, 3, 3, 0, 3, 
3> const&, Eigen::Matrix<double, 3, 3, 0, 3, 3>*)'|

Original comment by [email protected] on 2 Aug 2011 at 2:44

  • Added labels: ****
  • Removed labels: ****

from gsoc2011sfm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
OK, so we progress ;)
The first error you get (undefined reference) means that compilator can't find 
the definition (i.e. LIBMV_HEADER_DIR was not correctly set) but now it's the 
linker who can't find compiled code for libmv functions (i.e. LIBMV_LIB_DIR is 
not correct).

So for me the correct value was "/usr/local/lib" and as you said the "search 
for a File" is not correct but that's the only way I find to tell CMake to 
search for lib directory where libmultiview.a was...

I asked to libmv team how we can set libmv's lib and header installation 
directory but for now I don't have answer :(

Original comment by [email protected] on 2 Aug 2011 at 10:15

  • Added labels: ****
  • Removed labels: ****

from gsoc2011sfm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hey Thibault

When I "sudo make install" libmv my lib folder is just put in the "build" 
directory - it never gets to "/usr/local/lib"

In case it helps, when I use the following values in CMake:

LIBMV_HEADER_DIR : /home/steve/libmv/libmv-libmv-7bef9ca/src
LIBMV_LIB_DIR : /home/steve/libmv/libmv-libmv-7bef9ca/build/lib

I get the following warning:

----------------------------------------------------

Configuring done
CMake Warning at LibraryAdd.cmake:22 (add_library):
  Cannot generate a safe linker search path for target SfM_core because files
  in some directories may conflict with libraries in implicit directories:

    link library [libpng.so] in /usr/lib may be hidden by files in:
      /usr/local/share/opencv/../../lib
      /home/steve/libmv/libmv-libmv-7bef9ca/build/lib

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  src/CMakeLists.txt:2 (define_new_library)


CMake Warning at ProjectAdd.cmake:22 (add_executable):
  Cannot generate a safe linker search path for target SfM_tutorials because
  files in some directories may conflict with libraries in implicit
  directories:

    link library [libpng.so] in /usr/lib may be hidden by files in:
      /usr/local/share/opencv/../../lib
      /home/steve/libmv/libmv-libmv-7bef9ca/build/lib

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  tutorials/CMakeLists.txt:2 (define_new_project)


Generating done 

----------------------------------------------------

So maybe the problem I'm facing now is different, and due to some weird 
conflict? In any case, I agree that it's the libmv team's job to fix the CMake 
search issue, but they're doing a rewrite now aren't they? So it's probably 
unlikely that they will make any improvements until they release the new 
version.

I tried to follow the libmv installation directions exactly - did you do 
anything different that allowed you to link correctly with them in the 
gsoc2011sfm project?

Original comment by [email protected] on 2 Aug 2011 at 1:42

  • Added labels: ****
  • Removed labels: ****

from gsoc2011sfm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Sorry, I missed this answer!
So it seems you don't configure properly the libmv project. Please use ccmake 
(cmake with UI) and set the intall path to /usr/local/

Btw, I change a lot of things in the CMakeList.txt, maybe this problem is 
solved (but some other will probably comes). I have the same warning because 
there is multiple libpng.so files and cmake don't know which one is correct. 
But for me it's ok, I hope they are all the same!

Original comment by [email protected] on 16 Aug 2011 at 12:17

  • Added labels: ****
  • Removed labels: ****

from gsoc2011sfm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hi Thibault

OK I've got it working now - but I'm not sure exactly what did it. I think that 
install path was already set correctly. However, initially I tried to follow 
the libmv README instructions exactly which said NOT to build it in the top 
level directory:

// ============================== //

Building uses CMake, so it is possible to build in other directories with
different CMake flags. However, building inside the toplevel directory with
CMake will fail; in other words DON'T DO THIS:

 $ ls
 AUTHORS  contrib  doc  LICENSE  Makefile  README  src
 $ cmake .
 $ make  <-- Will fail.

Instead do this:

 $ ls
 AUTHORS  contrib  doc  LICENSE  Makefile  README  src
 $ mkdir build
 $ cd build
 $ cmake ../src # Your options here
 $ make
 $ make test
 $ ... 

// ============================== //

However, when I DID build it in the top-level directory, it seemed to build and 
install fine. And after this I no longer got compile errors when I built 
opencvSfM!!

So as far as I can tell everything is running smoothly now (using revision 
r224). When you say libmv is fully integrated, does that mean it should not 
need to be downloaded and installed separately to your work?

By the way, great work with your progress so far! Please let me know if you 
have any tasks you think I might be able to work on in order to help. I have 
downloaded "vincents-structure-from-motion-matlab-toolbox" and am going to try 
to learn my way around it a bit, but unfortunately I doubt I will be able to 
help you with the bundle-adjustment or improper-rotation problems you are 
facing at the moment..

Original comment by [email protected] on 17 Aug 2011 at 1:29

  • Added labels: ****
  • Removed labels: ****

from gsoc2011sfm.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Thanks for your help,
So I close this issue as everything seems to work now.

As I am in the end of my GSOC, I will probably focus on some little apps using 
this  API so if you have ideas, I'm open to suggestions!

Original comment by [email protected] on 18 Aug 2011 at 11:58

  • Changed state: Done
  • Added labels: ****
  • Removed labels: ****

from gsoc2011sfm.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.