how to scale video from web cam?

Hello , how can i scale the video from the web cam? I ve been trying to change the size, but it doesnt work , it corrupts the image, why is that? Is there any specific way of doing this?

and why does the data pixels should be 320 and 240? If there any specific reason why it should be that size? If i change the data pixels it corrupts too

any idea?

thanks in advance

M.

Hej Matias,

I suppose you can use the “resize” method of ofxCvColorImage class like this:

  
  
ofxCvColorImage colorImage = videoGrabber.getPixels();  
colorImage.resize(640, 480);  
  

Or you can put these values into the “draw” method: videoGrabber.draw(0, 0, 640, 480)