Opencv4tegra openembedded OpenCV compile sample TK1

Hi,

1- I built an angstrom-lxde-image using openembedded tutorial.

2- Added the recipe IMAGE_INSTALL_append = " opencv4tegra".

3- Built SDK bitbake angstrom-lxde-image -c populate_sdk.

4- I followed the tutorial High performance, low power Embedded Computing Systems | Toradex Developer Center
but I am having compilation errors below

facedetect.cpp:35: error: undefined reference to 'cv::getTextSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, double, int, int*)'
facedetect.cpp:62: error: undefined reference to 'cv::putText(cv::Mat&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::Point_<int>, int, double, cv::Scalar_<double>, int, int, bool)'
facedetect.cpp:76: error: undefined reference to 'cv::CascadeClassifier::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
facedetect.cpp:82: error: undefined reference to 'cv::VideoCapture::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
facedetect.cpp:119: error: undefined reference to 'cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&)'
collect2: error: ld returned 1 exit status
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 1

Thanks.

To use OpenCV for Tegra it is recommended to use NVidia Jetpack as mentioned here.

We are using angstrom-lxde image not linux4Tegra, and tried to bitbake including opencv, but I found your comment here

can we still use other version of opencv (not opencv4tegra) and include it in openembedded?

Thanks.

can we still use other version of opencv (not opencv4tegra) and include it in openembedded?

Should be possible but we only ever tested OpenCV for Tegra on TK1 along with Jetpack. Also note that one will not have access to any Tegra specific optimizations done by NVidia when using opencv instead of OpenCV for Tegra.