Ask Your Question

_Christian_'s profile - activity

2015-09-02 12:51:10 -0600 received badge  Nice Question (source)
2015-09-02 02:40:34 -0600 commented question How to contribute an optimised LineSegmentDetector Algorithm?

Oh, didn't know about the OpenCV_contrib Repo. Thanks for that Info. I'll look there of course then.

in general, the devs there seem to be quite hesitant to accept c++11 code at all. are there ways to avoid it ? I doubt, that we can avoid it, because we made use of std::unique_ptr which requires C++11. As me colleagues told me, they've choosen it in order to stint the reference counter in order to speed up the algorithm. If nothing helps, we could still wait for OpenCV accepting C++11.

I'll examine this Repo and try to add it there. Thanks again.

2015-09-02 01:59:06 -0600 received badge  Editor (source)
2015-09-02 00:23:08 -0600 received badge  Student (source)
2015-09-01 10:08:04 -0600 asked a question How to contribute an optimised LineSegmentDetector Algorithm?

Hello,

colleagues of mine implemented this optimised LSD in a seperate project and we want to contribute an this version of the LineSegmentDetector algorithm back to the community. I'm in charge to bring this version of the Algorithm back into the OpenCV Repository via a PullRequest. I started with http://code.opencv.org/projects/openc... and cloned the repository in order to add the hopefully optimised Algorithm.

But i ran into Problems while trying to add the "new" LSD-Algorithm into the module "imgproc" where the "old" one resides. The new Algorithm needs to be compiled with "-std=c++11", but the OpenCV project isn't. That's because i'm running into errors.

In my Sandbox the files containing the optimised Algorithm are compiled as follows:

project( lsd_back_newImpl CXX )
cmake_minimum_required(VERSION 2.8)
set (CMAKE_CXX_COMPILER "g++")
set( CMAKE_CXX_FLAGS "-std=c++11 -Wall -pthread -Os -s" )

add_library( lsd_back_newImpl SHARED lsd_back_newImpl )
set_target_properties( lsd_back_newImpl PROPERTIES LINKER_LANGUAGE CXX )

This way i get a shared library that i could probably use from the opencv library compiled without -std=C++11.

In first place, i put the lsd_new.cpp into the modules/imgproc/src directory. If i put the lsd_back_newImpl.cpp to modules/imgproc/src it will be automatically compiled, but without the compile flag "-std=C++11".

The CMakeLists.txt of modules/imgproc "only" contains

set(the_description "Image Processing")
ocv_define_module(imgproc opencv_core WRAP java python)

How would i accomplish to compile all files in imgproc/* like before, except the lsd_new.cpp file and instead compiling this file with the different Compiler_Flags in order to add a shared library that is compiled with the required flags?