镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

cv2 missing function imwritemulti #279

Closed

Description

@kwsp

imwritemulti is missing from the type stubs.

However, the corresponding imreadmulti is present.

Looks like this overloaded function was merged into OpenCV 4.5.1:

The current cv2 type stubs are generated from 4.4.0. When will it be time to update to a newer version? OpenCV stable is at 4.7.0 already.

Activity

  1. Avasam commented on Jun 13, 2023

    @Avasam
    Contributor

    Given that opencv can now generates python stubs and opencv-python has been updated to ship them, you can try the in-development version using pip install git+https://github.com/opencv/opencv-python.git.

    You can set the appropriate environment variables first if you'd like to install a specific package (like headless, contrib or healdless-contrib):

    ENABLE_CONTRIB=1
    ENABLE_HEADLESS=1

    It should work as-is with pyright and mypy, but for Pylance you'll have to remove the bundled stubs every time you update the extension. It can be found at: %HOMEPATH%\.vscode\extensions\ms-python.vscode-pylance-<VERSION>\dist\bundled\stubs\cv2-stubs (where <VERSION> is your current Pylance version).

    If the issue persists, you can raise it upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions