title: How do I modify the camshiftdemo.cpp sample program to reduce fps, height/width, and range of samples?
body: <p>I am experimenting with the following code on the raspberry pi: </p>
  
  <p><a href="https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/cpp/camshiftdemo.cpp?rev=4234" rel="nofollow noreferrer">https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/cpp/camshiftdemo.cpp?rev=4234</a> </p>
  
  <p>and I would like to do the recommendations from this thread: </p>
  
  <p><a href="https://stackoverflow.com/questions/7622672/opencv-better-performance">Getting better performance using OpenCV?</a></p>
  
  <p>Specifically, how do I perform #1 - #4 in the link above? </p>
  
  <p>Looking at this site: </p>
  
  <p><a href="http://opencv.willowgarage.com/documentation/cpp/reading_and_writing_images_and_video.html#cv-videocapture-set" rel="nofollow noreferrer">http://opencv.willowgarage.com/documentation/cpp/reading_and_writing_images_and_video.html#cv-videocapture-set</a></p>
  
  <p>I have attempted to do the following: </p>
  
  <pre><code>cap.set(CV_CAP_PROP_FRAME_WIDTH, 320);
  cap.set(CV_CAP_PROP_FRAME_WIDTH, 240);
  cout &lt;&lt; "width = " &lt;&lt; cap.get(CV_CAP_PROP_FRAME_WIDTH) &lt;&lt; endl;
  cout &lt;&lt; "height = " &lt;&lt; cap.get(CV_CAP_PROP_FRAME_HEIGHT) &lt;&lt; endl;
  </code></pre>
  
  <p>However the output always says 640 and 480 for width and height. Am I missing something big here?</p>
  
  <p>I am using OpenCV 2.3.1</p>