WebCam Face detection and tracking tutorial with Arduino Uno R3 and OpenCV 3.0 RC1 in Ubuntu 14.04 I try to make this Arduino Open CV tutorial for webcams. OpenCV 3.0 RC1 is compiled and installed. I also use Code::Blocks 13.12 as IDE. I am a newbie what comes to OpenCV and I do not know too much about Arduino either but here I am learning. Arduino IDE is 1.7.2. The tutorial is made for Windows 7 and software for this OS but I bet it is possible to repeat this in Ubuntu Linux 14.04 also. 

So the tutorial is here:

http://duino4projects.com/face-detection-and-tracking-with-arduino-and-opencv/

When I try to compile and run the techbitarFaceDetection.cpp 

the Code::Block IDE gives me following error:


  fatal error: Tserial.h: No such file or directory


So please tell me what to do next and how to fix this error.
Forget Tserial.h lib. To solve your problem (for serial communication) I sugest you to use "read/write from/to a file" programming method. The serial ports may be written to just like you are writing in a file. In the facedetect.cpp (OpenCV's example), in the detectAndDraw() function (I'm using OpenCV 3.0) add: unsigned char MSB[1] = {0}; //
    unsigned char LSB[1] = {0}; //
    char serialPortFilename[]="/dev/ttyACM0";
    FILE *serPort = fopen(serialPortFilename, "w"); //

than add: 

LSB[0]=r-&gt;x &amp; 0xff;//
    MSB[0]=(r-&gt;x &gt;&gt;8) &amp; 0xff;//

    fwrite((const void*)MSB,sizeof(unsigned char),sizeof(MSB),serPort);//
fwrite((const void*)LSB,sizeof(unsigned char),sizeof(LSB),serPort);//

LSB[0]=r-&gt;y &amp; 0xff;//
    MSB[0]=(r-&gt;y &gt;&gt;8) &amp; 0xff;//

    fwrite((const void*)MSB,sizeof(unsigned char),sizeof(MSB),serPort);//
    fwrite((const void*)LSB,sizeof(unsigned char),sizeof(LSB),serPort);//


into the if (0.75 &lt; aspect_ratio &amp;&amp; aspect_ratio &lt; 1.3) statement.

Finally don't forget to close the file

fclose(serPort);


Hope this will work for you!