Re: [ceres-solver] using Ceres with Cmake

80 views
Skip to first unread message

Sameer Agarwal

unread,
Jun 7, 2016, 12:14:48 AM6/7/16
to Ceres Solver
are you building in debug more or release mode?
try 
cmake -DCMAKE_BUILD_TYPE=Release

Sameer

On Mon, Jun 6, 2016 at 9:07 PM Lang Tan <jinaqi...@gmail.com> wrote:
Hi guys,

I'm just beginning to use Ceres. I have successfully installed Ceres and tried some examples. Then I try to follow the tutorial Using Ceres with Cmake.
In my project folder, there are 3 files: CMakeLists.txt,  simple_bundle_adjuster.cc (copied from Ceres),  problem-16-22106-pre.txt (Copied form Ceres)
The CMakeLists.txt :
cmake_minimum_required(VERSION 2.8)
project(simpe_ba)
find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})
# 
add_executable(simple_ba helloworld.cc)
target_link_libraries(helloworld ${CERES_LIBRARIES})

But it runs very slow : 

It takes 60s to evaluate the Jacobian( When I tried this example in Ceres, it only takes about 0.4s). I can't figure out why this becomes such slow, I guess my CMakeLists.txt is just too simple, but i don't know how to improve it.

Thanks in advance.

Tan.


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/632afbc2-d075-4fa5-9663-21e22b13c6ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lang Tan

unread,
Jun 7, 2016, 12:31:20 AM6/7/16
to Ceres Solver
I never set it.

在 2016年6月7日星期二 UTC+8下午12:14:48,Sameer Agarwal写道:

Sameer Agarwal

unread,
Jun 7, 2016, 12:35:53 AM6/7/16
to Ceres Solver
then you are likely building in debug mode by default. Set the mode to release and I bet your code becomes fast.

Lang Tan

unread,
Jun 7, 2016, 12:36:20 AM6/7/16
to Ceres Solver
Yes, now it's blazing fast. Thanks a lot!!!!!!


在 2016年6月7日星期二 UTC+8下午12:14:48,Sameer Agarwal写道:
are you building in debug more or release mode?
Reply all
Reply to author
Forward
0 new messages