Skip to content

Video capture resolution stuck in Windows MSMF backend #12822

@nerdfever

Description

@nerdfever

Open CV 3.4.2
Windows 64 Bit
Python 3.6

See http://answers.opencv.org/question/195388/video-capture-resolution-issue-on-windows/

The poster found the problem on a Logitech HD Webcam C615; I'm seeing the same thing on a Logitech QuickCam Pro 9000.

On Windows 10 x64 with the MSMF backend, if you change video resolution like so:

camera.set(cv2.CAP_PROP_FRAME_WIDTH, x)
camera.set(cv2.CAP_PROP_FRAME_HEIGHT, y)

The result is that you'll get a frame of size x,y pixels (if x,y is one of the resolutions supported by the webcam), but that image is in fact a 640x480 image rescaled to size x,y.

The poster at answers.opencv.org above claims that on the DirectShow backend it appears to work correctly (I've only tried the MSMF backend so far).

For example, below are 3 images captured identically at 640x480, 960x720, and 1600x1200 resolution with the MSMF backend from a Logitech QuickCam Pro 9000 (all those are reported by the camera as supported modes). It's pretty obvious they were all captured at the same resolution, then scaled.

20181013_143012_1 640x480

20181013_142952_1 960x720

20181013_143219_1 1600x1200

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions