Content-Length: 272816 | pFad | https://github.com/opencv/opencv/issues/23910

6B Python typing stub missing matrix type constants like CV_32F · Issue #23910 · opencv/opencv · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python typing stub missing matrix type constants like CV_32F #23910

Closed
4 tasks done
TheSingular opened this issue Jul 3, 2023 · 3 comments · Fixed by #23954
Closed
4 tasks done

Python typing stub missing matrix type constants like CV_32F #23910

TheSingular opened this issue Jul 3, 2023 · 3 comments · Fixed by #23954

Comments

@TheSingular
Copy link

TheSingular commented Jul 3, 2023

System Information

OpenCV python version:4.8.0.74
OS: Windows 11 22H2
Python version: 3.11.4

Detailed description

Where and how should we report issues with the typing? It seems all CV_... constants are missing.

Originally posted by @damonmaria in #20370 (comment)

The commit in question is missing the CV_... constants as stated by the comment I quoted, causing cannot find reference errors in PyCharm and failing to autocorrect.

Steps to reproduce

Open any python file in PyCharm or create a new one.

Type the following to the top of the file:

import cv2
test = cv2.CV_32F

Observe the yellow squiggly line below the CV_32F part. Hover the mouse cursor over that part to observe the warning:
Cannot find reference 'CV_32F' in '__init__.pyi'

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)
@TheSingular TheSingular added the bug label Jul 3, 2023
@asmorkalov asmorkalov changed the title Python typing stub missing CV_... constants. Python typing stub missing matrix type constants like CV_32F Jul 3, 2023
@asmorkalov
Copy link
Contributor

The are handled in manually written code and are out of scope of code generator. Details:

#define PUBLISH(I) PUBLISH_(I, #I, I ## _obj)

@TheSingular
Copy link
Author

Yeah, that seems to explain the why. Thanks for the explanation.

@TheSingular
Copy link
Author

Thanks a lot.

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

Successfully merging a pull request may close this issue.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/opencv/opencv/issues/23910

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy