Ask Your Question

Revision history [back]

I would suggest first of all including the frame grabbing by using the VideoCapture class. It will push your captured frame towards a single matrix element, giving you the chance of applying the region of interest operator before your processing.

Some example code:

VideoCapture cap(0); // open the default camera
Mat frame;
cap >> frame; // get a new frame from camera
Rect region_of_interest(50,50,100,100); // generates a 100x100 pixels region of interest, starting at position [50,50] for top left corner.
Mat sub = frame(region_of_interest).clone(); // sub will now contain the region only

Does this suit your needs?

I would suggest first of all including the frame grabbing by using the VideoCapture class. It will push your captured frame towards a single matrix element, giving you the chance of applying the region of interest operator before your processing.

Some example code:

VideoCapture cap(0); // open the default camera
Mat frame;
cap >> frame; // get a new frame from camera
Rect region_of_interest(50,50,100,100); // generates a 100x100 pixels region of interest, starting at position [50,50] for top left corner.
Mat sub = frame(region_of_interest).clone(); // sub will now contain the region only

Does this suit your needs?


UPDATE:

Looking at the logitech forums, it seems there is indeed a C++ interfacing possible with the camera's. This topic goes deeper that.

It states that:

Yes, its called DirectShow - it used to be part of the Direct X SDK but its now on the Platform SDK (and pressumeably the Windows\Vista SDK). The main sample to look at is AmCap - you could probably just google that. DirectShow is COM based so theres VB code too...though C++ is better

So my guess would be to download that amcap code example, look at the source and then try to reconstruct the code you would need to set parameters for your cam.