accessing OpenCV from the KISS IDE

1 reply [Last post]
DavidMutchler
Title: NooBot+
Joined: 06/17/2009
Posts:
BotPoints: 24
User offline. Last seen 6 years 18 weeks ago.

I am trying to access OpenCV methods from the KISS IDE (v. 4.0.5), running on the Link (firmware 1.9.5). Here is my test program:

  1. // Created on Thu June 20 2013
  2. #include <iostream>
  3. #include <kovan/camera.hpp>
  4. #include <opencv2/opencv.hpp>
  5.  
  6. using namespace std;
  7. using namespace cv;
  8.  
  9. int main(int argc, char *argv[])
  10. {
  11. // Mat image;
  12.  
  13. Camera::Device camera;
  14. camera.open();
  15.  
  16. VideoCapture *cap = camera.videoCapture();
  17.  
  18. cout << cap->grab() << endl;
  19.  
  20. camera.close();
  21. }

This compiles on the Link and appears to run correctly, in that it prints a 1 (successful grab). The problem is that when I un-comment the line
Mat image;

in order to do a cap->retrieve(image), I get a compile-time (linker) error indicating that there is an undefined reference to cv::fastFree(void*). Here is the full error message:

/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.4./../../../../arm-angstrom-linux-gnueabi/bin/ld: nogood4.cpp.o: underfined reference to symbol 'cv::fastFree(void*);

/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.4./../../../../arm-angstrom-linux-gnueabi/bin/ld: note: 'cv::fastFree(void*)' is defined in DSO /usr/lib/libopencv_core.so.2.4 so try adding it to the linker command line

/usr/lib/libopencv_core.so.2.4: could not read symbols: Invalid operation

collect2: ld returned 1 exit status

Am I doing something wrong? Is there some easy way to access the OpenCV library on the Link?

Thanks in advance!

Beta
Beta's picture
Title: The Magnificent
Joined: 02/24/2012
Posts:
BotPoints: 266
User offline. Last seen 9 years 15 weeks ago.

Hi David,

KISS IDE 4.1 will address this issue through a project system with build options (hopefully available in the next few days). I'll update instructions for OpenCV on this topic once it's available.

Braden McDorman

Developer of the KIPR Link, KISS IDE, KIPR's 2D Simulator, and CBCJVM.

Reach me at bmcdorman(cat)kipr(dog)org where (cat)=@ and (dog)=. if you need assistance of any kind.