title: OpenCV: Difference between cap.set(CAP_PROP_FRAME_WIDTH or CAP_PROP_FRAME_HEIGHT) and resize()
body: <p>I am working on OpenCV (4.3.0) and trying to understand how I can change the resolution of the image.</p>
  <p>To my understanding there are 2 ways that I can do this,</p>
  <ol>
  <li><p>Using &quot;cap.set()&quot; function</p>
  <pre><code>     cv::VideoCapture cap(0)
       cap.set(CAP_PROP_FRAME_WIDTH, 320);//Setting the width of the video 
       cap.set(CAP_PROP_FRAME_HEIGHT, 240);//Setting the height of the video 
  </code></pre>
  </li>
  <li><p>Using &quot;resize()&quot; function,</p>
  <pre><code>int up_width = 600;
  int up_height = 400;
  Mat resized_up;
  resize(image, resized_up, Size(up_width, up_height), INTER_LINEAR);
  </code></pre>
  </li>
  </ol>
  <p>I wanted to understand if they both are the same or if they are different. What are the exact differences between them?</p>