0

I am trying to incorporate OpenCV libraries in Arduino sketches using Eclipse. As a start, I separate the 2 prjects, OpenCV code and a simple Arduino sketch. They both compile and run beautifully in separate projects after linking everything OpenCV libraries and Arduino libraries, respectively. So then, I try adding OpenCV code into the Arduino sketch project to try and get them to run together. Even after the same linking as I did with the OpenCV project, there are compiling errors such as type '___' could not be resolved. The header inclusions like

#include <iostream>
#include <cv.h>
#include <highgui.h>

seem to not have errors to them. In the console I would have compilation errors until building such as /usr/include/c++/4.8/iostream:38:28: fatal error: bits/c++config.h: No such file or directory. I didn't have this error with the individual OpenCV project. So maybe the AVR C++ compiler is missing something the native c++ compiler has.

I don't get what I am doing wrong or know what I am forgetting. Includes Library/Library Paths

Any help would be appreciated. Thanks!

LeggoMaEggo
  • 512
  • 1
  • 9
  • 24

1 Answers1

0

It looks like you are trying to program OpenCV into the Arduino. Assuming you wnat to run this code in Arduino Uno, you are never be able to run OpenCV even though you successful compile the project. Arduino Uno has only around 2kb of RAM (think how big the image file you want to process is) and does not have enough flash memory for OpenCV code.

You have to look for another way like running separated OpenCV project on your computer and communicate with Arduino Uno through serial port or something.

Bumsik Kim
  • 5,853
  • 3
  • 23
  • 39