Ask Your Question
0

Running OpenCV SuperpixelSEEDS class without installing contrib module

asked 2015-07-08 17:52:23 -0600

updated 2015-07-08 18:16:15 -0600

I want to utilize SuperpixelSEEDS class implementing the SEEDS (Superpixels Extracted via Energy-Driven Sampling) superpixels algorithm described in:

Michael Van den Bergh, Xavier Boix, Gemma Roig, Luc Van Gool: SEEDS: Superpixels Extracted via Energy-Driven Sampling. International Journal of Computer Vision (IJCV), 2014.

Full documentation:

OpenCV-Superpixels

However, installing contrib module is not an option in this case since I will be integrating it to Android platform.

Is it possible to compile seeds.hpp along with the implementation seeds.cpp with opencv not compiled along with opencv_contrib module?

Here's one failed attempt:

$ g++ -ggdb `pkg-config --cflags --libs opencv` seeds_sample.cpp seeds.cpp /tmp/ccwT1ohy.o: In function `cv::operator*=(cv::Mat&, double const&)': /usr/local/include/opencv2/core/operations.hpp:254: undefined reference to `cv::Mat::convertTo(cv::_OutputArray const&, int, double, double) const' /tmp/ccwT1ohy.o: In function `cv::operator&=(cv::Mat&, cv::Scalar_<double> const&)': /usr/local/include/opencv2/core.hpp:1143: undefined reference to `cv::noArray()' /tmp/ccwT1ohy.o: In function `cv::operator&=(cv::Mat&, cv::Scalar_<double> const&)': /usr/local/include/opencv2/core/operations.hpp:264: undefined reference to `cv::bitwise_and(cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&)' /tmp/ccwT1ohy.o: In function `main': /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:41: undefined reference to `cv::VideoCapture::VideoCapture()' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:48: undefined reference to `cv::VideoCapture::open(int)' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:53: undefined reference to `cv::imread(cv::String const&, int)' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:58: undefined reference to `cv::VideoCapture::isOpened() const' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:70: undefined reference to `cv::namedWindow(cv::String const&, int)' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:77: undefined reference to `cv::createTrackbar(cv::String const&, cv::String const&, int*, int, void (*)(int, void*), void*)' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:78: undefined reference to `cv::createTrackbar(cv::String const&, cv::String const&, int*, int, void (*)(int, void*), void*)' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:79: undefined reference to `cv::createTrackbar(cv::String const&, cv::String const&, int*, int, void (*)(int, void*), void*)' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:80: undefined reference to `cv::createTrackbar(cv::String const&, cv::String const&, int*, int, void (*)(int, void*), void*)' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:91: undefined reference to `vtable for cv::VideoCapture' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:93: undefined reference to `cv::Mat::copyTo(cv::_OutputArray const&) const' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:107: undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:109: undefined reference to `cv::getTickCount()' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:114: undefined reference to `cv::getTickCount()' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:114: undefined reference to `cv::getTickFrequency()' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:124: undefined reference to `cv::Mat::setTo(cv::_InputArray const&, cv::_InputArray const&)' /home/cobalt/Workspace/SEEDS/seeds_sample.cpp:130: undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)' /home/cobalt/Workspace/SEEDS/seeds_sample ... (more)

edit retag flag offensive close merge delete

Comments

1

In cmake you can select what you want to build. As SuperpixelSEEDS seems to be in module ximgproc you can disable all other contrib module. I haven't try but may be it could work

LBerger gravatar imageLBerger ( 2015-07-09 02:54:51 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-07-09 20:25:15 -0600

@LBerger Thanks for the comment. I will try it later, but for now, since I'm applying it to Android NDK, I find creating my own SuperpixelSEEDS class and compiling it with JNI easier.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-07-08 17:52:23 -0600

Seen: 1,291 times

Last updated: Jul 08 '15