Re: [ceres-solver] using Ceres with Cmake

80 lượt xem
Chuyển tới thư đầu tiên chưa đọc

Sameer Agarwal

chưa đọc,
00:14:48 7 thg 6, 20167/6/16
đến 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

chưa đọc,
00:31:20 7 thg 6, 20167/6/16
đến Ceres Solver
I never set it.

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

Sameer Agarwal

chưa đọc,
00:35:53 7 thg 6, 20167/6/16
đến 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

chưa đọc,
00:36:20 7 thg 6, 20167/6/16
đến 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?
Trả lời tất cả
Trả lời tác giả
Chuyển tiếp
0 tin nhắn mới