8000 opencv-python stubs by Avasam · Pull Request #8879 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

opencv-python stubs #8879

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

Closed
wants to merge 38 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
53cbde4
Bump PyInstaller-stubs to 5.5
Avasam Oct 10, 2022
7f6a836
Merge branch 'master' of https://github.com/python/typeshed
Avasam Oct 10, 2022
517bd33
Initial generated cv2 stubs
Avasam Oct 10, 2022
63d7170
Added microsoft/python-type-stubs/cv2
Avasam Oct 11, 2022
1a00677
Set signatures from existing docstrings
Avasam Oct 11, 2022
aef1b26
Added https://github.com/microsoft/python-type-stubs/pull/219
Avasam Oct 11, 2022
b9224e3
Added https://github.com/microsoft/python-type-stubs/pull/227
Avasam Oct 11, 2022
85f6091
Added https://github.com/microsoft/python-type-stubs/pull/232
Avasam Oct 11, 2022
9fdc94e
Empty docstrings
Avasam Oct 11, 2022
1e3488c
Use the more flexible _Mat (NDArray) for typing
Avasam Oct 11, 2022
b72ac55
Fix dts to dst
Avasam Oct 11, 2022
41dba77
Added missing packages + strict types in cv2.gapi
Avasam Oct 12, 2022
edfd948
Updated list to Sequence in method args
Avasam Oct 12, 2022
8b35a5a
stricter pyright
Avasam Oct 12, 2022
e2c4a41
Fix Flake8
Avasam Oct 12, 2022
7e8b5dd
complete some Incomplete
Avasam Oct 12, 2022
6e5ab28
Removed docstrings
Avasam Oct 12, 2022
9cf3c44
fix pyright test
Avasam Oct 12, 2022
6a03195
Fixed Mat variances
Avasam Oct 12, 2022
f75c2f9
fixed cv2.error and cv2.Error
Avasam Oct 12, 2022
7fb76ea
Flake8 and stubtest
Avasam Oct 12, 2022
c9431d2
don't return Any with # incomplete method
Avasam Oct 14, 2022
0a688b7
don't return Any with # incomplete method
Avasam Oct 14, 2022
900e731
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 14, 2022
37bb1d1
Class def updates
Avasam Oct 15, 2022
ebe36a1
Merge branch 'opencv2' of https://github.com/Avasam/typeshed into ope…
Avasam Oct 15, 2022
06f73ba
Additional comments
Avasam Oct 15, 2022
c66b19c
Move _RotatedRect
Avasam Oct 15, 2022
203de26
mypy type: ignore[misc] explanation comment
Avasam Oct 15, 2022
28dc455
Completed generated modules
Avasam Oct 19, 2022
ffcfcee
Merge branch 'master' of https://github.com/python/typeshed into opencv2
Avasam Oct 20, 2022
bb50269
Fix flake8 warnings
Avasam Oct 20, 2022
22f29a7
Merge branch 'python:main' into opencv2
Avasam Nov 12, 2022
6b35384
Merge branch 'main' of https://github.com/python/typeshed into opencv2
Avasam Dec 5, 2022
6919768
noqa: Y042" has no matching violations
Avasam Dec 5, 2022
6d21d55
Merge branch 'main' into opencv2
AlexWaygood Jan 11, 2023
3b4f9b3
Merge branch 'main' of https://github.com/python/typeshed into opencv2
Avasam Jun 5, 2023
bfd370d
Merge branch 'opencv2' of https://github.com/Avasam/typeshed into ope…
Avasam Jun 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
Prev Previous commit
Next Next commit
Empty docstrings
  • Loading branch information
