WebCam Face detection and tracking tutorial with Arduino Uno R3 and OpenCV 3.0 RC1 in Ubuntu 14.04
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!