OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

What is the `image` *parameter* in `cv2.VideoCapture.read` for?

  • Thread starter Thread starter splaytreez
  • Start date Start date
S

splaytreez

Guest
The signature of the method is:

Code:
def read(self, image: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]

It's obvious that the MatLike that it returns is the image that it reads, but what is the image parameter for?

The docs confuse me:

Parameters:

[out] image the video frame is returned here. If no frames has been grabbed the image will be empty.

I'm just not sure what that means. What's the difference between the parameter and the value the function outputs?
<p>The signature of the method is:</p>
<pre><code>def read(self, image: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]
</code></pre>
<p>It's obvious that the <code>MatLike</code> that it <em>returns</em> is the image that it reads, but what is the <code>image</code> <em>parameter</em> for?</p>
<p>The docs confuse me:</p>
<blockquote>
<p>Parameters:</p>
<p>[out] <code>image</code> the video frame is returned here. If no frames has been grabbed the image will be empty.</p>
</blockquote>
<p>I'm just not sure what that means. What's the difference between the parameter and the value the function outputs?</p>
 

Latest posts

Top