I am trying to use openCV to get images from the camera install in my laptop (running Ubuntu 11.04), and I have some questions/problems:
-
I have checked that some code examples use the following includes:
#include “cv.h”
#include “highgui.h”
but once I compile the code, errors are given due to those includes. How can I set those packages/libraries to be used in my code? I try doing it following this website http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/ but no success.
-
Once an image is loaded in an object IplImage*, how can I sent it through a socket? I have though about saving it to a file using “cvSaveImage(fileName,img)”, and then open such file and send it (which I have no problem with, since I have sent files .bmp and .jpg through sockets), but I not sure whether this may be the optimal way to do it. I have checked that the structure IplImage have several fields, but I am not sure which one of them can be used for my purpose.
-
How can I get the variable of the camera of my laptop as parameter for cvCaptureFromCAM in openCV?
Thanks in advance for any help you could provide.
The main problem I was facing was that I was installing openCV for a different version of Ubuntu. Once I install the right method for the appropiate version of Ubuntu the mentioned problems in my question disappeared, using “0” as index for my laptop camera.