How to add module from opencv 3 to opencv 2

asked 2016-12-20 09:53:29 -0600

anunuparov gravatar image

updated 2016-12-20 09:54:29 -0600

Hello,

More precisely I want to add ArUco library support in OpenCV 2.4.13. And I have no idea how to do this.

I saw this post http://answers.opencv.org/question/98...

Next advice was in this post: "If switching to OpenCV 3+ is that much of a problem, you can just download the source files for the ARUCO module directly. It will take a little bit of work to get them to compile, but much less than trying to re-write all the functions yourself. Just remember that it falls under the OpenCV BSD license, so be aware of how you integrate it."

But I have no idea how to do this, CMakeLists.txt file is made for building is a part of the full OpenCV library. How can I compile only one module? And how to include it in OpenCV 2.4.13

Thank you in advance!

edit retag flag offensive close merge delete

Comments

please clarify:

  • do you want to use aruco markers with opencv2.4 ? (then use the original aruco lib, not the opencv3 module)
  • do you want to calibrate your camera using opencv3's charuco boards ? (then upgrade to opencv3, it won't work with 2.4)
berak gravatar imageberak ( 2016-12-20 10:46:49 -0600 )edit

Thank you for your answer!

I want to use aruco markers with opencv 2.4. Upgrade to opencv 3 is not possible, because I'm using OpenCV4Tegra, if I will upgrade to 3d version I will lose all optimization made by nvidia.

This solution will work for aruco, but actually I think I will need to port other modules from opencv 3, so I hope to find some sort of universal solution for adding opencv 3 modules to opencv 2. Thats why I thought it will be interesting to compile opencv 3 module alone and integrate it with opencv 2.

anunuparov gravatar imageanunuparov ( 2016-12-20 11:39:05 -0600 )edit

i guess, what you want then, is - apply more pressure on devs to support OpenCV4Tegra (or it's successor) on opencv3, not sit on your outdated 2.4 version forever.

berak gravatar imageberak ( 2016-12-20 11:43:13 -0600 )edit

On devs forum they said that that will not be soon, so It's best option but will not work at this moment. So I hope to find another way

anunuparov gravatar imageanunuparov ( 2016-12-20 12:03:12 -0600 )edit
1

sad as it is, you're pretty much on your own, from here. ;(

berak gravatar imageberak ( 2016-12-20 12:07:24 -0600 )edit

Anyway thank you!

anunuparov gravatar imageanunuparov ( 2016-12-21 05:49:35 -0600 )edit

P.S. I actually decided just to have 2 opencv builds on computer, and use when it's possible OpenCV 2, and where is not OpenCV 3.

anunuparov gravatar imageanunuparov ( 2016-12-28 04:31:21 -0600 )edit