Avasam committed Oct 11, 2022
commit 9fdc94efbf50d6201d9c908599dd5b62649148e0
79 changes: 17 additions & 62 deletions stubs/opencv-python/cv2/cv2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ _P3: TypeAlias = Incomplete # noqa: Y042
_Q: TypeAlias = Incomplete # noqa: Y042
_roi1: TypeAlias = Incomplete # noqa: Y042
_roi2: TypeAlias = Incomple 10000 te # noqa: Y042
__3dImage: TypeAlias = Incomplete # noqa: Y042
_3dImage: TypeAlias = Incomplete # noqa: Y042
_intersectingRegion: TypeAlias = Incomplete # noqa: Y042
_blend: TypeAlias = Incomplete # noqa: Y042
_boundingBoxes: TypeAlias = Incomplete # noqa: Y042
Expand Down Expand Up @@ -5782,10 +5782,7 @@ def cartToPolar(x, y, magnitude=..., angle=..., angleInDegrees=...) -> tuple[_ma
"""
...

def checkChessboard(img: Mat, size) -> _retval:
""" """
...

def checkChessboard(img: Mat, size) -> _retval: ...
def checkHardwareSupport(feature) -> _retval:
"""
@brief Returns true if the specified feature is supported by the host hardware.
Expand Down Expand Up @@ -6520,10 +6517,7 @@ def createBackgroundSubtractorMOG2(history=..., varThreshold=..., detectShadows=
"""
...

def createButton(buttonName, onChange, userData=..., buttonType=..., initialButtonState=...) -> None:
""" """
...

def createButton(buttonName, onChange, userData=..., buttonType=..., initialButtonState=...) -> None: ...
def createCLAHE(clipLimit=..., tileGridSize=...) -> _retval:
"""
@brief Creates a smart pointer to a cv::CLAHE class and initializes it.
Expand Down Expand Up @@ -6677,10 +6671,7 @@ def createTonemapReinhard(gamma=..., intensity=..., light_adapt=..., color_adapt
"""
...

def createTrackbar(trackbarName, windowName, value, count, onChange) -> None:
""" """
...

def createTrackbar(trackbarName, windowName, value, count, onChange) -> None: ...
def cubeRoot(val) -> _retval:
"""
@brief Computes the cube root of an argument.
Expand Down Expand Up @@ -7315,14 +7306,8 @@ def divide(src1: Mat, src2: Mat, dts: Mat = ..., scale=..., dtype=...) -> _dst:

@overload
def divide(scale, src2, dst=..., dtype=...) -> _dst: ...
def dnn_registerLayer() -> None:
""" """
...

def dnn_unregisterLayer() -> None:
""" """
...

def dnn_registerLayer() -> None: ...
def dnn_unregisterLayer() -> None: ...
def drawChessboardCorners(image: Mat, patternSize, corners, patternWasFound) -> _image:
"""
@brief Renders the detected chessboard corners.
Expand Down Expand Up @@ -8216,10 +8201,7 @@ def filterSpeckles(img: Mat, newVal, maxSpeckleSize, maxDiff, buf=...) -> tuple[
"""
...

def find4QuadCornerSubpix(img: Mat, corners, region_size) -> tuple[_retval, _corners]:
""" """
...

def find4QuadCornerSubpix(img: Mat, corners, region_size) -> tuple[_retval, _corners]: ...
def findChessboardCorners(image: Mat, patternSize, corners=..., flags: int = ...) -> tuple[_retval, _corners]:
"""
@brief Finds the positions of internal corners of the chessboard.
Expand Down Expand Up @@ -9388,10 +9370,7 @@ def getTrackbarPos(trackbarname, winname) -> _retval:
"""
...

def getValidDisparityROI(roi1, roi2, minDisparity, numberOfDisparities, blockSize) -> _retval:
""" """
...

def getValidDisparityROI(roi1, roi2, minDisparity, numberOfDisparities, blockSize) -> _retval: ...
def getVersionMajor() -> _retval:
"""
@brief Returns major library version
Expand Down Expand Up @@ -11334,14 +11313,8 @@ def rectify3Collinear(
P2=...,
P3=...,
Q=...,
) -> tuple[_retval, _R1, _R2, _R3, _P1, _P2, _P3, _Q, _roi1, _roi2]:
""" """
...

def redirectError(onError) -> None:
""" """
...

) -> tuple[_retval, _R1, _R2, _R3, _P1, _P2, _P3, _Q, _roi1, _roi2]: ...
def redirectError(onError) -> None: ...
def reduce(src: Mat, dim, rtype, dts: Mat = ..., dtype=...) -> _dst:
"""
@brief Reduces a matrix to a vector.
Expand Down Expand Up @@ -11425,7 +11398,7 @@ def repeat(src: Mat, ny, nx, dts: Mat = ...) -> _dst:
"""
...

def reprojectImageTo3D(disparity, Q, _3dImage=..., handleMissingValues=..., ddepth=...) -> __3dImage:
def reprojectImageTo3D(disparity, Q, _3dImage=..., handleMissingValues=..., ddepth=...) -> _3dImage:
"""
@brief Reprojects a disparity image to 3D space.

Expand Down Expand Up @@ -11707,10 +11680,7 @@ def setIdentity(mtx, s=...) -> _mtx:
...

def setLogLevel(*args, **kwargs) -> Any: ... # incomplete
def setMouseCallback(windowName, onMouse, param=...) -> None:
""" """
...

def setMouseCallback(windowName, onMouse, param=...) -> None: ...
def setNumThreads(nthreads) -> None:
"""
@brief OpenCV will try to set the number of threads for the next parallel region.
Expand Down Expand Up @@ -11794,10 +11764,7 @@ def setTrackbarPos(trackbarname, winname, pos) -> None:
"""
...

def setUseOpenVX(flag) -> None:
""" """
...

def setUseOpenVX(flag) -> None: ...
def setUseOptimized(onoff) -> None:
"""
@brief Enables or disables the optimized code.
Expand Down Expand Up @@ -12569,10 +12536,7 @@ def sqrt(src: Mat, dts: Mat = ...) -> _dst:
"""
...

def startWindowThread() -> _retval:
""" """
...

def startWindowThread() -> _retval: ...
def stereoCalibrate(
objectPoints,
imagePoints1,
Expand All @@ -12588,10 +12552,7 @@ def stereoCalibrate(
F=...,
flags: int = ...,
criteria=...,
) -> tuple[_retval, _cameraMatrix1, _distCoeffs1, _cameraMatrix2, _distCoeffs2, _R, _T, _E, _F]:
""" """
...

) -> tuple[_retval, _cameraMatrix1, _distCoeffs1, _cameraMatrix2, _distCoeffs2, _R, _T, _E, _F]: ...
def stereoCalibrateExtended(
objectPoints,
imagePoints1,
Expand Down Expand Up @@ -13171,10 +13132,7 @@ def undistortPointsIter(src: Mat, cameraMatrix, distCoeffs, R, P, criteria, dts:
"""
...

def useOpenVX() -> _retval:
""" """
...

def useOpenVX() -> _retval: ...
def useOptimized() -> _retval:
"""
@brief Returns the status of optimized code usage.
Expand All @@ -13183,10 +13141,7 @@ def useOptimized() -> _retval:
"""
...

def validateDisparity(disparity, cost, minDisparity, numberOfDisparities, disp12MaxDisp=...) -> _disparity:
""" """
...

def validateDisparity(disparity, cost, minDisparity, numberOfDisparities, disp12MaxDisp=...) -> _disparity: ...
def vconcat(src: Mat | list[Mat], dts: Mat = ...) -> Mat:
"""
@param src input array or vector of matrices. all of the matrices must have the same number of cols and the same depth
Expand Down
0