initial commit
This commit is contained in:
247
venv/bin/Activate.ps1
Normal file
247
venv/bin/Activate.ps1
Normal file
@@ -0,0 +1,247 @@
|
||||
<#
|
||||
.Synopsis
|
||||
Activate a Python virtual environment for the current PowerShell session.
|
||||
|
||||
.Description
|
||||
Pushes the python executable for a virtual environment to the front of the
|
||||
$Env:PATH environment variable and sets the prompt to signify that you are
|
||||
in a Python virtual environment. Makes use of the command line switches as
|
||||
well as the `pyvenv.cfg` file values present in the virtual environment.
|
||||
|
||||
.Parameter VenvDir
|
||||
Path to the directory that contains the virtual environment to activate. The
|
||||
default value for this is the parent of the directory that the Activate.ps1
|
||||
script is located within.
|
||||
|
||||
.Parameter Prompt
|
||||
The prompt prefix to display when this virtual environment is activated. By
|
||||
default, this prompt is the name of the virtual environment folder (VenvDir)
|
||||
surrounded by parentheses and followed by a single space (ie. '(.venv) ').
|
||||
|
||||
.Example
|
||||
Activate.ps1
|
||||
Activates the Python virtual environment that contains the Activate.ps1 script.
|
||||
|
||||
.Example
|
||||
Activate.ps1 -Verbose
|
||||
Activates the Python virtual environment that contains the Activate.ps1 script,
|
||||
and shows extra information about the activation as it executes.
|
||||
|
||||
.Example
|
||||
Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
|
||||
Activates the Python virtual environment located in the specified location.
|
||||
|
||||
.Example
|
||||
Activate.ps1 -Prompt "MyPython"
|
||||
Activates the Python virtual environment that contains the Activate.ps1 script,
|
||||
and prefixes the current prompt with the specified string (surrounded in
|
||||
parentheses) while the virtual environment is active.
|
||||
|
||||
.Notes
|
||||
On Windows, it may be required to enable this Activate.ps1 script by setting the
|
||||
execution policy for the user. You can do this by issuing the following PowerShell
|
||||
command:
|
||||
|
||||
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||
|
||||
For more information on Execution Policies:
|
||||
https://go.microsoft.com/fwlink/?LinkID=135170
|
||||
|
||||
#>
|
||||
Param(
|
||||
[Parameter(Mandatory = $false)]
|
||||
[String]
|
||||
$VenvDir,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[String]
|
||||
$Prompt
|
||||
)
|
||||
|
||||
<# Function declarations --------------------------------------------------- #>
|
||||
|
||||
<#
|
||||
.Synopsis
|
||||
Remove all shell session elements added by the Activate script, including the
|
||||
addition of the virtual environment's Python executable from the beginning of
|
||||
the PATH variable.
|
||||
|
||||
.Parameter NonDestructive
|
||||
If present, do not remove this function from the global namespace for the
|
||||
session.
|
||||
|
||||
#>
|
||||
function global:deactivate ([switch]$NonDestructive) {
|
||||
# Revert to original values
|
||||
|
||||
# The prior prompt:
|
||||
if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
|
||||
Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
|
||||
Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
|
||||
}
|
||||
|
||||
# The prior PYTHONHOME:
|
||||
if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
|
||||
Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
|
||||
Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
|
||||
}
|
||||
|
||||
# The prior PATH:
|
||||
if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
|
||||
Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
|
||||
Remove-Item -Path Env:_OLD_VIRTUAL_PATH
|
||||
}
|
||||
|
||||
# Just remove the VIRTUAL_ENV altogether:
|
||||
if (Test-Path -Path Env:VIRTUAL_ENV) {
|
||||
Remove-Item -Path env:VIRTUAL_ENV
|
||||
}
|
||||
|
||||
# Just remove VIRTUAL_ENV_PROMPT altogether.
|
||||
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
|
||||
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
|
||||
}
|
||||
|
||||
# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
|
||||
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
|
||||
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
|
||||
}
|
||||
|
||||
# Leave deactivate function in the global namespace if requested:
|
||||
if (-not $NonDestructive) {
|
||||
Remove-Item -Path function:deactivate
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.Description
|
||||
Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
|
||||
given folder, and returns them in a map.
|
||||
|
||||
For each line in the pyvenv.cfg file, if that line can be parsed into exactly
|
||||
two strings separated by `=` (with any amount of whitespace surrounding the =)
|
||||
then it is considered a `key = value` line. The left hand string is the key,
|
||||
the right hand is the value.
|
||||
|
||||
If the value starts with a `'` or a `"` then the first and last character is
|
||||
stripped from the value before being captured.
|
||||
|
||||
.Parameter ConfigDir
|
||||
Path to the directory that contains the `pyvenv.cfg` file.
|
||||
#>
|
||||
function Get-PyVenvConfig(
|
||||
[String]
|
||||
$ConfigDir
|
||||
) {
|
||||
Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
|
||||
|
||||
# Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
|
||||
$pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
|
||||
|
||||
# An empty map will be returned if no config file is found.
|
||||
$pyvenvConfig = @{ }
|
||||
|
||||
if ($pyvenvConfigPath) {
|
||||
|
||||
Write-Verbose "File exists, parse `key = value` lines"
|
||||
$pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
|
||||
|
||||
$pyvenvConfigContent | ForEach-Object {
|
||||
$keyval = $PSItem -split "\s*=\s*", 2
|
||||
if ($keyval[0] -and $keyval[1]) {
|
||||
$val = $keyval[1]
|
||||
|
||||
# Remove extraneous quotations around a string value.
|
||||
if ("'""".Contains($val.Substring(0, 1))) {
|
||||
$val = $val.Substring(1, $val.Length - 2)
|
||||
}
|
||||
|
||||
$pyvenvConfig[$keyval[0]] = $val
|
||||
Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
|
||||
}
|
||||
}
|
||||
}
|
||||
return $pyvenvConfig
|
||||
}
|
||||
|
||||
|
||||
<# Begin Activate script --------------------------------------------------- #>
|
||||
|
||||
# Determine the containing directory of this script
|
||||
$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
$VenvExecDir = Get-Item -Path $VenvExecPath
|
||||
|
||||
Write-Verbose "Activation script is located in path: '$VenvExecPath'"
|
||||
Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
|
||||
Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
|
||||
|
||||
# Set values required in priority: CmdLine, ConfigFile, Default
|
||||
# First, get the location of the virtual environment, it might not be
|
||||
# VenvExecDir if specified on the command line.
|
||||
if ($VenvDir) {
|
||||
Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
|
||||
}
|
||||
else {
|
||||
Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
|
||||
$VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
|
||||
Write-Verbose "VenvDir=$VenvDir"
|
||||
}
|
||||
|
||||
# Next, read the `pyvenv.cfg` file to determine any required value such
|
||||
# as `prompt`.
|
||||
$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
|
||||
|
||||
# Next, set the prompt from the command line, or the config file, or
|
||||
# just use the name of the virtual environment folder.
|
||||
if ($Prompt) {
|
||||
Write-Verbose "Prompt specified as argument, using '$Prompt'"
|
||||
}
|
||||
else {
|
||||
Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
|
||||
if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
|
||||
Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
|
||||
$Prompt = $pyvenvCfg['prompt'];
|
||||
}
|
||||
else {
|
||||
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
|
||||
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
|
||||
$Prompt = Split-Path -Path $venvDir -Leaf
|
||||
}
|
||||
}
|
||||
|
||||
Write-Verbose "Prompt = '$Prompt'"
|
||||
Write-Verbose "VenvDir='$VenvDir'"
|
||||
|
||||
# Deactivate any currently active virtual environment, but leave the
|
||||
# deactivate function in place.
|
||||
deactivate -nondestructive
|
||||
|
||||
# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
|
||||
# that there is an activated venv.
|
||||
$env:VIRTUAL_ENV = $VenvDir
|
||||
|
||||
if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
||||
|
||||
Write-Verbose "Setting prompt to '$Prompt'"
|
||||
|
||||
# Set the prompt to include the env name
|
||||
# Make sure _OLD_VIRTUAL_PROMPT is global
|
||||
function global:_OLD_VIRTUAL_PROMPT { "" }
|
||||
Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
|
||||
New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
|
||||
|
||||
function global:prompt {
|
||||
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
|
||||
_OLD_VIRTUAL_PROMPT
|
||||
}
|
||||
$env:VIRTUAL_ENV_PROMPT = $Prompt
|
||||
}
|
||||
|
||||
# Clear PYTHONHOME
|
||||
if (Test-Path -Path Env:PYTHONHOME) {
|
||||
Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
|
||||
Remove-Item -Path Env:PYTHONHOME
|
||||
}
|
||||
|
||||
# Add the venv to the PATH
|
||||
Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
|
||||
$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
|
||||
69
venv/bin/activate
Normal file
69
venv/bin/activate
Normal file
@@ -0,0 +1,69 @@
|
||||
# This file must be used with "source bin/activate" *from bash*
|
||||
# you cannot run it directly
|
||||
|
||||
deactivate () {
|
||||
# reset old environment variables
|
||||
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
|
||||
PATH="${_OLD_VIRTUAL_PATH:-}"
|
||||
export PATH
|
||||
unset _OLD_VIRTUAL_PATH
|
||||
fi
|
||||
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
|
||||
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
|
||||
export PYTHONHOME
|
||||
unset _OLD_VIRTUAL_PYTHONHOME
|
||||
fi
|
||||
|
||||
# This should detect bash and zsh, which have a hash command that must
|
||||
# be called to get it to forget past commands. Without forgetting
|
||||
# past commands the $PATH changes we made may not be respected
|
||||
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
||||
hash -r 2> /dev/null
|
||||
fi
|
||||
|
||||
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
|
||||
PS1="${_OLD_VIRTUAL_PS1:-}"
|
||||
export PS1
|
||||
unset _OLD_VIRTUAL_PS1
|
||||
fi
|
||||
|
||||
unset VIRTUAL_ENV
|
||||
unset VIRTUAL_ENV_PROMPT
|
||||
if [ ! "${1:-}" = "nondestructive" ] ; then
|
||||
# Self destruct!
|
||||
unset -f deactivate
|
||||
fi
|
||||
}
|
||||
|
||||
# unset irrelevant variables
|
||||
deactivate nondestructive
|
||||
|
||||
VIRTUAL_ENV="/home/klein/codeWS/Python3/camera-operation/venv"
|
||||
export VIRTUAL_ENV
|
||||
|
||||
_OLD_VIRTUAL_PATH="$PATH"
|
||||
PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
# unset PYTHONHOME if set
|
||||
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
|
||||
# could use `if (set -u; : $PYTHONHOME) ;` in bash
|
||||
if [ -n "${PYTHONHOME:-}" ] ; then
|
||||
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
|
||||
unset PYTHONHOME
|
||||
fi
|
||||
|
||||
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
|
||||
_OLD_VIRTUAL_PS1="${PS1:-}"
|
||||
PS1="(venv) ${PS1:-}"
|
||||
export PS1
|
||||
VIRTUAL_ENV_PROMPT="(venv) "
|
||||
export VIRTUAL_ENV_PROMPT
|
||||
fi
|
||||
|
||||
# This should detect bash and zsh, which have a hash command that must
|
||||
# be called to get it to forget past commands. Without forgetting
|
||||
# past commands the $PATH changes we made may not be respected
|
||||
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
||||
hash -r 2> /dev/null
|
||||
fi
|
||||
26
venv/bin/activate.csh
Normal file
26
venv/bin/activate.csh
Normal file
@@ -0,0 +1,26 @@
|
||||
# This file must be used with "source bin/activate.csh" *from csh*.
|
||||
# You cannot run it directly.
|
||||
# Created by Davide Di Blasi <davidedb@gmail.com>.
|
||||
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
|
||||
|
||||
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
|
||||
|
||||
# Unset irrelevant variables.
|
||||
deactivate nondestructive
|
||||
|
||||
setenv VIRTUAL_ENV "/home/klein/codeWS/Python3/camera-operation/venv"
|
||||
|
||||
set _OLD_VIRTUAL_PATH="$PATH"
|
||||
setenv PATH "$VIRTUAL_ENV/bin:$PATH"
|
||||
|
||||
|
||||
set _OLD_VIRTUAL_PROMPT="$prompt"
|
||||
|
||||
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
|
||||
set prompt = "(venv) $prompt"
|
||||
setenv VIRTUAL_ENV_PROMPT "(venv) "
|
||||
endif
|
||||
|
||||
alias pydoc python -m pydoc
|
||||
|
||||
rehash
|
||||
69
venv/bin/activate.fish
Normal file
69
venv/bin/activate.fish
Normal file
@@ -0,0 +1,69 @@
|
||||
# This file must be used with "source <venv>/bin/activate.fish" *from fish*
|
||||
# (https://fishshell.com/); you cannot run it directly.
|
||||
|
||||
function deactivate -d "Exit virtual environment and return to normal shell environment"
|
||||
# reset old environment variables
|
||||
if test -n "$_OLD_VIRTUAL_PATH"
|
||||
set -gx PATH $_OLD_VIRTUAL_PATH
|
||||
set -e _OLD_VIRTUAL_PATH
|
||||
end
|
||||
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
|
||||
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
|
||||
set -e _OLD_VIRTUAL_PYTHONHOME
|
||||
end
|
||||
|
||||
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
|
||||
set -e _OLD_FISH_PROMPT_OVERRIDE
|
||||
# prevents error when using nested fish instances (Issue #93858)
|
||||
if functions -q _old_fish_prompt
|
||||
functions -e fish_prompt
|
||||
functions -c _old_fish_prompt fish_prompt
|
||||
functions -e _old_fish_prompt
|
||||
end
|
||||
end
|
||||
|
||||
set -e VIRTUAL_ENV
|
||||
set -e VIRTUAL_ENV_PROMPT
|
||||
if test "$argv[1]" != "nondestructive"
|
||||
# Self-destruct!
|
||||
functions -e deactivate
|
||||
end
|
||||
end
|
||||
|
||||
# Unset irrelevant variables.
|
||||
deactivate nondestructive
|
||||
|
||||
set -gx VIRTUAL_ENV "/home/klein/codeWS/Python3/camera-operation/venv"
|
||||
|
||||
set -gx _OLD_VIRTUAL_PATH $PATH
|
||||
set -gx PATH "$VIRTUAL_ENV/bin" $PATH
|
||||
|
||||
# Unset PYTHONHOME if set.
|
||||
if set -q PYTHONHOME
|
||||
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
|
||||
set -e PYTHONHOME
|
||||
end
|
||||
|
||||
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
|
||||
# fish uses a function instead of an env var to generate the prompt.
|
||||
|
||||
# Save the current fish_prompt function as the function _old_fish_prompt.
|
||||
functions -c fish_prompt _old_fish_prompt
|
||||
|
||||
# With the original prompt function renamed, we can override with our own.
|
||||
function fish_prompt
|
||||
# Save the return status of the last command.
|
||||
set -l old_status $status
|
||||
|
||||
# Output the venv prompt; color taken from the blue of the Python logo.
|
||||
printf "%s%s%s" (set_color 4B8BBE) "(venv) " (set_color normal)
|
||||
|
||||
# Restore the return status of the previous command.
|
||||
echo "exit $old_status" | .
|
||||
# Output the original/"old" prompt.
|
||||
_old_fish_prompt
|
||||
end
|
||||
|
||||
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
|
||||
set -gx VIRTUAL_ENV_PROMPT "(venv) "
|
||||
end
|
||||
8
venv/bin/f2py
Executable file
8
venv/bin/f2py
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/home/klein/codeWS/Python3/camera-operation/venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from numpy.f2py.f2py2e import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
venv/bin/numpy-config
Executable file
8
venv/bin/numpy-config
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/home/klein/codeWS/Python3/camera-operation/venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from numpy._configtool import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
venv/bin/pip
Executable file
8
venv/bin/pip
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/home/klein/codeWS/Python3/camera-operation/venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pip._internal.cli.main import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
venv/bin/pip3
Executable file
8
venv/bin/pip3
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/home/klein/codeWS/Python3/camera-operation/venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pip._internal.cli.main import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
8
venv/bin/pip3.11
Executable file
8
venv/bin/pip3.11
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/home/klein/codeWS/Python3/camera-operation/venv/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import sys
|
||||
from pip._internal.cli.main import main
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
|
||||
sys.exit(main())
|
||||
1
venv/bin/python
Symbolic link
1
venv/bin/python
Symbolic link
@@ -0,0 +1 @@
|
||||
python3
|
||||
1
venv/bin/python3
Symbolic link
1
venv/bin/python3
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/bin/python3
|
||||
1
venv/bin/python3.11
Symbolic link
1
venv/bin/python3.11
Symbolic link
@@ -0,0 +1 @@
|
||||
python3
|
||||
222
venv/lib/python3.11/site-packages/_distutils_hack/__init__.py
Normal file
222
venv/lib/python3.11/site-packages/_distutils_hack/__init__.py
Normal file
@@ -0,0 +1,222 @@
|
||||
# don't import any costly modules
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
is_pypy = '__pypy__' in sys.builtin_module_names
|
||||
|
||||
|
||||
def warn_distutils_present():
|
||||
if 'distutils' not in sys.modules:
|
||||
return
|
||||
if is_pypy and sys.version_info < (3, 7):
|
||||
# PyPy for 3.6 unconditionally imports distutils, so bypass the warning
|
||||
# https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250
|
||||
return
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"Distutils was imported before Setuptools, but importing Setuptools "
|
||||
"also replaces the `distutils` module in `sys.modules`. This may lead "
|
||||
"to undesirable behaviors or errors. To avoid these issues, avoid "
|
||||
"using distutils directly, ensure that setuptools is installed in the "
|
||||
"traditional way (e.g. not an editable install), and/or make sure "
|
||||
"that setuptools is always imported before distutils."
|
||||
)
|
||||
|
||||
|
||||
def clear_distutils():
|
||||
if 'distutils' not in sys.modules:
|
||||
return
|
||||
import warnings
|
||||
|
||||
warnings.warn("Setuptools is replacing distutils.")
|
||||
mods = [
|
||||
name
|
||||
for name in sys.modules
|
||||
if name == "distutils" or name.startswith("distutils.")
|
||||
]
|
||||
for name in mods:
|
||||
del sys.modules[name]
|
||||
|
||||
|
||||
def enabled():
|
||||
"""
|
||||
Allow selection of distutils by environment variable.
|
||||
"""
|
||||
which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local')
|
||||
return which == 'local'
|
||||
|
||||
|
||||
def ensure_local_distutils():
|
||||
import importlib
|
||||
|
||||
clear_distutils()
|
||||
|
||||
# With the DistutilsMetaFinder in place,
|
||||
# perform an import to cause distutils to be
|
||||
# loaded from setuptools._distutils. Ref #2906.
|
||||
with shim():
|
||||
importlib.import_module('distutils')
|
||||
|
||||
# check that submodules load as expected
|
||||
core = importlib.import_module('distutils.core')
|
||||
assert '_distutils' in core.__file__, core.__file__
|
||||
assert 'setuptools._distutils.log' not in sys.modules
|
||||
|
||||
|
||||
def do_override():
|
||||
"""
|
||||
Ensure that the local copy of distutils is preferred over stdlib.
|
||||
|
||||
See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401
|
||||
for more motivation.
|
||||
"""
|
||||
if enabled():
|
||||
warn_distutils_present()
|
||||
ensure_local_distutils()
|
||||
|
||||
|
||||
class _TrivialRe:
|
||||
def __init__(self, *patterns):
|
||||
self._patterns = patterns
|
||||
|
||||
def match(self, string):
|
||||
return all(pat in string for pat in self._patterns)
|
||||
|
||||
|
||||
class DistutilsMetaFinder:
|
||||
def find_spec(self, fullname, path, target=None):
|
||||
# optimization: only consider top level modules and those
|
||||
# found in the CPython test suite.
|
||||
if path is not None and not fullname.startswith('test.'):
|
||||
return
|
||||
|
||||
method_name = 'spec_for_{fullname}'.format(**locals())
|
||||
method = getattr(self, method_name, lambda: None)
|
||||
return method()
|
||||
|
||||
def spec_for_distutils(self):
|
||||
if self.is_cpython():
|
||||
return
|
||||
|
||||
import importlib
|
||||
import importlib.abc
|
||||
import importlib.util
|
||||
|
||||
try:
|
||||
mod = importlib.import_module('setuptools._distutils')
|
||||
except Exception:
|
||||
# There are a couple of cases where setuptools._distutils
|
||||
# may not be present:
|
||||
# - An older Setuptools without a local distutils is
|
||||
# taking precedence. Ref #2957.
|
||||
# - Path manipulation during sitecustomize removes
|
||||
# setuptools from the path but only after the hook
|
||||
# has been loaded. Ref #2980.
|
||||
# In either case, fall back to stdlib behavior.
|
||||
return
|
||||
|
||||
class DistutilsLoader(importlib.abc.Loader):
|
||||
def create_module(self, spec):
|
||||
mod.__name__ = 'distutils'
|
||||
return mod
|
||||
|
||||
def exec_module(self, module):
|
||||
pass
|
||||
|
||||
return importlib.util.spec_from_loader(
|
||||
'distutils', DistutilsLoader(), origin=mod.__file__
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def is_cpython():
|
||||
"""
|
||||
Suppress supplying distutils for CPython (build and tests).
|
||||
Ref #2965 and #3007.
|
||||
"""
|
||||
return os.path.isfile('pybuilddir.txt')
|
||||
|
||||
def spec_for_pip(self):
|
||||
"""
|
||||
Ensure stdlib distutils when running under pip.
|
||||
See pypa/pip#8761 for rationale.
|
||||
"""
|
||||
if self.pip_imported_during_build():
|
||||
return
|
||||
clear_distutils()
|
||||
self.spec_for_distutils = lambda: None
|
||||
|
||||
@classmethod
|
||||
def pip_imported_during_build(cls):
|
||||
"""
|
||||
Detect if pip is being imported in a build script. Ref #2355.
|
||||
"""
|
||||
import traceback
|
||||
|
||||
return any(
|
||||
cls.frame_file_is_setup(frame) for frame, line in traceback.walk_stack(None)
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def frame_file_is_setup(frame):
|
||||
"""
|
||||
Return True if the indicated frame suggests a setup.py file.
|
||||
"""
|
||||
# some frames may not have __file__ (#2940)
|
||||
return frame.f_globals.get('__file__', '').endswith('setup.py')
|
||||
|
||||
def spec_for_sensitive_tests(self):
|
||||
"""
|
||||
Ensure stdlib distutils when running select tests under CPython.
|
||||
|
||||
python/cpython#91169
|
||||
"""
|
||||
clear_distutils()
|
||||
self.spec_for_distutils = lambda: None
|
||||
|
||||
sensitive_tests = (
|
||||
[
|
||||
'test.test_distutils',
|
||||
'test.test_peg_generator',
|
||||
'test.test_importlib',
|
||||
]
|
||||
if sys.version_info < (3, 10)
|
||||
else [
|
||||
'test.test_distutils',
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
for name in DistutilsMetaFinder.sensitive_tests:
|
||||
setattr(
|
||||
DistutilsMetaFinder,
|
||||
f'spec_for_{name}',
|
||||
DistutilsMetaFinder.spec_for_sensitive_tests,
|
||||
)
|
||||
|
||||
|
||||
DISTUTILS_FINDER = DistutilsMetaFinder()
|
||||
|
||||
|
||||
def add_shim():
|
||||
DISTUTILS_FINDER in sys.meta_path or insert_shim()
|
||||
|
||||
|
||||
class shim:
|
||||
def __enter__(self):
|
||||
insert_shim()
|
||||
|
||||
def __exit__(self, exc, value, tb):
|
||||
remove_shim()
|
||||
|
||||
|
||||
def insert_shim():
|
||||
sys.meta_path.insert(0, DISTUTILS_FINDER)
|
||||
|
||||
|
||||
def remove_shim():
|
||||
try:
|
||||
sys.meta_path.remove(DISTUTILS_FINDER)
|
||||
except ValueError:
|
||||
pass
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
__import__('_distutils_hack').do_override()
|
||||
118
venv/lib/python3.11/site-packages/cv2/Error/__init__.pyi
Normal file
118
venv/lib/python3.11/site-packages/cv2/Error/__init__.pyi
Normal file
@@ -0,0 +1,118 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
# Enumerations
|
||||
StsOk: int
|
||||
STS_OK: int
|
||||
StsBackTrace: int
|
||||
STS_BACK_TRACE: int
|
||||
StsError: int
|
||||
STS_ERROR: int
|
||||
StsInternal: int
|
||||
STS_INTERNAL: int
|
||||
StsNoMem: int
|
||||
STS_NO_MEM: int
|
||||
StsBadArg: int
|
||||
STS_BAD_ARG: int
|
||||
StsBadFunc: int
|
||||
STS_BAD_FUNC: int
|
||||
StsNoConv: int
|
||||
STS_NO_CONV: int
|
||||
StsAutoTrace: int
|
||||
STS_AUTO_TRACE: int
|
||||
HeaderIsNull: int
|
||||
HEADER_IS_NULL: int
|
||||
BadImageSize: int
|
||||
BAD_IMAGE_SIZE: int
|
||||
BadOffset: int
|
||||
BAD_OFFSET: int
|
||||
BadDataPtr: int
|
||||
BAD_DATA_PTR: int
|
||||
BadStep: int
|
||||
BAD_STEP: int
|
||||
BadModelOrChSeq: int
|
||||
BAD_MODEL_OR_CH_SEQ: int
|
||||
BadNumChannels: int
|
||||
BAD_NUM_CHANNELS: int
|
||||
BadNumChannel1U: int
|
||||
BAD_NUM_CHANNEL1U: int
|
||||
BadDepth: int
|
||||
BAD_DEPTH: int
|
||||
BadAlphaChannel: int
|
||||
BAD_ALPHA_CHANNEL: int
|
||||
BadOrder: int
|
||||
BAD_ORDER: int
|
||||
BadOrigin: int
|
||||
BAD_ORIGIN: int
|
||||
BadAlign: int
|
||||
BAD_ALIGN: int
|
||||
BadCallBack: int
|
||||
BAD_CALL_BACK: int
|
||||
BadTileSize: int
|
||||
BAD_TILE_SIZE: int
|
||||
BadCOI: int
|
||||
BAD_COI: int
|
||||
BadROISize: int
|
||||
BAD_ROISIZE: int
|
||||
MaskIsTiled: int
|
||||
MASK_IS_TILED: int
|
||||
StsNullPtr: int
|
||||
STS_NULL_PTR: int
|
||||
StsVecLengthErr: int
|
||||
STS_VEC_LENGTH_ERR: int
|
||||
StsFilterStructContentErr: int
|
||||
STS_FILTER_STRUCT_CONTENT_ERR: int
|
||||
StsKernelStructContentErr: int
|
||||
STS_KERNEL_STRUCT_CONTENT_ERR: int
|
||||
StsFilterOffsetErr: int
|
||||
STS_FILTER_OFFSET_ERR: int
|
||||
StsBadSize: int
|
||||
STS_BAD_SIZE: int
|
||||
StsDivByZero: int
|
||||
STS_DIV_BY_ZERO: int
|
||||
StsInplaceNotSupported: int
|
||||
STS_INPLACE_NOT_SUPPORTED: int
|
||||
StsObjectNotFound: int
|
||||
STS_OBJECT_NOT_FOUND: int
|
||||
StsUnmatchedFormats: int
|
||||
STS_UNMATCHED_FORMATS: int
|
||||
StsBadFlag: int
|
||||
STS_BAD_FLAG: int
|
||||
StsBadPoint: int
|
||||
STS_BAD_POINT: int
|
||||
StsBadMask: int
|
||||
STS_BAD_MASK: int
|
||||
StsUnmatchedSizes: int
|
||||
STS_UNMATCHED_SIZES: int
|
||||
StsUnsupportedFormat: int
|
||||
STS_UNSUPPORTED_FORMAT: int
|
||||
StsOutOfRange: int
|
||||
STS_OUT_OF_RANGE: int
|
||||
StsParseError: int
|
||||
STS_PARSE_ERROR: int
|
||||
StsNotImplemented: int
|
||||
STS_NOT_IMPLEMENTED: int
|
||||
StsBadMemBlock: int
|
||||
STS_BAD_MEM_BLOCK: int
|
||||
StsAssert: int
|
||||
STS_ASSERT: int
|
||||
GpuNotSupported: int
|
||||
GPU_NOT_SUPPORTED: int
|
||||
GpuApiCallError: int
|
||||
GPU_API_CALL_ERROR: int
|
||||
OpenGlNotSupported: int
|
||||
OPEN_GL_NOT_SUPPORTED: int
|
||||
OpenGlApiCallError: int
|
||||
OPEN_GL_API_CALL_ERROR: int
|
||||
OpenCLApiCallError: int
|
||||
OPEN_CLAPI_CALL_ERROR: int
|
||||
OpenCLDoubleNotSupported: int
|
||||
OPEN_CLDOUBLE_NOT_SUPPORTED: int
|
||||
OpenCLInitError: int
|
||||
OPEN_CLINIT_ERROR: int
|
||||
OpenCLNoAMDBlasFft: int
|
||||
OPEN_CLNO_AMDBLAS_FFT: int
|
||||
Code = int
|
||||
"""One of [StsOk, STS_OK, StsBackTrace, STS_BACK_TRACE, StsError, STS_ERROR, StsInternal, STS_INTERNAL, StsNoMem, STS_NO_MEM, StsBadArg, STS_BAD_ARG, StsBadFunc, STS_BAD_FUNC, StsNoConv, STS_NO_CONV, StsAutoTrace, STS_AUTO_TRACE, HeaderIsNull, HEADER_IS_NULL, BadImageSize, BAD_IMAGE_SIZE, BadOffset, BAD_OFFSET, BadDataPtr, BAD_DATA_PTR, BadStep, BAD_STEP, BadModelOrChSeq, BAD_MODEL_OR_CH_SEQ, BadNumChannels, BAD_NUM_CHANNELS, BadNumChannel1U, BAD_NUM_CHANNEL1U, BadDepth, BAD_DEPTH, BadAlphaChannel, BAD_ALPHA_CHANNEL, BadOrder, BAD_ORDER, BadOrigin, BAD_ORIGIN, BadAlign, BAD_ALIGN, BadCallBack, BAD_CALL_BACK, BadTileSize, BAD_TILE_SIZE, BadCOI, BAD_COI, BadROISize, BAD_ROISIZE, MaskIsTiled, MASK_IS_TILED, StsNullPtr, STS_NULL_PTR, StsVecLengthErr, STS_VEC_LENGTH_ERR, StsFilterStructContentErr, STS_FILTER_STRUCT_CONTENT_ERR, StsKernelStructContentErr, STS_KERNEL_STRUCT_CONTENT_ERR, StsFilterOffsetErr, STS_FILTER_OFFSET_ERR, StsBadSize, STS_BAD_SIZE, StsDivByZero, STS_DIV_BY_ZERO, StsInplaceNotSupported, STS_INPLACE_NOT_SUPPORTED, StsObjectNotFound, STS_OBJECT_NOT_FOUND, StsUnmatchedFormats, STS_UNMATCHED_FORMATS, StsBadFlag, STS_BAD_FLAG, StsBadPoint, STS_BAD_POINT, StsBadMask, STS_BAD_MASK, StsUnmatchedSizes, STS_UNMATCHED_SIZES, StsUnsupportedFormat, STS_UNSUPPORTED_FORMAT, StsOutOfRange, STS_OUT_OF_RANGE, StsParseError, STS_PARSE_ERROR, StsNotImplemented, STS_NOT_IMPLEMENTED, StsBadMemBlock, STS_BAD_MEM_BLOCK, StsAssert, STS_ASSERT, GpuNotSupported, GPU_NOT_SUPPORTED, GpuApiCallError, GPU_API_CALL_ERROR, OpenGlNotSupported, OPEN_GL_NOT_SUPPORTED, OpenGlApiCallError, OPEN_GL_API_CALL_ERROR, OpenCLApiCallError, OPEN_CLAPI_CALL_ERROR, OpenCLDoubleNotSupported, OPEN_CLDOUBLE_NOT_SUPPORTED, OpenCLInitError, OPEN_CLINIT_ERROR, OpenCLNoAMDBlasFft, OPEN_CLNO_AMDBLAS_FFT]"""
|
||||
|
||||
|
||||
|
||||
3090
venv/lib/python3.11/site-packages/cv2/LICENSE-3RD-PARTY.txt
Normal file
3090
venv/lib/python3.11/site-packages/cv2/LICENSE-3RD-PARTY.txt
Normal file
File diff suppressed because it is too large
Load Diff
21
venv/lib/python3.11/site-packages/cv2/LICENSE.txt
Normal file
21
venv/lib/python3.11/site-packages/cv2/LICENSE.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Olli-Pekka Heinisuo
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
181
venv/lib/python3.11/site-packages/cv2/__init__.py
Normal file
181
venv/lib/python3.11/site-packages/cv2/__init__.py
Normal file
@@ -0,0 +1,181 @@
|
||||
'''
|
||||
OpenCV Python binary extension loader
|
||||
'''
|
||||
import os
|
||||
import importlib
|
||||
import sys
|
||||
|
||||
__all__ = []
|
||||
|
||||
try:
|
||||
import numpy
|
||||
import numpy.core.multiarray
|
||||
except ImportError:
|
||||
print('OpenCV bindings requires "numpy" package.')
|
||||
print('Install it via command:')
|
||||
print(' pip install numpy')
|
||||
raise
|
||||
|
||||
# TODO
|
||||
# is_x64 = sys.maxsize > 2**32
|
||||
|
||||
|
||||
def __load_extra_py_code_for_module(base, name, enable_debug_print=False):
|
||||
module_name = "{}.{}".format(__name__, name)
|
||||
export_module_name = "{}.{}".format(base, name)
|
||||
native_module = sys.modules.pop(module_name, None)
|
||||
try:
|
||||
py_module = importlib.import_module(module_name)
|
||||
except ImportError as err:
|
||||
if enable_debug_print:
|
||||
print("Can't load Python code for module:", module_name,
|
||||
". Reason:", err)
|
||||
# Extension doesn't contain extra py code
|
||||
return False
|
||||
|
||||
if base in sys.modules and not hasattr(sys.modules[base], name):
|
||||
setattr(sys.modules[base], name, py_module)
|
||||
sys.modules[export_module_name] = py_module
|
||||
# If it is C extension module it is already loaded by cv2 package
|
||||
if native_module:
|
||||
setattr(py_module, "_native", native_module)
|
||||
for k, v in filter(lambda kv: not hasattr(py_module, kv[0]),
|
||||
native_module.__dict__.items()):
|
||||
if enable_debug_print: print(' symbol({}): {} = {}'.format(name, k, v))
|
||||
setattr(py_module, k, v)
|
||||
return True
|
||||
|
||||
|
||||
def __collect_extra_submodules(enable_debug_print=False):
|
||||
def modules_filter(module):
|
||||
return all((
|
||||
# module is not internal
|
||||
not module.startswith("_"),
|
||||
not module.startswith("python-"),
|
||||
# it is not a file
|
||||
os.path.isdir(os.path.join(_extra_submodules_init_path, module))
|
||||
))
|
||||
if sys.version_info[0] < 3:
|
||||
if enable_debug_print:
|
||||
print("Extra submodules is loaded only for Python 3")
|
||||
return []
|
||||
|
||||
__INIT_FILE_PATH = os.path.abspath(__file__)
|
||||
_extra_submodules_init_path = os.path.dirname(__INIT_FILE_PATH)
|
||||
return filter(modules_filter, os.listdir(_extra_submodules_init_path))
|
||||
|
||||
|
||||
def bootstrap():
|
||||
import sys
|
||||
|
||||
import copy
|
||||
save_sys_path = copy.copy(sys.path)
|
||||
|
||||
if hasattr(sys, 'OpenCV_LOADER'):
|
||||
print(sys.path)
|
||||
raise ImportError('ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.')
|
||||
sys.OpenCV_LOADER = True
|
||||
|
||||
DEBUG = False
|
||||
if hasattr(sys, 'OpenCV_LOADER_DEBUG'):
|
||||
DEBUG = True
|
||||
|
||||
import platform
|
||||
if DEBUG: print('OpenCV loader: os.name="{}" platform.system()="{}"'.format(os.name, str(platform.system())))
|
||||
|
||||
LOADER_DIR = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
|
||||
|
||||
PYTHON_EXTENSIONS_PATHS = []
|
||||
BINARIES_PATHS = []
|
||||
|
||||
g_vars = globals()
|
||||
l_vars = locals().copy()
|
||||
|
||||
if sys.version_info[:2] < (3, 0):
|
||||
from . load_config_py2 import exec_file_wrapper
|
||||
else:
|
||||
from . load_config_py3 import exec_file_wrapper
|
||||
|
||||
def load_first_config(fnames, required=True):
|
||||
for fname in fnames:
|
||||
fpath = os.path.join(LOADER_DIR, fname)
|
||||
if not os.path.exists(fpath):
|
||||
if DEBUG: print('OpenCV loader: config not found, skip: {}'.format(fpath))
|
||||
continue
|
||||
if DEBUG: print('OpenCV loader: loading config: {}'.format(fpath))
|
||||
exec_file_wrapper(fpath, g_vars, l_vars)
|
||||
return True
|
||||
if required:
|
||||
raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))
|
||||
|
||||
load_first_config(['config.py'], True)
|
||||
load_first_config([
|
||||
'config-{}.{}.py'.format(sys.version_info[0], sys.version_info[1]),
|
||||
'config-{}.py'.format(sys.version_info[0])
|
||||
], True)
|
||||
|
||||
if DEBUG: print('OpenCV loader: PYTHON_EXTENSIONS_PATHS={}'.format(str(l_vars['PYTHON_EXTENSIONS_PATHS'])))
|
||||
if DEBUG: print('OpenCV loader: BINARIES_PATHS={}'.format(str(l_vars['BINARIES_PATHS'])))
|
||||
|
||||
applySysPathWorkaround = False
|
||||
if hasattr(sys, 'OpenCV_REPLACE_SYS_PATH_0'):
|
||||
applySysPathWorkaround = True
|
||||
else:
|
||||
try:
|
||||
BASE_DIR = os.path.dirname(LOADER_DIR)
|
||||
if sys.path[0] == BASE_DIR or os.path.realpath(sys.path[0]) == BASE_DIR:
|
||||
applySysPathWorkaround = True
|
||||
except:
|
||||
if DEBUG: print('OpenCV loader: exception during checking workaround for sys.path[0]')
|
||||
pass # applySysPathWorkaround is False
|
||||
|
||||
for p in reversed(l_vars['PYTHON_EXTENSIONS_PATHS']):
|
||||
sys.path.insert(1 if not applySysPathWorkaround else 0, p)
|
||||
|
||||
if os.name == 'nt':
|
||||
if sys.version_info[:2] >= (3, 8): # https://github.com/python/cpython/pull/12302
|
||||
for p in l_vars['BINARIES_PATHS']:
|
||||
try:
|
||||
os.add_dll_directory(p)
|
||||
except Exception as e:
|
||||
if DEBUG: print('Failed os.add_dll_directory(): '+ str(e))
|
||||
pass
|
||||
os.environ['PATH'] = ';'.join(l_vars['BINARIES_PATHS']) + ';' + os.environ.get('PATH', '')
|
||||
if DEBUG: print('OpenCV loader: PATH={}'.format(str(os.environ['PATH'])))
|
||||
else:
|
||||
# amending of LD_LIBRARY_PATH works for sub-processes only
|
||||
os.environ['LD_LIBRARY_PATH'] = ':'.join(l_vars['BINARIES_PATHS']) + ':' + os.environ.get('LD_LIBRARY_PATH', '')
|
||||
|
||||
if DEBUG: print("Relink everything from native cv2 module to cv2 package")
|
||||
|
||||
py_module = sys.modules.pop("cv2")
|
||||
|
||||
native_module = importlib.import_module("cv2")
|
||||
|
||||
sys.modules["cv2"] = py_module
|
||||
setattr(py_module, "_native", native_module)
|
||||
|
||||
for item_name, item in filter(lambda kv: kv[0] not in ("__file__", "__loader__", "__spec__",
|
||||
"__name__", "__package__"),
|
||||
native_module.__dict__.items()):
|
||||
if item_name not in g_vars:
|
||||
g_vars[item_name] = item
|
||||
|
||||
sys.path = save_sys_path # multiprocessing should start from bootstrap code (https://github.com/opencv/opencv/issues/18502)
|
||||
|
||||
try:
|
||||
del sys.OpenCV_LOADER
|
||||
except Exception as e:
|
||||
if DEBUG:
|
||||
print("Exception during delete OpenCV_LOADER:", e)
|
||||
|
||||
if DEBUG: print('OpenCV loader: binary extension... OK')
|
||||
|
||||
for submodule in __collect_extra_submodules(DEBUG):
|
||||
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
|
||||
if DEBUG: print("Extra Python code for", submodule, "is loaded")
|
||||
|
||||
if DEBUG: print('OpenCV loader: DONE')
|
||||
|
||||
|
||||
bootstrap()
|
||||
6305
venv/lib/python3.11/site-packages/cv2/__init__.pyi
Normal file
6305
venv/lib/python3.11/site-packages/cv2/__init__.pyi
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
303
venv/lib/python3.11/site-packages/cv2/aruco/__init__.pyi
Normal file
303
venv/lib/python3.11/site-packages/cv2/aruco/__init__.pyi
Normal file
@@ -0,0 +1,303 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Enumerations
|
||||
CORNER_REFINE_NONE: int
|
||||
CORNER_REFINE_SUBPIX: int
|
||||
CORNER_REFINE_CONTOUR: int
|
||||
CORNER_REFINE_APRILTAG: int
|
||||
CornerRefineMethod = int
|
||||
"""One of [CORNER_REFINE_NONE, CORNER_REFINE_SUBPIX, CORNER_REFINE_CONTOUR, CORNER_REFINE_APRILTAG]"""
|
||||
|
||||
DICT_4X4_50: int
|
||||
DICT_4X4_100: int
|
||||
DICT_4X4_250: int
|
||||
DICT_4X4_1000: int
|
||||
DICT_5X5_50: int
|
||||
DICT_5X5_100: int
|
||||
DICT_5X5_250: int
|
||||
DICT_5X5_1000: int
|
||||
DICT_6X6_50: int
|
||||
DICT_6X6_100: int
|
||||
DICT_6X6_250: int
|
||||
DICT_6X6_1000: int
|
||||
DICT_7X7_50: int
|
||||
DICT_7X7_100: int
|
||||
DICT_7X7_250: int
|
||||
DICT_7X7_1000: int
|
||||
DICT_ARUCO_ORIGINAL: int
|
||||
DICT_APRILTAG_16h5: int
|
||||
DICT_APRILTAG_16H5: int
|
||||
DICT_APRILTAG_25h9: int
|
||||
DICT_APRILTAG_25H9: int
|
||||
DICT_APRILTAG_36h10: int
|
||||
DICT_APRILTAG_36H10: int
|
||||
DICT_APRILTAG_36h11: int
|
||||
DICT_APRILTAG_36H11: int
|
||||
DICT_ARUCO_MIP_36h12: int
|
||||
DICT_ARUCO_MIP_36H12: int
|
||||
PredefinedDictionaryType = int
|
||||
"""One of [DICT_4X4_50, DICT_4X4_100, DICT_4X4_250, DICT_4X4_1000, DICT_5X5_50, DICT_5X5_100, DICT_5X5_250, DICT_5X5_1000, DICT_6X6_50, DICT_6X6_100, DICT_6X6_250, DICT_6X6_1000, DICT_7X7_50, DICT_7X7_100, DICT_7X7_250, DICT_7X7_1000, DICT_ARUCO_ORIGINAL, DICT_APRILTAG_16h5, DICT_APRILTAG_16H5, DICT_APRILTAG_25h9, DICT_APRILTAG_25H9, DICT_APRILTAG_36h10, DICT_APRILTAG_36H10, DICT_APRILTAG_36h11, DICT_APRILTAG_36H11, DICT_ARUCO_MIP_36h12, DICT_ARUCO_MIP_36H12]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class Board:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, objPoints: _typing.Sequence[cv2.typing.MatLike], dictionary: Dictionary, ids: cv2.typing.MatLike) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, objPoints: _typing.Sequence[cv2.UMat], dictionary: Dictionary, ids: cv2.UMat) -> None: ...
|
||||
|
||||
def getDictionary(self) -> Dictionary: ...
|
||||
|
||||
def getObjPoints(self) -> _typing.Sequence[_typing.Sequence[cv2.typing.Point3f]]: ...
|
||||
|
||||
def getIds(self) -> _typing.Sequence[int]: ...
|
||||
|
||||
def getRightBottomCorner(self) -> cv2.typing.Point3f: ...
|
||||
|
||||
@_typing.overload
|
||||
def matchImagePoints(self, detectedCorners: _typing.Sequence[cv2.typing.MatLike], detectedIds: cv2.typing.MatLike, objPoints: cv2.typing.MatLike | None = ..., imgPoints: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def matchImagePoints(self, detectedCorners: _typing.Sequence[cv2.UMat], detectedIds: cv2.UMat, objPoints: cv2.UMat | None = ..., imgPoints: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def generateImage(self, outSize: cv2.typing.Size, img: cv2.typing.MatLike | None = ..., marginSize: int = ..., borderBits: int = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def generateImage(self, outSize: cv2.typing.Size, img: cv2.UMat | None = ..., marginSize: int = ..., borderBits: int = ...) -> cv2.UMat: ...
|
||||
|
||||
|
||||
class GridBoard(Board):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, size: cv2.typing.Size, markerLength: float, markerSeparation: float, dictionary: Dictionary, ids: cv2.typing.MatLike | None = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, size: cv2.typing.Size, markerLength: float, markerSeparation: float, dictionary: Dictionary, ids: cv2.UMat | None = ...) -> None: ...
|
||||
|
||||
def getGridSize(self) -> cv2.typing.Size: ...
|
||||
|
||||
def getMarkerLength(self) -> float: ...
|
||||
|
||||
def getMarkerSeparation(self) -> float: ...
|
||||
|
||||
|
||||
class CharucoBoard(Board):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, size: cv2.typing.Size, squareLength: float, markerLength: float, dictionary: Dictionary, ids: cv2.typing.MatLike | None = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, size: cv2.typing.Size, squareLength: float, markerLength: float, dictionary: Dictionary, ids: cv2.UMat | None = ...) -> None: ...
|
||||
|
||||
def setLegacyPattern(self, legacyPattern: bool) -> None: ...
|
||||
|
||||
def getLegacyPattern(self) -> bool: ...
|
||||
|
||||
def getChessboardSize(self) -> cv2.typing.Size: ...
|
||||
|
||||
def getSquareLength(self) -> float: ...
|
||||
|
||||
def getMarkerLength(self) -> float: ...
|
||||
|
||||
def getChessboardCorners(self) -> _typing.Sequence[cv2.typing.Point3f]: ...
|
||||
|
||||
@_typing.overload
|
||||
def checkCharucoCornersCollinear(self, charucoIds: cv2.typing.MatLike) -> bool: ...
|
||||
@_typing.overload
|
||||
def checkCharucoCornersCollinear(self, charucoIds: cv2.UMat) -> bool: ...
|
||||
|
||||
|
||||
class DetectorParameters:
|
||||
adaptiveThreshWinSizeMin: int
|
||||
adaptiveThreshWinSizeMax: int
|
||||
adaptiveThreshWinSizeStep: int
|
||||
adaptiveThreshConstant: float
|
||||
minMarkerPerimeterRate: float
|
||||
maxMarkerPerimeterRate: float
|
||||
polygonalApproxAccuracyRate: float
|
||||
minCornerDistanceRate: float
|
||||
minDistanceToBorder: int
|
||||
minMarkerDistanceRate: float
|
||||
minGroupDistance: float
|
||||
cornerRefinementMethod: int
|
||||
cornerRefinementWinSize: int
|
||||
relativeCornerRefinmentWinSize: float
|
||||
cornerRefinementMaxIterations: int
|
||||
cornerRefinementMinAccuracy: float
|
||||
markerBorderBits: int
|
||||
perspectiveRemovePixelPerCell: int
|
||||
perspectiveRemoveIgnoredMarginPerCell: float
|
||||
maxErroneousBitsInBorderRate: float
|
||||
minOtsuStdDev: float
|
||||
errorCorrectionRate: float
|
||||
aprilTagQuadDecimate: float
|
||||
aprilTagQuadSigma: float
|
||||
aprilTagMinClusterPixels: int
|
||||
aprilTagMaxNmaxima: int
|
||||
aprilTagCriticalRad: float
|
||||
aprilTagMaxLineFitMse: float
|
||||
aprilTagMinWhiteBlackDiff: int
|
||||
aprilTagDeglitch: int
|
||||
detectInvertedMarker: bool
|
||||
useAruco3Detection: bool
|
||||
minSideLengthCanonicalImg: int
|
||||
minMarkerLengthRatioOriginalImg: float
|
||||
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
def readDetectorParameters(self, fn: cv2.FileNode) -> bool: ...
|
||||
|
||||
def writeDetectorParameters(self, fs: cv2.FileStorage, name: str = ...) -> bool: ...
|
||||
|
||||
|
||||
class RefineParameters:
|
||||
minRepDistance: float
|
||||
errorCorrectionRate: float
|
||||
checkAllOrders: bool
|
||||
|
||||
# Functions
|
||||
def __init__(self, minRepDistance: float = ..., errorCorrectionRate: float = ..., checkAllOrders: bool = ...) -> None: ...
|
||||
|
||||
def readRefineParameters(self, fn: cv2.FileNode) -> bool: ...
|
||||
|
||||
def writeRefineParameters(self, fs: cv2.FileStorage, name: str = ...) -> bool: ...
|
||||
|
||||
|
||||
class ArucoDetector(cv2.Algorithm):
|
||||
# Functions
|
||||
def __init__(self, dictionary: Dictionary = ..., detectorParams: DetectorParameters = ..., refineParams: RefineParameters = ...) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def detectMarkers(self, image: cv2.typing.MatLike, corners: _typing.Sequence[cv2.typing.MatLike] | None = ..., ids: cv2.typing.MatLike | None = ..., rejectedImgPoints: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike]]: ...
|
||||
@_typing.overload
|
||||
def detectMarkers(self, image: cv2.UMat, corners: _typing.Sequence[cv2.UMat] | None = ..., ids: cv2.UMat | None = ..., rejectedImgPoints: _typing.Sequence[cv2.UMat] | None = ...) -> tuple[_typing.Sequence[cv2.UMat], cv2.UMat, _typing.Sequence[cv2.UMat]]: ...
|
||||
|
||||
@_typing.overload
|
||||
def refineDetectedMarkers(self, image: cv2.typing.MatLike, board: Board, detectedCorners: _typing.Sequence[cv2.typing.MatLike], detectedIds: cv2.typing.MatLike, rejectedCorners: _typing.Sequence[cv2.typing.MatLike], cameraMatrix: cv2.typing.MatLike | None = ..., distCoeffs: cv2.typing.MatLike | None = ..., recoveredIdxs: cv2.typing.MatLike | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def refineDetectedMarkers(self, image: cv2.UMat, board: Board, detectedCorners: _typing.Sequence[cv2.UMat], detectedIds: cv2.UMat, rejectedCorners: _typing.Sequence[cv2.UMat], cameraMatrix: cv2.UMat | None = ..., distCoeffs: cv2.UMat | None = ..., recoveredIdxs: cv2.UMat | None = ...) -> tuple[_typing.Sequence[cv2.UMat], cv2.UMat, _typing.Sequence[cv2.UMat], cv2.UMat]: ...
|
||||
|
||||
def getDictionary(self) -> Dictionary: ...
|
||||
|
||||
def setDictionary(self, dictionary: Dictionary) -> None: ...
|
||||
|
||||
def getDetectorParameters(self) -> DetectorParameters: ...
|
||||
|
||||
def setDetectorParameters(self, detectorParameters: DetectorParameters) -> None: ...
|
||||
|
||||
def getRefineParameters(self) -> RefineParameters: ...
|
||||
|
||||
def setRefineParameters(self, refineParameters: RefineParameters) -> None: ...
|
||||
|
||||
def write(self, fs: cv2.FileStorage, name: str) -> None: ...
|
||||
|
||||
def read(self, fn: cv2.FileNode) -> None: ...
|
||||
|
||||
|
||||
class Dictionary:
|
||||
bytesList: cv2.typing.MatLike
|
||||
markerSize: int
|
||||
maxCorrectionBits: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, bytesList: cv2.typing.MatLike, _markerSize: int, maxcorr: int = ...) -> None: ...
|
||||
|
||||
def readDictionary(self, fn: cv2.FileNode) -> bool: ...
|
||||
|
||||
def writeDictionary(self, fs: cv2.FileStorage, name: str = ...) -> None: ...
|
||||
|
||||
def identify(self, onlyBits: cv2.typing.MatLike, maxCorrectionRate: float) -> tuple[bool, int, int]: ...
|
||||
|
||||
@_typing.overload
|
||||
def getDistanceToId(self, bits: cv2.typing.MatLike, id: int, allRotations: bool = ...) -> int: ...
|
||||
@_typing.overload
|
||||
def getDistanceToId(self, bits: cv2.UMat, id: int, allRotations: bool = ...) -> int: ...
|
||||
|
||||
@_typing.overload
|
||||
def generateImageMarker(self, id: int, sidePixels: int, _img: cv2.typing.MatLike | None = ..., borderBits: int = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def generateImageMarker(self, id: int, sidePixels: int, _img: cv2.UMat | None = ..., borderBits: int = ...) -> cv2.UMat: ...
|
||||
|
||||
@staticmethod
|
||||
def getByteListFromBits(bits: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
|
||||
@staticmethod
|
||||
def getBitsFromByteList(byteList: cv2.typing.MatLike, markerSize: int) -> cv2.typing.MatLike: ...
|
||||
|
||||
|
||||
class CharucoParameters:
|
||||
cameraMatrix: cv2.typing.MatLike
|
||||
distCoeffs: cv2.typing.MatLike
|
||||
minMarkers: int
|
||||
tryRefineMarkers: bool
|
||||
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class CharucoDetector(cv2.Algorithm):
|
||||
# Functions
|
||||
def __init__(self, board: CharucoBoard, charucoParams: CharucoParameters = ..., detectorParams: DetectorParameters = ..., refineParams: RefineParameters = ...) -> None: ...
|
||||
|
||||
def getBoard(self) -> CharucoBoard: ...
|
||||
|
||||
def setBoard(self, board: CharucoBoard) -> None: ...
|
||||
|
||||
def getCharucoParameters(self) -> CharucoParameters: ...
|
||||
|
||||
def setCharucoParameters(self, charucoParameters: CharucoParameters) -> None: ...
|
||||
|
||||
def getDetectorParameters(self) -> DetectorParameters: ...
|
||||
|
||||
def setDetectorParameters(self, detectorParameters: DetectorParameters) -> None: ...
|
||||
|
||||
def getRefineParameters(self) -> RefineParameters: ...
|
||||
|
||||
def setRefineParameters(self, refineParameters: RefineParameters) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def detectBoard(self, image: cv2.typing.MatLike, charucoCorners: cv2.typing.MatLike | None = ..., charucoIds: cv2.typing.MatLike | None = ..., markerCorners: _typing.Sequence[cv2.typing.MatLike] | None = ..., markerIds: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def detectBoard(self, image: cv2.UMat, charucoCorners: cv2.UMat | None = ..., charucoIds: cv2.UMat | None = ..., markerCorners: _typing.Sequence[cv2.UMat] | None = ..., markerIds: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat, _typing.Sequence[cv2.UMat], cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def detectDiamonds(self, image: cv2.typing.MatLike, diamondCorners: _typing.Sequence[cv2.typing.MatLike] | None = ..., diamondIds: cv2.typing.MatLike | None = ..., markerCorners: _typing.Sequence[cv2.typing.MatLike] | None = ..., markerIds: cv2.typing.MatLike | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def detectDiamonds(self, image: cv2.UMat, diamondCorners: _typing.Sequence[cv2.UMat] | None = ..., diamondIds: cv2.UMat | None = ..., markerCorners: _typing.Sequence[cv2.UMat] | None = ..., markerIds: cv2.UMat | None = ...) -> tuple[_typing.Sequence[cv2.UMat], cv2.UMat, _typing.Sequence[cv2.UMat], cv2.UMat]: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def drawDetectedCornersCharuco(image: cv2.typing.MatLike, charucoCorners: cv2.typing.MatLike, charucoIds: cv2.typing.MatLike | None = ..., cornerColor: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def drawDetectedCornersCharuco(image: cv2.UMat, charucoCorners: cv2.UMat, charucoIds: cv2.UMat | None = ..., cornerColor: cv2.typing.Scalar = ...) -> cv2.UMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def drawDetectedDiamonds(image: cv2.typing.MatLike, diamondCorners: _typing.Sequence[cv2.typing.MatLike], diamondIds: cv2.typing.MatLike | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def drawDetectedDiamonds(image: cv2.UMat, diamondCorners: _typing.Sequence[cv2.UMat], diamondIds: cv2.UMat | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.UMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def drawDetectedMarkers(image: cv2.typing.MatLike, corners: _typing.Sequence[cv2.typing.MatLike], ids: cv2.typing.MatLike | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def drawDetectedMarkers(image: cv2.UMat, corners: _typing.Sequence[cv2.UMat], ids: cv2.UMat | None = ..., borderColor: cv2.typing.Scalar = ...) -> cv2.UMat: ...
|
||||
|
||||
def extendDictionary(nMarkers: int, markerSize: int, baseDictionary: Dictionary = ..., randomSeed: int = ...) -> Dictionary: ...
|
||||
|
||||
@_typing.overload
|
||||
def generateImageMarker(dictionary: Dictionary, id: int, sidePixels: int, img: cv2.typing.MatLike | None = ..., borderBits: int = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def generateImageMarker(dictionary: Dictionary, id: int, sidePixels: int, img: cv2.UMat | None = ..., borderBits: int = ...) -> cv2.UMat: ...
|
||||
|
||||
def getPredefinedDictionary(dict: int) -> Dictionary: ...
|
||||
|
||||
|
||||
39
venv/lib/python3.11/site-packages/cv2/barcode/__init__.pyi
Normal file
39
venv/lib/python3.11/site-packages/cv2/barcode/__init__.pyi
Normal file
@@ -0,0 +1,39 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Classes
|
||||
class BarcodeDetector(cv2.GraphicalCodeDetector):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, prototxt_path: str, model_path: str) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def decodeWithType(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str]]: ...
|
||||
@_typing.overload
|
||||
def decodeWithType(self, img: cv2.UMat, points: cv2.UMat) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str]]: ...
|
||||
|
||||
@_typing.overload
|
||||
def detectAndDecodeWithType(self, img: cv2.typing.MatLike, points: cv2.typing.MatLike | None = ...) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str], cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def detectAndDecodeWithType(self, img: cv2.UMat, points: cv2.UMat | None = ...) -> tuple[bool, _typing.Sequence[str], _typing.Sequence[str], cv2.UMat]: ...
|
||||
|
||||
def getDownsamplingThreshold(self) -> float: ...
|
||||
|
||||
def setDownsamplingThreshold(self, thresh: float) -> BarcodeDetector: ...
|
||||
|
||||
def getDetectorScales(self) -> _typing.Sequence[float]: ...
|
||||
|
||||
def setDetectorScales(self, sizes: _typing.Sequence[float]) -> BarcodeDetector: ...
|
||||
|
||||
def getGradientThreshold(self) -> float: ...
|
||||
|
||||
def setGradientThreshold(self, thresh: float) -> BarcodeDetector: ...
|
||||
|
||||
|
||||
|
||||
24
venv/lib/python3.11/site-packages/cv2/config-3.py
Normal file
24
venv/lib/python3.11/site-packages/cv2/config-3.py
Normal file
@@ -0,0 +1,24 @@
|
||||
PYTHON_EXTENSIONS_PATHS = [
|
||||
LOADER_DIR
|
||||
] + PYTHON_EXTENSIONS_PATHS
|
||||
|
||||
ci_and_not_headless = False
|
||||
|
||||
try:
|
||||
from .version import ci_build, headless
|
||||
|
||||
ci_and_not_headless = ci_build and not headless
|
||||
except:
|
||||
pass
|
||||
|
||||
# the Qt plugin is included currently only in the pre-built wheels
|
||||
if sys.platform.startswith("linux") and ci_and_not_headless:
|
||||
os.environ["QT_QPA_PLATFORM_PLUGIN_PATH"] = os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)), "qt", "plugins"
|
||||
)
|
||||
|
||||
# Qt will throw warning on Linux if fonts are not found
|
||||
if sys.platform.startswith("linux") and ci_and_not_headless:
|
||||
os.environ["QT_QPA_FONTDIR"] = os.path.join(
|
||||
os.path.dirname(os.path.abspath(__file__)), "qt", "fonts"
|
||||
)
|
||||
5
venv/lib/python3.11/site-packages/cv2/config.py
Normal file
5
venv/lib/python3.11/site-packages/cv2/config.py
Normal file
@@ -0,0 +1,5 @@
|
||||
import os
|
||||
|
||||
BINARIES_PATHS = [
|
||||
os.path.join(os.path.join(LOADER_DIR, '../../'), 'lib64')
|
||||
] + BINARIES_PATHS
|
||||
508
venv/lib/python3.11/site-packages/cv2/cuda/__init__.pyi
Normal file
508
venv/lib/python3.11/site-packages/cv2/cuda/__init__.pyi
Normal file
@@ -0,0 +1,508 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Enumerations
|
||||
FEATURE_SET_COMPUTE_10: int
|
||||
FEATURE_SET_COMPUTE_11: int
|
||||
FEATURE_SET_COMPUTE_12: int
|
||||
FEATURE_SET_COMPUTE_13: int
|
||||
FEATURE_SET_COMPUTE_20: int
|
||||
FEATURE_SET_COMPUTE_21: int
|
||||
FEATURE_SET_COMPUTE_30: int
|
||||
FEATURE_SET_COMPUTE_32: int
|
||||
FEATURE_SET_COMPUTE_35: int
|
||||
FEATURE_SET_COMPUTE_50: int
|
||||
GLOBAL_ATOMICS: int
|
||||
SHARED_ATOMICS: int
|
||||
NATIVE_DOUBLE: int
|
||||
WARP_SHUFFLE_FUNCTIONS: int
|
||||
DYNAMIC_PARALLELISM: int
|
||||
FeatureSet = int
|
||||
"""One of [FEATURE_SET_COMPUTE_10, FEATURE_SET_COMPUTE_11, FEATURE_SET_COMPUTE_12, FEATURE_SET_COMPUTE_13, FEATURE_SET_COMPUTE_20, FEATURE_SET_COMPUTE_21, FEATURE_SET_COMPUTE_30, FEATURE_SET_COMPUTE_32, FEATURE_SET_COMPUTE_35, FEATURE_SET_COMPUTE_50, GLOBAL_ATOMICS, SHARED_ATOMICS, NATIVE_DOUBLE, WARP_SHUFFLE_FUNCTIONS, DYNAMIC_PARALLELISM]"""
|
||||
|
||||
|
||||
HostMem_PAGE_LOCKED: int
|
||||
HOST_MEM_PAGE_LOCKED: int
|
||||
HostMem_SHARED: int
|
||||
HOST_MEM_SHARED: int
|
||||
HostMem_WRITE_COMBINED: int
|
||||
HOST_MEM_WRITE_COMBINED: int
|
||||
HostMem_AllocType = int
|
||||
"""One of [HostMem_PAGE_LOCKED, HOST_MEM_PAGE_LOCKED, HostMem_SHARED, HOST_MEM_SHARED, HostMem_WRITE_COMBINED, HOST_MEM_WRITE_COMBINED]"""
|
||||
|
||||
Event_DEFAULT: int
|
||||
EVENT_DEFAULT: int
|
||||
Event_BLOCKING_SYNC: int
|
||||
EVENT_BLOCKING_SYNC: int
|
||||
Event_DISABLE_TIMING: int
|
||||
EVENT_DISABLE_TIMING: int
|
||||
Event_INTERPROCESS: int
|
||||
EVENT_INTERPROCESS: int
|
||||
Event_CreateFlags = int
|
||||
"""One of [Event_DEFAULT, EVENT_DEFAULT, Event_BLOCKING_SYNC, EVENT_BLOCKING_SYNC, Event_DISABLE_TIMING, EVENT_DISABLE_TIMING, Event_INTERPROCESS, EVENT_INTERPROCESS]"""
|
||||
|
||||
DeviceInfo_ComputeModeDefault: int
|
||||
DEVICE_INFO_COMPUTE_MODE_DEFAULT: int
|
||||
DeviceInfo_ComputeModeExclusive: int
|
||||
DEVICE_INFO_COMPUTE_MODE_EXCLUSIVE: int
|
||||
DeviceInfo_ComputeModeProhibited: int
|
||||
DEVICE_INFO_COMPUTE_MODE_PROHIBITED: int
|
||||
DeviceInfo_ComputeModeExclusiveProcess: int
|
||||
DEVICE_INFO_COMPUTE_MODE_EXCLUSIVE_PROCESS: int
|
||||
DeviceInfo_ComputeMode = int
|
||||
"""One of [DeviceInfo_ComputeModeDefault, DEVICE_INFO_COMPUTE_MODE_DEFAULT, DeviceInfo_ComputeModeExclusive, DEVICE_INFO_COMPUTE_MODE_EXCLUSIVE, DeviceInfo_ComputeModeProhibited, DEVICE_INFO_COMPUTE_MODE_PROHIBITED, DeviceInfo_ComputeModeExclusiveProcess, DEVICE_INFO_COMPUTE_MODE_EXCLUSIVE_PROCESS]"""
|
||||
|
||||
|
||||
# Classes
|
||||
class GpuMat:
|
||||
@property
|
||||
def step(self) -> int: ...
|
||||
|
||||
# Classes
|
||||
class Allocator:
|
||||
...
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, allocator: GpuMat.Allocator = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, rows: int, cols: int, type: int, allocator: GpuMat.Allocator = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, size: cv2.typing.Size, type: int, allocator: GpuMat.Allocator = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, rows: int, cols: int, type: int, s: cv2.typing.Scalar, allocator: GpuMat.Allocator = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, size: cv2.typing.Size, type: int, s: cv2.typing.Scalar, allocator: GpuMat.Allocator = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, m: GpuMat) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, m: GpuMat, rowRange: cv2.typing.Range, colRange: cv2.typing.Range) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, m: GpuMat, roi: cv2.typing.Rect) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, arr: cv2.typing.MatLike, allocator: GpuMat.Allocator = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, arr: GpuMat, allocator: GpuMat.Allocator = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, arr: cv2.UMat, allocator: GpuMat.Allocator = ...) -> None: ...
|
||||
|
||||
@staticmethod
|
||||
def defaultAllocator() -> GpuMat.Allocator: ...
|
||||
|
||||
@staticmethod
|
||||
def setDefaultAllocator(allocator: GpuMat.Allocator) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def create(self, rows: int, cols: int, type: int) -> None: ...
|
||||
@_typing.overload
|
||||
def create(self, size: cv2.typing.Size, type: int) -> None: ...
|
||||
|
||||
def release(self) -> None: ...
|
||||
|
||||
def swap(self, mat: GpuMat) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def upload(self, arr: cv2.typing.MatLike) -> None: ...
|
||||
@_typing.overload
|
||||
def upload(self, arr: GpuMat) -> None: ...
|
||||
@_typing.overload
|
||||
def upload(self, arr: cv2.UMat) -> None: ...
|
||||
@_typing.overload
|
||||
def upload(self, arr: cv2.typing.MatLike, stream: Stream) -> None: ...
|
||||
@_typing.overload
|
||||
def upload(self, arr: GpuMat, stream: Stream) -> None: ...
|
||||
@_typing.overload
|
||||
def upload(self, arr: cv2.UMat, stream: Stream) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def download(self, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def download(self, dst: GpuMat | None = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def download(self, dst: cv2.UMat | None = ...) -> cv2.UMat: ...
|
||||
@_typing.overload
|
||||
def download(self, stream: Stream, dst: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def download(self, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def download(self, stream: Stream, dst: cv2.UMat | None = ...) -> cv2.UMat: ...
|
||||
|
||||
def clone(self) -> GpuMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def copyTo(self, dst: GpuMat | None = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def copyTo(self, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def copyTo(self, mask: GpuMat, dst: GpuMat | None = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def copyTo(self, mask: GpuMat, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def setTo(self, s: cv2.typing.Scalar) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def setTo(self, s: cv2.typing.Scalar, stream: Stream) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def setTo(self, s: cv2.typing.Scalar, mask: cv2.typing.MatLike) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def setTo(self, s: cv2.typing.Scalar, mask: GpuMat) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def setTo(self, s: cv2.typing.Scalar, mask: cv2.UMat) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def setTo(self, s: cv2.typing.Scalar, mask: cv2.typing.MatLike, stream: Stream) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def setTo(self, s: cv2.typing.Scalar, mask: GpuMat, stream: Stream) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def setTo(self, s: cv2.typing.Scalar, mask: cv2.UMat, stream: Stream) -> GpuMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def convertTo(self, rtype: int, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def convertTo(self, rtype: int, dst: GpuMat | None = ..., alpha: float = ..., beta: float = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def convertTo(self, rtype: int, alpha: float, beta: float, stream: Stream, dst: GpuMat | None = ...) -> GpuMat: ...
|
||||
|
||||
def assignTo(self, m: GpuMat, type: int = ...) -> None: ...
|
||||
|
||||
def row(self, y: int) -> GpuMat: ...
|
||||
|
||||
def col(self, x: int) -> GpuMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def rowRange(self, startrow: int, endrow: int) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def rowRange(self, r: cv2.typing.Range) -> GpuMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def colRange(self, startcol: int, endcol: int) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def colRange(self, r: cv2.typing.Range) -> GpuMat: ...
|
||||
|
||||
def reshape(self, cn: int, rows: int = ...) -> GpuMat: ...
|
||||
|
||||
def locateROI(self, wholeSize: cv2.typing.Size, ofs: cv2.typing.Point) -> None: ...
|
||||
|
||||
def adjustROI(self, dtop: int, dbottom: int, dleft: int, dright: int) -> GpuMat: ...
|
||||
|
||||
def isContinuous(self) -> bool: ...
|
||||
|
||||
def elemSize(self) -> int: ...
|
||||
|
||||
def elemSize1(self) -> int: ...
|
||||
|
||||
def type(self) -> int: ...
|
||||
|
||||
def depth(self) -> int: ...
|
||||
|
||||
def channels(self) -> int: ...
|
||||
|
||||
def step1(self) -> int: ...
|
||||
|
||||
def size(self) -> cv2.typing.Size: ...
|
||||
|
||||
def empty(self) -> bool: ...
|
||||
|
||||
def cudaPtr(self) -> cv2.typing.IntPointer: ...
|
||||
|
||||
def updateContinuityFlag(self) -> None: ...
|
||||
|
||||
|
||||
class GpuData:
|
||||
...
|
||||
|
||||
class GpuMatND:
|
||||
...
|
||||
|
||||
class BufferPool:
|
||||
# Functions
|
||||
def __init__(self, stream: Stream) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def getBuffer(self, rows: int, cols: int, type: int) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def getBuffer(self, size: cv2.typing.Size, type: int) -> GpuMat: ...
|
||||
|
||||
def getAllocator(self) -> GpuMat.Allocator: ...
|
||||
|
||||
|
||||
class HostMem:
|
||||
@property
|
||||
def step(self) -> int: ...
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, alloc_type: HostMem_AllocType = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, rows: int, cols: int, type: int, alloc_type: HostMem_AllocType = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, size: cv2.typing.Size, type: int, alloc_type: HostMem_AllocType = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, arr: cv2.typing.MatLike, alloc_type: HostMem_AllocType = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, arr: GpuMat, alloc_type: HostMem_AllocType = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, arr: cv2.UMat, alloc_type: HostMem_AllocType = ...) -> None: ...
|
||||
|
||||
def swap(self, b: HostMem) -> None: ...
|
||||
|
||||
def clone(self) -> HostMem: ...
|
||||
|
||||
def create(self, rows: int, cols: int, type: int) -> None: ...
|
||||
|
||||
def reshape(self, cn: int, rows: int = ...) -> HostMem: ...
|
||||
|
||||
def createMatHeader(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def isContinuous(self) -> bool: ...
|
||||
|
||||
def elemSize(self) -> int: ...
|
||||
|
||||
def elemSize1(self) -> int: ...
|
||||
|
||||
def type(self) -> int: ...
|
||||
|
||||
def depth(self) -> int: ...
|
||||
|
||||
def channels(self) -> int: ...
|
||||
|
||||
def step1(self) -> int: ...
|
||||
|
||||
def size(self) -> cv2.typing.Size: ...
|
||||
|
||||
def empty(self) -> bool: ...
|
||||
|
||||
|
||||
class Stream:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, allocator: GpuMat.Allocator) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, cudaFlags: int) -> None: ...
|
||||
|
||||
def queryIfComplete(self) -> bool: ...
|
||||
|
||||
def waitForCompletion(self) -> None: ...
|
||||
|
||||
def waitEvent(self, event: Event) -> None: ...
|
||||
|
||||
@classmethod
|
||||
def Null(cls) -> Stream: ...
|
||||
|
||||
def cudaPtr(self) -> cv2.typing.IntPointer: ...
|
||||
|
||||
|
||||
class Event:
|
||||
# Functions
|
||||
def __init__(self, flags: Event_CreateFlags = ...) -> None: ...
|
||||
|
||||
def record(self, stream: Stream = ...) -> None: ...
|
||||
|
||||
def queryIfComplete(self) -> bool: ...
|
||||
|
||||
def waitForCompletion(self) -> None: ...
|
||||
|
||||
@staticmethod
|
||||
def elapsedTime(start: Event, end: Event) -> float: ...
|
||||
|
||||
|
||||
class TargetArchs:
|
||||
# Functions
|
||||
@staticmethod
|
||||
def has(major: int, minor: int) -> bool: ...
|
||||
|
||||
@staticmethod
|
||||
def hasPtx(major: int, minor: int) -> bool: ...
|
||||
|
||||
@staticmethod
|
||||
def hasBin(major: int, minor: int) -> bool: ...
|
||||
|
||||
@staticmethod
|
||||
def hasEqualOrLessPtx(major: int, minor: int) -> bool: ...
|
||||
|
||||
@staticmethod
|
||||
def hasEqualOrGreater(major: int, minor: int) -> bool: ...
|
||||
|
||||
@staticmethod
|
||||
def hasEqualOrGreaterPtx(major: int, minor: int) -> bool: ...
|
||||
|
||||
@staticmethod
|
||||
def hasEqualOrGreaterBin(major: int, minor: int) -> bool: ...
|
||||
|
||||
|
||||
class DeviceInfo:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, device_id: int) -> None: ...
|
||||
|
||||
def deviceID(self) -> int: ...
|
||||
|
||||
def totalGlobalMem(self) -> int: ...
|
||||
|
||||
def sharedMemPerBlock(self) -> int: ...
|
||||
|
||||
def regsPerBlock(self) -> int: ...
|
||||
|
||||
def warpSize(self) -> int: ...
|
||||
|
||||
def memPitch(self) -> int: ...
|
||||
|
||||
def maxThreadsPerBlock(self) -> int: ...
|
||||
|
||||
def maxThreadsDim(self) -> cv2.typing.Vec3i: ...
|
||||
|
||||
def maxGridSize(self) -> cv2.typing.Vec3i: ...
|
||||
|
||||
def clockRate(self) -> int: ...
|
||||
|
||||
def totalConstMem(self) -> int: ...
|
||||
|
||||
def majorVersion(self) -> int: ...
|
||||
|
||||
def minorVersion(self) -> int: ...
|
||||
|
||||
def textureAlignment(self) -> int: ...
|
||||
|
||||
def texturePitchAlignment(self) -> int: ...
|
||||
|
||||
def multiProcessorCount(self) -> int: ...
|
||||
|
||||
def kernelExecTimeoutEnabled(self) -> bool: ...
|
||||
|
||||
def integrated(self) -> bool: ...
|
||||
|
||||
def canMapHostMemory(self) -> bool: ...
|
||||
|
||||
def computeMode(self) -> DeviceInfo_ComputeMode: ...
|
||||
|
||||
def maxTexture1D(self) -> int: ...
|
||||
|
||||
def maxTexture1DMipmap(self) -> int: ...
|
||||
|
||||
def maxTexture1DLinear(self) -> int: ...
|
||||
|
||||
def maxTexture2D(self) -> cv2.typing.Vec2i: ...
|
||||
|
||||
def maxTexture2DMipmap(self) -> cv2.typing.Vec2i: ...
|
||||
|
||||
def maxTexture2DLinear(self) -> cv2.typing.Vec3i: ...
|
||||
|
||||
def maxTexture2DGather(self) -> cv2.typing.Vec2i: ...
|
||||
|
||||
def maxTexture3D(self) -> cv2.typing.Vec3i: ...
|
||||
|
||||
def maxTextureCubemap(self) -> int: ...
|
||||
|
||||
def maxTexture1DLayered(self) -> cv2.typing.Vec2i: ...
|
||||
|
||||
def maxTexture2DLayered(self) -> cv2.typing.Vec3i: ...
|
||||
|
||||
def maxTextureCubemapLayered(self) -> cv2.typing.Vec2i: ...
|
||||
|
||||
def maxSurface1D(self) -> int: ...
|
||||
|
||||
def maxSurface2D(self) -> cv2.typing.Vec2i: ...
|
||||
|
||||
def maxSurface3D(self) -> cv2.typing.Vec3i: ...
|
||||
|
||||
def maxSurface1DLayered(self) -> cv2.typing.Vec2i: ...
|
||||
|
||||
def maxSurface2DLayered(self) -> cv2.typing.Vec3i: ...
|
||||
|
||||
def maxSurfaceCubemap(self) -> int: ...
|
||||
|
||||
def maxSurfaceCubemapLayered(self) -> cv2.typing.Vec2i: ...
|
||||
|
||||
def surfaceAlignment(self) -> int: ...
|
||||
|
||||
def concurrentKernels(self) -> bool: ...
|
||||
|
||||
def ECCEnabled(self) -> bool: ...
|
||||
|
||||
def pciBusID(self) -> int: ...
|
||||
|
||||
def pciDeviceID(self) -> int: ...
|
||||
|
||||
def pciDomainID(self) -> int: ...
|
||||
|
||||
def tccDriver(self) -> bool: ...
|
||||
|
||||
def asyncEngineCount(self) -> int: ...
|
||||
|
||||
def unifiedAddressing(self) -> bool: ...
|
||||
|
||||
def memoryClockRate(self) -> int: ...
|
||||
|
||||
def memoryBusWidth(self) -> int: ...
|
||||
|
||||
def l2CacheSize(self) -> int: ...
|
||||
|
||||
def maxThreadsPerMultiProcessor(self) -> int: ...
|
||||
|
||||
def queryMemory(self, totalMemory: int, freeMemory: int) -> None: ...
|
||||
|
||||
def freeMemory(self) -> int: ...
|
||||
|
||||
def totalMemory(self) -> int: ...
|
||||
|
||||
def isCompatible(self) -> bool: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def createContinuous(rows: int, cols: int, type: int, arr: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def createContinuous(rows: int, cols: int, type: int, arr: GpuMat | None = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def createContinuous(rows: int, cols: int, type: int, arr: cv2.UMat | None = ...) -> cv2.UMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def createGpuMatFromCudaMemory(rows: int, cols: int, type: int, cudaMemoryAddress: int, step: int = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def createGpuMatFromCudaMemory(size: cv2.typing.Size, type: int, cudaMemoryAddress: int, step: int = ...) -> GpuMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def ensureSizeIsEnough(rows: int, cols: int, type: int, arr: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def ensureSizeIsEnough(rows: int, cols: int, type: int, arr: GpuMat | None = ...) -> GpuMat: ...
|
||||
@_typing.overload
|
||||
def ensureSizeIsEnough(rows: int, cols: int, type: int, arr: cv2.UMat | None = ...) -> cv2.UMat: ...
|
||||
|
||||
def fastNlMeansDenoising(src: GpuMat, h: float, dst: GpuMat | None = ..., search_window: int = ..., block_size: int = ..., stream: Stream = ...) -> GpuMat: ...
|
||||
|
||||
def fastNlMeansDenoisingColored(src: GpuMat, h_luminance: float, photo_render: float, dst: GpuMat | None = ..., search_window: int = ..., block_size: int = ..., stream: Stream = ...) -> GpuMat: ...
|
||||
|
||||
def getCudaEnabledDeviceCount() -> int: ...
|
||||
|
||||
def getDevice() -> int: ...
|
||||
|
||||
def nonLocalMeans(src: GpuMat, h: float, dst: GpuMat | None = ..., search_window: int = ..., block_size: int = ..., borderMode: int = ..., stream: Stream = ...) -> GpuMat: ...
|
||||
|
||||
def printCudaDeviceInfo(device: int) -> None: ...
|
||||
|
||||
def printShortCudaDeviceInfo(device: int) -> None: ...
|
||||
|
||||
def registerPageLocked(m: cv2.typing.MatLike) -> None: ...
|
||||
|
||||
def resetDevice() -> None: ...
|
||||
|
||||
def setBufferPoolConfig(deviceId: int, stackSize: int, stackCount: int) -> None: ...
|
||||
|
||||
def setBufferPoolUsage(on: bool) -> None: ...
|
||||
|
||||
def setDevice(device: int) -> None: ...
|
||||
|
||||
def unregisterPageLocked(m: cv2.typing.MatLike) -> None: ...
|
||||
|
||||
def wrapStream(cudaStreamMemoryAddress: int) -> Stream: ...
|
||||
|
||||
|
||||
BIN
venv/lib/python3.11/site-packages/cv2/cv2.abi3.so
Executable file
BIN
venv/lib/python3.11/site-packages/cv2/cv2.abi3.so
Executable file
Binary file not shown.
3
venv/lib/python3.11/site-packages/cv2/data/__init__.py
Normal file
3
venv/lib/python3.11/site-packages/cv2/data/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
import os
|
||||
|
||||
haarcascades = os.path.join(os.path.dirname(__file__), "")
|
||||
Binary file not shown.
12213
venv/lib/python3.11/site-packages/cv2/data/haarcascade_eye.xml
Normal file
12213
venv/lib/python3.11/site-packages/cv2/data/haarcascade_eye.xml
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
17030
venv/lib/python3.11/site-packages/cv2/data/haarcascade_fullbody.xml
Normal file
17030
venv/lib/python3.11/site-packages/cv2/data/haarcascade_fullbody.xml
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
14056
venv/lib/python3.11/site-packages/cv2/data/haarcascade_lowerbody.xml
Normal file
14056
venv/lib/python3.11/site-packages/cv2/data/haarcascade_lowerbody.xml
Normal file
File diff suppressed because it is too large
Load Diff
29690
venv/lib/python3.11/site-packages/cv2/data/haarcascade_profileface.xml
Normal file
29690
venv/lib/python3.11/site-packages/cv2/data/haarcascade_profileface.xml
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
6729
venv/lib/python3.11/site-packages/cv2/data/haarcascade_smile.xml
Normal file
6729
venv/lib/python3.11/site-packages/cv2/data/haarcascade_smile.xml
Normal file
File diff suppressed because it is too large
Load Diff
28134
venv/lib/python3.11/site-packages/cv2/data/haarcascade_upperbody.xml
Normal file
28134
venv/lib/python3.11/site-packages/cv2/data/haarcascade_upperbody.xml
Normal file
File diff suppressed because it is too large
Load Diff
600
venv/lib/python3.11/site-packages/cv2/detail/__init__.pyi
Normal file
600
venv/lib/python3.11/site-packages/cv2/detail/__init__.pyi
Normal file
@@ -0,0 +1,600 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.gapi
|
||||
import cv2.gapi.ie
|
||||
import cv2.gapi.onnx
|
||||
import cv2.gapi.ov
|
||||
import cv2.typing
|
||||
import numpy
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Enumerations
|
||||
TEST_CUSTOM: int
|
||||
TEST_EQ: int
|
||||
TEST_NE: int
|
||||
TEST_LE: int
|
||||
TEST_LT: int
|
||||
TEST_GE: int
|
||||
TEST_GT: int
|
||||
TestOp = int
|
||||
"""One of [TEST_CUSTOM, TEST_EQ, TEST_NE, TEST_LE, TEST_LT, TEST_GE, TEST_GT]"""
|
||||
|
||||
WAVE_CORRECT_HORIZ: int
|
||||
WAVE_CORRECT_VERT: int
|
||||
WAVE_CORRECT_AUTO: int
|
||||
WaveCorrectKind = int
|
||||
"""One of [WAVE_CORRECT_HORIZ, WAVE_CORRECT_VERT, WAVE_CORRECT_AUTO]"""
|
||||
|
||||
OpaqueKind_CV_UNKNOWN: int
|
||||
OPAQUE_KIND_CV_UNKNOWN: int
|
||||
OpaqueKind_CV_BOOL: int
|
||||
OPAQUE_KIND_CV_BOOL: int
|
||||
OpaqueKind_CV_INT: int
|
||||
OPAQUE_KIND_CV_INT: int
|
||||
OpaqueKind_CV_INT64: int
|
||||
OPAQUE_KIND_CV_INT64: int
|
||||
OpaqueKind_CV_DOUBLE: int
|
||||
OPAQUE_KIND_CV_DOUBLE: int
|
||||
OpaqueKind_CV_FLOAT: int
|
||||
OPAQUE_KIND_CV_FLOAT: int
|
||||
OpaqueKind_CV_UINT64: int
|
||||
OPAQUE_KIND_CV_UINT64: int
|
||||
OpaqueKind_CV_STRING: int
|
||||
OPAQUE_KIND_CV_STRING: int
|
||||
OpaqueKind_CV_POINT: int
|
||||
OPAQUE_KIND_CV_POINT: int
|
||||
OpaqueKind_CV_POINT2F: int
|
||||
OPAQUE_KIND_CV_POINT2F: int
|
||||
OpaqueKind_CV_POINT3F: int
|
||||
OPAQUE_KIND_CV_POINT3F: int
|
||||
OpaqueKind_CV_SIZE: int
|
||||
OPAQUE_KIND_CV_SIZE: int
|
||||
OpaqueKind_CV_RECT: int
|
||||
OPAQUE_KIND_CV_RECT: int
|
||||
OpaqueKind_CV_SCALAR: int
|
||||
OPAQUE_KIND_CV_SCALAR: int
|
||||
OpaqueKind_CV_MAT: int
|
||||
OPAQUE_KIND_CV_MAT: int
|
||||
OpaqueKind_CV_DRAW_PRIM: int
|
||||
OPAQUE_KIND_CV_DRAW_PRIM: int
|
||||
OpaqueKind = int
|
||||
"""One of [OpaqueKind_CV_UNKNOWN, OPAQUE_KIND_CV_UNKNOWN, OpaqueKind_CV_BOOL, OPAQUE_KIND_CV_BOOL, OpaqueKind_CV_INT, OPAQUE_KIND_CV_INT, OpaqueKind_CV_INT64, OPAQUE_KIND_CV_INT64, OpaqueKind_CV_DOUBLE, OPAQUE_KIND_CV_DOUBLE, OpaqueKind_CV_FLOAT, OPAQUE_KIND_CV_FLOAT, OpaqueKind_CV_UINT64, OPAQUE_KIND_CV_UINT64, OpaqueKind_CV_STRING, OPAQUE_KIND_CV_STRING, OpaqueKind_CV_POINT, OPAQUE_KIND_CV_POINT, OpaqueKind_CV_POINT2F, OPAQUE_KIND_CV_POINT2F, OpaqueKind_CV_POINT3F, OPAQUE_KIND_CV_POINT3F, OpaqueKind_CV_SIZE, OPAQUE_KIND_CV_SIZE, OpaqueKind_CV_RECT, OPAQUE_KIND_CV_RECT, OpaqueKind_CV_SCALAR, OPAQUE_KIND_CV_SCALAR, OpaqueKind_CV_MAT, OPAQUE_KIND_CV_MAT, OpaqueKind_CV_DRAW_PRIM, OPAQUE_KIND_CV_DRAW_PRIM]"""
|
||||
|
||||
ArgKind_OPAQUE_VAL: int
|
||||
ARG_KIND_OPAQUE_VAL: int
|
||||
ArgKind_OPAQUE: int
|
||||
ARG_KIND_OPAQUE: int
|
||||
ArgKind_GOBJREF: int
|
||||
ARG_KIND_GOBJREF: int
|
||||
ArgKind_GMAT: int
|
||||
ARG_KIND_GMAT: int
|
||||
ArgKind_GMATP: int
|
||||
ARG_KIND_GMATP: int
|
||||
ArgKind_GFRAME: int
|
||||
ARG_KIND_GFRAME: int
|
||||
ArgKind_GSCALAR: int
|
||||
ARG_KIND_GSCALAR: int
|
||||
ArgKind_GARRAY: int
|
||||
ARG_KIND_GARRAY: int
|
||||
ArgKind_GOPAQUE: int
|
||||
ARG_KIND_GOPAQUE: int
|
||||
ArgKind = int
|
||||
"""One of [ArgKind_OPAQUE_VAL, ARG_KIND_OPAQUE_VAL, ArgKind_OPAQUE, ARG_KIND_OPAQUE, ArgKind_GOBJREF, ARG_KIND_GOBJREF, ArgKind_GMAT, ARG_KIND_GMAT, ArgKind_GMATP, ARG_KIND_GMATP, ArgKind_GFRAME, ARG_KIND_GFRAME, ArgKind_GSCALAR, ARG_KIND_GSCALAR, ArgKind_GARRAY, ARG_KIND_GARRAY, ArgKind_GOPAQUE, ARG_KIND_GOPAQUE]"""
|
||||
|
||||
|
||||
Blender_NO: int
|
||||
BLENDER_NO: int
|
||||
Blender_FEATHER: int
|
||||
BLENDER_FEATHER: int
|
||||
Blender_MULTI_BAND: int
|
||||
BLENDER_MULTI_BAND: int
|
||||
|
||||
ExposureCompensator_NO: int
|
||||
EXPOSURE_COMPENSATOR_NO: int
|
||||
ExposureCompensator_GAIN: int
|
||||
EXPOSURE_COMPENSATOR_GAIN: int
|
||||
ExposureCompensator_GAIN_BLOCKS: int
|
||||
EXPOSURE_COMPENSATOR_GAIN_BLOCKS: int
|
||||
ExposureCompensator_CHANNELS: int
|
||||
EXPOSURE_COMPENSATOR_CHANNELS: int
|
||||
ExposureCompensator_CHANNELS_BLOCKS: int
|
||||
EXPOSURE_COMPENSATOR_CHANNELS_BLOCKS: int
|
||||
|
||||
SeamFinder_NO: int
|
||||
SEAM_FINDER_NO: int
|
||||
SeamFinder_VORONOI_SEAM: int
|
||||
SEAM_FINDER_VORONOI_SEAM: int
|
||||
SeamFinder_DP_SEAM: int
|
||||
SEAM_FINDER_DP_SEAM: int
|
||||
|
||||
DpSeamFinder_COLOR: int
|
||||
DP_SEAM_FINDER_COLOR: int
|
||||
DpSeamFinder_COLOR_GRAD: int
|
||||
DP_SEAM_FINDER_COLOR_GRAD: int
|
||||
DpSeamFinder_CostFunction = int
|
||||
"""One of [DpSeamFinder_COLOR, DP_SEAM_FINDER_COLOR, DpSeamFinder_COLOR_GRAD, DP_SEAM_FINDER_COLOR_GRAD]"""
|
||||
|
||||
Timelapser_AS_IS: int
|
||||
TIMELAPSER_AS_IS: int
|
||||
Timelapser_CROP: int
|
||||
TIMELAPSER_CROP: int
|
||||
|
||||
GraphCutSeamFinderBase_COST_COLOR: int
|
||||
GRAPH_CUT_SEAM_FINDER_BASE_COST_COLOR: int
|
||||
GraphCutSeamFinderBase_COST_COLOR_GRAD: int
|
||||
GRAPH_CUT_SEAM_FINDER_BASE_COST_COLOR_GRAD: int
|
||||
GraphCutSeamFinderBase_CostType = int
|
||||
"""One of [GraphCutSeamFinderBase_COST_COLOR, GRAPH_CUT_SEAM_FINDER_BASE_COST_COLOR, GraphCutSeamFinderBase_COST_COLOR_GRAD, GRAPH_CUT_SEAM_FINDER_BASE_COST_COLOR_GRAD]"""
|
||||
|
||||
TrackerSamplerCSC_MODE_INIT_POS: int
|
||||
TRACKER_SAMPLER_CSC_MODE_INIT_POS: int
|
||||
TrackerSamplerCSC_MODE_INIT_NEG: int
|
||||
TRACKER_SAMPLER_CSC_MODE_INIT_NEG: int
|
||||
TrackerSamplerCSC_MODE_TRACK_POS: int
|
||||
TRACKER_SAMPLER_CSC_MODE_TRACK_POS: int
|
||||
TrackerSamplerCSC_MODE_TRACK_NEG: int
|
||||
TRACKER_SAMPLER_CSC_MODE_TRACK_NEG: int
|
||||
TrackerSamplerCSC_MODE_DETECT: int
|
||||
TRACKER_SAMPLER_CSC_MODE_DETECT: int
|
||||
TrackerSamplerCSC_MODE = int
|
||||
"""One of [TrackerSamplerCSC_MODE_INIT_POS, TRACKER_SAMPLER_CSC_MODE_INIT_POS, TrackerSamplerCSC_MODE_INIT_NEG, TRACKER_SAMPLER_CSC_MODE_INIT_NEG, TrackerSamplerCSC_MODE_TRACK_POS, TRACKER_SAMPLER_CSC_MODE_TRACK_POS, TrackerSamplerCSC_MODE_TRACK_NEG, TRACKER_SAMPLER_CSC_MODE_TRACK_NEG, TrackerSamplerCSC_MODE_DETECT, TRACKER_SAMPLER_CSC_MODE_DETECT]"""
|
||||
|
||||
|
||||
# Classes
|
||||
class Blender:
|
||||
# Functions
|
||||
@classmethod
|
||||
def createDefault(cls, type: int, try_gpu: bool = ...) -> Blender: ...
|
||||
|
||||
@_typing.overload
|
||||
def prepare(self, corners: _typing.Sequence[cv2.typing.Point], sizes: _typing.Sequence[cv2.typing.Size]) -> None: ...
|
||||
@_typing.overload
|
||||
def prepare(self, dst_roi: cv2.typing.Rect) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def feed(self, img: cv2.typing.MatLike, mask: cv2.typing.MatLike, tl: cv2.typing.Point) -> None: ...
|
||||
@_typing.overload
|
||||
def feed(self, img: cv2.UMat, mask: cv2.UMat, tl: cv2.typing.Point) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def blend(self, dst: cv2.typing.MatLike, dst_mask: cv2.typing.MatLike) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def blend(self, dst: cv2.UMat, dst_mask: cv2.UMat) -> tuple[cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
|
||||
class FeatherBlender(Blender):
|
||||
# Functions
|
||||
def __init__(self, sharpness: float = ...) -> None: ...
|
||||
|
||||
def sharpness(self) -> float: ...
|
||||
|
||||
def setSharpness(self, val: float) -> None: ...
|
||||
|
||||
def prepare(self, dst_roi: cv2.typing.Rect) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def feed(self, img: cv2.typing.MatLike, mask: cv2.typing.MatLike, tl: cv2.typing.Point) -> None: ...
|
||||
@_typing.overload
|
||||
def feed(self, img: cv2.UMat, mask: cv2.UMat, tl: cv2.typing.Point) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def blend(self, dst: cv2.typing.MatLike, dst_mask: cv2.typing.MatLike) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def blend(self, dst: cv2.UMat, dst_mask: cv2.UMat) -> tuple[cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
def createWeightMaps(self, masks: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], weight_maps: _typing.Sequence[cv2.UMat]) -> tuple[cv2.typing.Rect, _typing.Sequence[cv2.UMat]]: ...
|
||||
|
||||
|
||||
class MultiBandBlender(Blender):
|
||||
# Functions
|
||||
def __init__(self, try_gpu: int = ..., num_bands: int = ..., weight_type: int = ...) -> None: ...
|
||||
|
||||
def numBands(self) -> int: ...
|
||||
|
||||
def setNumBands(self, val: int) -> None: ...
|
||||
|
||||
def prepare(self, dst_roi: cv2.typing.Rect) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def feed(self, img: cv2.typing.MatLike, mask: cv2.typing.MatLike, tl: cv2.typing.Point) -> None: ...
|
||||
@_typing.overload
|
||||
def feed(self, img: cv2.UMat, mask: cv2.UMat, tl: cv2.typing.Point) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def blend(self, dst: cv2.typing.MatLike, dst_mask: cv2.typing.MatLike) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def blend(self, dst: cv2.UMat, dst_mask: cv2.UMat) -> tuple[cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
|
||||
class CameraParams:
|
||||
focal: float
|
||||
aspect: float
|
||||
ppx: float
|
||||
ppy: float
|
||||
R: cv2.typing.MatLike
|
||||
t: cv2.typing.MatLike
|
||||
|
||||
# Functions
|
||||
def K(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
|
||||
class ExposureCompensator:
|
||||
# Functions
|
||||
@classmethod
|
||||
def createDefault(cls, type: int) -> ExposureCompensator: ...
|
||||
|
||||
def feed(self, corners: _typing.Sequence[cv2.typing.Point], images: _typing.Sequence[cv2.UMat], masks: _typing.Sequence[cv2.UMat]) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ...
|
||||
|
||||
def getMatGains(self, arg1: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
|
||||
def setMatGains(self, arg1: _typing.Sequence[cv2.typing.MatLike]) -> None: ...
|
||||
|
||||
def setUpdateGain(self, b: bool) -> None: ...
|
||||
|
||||
def getUpdateGain(self) -> bool: ...
|
||||
|
||||
|
||||
class NoExposureCompensator(ExposureCompensator):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def apply(self, arg1: int, arg2: cv2.typing.Point, arg3: cv2.typing.MatLike, arg4: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def apply(self, arg1: int, arg2: cv2.typing.Point, arg3: cv2.UMat, arg4: cv2.UMat) -> cv2.UMat: ...
|
||||
|
||||
def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
|
||||
def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ...
|
||||
|
||||
|
||||
class GainCompensator(ExposureCompensator):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, nr_feeds: int) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ...
|
||||
|
||||
def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
|
||||
def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ...
|
||||
|
||||
def setNrFeeds(self, nr_feeds: int) -> None: ...
|
||||
|
||||
def getNrFeeds(self) -> int: ...
|
||||
|
||||
def setSimilarityThreshold(self, similarity_threshold: float) -> None: ...
|
||||
|
||||
def getSimilarityThreshold(self) -> float: ...
|
||||
|
||||
|
||||
class ChannelsCompensator(ExposureCompensator):
|
||||
# Functions
|
||||
def __init__(self, nr_feeds: int = ...) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ...
|
||||
|
||||
def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
|
||||
def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ...
|
||||
|
||||
def setNrFeeds(self, nr_feeds: int) -> None: ...
|
||||
|
||||
def getNrFeeds(self) -> int: ...
|
||||
|
||||
def setSimilarityThreshold(self, similarity_threshold: float) -> None: ...
|
||||
|
||||
def getSimilarityThreshold(self) -> float: ...
|
||||
|
||||
|
||||
class BlocksCompensator(ExposureCompensator):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ...
|
||||
|
||||
def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
|
||||
def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ...
|
||||
|
||||
def setNrFeeds(self, nr_feeds: int) -> None: ...
|
||||
|
||||
def getNrFeeds(self) -> int: ...
|
||||
|
||||
def setSimilarityThreshold(self, similarity_threshold: float) -> None: ...
|
||||
|
||||
def getSimilarityThreshold(self) -> float: ...
|
||||
|
||||
@_typing.overload
|
||||
def setBlockSize(self, width: int, height: int) -> None: ...
|
||||
@_typing.overload
|
||||
def setBlockSize(self, size: cv2.typing.Size) -> None: ...
|
||||
|
||||
def getBlockSize(self) -> cv2.typing.Size: ...
|
||||
|
||||
def setNrGainsFilteringIterations(self, nr_iterations: int) -> None: ...
|
||||
|
||||
def getNrGainsFilteringIterations(self) -> int: ...
|
||||
|
||||
|
||||
class BlocksGainCompensator(BlocksCompensator):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, bl_width: int = ..., bl_height: int = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, bl_width: int, bl_height: int, nr_feeds: int) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.typing.MatLike, mask: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def apply(self, index: int, corner: cv2.typing.Point, image: cv2.UMat, mask: cv2.UMat) -> cv2.UMat: ...
|
||||
|
||||
def getMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
|
||||
def setMatGains(self, umv: _typing.Sequence[cv2.typing.MatLike]) -> None: ...
|
||||
|
||||
|
||||
class BlocksChannelsCompensator(BlocksCompensator):
|
||||
# Functions
|
||||
def __init__(self, bl_width: int = ..., bl_height: int = ..., nr_feeds: int = ...) -> None: ...
|
||||
|
||||
|
||||
class ImageFeatures:
|
||||
img_idx: int
|
||||
img_size: cv2.typing.Size
|
||||
keypoints: _typing.Sequence[cv2.KeyPoint]
|
||||
descriptors: cv2.UMat
|
||||
|
||||
# Functions
|
||||
def getKeypoints(self) -> _typing.Sequence[cv2.KeyPoint]: ...
|
||||
|
||||
|
||||
class MatchesInfo:
|
||||
src_img_idx: int
|
||||
dst_img_idx: int
|
||||
matches: _typing.Sequence[cv2.DMatch]
|
||||
inliers_mask: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]
|
||||
num_inliers: int
|
||||
H: cv2.typing.MatLike
|
||||
confidence: float
|
||||
|
||||
# Functions
|
||||
def getMatches(self) -> _typing.Sequence[cv2.DMatch]: ...
|
||||
|
||||
def getInliers(self) -> numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]: ...
|
||||
|
||||
|
||||
class FeaturesMatcher:
|
||||
# Functions
|
||||
def apply(self, features1: ImageFeatures, features2: ImageFeatures) -> MatchesInfo: ...
|
||||
|
||||
def apply2(self, features: _typing.Sequence[ImageFeatures], mask: cv2.UMat | None = ...) -> _typing.Sequence[MatchesInfo]: ...
|
||||
|
||||
def isThreadSafe(self) -> bool: ...
|
||||
|
||||
def collectGarbage(self) -> None: ...
|
||||
|
||||
|
||||
class BestOf2NearestMatcher(FeaturesMatcher):
|
||||
# Functions
|
||||
def __init__(self, try_use_gpu: bool = ..., match_conf: float = ..., num_matches_thresh1: int = ..., num_matches_thresh2: int = ..., matches_confindece_thresh: float = ...) -> None: ...
|
||||
|
||||
def collectGarbage(self) -> None: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls, try_use_gpu: bool = ..., match_conf: float = ..., num_matches_thresh1: int = ..., num_matches_thresh2: int = ..., matches_confindece_thresh: float = ...) -> BestOf2NearestMatcher: ...
|
||||
|
||||
|
||||
class BestOf2NearestRangeMatcher(BestOf2NearestMatcher):
|
||||
# Functions
|
||||
def __init__(self, range_width: int = ..., try_use_gpu: bool = ..., match_conf: float = ..., num_matches_thresh1: int = ..., num_matches_thresh2: int = ...) -> None: ...
|
||||
|
||||
|
||||
class AffineBestOf2NearestMatcher(BestOf2NearestMatcher):
|
||||
# Functions
|
||||
def __init__(self, full_affine: bool = ..., try_use_gpu: bool = ..., match_conf: float = ..., num_matches_thresh1: int = ...) -> None: ...
|
||||
|
||||
|
||||
class Estimator:
|
||||
# Functions
|
||||
def apply(self, features: _typing.Sequence[ImageFeatures], pairwise_matches: _typing.Sequence[MatchesInfo], cameras: _typing.Sequence[CameraParams]) -> tuple[bool, _typing.Sequence[CameraParams]]: ...
|
||||
|
||||
|
||||
class HomographyBasedEstimator(Estimator):
|
||||
# Functions
|
||||
def __init__(self, is_focals_estimated: bool = ...) -> None: ...
|
||||
|
||||
|
||||
class AffineBasedEstimator(Estimator):
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class BundleAdjusterBase(Estimator):
|
||||
# Functions
|
||||
def refinementMask(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def setRefinementMask(self, mask: cv2.typing.MatLike) -> None: ...
|
||||
|
||||
def confThresh(self) -> float: ...
|
||||
|
||||
def setConfThresh(self, conf_thresh: float) -> None: ...
|
||||
|
||||
def termCriteria(self) -> cv2.typing.TermCriteria: ...
|
||||
|
||||
def setTermCriteria(self, term_criteria: cv2.typing.TermCriteria) -> None: ...
|
||||
|
||||
|
||||
class NoBundleAdjuster(BundleAdjusterBase):
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class BundleAdjusterReproj(BundleAdjusterBase):
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class BundleAdjusterRay(BundleAdjusterBase):
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class BundleAdjusterAffine(BundleAdjusterBase):
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class BundleAdjusterAffinePartial(BundleAdjusterBase):
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class SeamFinder:
|
||||
# Functions
|
||||
def find(self, src: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], masks: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
@classmethod
|
||||
def createDefault(cls, type: int) -> SeamFinder: ...
|
||||
|
||||
|
||||
class NoSeamFinder(SeamFinder):
|
||||
# Functions
|
||||
def find(self, arg1: _typing.Sequence[cv2.UMat], arg2: _typing.Sequence[cv2.typing.Point], arg3: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
|
||||
class PairwiseSeamFinder(SeamFinder):
|
||||
# Functions
|
||||
def find(self, src: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], masks: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
|
||||
class VoronoiSeamFinder(PairwiseSeamFinder):
|
||||
# Functions
|
||||
def find(self, src: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], masks: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
|
||||
class DpSeamFinder(SeamFinder):
|
||||
# Functions
|
||||
def __init__(self, costFunc: str) -> None: ...
|
||||
|
||||
def setCostFunction(self, val: str) -> None: ...
|
||||
|
||||
|
||||
class GraphCutSeamFinder:
|
||||
# Functions
|
||||
def __init__(self, cost_type: str, terminal_cost: float = ..., bad_region_penalty: float = ...) -> None: ...
|
||||
|
||||
def find(self, src: _typing.Sequence[cv2.UMat], corners: _typing.Sequence[cv2.typing.Point], masks: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
|
||||
class Timelapser:
|
||||
# Functions
|
||||
@classmethod
|
||||
def createDefault(cls, type: int) -> Timelapser: ...
|
||||
|
||||
def initialize(self, corners: _typing.Sequence[cv2.typing.Point], sizes: _typing.Sequence[cv2.typing.Size]) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def process(self, img: cv2.typing.MatLike, mask: cv2.typing.MatLike, tl: cv2.typing.Point) -> None: ...
|
||||
@_typing.overload
|
||||
def process(self, img: cv2.UMat, mask: cv2.UMat, tl: cv2.typing.Point) -> None: ...
|
||||
|
||||
def getDst(self) -> cv2.UMat: ...
|
||||
|
||||
|
||||
class TimelapserCrop(Timelapser):
|
||||
...
|
||||
|
||||
class ProjectorBase:
|
||||
...
|
||||
|
||||
class SphericalProjector(ProjectorBase):
|
||||
# Functions
|
||||
def mapForward(self, x: float, y: float, u: float, v: float) -> None: ...
|
||||
|
||||
def mapBackward(self, u: float, v: float, x: float, y: float) -> None: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
def calibrateRotatingCamera(Hs: _typing.Sequence[cv2.typing.MatLike], K: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike]: ...
|
||||
|
||||
@_typing.overload
|
||||
def computeImageFeatures(featuresFinder: cv2.Feature2D, images: _typing.Sequence[cv2.typing.MatLike], masks: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[ImageFeatures]: ...
|
||||
@_typing.overload
|
||||
def computeImageFeatures(featuresFinder: cv2.Feature2D, images: _typing.Sequence[cv2.UMat], masks: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[ImageFeatures]: ...
|
||||
|
||||
@_typing.overload
|
||||
def computeImageFeatures2(featuresFinder: cv2.Feature2D, image: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> ImageFeatures: ...
|
||||
@_typing.overload
|
||||
def computeImageFeatures2(featuresFinder: cv2.Feature2D, image: cv2.UMat, mask: cv2.UMat | None = ...) -> ImageFeatures: ...
|
||||
|
||||
@_typing.overload
|
||||
def createLaplacePyr(img: cv2.typing.MatLike, num_levels: int, pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
@_typing.overload
|
||||
def createLaplacePyr(img: cv2.UMat, num_levels: int, pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def createLaplacePyrGpu(img: cv2.typing.MatLike, num_levels: int, pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
@_typing.overload
|
||||
def createLaplacePyrGpu(img: cv2.UMat, num_levels: int, pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def createWeightMap(mask: cv2.typing.MatLike, sharpness: float, weight: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def createWeightMap(mask: cv2.UMat, sharpness: float, weight: cv2.UMat) -> cv2.UMat: ...
|
||||
|
||||
def focalsFromHomography(H: cv2.typing.MatLike, f0: float, f1: float, f0_ok: bool, f1_ok: bool) -> None: ...
|
||||
|
||||
def leaveBiggestComponent(features: _typing.Sequence[ImageFeatures], pairwise_matches: _typing.Sequence[MatchesInfo], conf_threshold: float) -> _typing.Sequence[int]: ...
|
||||
|
||||
def matchesGraphAsString(paths: _typing.Sequence[str], pairwise_matches: _typing.Sequence[MatchesInfo], conf_threshold: float) -> str: ...
|
||||
|
||||
@_typing.overload
|
||||
def normalizeUsingWeightMap(weight: cv2.typing.MatLike, src: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def normalizeUsingWeightMap(weight: cv2.UMat, src: cv2.UMat) -> cv2.UMat: ...
|
||||
|
||||
def overlapRoi(tl1: cv2.typing.Point, tl2: cv2.typing.Point, sz1: cv2.typing.Size, sz2: cv2.typing.Size, roi: cv2.typing.Rect) -> bool: ...
|
||||
|
||||
def restoreImageFromLaplacePyr(pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
def restoreImageFromLaplacePyrGpu(pyr: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def resultRoi(corners: _typing.Sequence[cv2.typing.Point], images: _typing.Sequence[cv2.UMat]) -> cv2.typing.Rect: ...
|
||||
@_typing.overload
|
||||
def resultRoi(corners: _typing.Sequence[cv2.typing.Point], sizes: _typing.Sequence[cv2.typing.Size]) -> cv2.typing.Rect: ...
|
||||
|
||||
def resultRoiIntersection(corners: _typing.Sequence[cv2.typing.Point], sizes: _typing.Sequence[cv2.typing.Size]) -> cv2.typing.Rect: ...
|
||||
|
||||
def resultTl(corners: _typing.Sequence[cv2.typing.Point]) -> cv2.typing.Point: ...
|
||||
|
||||
def selectRandomSubset(count: int, size: int, subset: _typing.Sequence[int]) -> None: ...
|
||||
|
||||
def stitchingLogLevel() -> int: ...
|
||||
|
||||
@_typing.overload
|
||||
def strip(params: cv2.gapi.ie.PyParams) -> cv2.gapi.GNetParam: ...
|
||||
@_typing.overload
|
||||
def strip(params: cv2.gapi.onnx.PyParams) -> cv2.gapi.GNetParam: ...
|
||||
@_typing.overload
|
||||
def strip(params: cv2.gapi.ov.PyParams) -> cv2.gapi.GNetParam: ...
|
||||
|
||||
def waveCorrect(rmats: _typing.Sequence[cv2.typing.MatLike], kind: WaveCorrectKind) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
|
||||
|
||||
530
venv/lib/python3.11/site-packages/cv2/dnn/__init__.pyi
Normal file
530
venv/lib/python3.11/site-packages/cv2/dnn/__init__.pyi
Normal file
@@ -0,0 +1,530 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import numpy
|
||||
import sys
|
||||
import typing as _typing
|
||||
if sys.version_info >= (3, 8):
|
||||
from typing import Protocol
|
||||
else:
|
||||
from typing_extensions import Protocol
|
||||
|
||||
|
||||
# Enumerations
|
||||
DNN_BACKEND_DEFAULT: int
|
||||
DNN_BACKEND_HALIDE: int
|
||||
DNN_BACKEND_INFERENCE_ENGINE: int
|
||||
DNN_BACKEND_OPENCV: int
|
||||
DNN_BACKEND_VKCOM: int
|
||||
DNN_BACKEND_CUDA: int
|
||||
DNN_BACKEND_WEBNN: int
|
||||
DNN_BACKEND_TIMVX: int
|
||||
DNN_BACKEND_CANN: int
|
||||
Backend = int
|
||||
"""One of [DNN_BACKEND_DEFAULT, DNN_BACKEND_HALIDE, DNN_BACKEND_INFERENCE_ENGINE, DNN_BACKEND_OPENCV, DNN_BACKEND_VKCOM, DNN_BACKEND_CUDA, DNN_BACKEND_WEBNN, DNN_BACKEND_TIMVX, DNN_BACKEND_CANN]"""
|
||||
|
||||
DNN_TARGET_CPU: int
|
||||
DNN_TARGET_OPENCL: int
|
||||
DNN_TARGET_OPENCL_FP16: int
|
||||
DNN_TARGET_MYRIAD: int
|
||||
DNN_TARGET_VULKAN: int
|
||||
DNN_TARGET_FPGA: int
|
||||
DNN_TARGET_CUDA: int
|
||||
DNN_TARGET_CUDA_FP16: int
|
||||
DNN_TARGET_HDDL: int
|
||||
DNN_TARGET_NPU: int
|
||||
DNN_TARGET_CPU_FP16: int
|
||||
Target = int
|
||||
"""One of [DNN_TARGET_CPU, DNN_TARGET_OPENCL, DNN_TARGET_OPENCL_FP16, DNN_TARGET_MYRIAD, DNN_TARGET_VULKAN, DNN_TARGET_FPGA, DNN_TARGET_CUDA, DNN_TARGET_CUDA_FP16, DNN_TARGET_HDDL, DNN_TARGET_NPU, DNN_TARGET_CPU_FP16]"""
|
||||
|
||||
DNN_LAYOUT_UNKNOWN: int
|
||||
DNN_LAYOUT_ND: int
|
||||
DNN_LAYOUT_NCHW: int
|
||||
DNN_LAYOUT_NCDHW: int
|
||||
DNN_LAYOUT_NHWC: int
|
||||
DNN_LAYOUT_NDHWC: int
|
||||
DNN_LAYOUT_PLANAR: int
|
||||
DataLayout = int
|
||||
"""One of [DNN_LAYOUT_UNKNOWN, DNN_LAYOUT_ND, DNN_LAYOUT_NCHW, DNN_LAYOUT_NCDHW, DNN_LAYOUT_NHWC, DNN_LAYOUT_NDHWC, DNN_LAYOUT_PLANAR]"""
|
||||
|
||||
DNN_PMODE_NULL: int
|
||||
DNN_PMODE_CROP_CENTER: int
|
||||
DNN_PMODE_LETTERBOX: int
|
||||
ImagePaddingMode = int
|
||||
"""One of [DNN_PMODE_NULL, DNN_PMODE_CROP_CENTER, DNN_PMODE_LETTERBOX]"""
|
||||
|
||||
SoftNMSMethod_SOFTNMS_LINEAR: int
|
||||
SOFT_NMSMETHOD_SOFTNMS_LINEAR: int
|
||||
SoftNMSMethod_SOFTNMS_GAUSSIAN: int
|
||||
SOFT_NMSMETHOD_SOFTNMS_GAUSSIAN: int
|
||||
SoftNMSMethod = int
|
||||
"""One of [SoftNMSMethod_SOFTNMS_LINEAR, SOFT_NMSMETHOD_SOFTNMS_LINEAR, SoftNMSMethod_SOFTNMS_GAUSSIAN, SOFT_NMSMETHOD_SOFTNMS_GAUSSIAN]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class DictValue:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, i: int) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, p: float) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, s: str) -> None: ...
|
||||
|
||||
def isInt(self) -> bool: ...
|
||||
|
||||
def isString(self) -> bool: ...
|
||||
|
||||
def isReal(self) -> bool: ...
|
||||
|
||||
def getIntValue(self, idx: int = ...) -> int: ...
|
||||
|
||||
def getRealValue(self, idx: int = ...) -> float: ...
|
||||
|
||||
def getStringValue(self, idx: int = ...) -> str: ...
|
||||
|
||||
|
||||
class Layer(cv2.Algorithm):
|
||||
blobs: _typing.Sequence[cv2.typing.MatLike]
|
||||
@property
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
def type(self) -> str: ...
|
||||
@property
|
||||
def preferableTarget(self) -> int: ...
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def finalize(self, inputs: _typing.Sequence[cv2.typing.MatLike], outputs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def finalize(self, inputs: _typing.Sequence[cv2.UMat], outputs: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
def run(self, inputs: _typing.Sequence[cv2.typing.MatLike], internals: _typing.Sequence[cv2.typing.MatLike], outputs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ...
|
||||
|
||||
def outputNameToIndex(self, outputName: str) -> int: ...
|
||||
|
||||
|
||||
class Net:
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@_typing.overload
|
||||
def readFromModelOptimizer(cls, xml: str, bin: str) -> Net: ...
|
||||
@classmethod
|
||||
@_typing.overload
|
||||
def readFromModelOptimizer(cls, bufferModelConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferWeights: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]) -> Net: ...
|
||||
|
||||
def empty(self) -> bool: ...
|
||||
|
||||
def dump(self) -> str: ...
|
||||
|
||||
def dumpToFile(self, path: str) -> None: ...
|
||||
|
||||
def dumpToPbtxt(self, path: str) -> None: ...
|
||||
|
||||
def getLayerId(self, layer: str) -> int: ...
|
||||
|
||||
def getLayerNames(self) -> _typing.Sequence[str]: ...
|
||||
|
||||
@_typing.overload
|
||||
def getLayer(self, layerId: int) -> Layer: ...
|
||||
@_typing.overload
|
||||
def getLayer(self, layerName: str) -> Layer: ...
|
||||
@_typing.overload
|
||||
def getLayer(self, layerId: cv2.typing.LayerId) -> Layer: ...
|
||||
|
||||
def connect(self, outPin: str, inpPin: str) -> None: ...
|
||||
|
||||
def setInputsNames(self, inputBlobNames: _typing.Sequence[str]) -> None: ...
|
||||
|
||||
def setInputShape(self, inputName: str, shape: cv2.typing.MatShape) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def forward(self, outputName: str = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def forward(self, outputBlobs: _typing.Sequence[cv2.typing.MatLike] | None = ..., outputName: str = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def forward(self, outputBlobs: _typing.Sequence[cv2.UMat] | None = ..., outputName: str = ...) -> _typing.Sequence[cv2.UMat]: ...
|
||||
@_typing.overload
|
||||
def forward(self, outBlobNames: _typing.Sequence[str], outputBlobs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def forward(self, outBlobNames: _typing.Sequence[str], outputBlobs: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
def forwardAsync(self, outputName: str = ...) -> cv2.AsyncArray: ...
|
||||
|
||||
def forwardAndRetrieve(self, outBlobNames: _typing.Sequence[str]) -> _typing.Sequence[_typing.Sequence[cv2.typing.MatLike]]: ...
|
||||
|
||||
@_typing.overload
|
||||
def quantize(self, calibData: _typing.Sequence[cv2.typing.MatLike], inputsDtype: int, outputsDtype: int, perChannel: bool = ...) -> Net: ...
|
||||
@_typing.overload
|
||||
def quantize(self, calibData: _typing.Sequence[cv2.UMat], inputsDtype: int, outputsDtype: int, perChannel: bool = ...) -> Net: ...
|
||||
|
||||
def getInputDetails(self) -> tuple[_typing.Sequence[float], _typing.Sequence[int]]: ...
|
||||
|
||||
def getOutputDetails(self) -> tuple[_typing.Sequence[float], _typing.Sequence[int]]: ...
|
||||
|
||||
def setHalideScheduler(self, scheduler: str) -> None: ...
|
||||
|
||||
def setPreferableBackend(self, backendId: int) -> None: ...
|
||||
|
||||
def setPreferableTarget(self, targetId: int) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def setInput(self, blob: cv2.typing.MatLike, name: str = ..., scalefactor: float = ..., mean: cv2.typing.Scalar = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def setInput(self, blob: cv2.UMat, name: str = ..., scalefactor: float = ..., mean: cv2.typing.Scalar = ...) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def setParam(self, layer: int, numParam: int, blob: cv2.typing.MatLike) -> None: ...
|
||||
@_typing.overload
|
||||
def setParam(self, layerName: str, numParam: int, blob: cv2.typing.MatLike) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def getParam(self, layer: int, numParam: int = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def getParam(self, layerName: str, numParam: int = ...) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getUnconnectedOutLayers(self) -> _typing.Sequence[int]: ...
|
||||
|
||||
def getUnconnectedOutLayersNames(self) -> _typing.Sequence[str]: ...
|
||||
|
||||
@_typing.overload
|
||||
def getLayersShapes(self, netInputShapes: _typing.Sequence[cv2.typing.MatShape]) -> tuple[_typing.Sequence[int], _typing.Sequence[_typing.Sequence[cv2.typing.MatShape]], _typing.Sequence[_typing.Sequence[cv2.typing.MatShape]]]: ...
|
||||
@_typing.overload
|
||||
def getLayersShapes(self, netInputShape: cv2.typing.MatShape) -> tuple[_typing.Sequence[int], _typing.Sequence[_typing.Sequence[cv2.typing.MatShape]], _typing.Sequence[_typing.Sequence[cv2.typing.MatShape]]]: ...
|
||||
|
||||
@_typing.overload
|
||||
def getFLOPS(self, netInputShapes: _typing.Sequence[cv2.typing.MatShape]) -> int: ...
|
||||
@_typing.overload
|
||||
def getFLOPS(self, netInputShape: cv2.typing.MatShape) -> int: ...
|
||||
@_typing.overload
|
||||
def getFLOPS(self, layerId: int, netInputShapes: _typing.Sequence[cv2.typing.MatShape]) -> int: ...
|
||||
@_typing.overload
|
||||
def getFLOPS(self, layerId: int, netInputShape: cv2.typing.MatShape) -> int: ...
|
||||
|
||||
def getLayerTypes(self) -> _typing.Sequence[str]: ...
|
||||
|
||||
def getLayersCount(self, layerType: str) -> int: ...
|
||||
|
||||
@_typing.overload
|
||||
def getMemoryConsumption(self, netInputShape: cv2.typing.MatShape) -> tuple[int, int]: ...
|
||||
@_typing.overload
|
||||
def getMemoryConsumption(self, layerId: int, netInputShapes: _typing.Sequence[cv2.typing.MatShape]) -> tuple[int, int]: ...
|
||||
@_typing.overload
|
||||
def getMemoryConsumption(self, layerId: int, netInputShape: cv2.typing.MatShape) -> tuple[int, int]: ...
|
||||
|
||||
def enableFusion(self, fusion: bool) -> None: ...
|
||||
|
||||
def enableWinograd(self, useWinograd: bool) -> None: ...
|
||||
|
||||
def getPerfProfile(self) -> tuple[int, _typing.Sequence[float]]: ...
|
||||
|
||||
|
||||
class Image2BlobParams:
|
||||
scalefactor: cv2.typing.Scalar
|
||||
size: cv2.typing.Size
|
||||
mean: cv2.typing.Scalar
|
||||
swapRB: bool
|
||||
ddepth: int
|
||||
datalayout: DataLayout
|
||||
paddingmode: ImagePaddingMode
|
||||
borderValue: cv2.typing.Scalar
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, scalefactor: cv2.typing.Scalar, size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., ddepth: int = ..., datalayout: DataLayout = ..., mode: ImagePaddingMode = ..., borderValue: cv2.typing.Scalar = ...) -> None: ...
|
||||
|
||||
def blobRectToImageRect(self, rBlob: cv2.typing.Rect, size: cv2.typing.Size) -> cv2.typing.Rect: ...
|
||||
|
||||
def blobRectsToImageRects(self, rBlob: _typing.Sequence[cv2.typing.Rect], size: cv2.typing.Size) -> _typing.Sequence[cv2.typing.Rect]: ...
|
||||
|
||||
|
||||
class Model:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, model: str, config: str = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, network: Net) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def setInputSize(self, size: cv2.typing.Size) -> Model: ...
|
||||
@_typing.overload
|
||||
def setInputSize(self, width: int, height: int) -> Model: ...
|
||||
|
||||
def setInputMean(self, mean: cv2.typing.Scalar) -> Model: ...
|
||||
|
||||
def setInputScale(self, scale: cv2.typing.Scalar) -> Model: ...
|
||||
|
||||
def setInputCrop(self, crop: bool) -> Model: ...
|
||||
|
||||
def setInputSwapRB(self, swapRB: bool) -> Model: ...
|
||||
|
||||
def setOutputNames(self, outNames: _typing.Sequence[str]) -> Model: ...
|
||||
|
||||
def setInputParams(self, scale: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ...) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def predict(self, frame: cv2.typing.MatLike, outs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def predict(self, frame: cv2.UMat, outs: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
def setPreferableBackend(self, backendId: Backend) -> Model: ...
|
||||
|
||||
def setPreferableTarget(self, targetId: Target) -> Model: ...
|
||||
|
||||
def enableWinograd(self, useWinograd: bool) -> Model: ...
|
||||
|
||||
|
||||
class ClassificationModel(Model):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, model: str, config: str = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, network: Net) -> None: ...
|
||||
|
||||
def setEnableSoftmaxPostProcessing(self, enable: bool) -> ClassificationModel: ...
|
||||
|
||||
def getEnableSoftmaxPostProcessing(self) -> bool: ...
|
||||
|
||||
@_typing.overload
|
||||
def classify(self, frame: cv2.typing.MatLike) -> tuple[int, float]: ...
|
||||
@_typing.overload
|
||||
def classify(self, frame: cv2.UMat) -> tuple[int, float]: ...
|
||||
|
||||
|
||||
class KeypointsModel(Model):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, model: str, config: str = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, network: Net) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def estimate(self, frame: cv2.typing.MatLike, thresh: float = ...) -> _typing.Sequence[cv2.typing.Point2f]: ...
|
||||
@_typing.overload
|
||||
def estimate(self, frame: cv2.UMat, thresh: float = ...) -> _typing.Sequence[cv2.typing.Point2f]: ...
|
||||
|
||||
|
||||
class SegmentationModel(Model):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, model: str, config: str = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, network: Net) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def segment(self, frame: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def segment(self, frame: cv2.UMat, mask: cv2.UMat | None = ...) -> cv2.UMat: ...
|
||||
|
||||
|
||||
class DetectionModel(Model):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, model: str, config: str = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, network: Net) -> None: ...
|
||||
|
||||
def setNmsAcrossClasses(self, value: bool) -> DetectionModel: ...
|
||||
|
||||
def getNmsAcrossClasses(self) -> bool: ...
|
||||
|
||||
@_typing.overload
|
||||
def detect(self, frame: cv2.typing.MatLike, confThreshold: float = ..., nmsThreshold: float = ...) -> tuple[_typing.Sequence[int], _typing.Sequence[float], _typing.Sequence[cv2.typing.Rect]]: ...
|
||||
@_typing.overload
|
||||
def detect(self, frame: cv2.UMat, confThreshold: float = ..., nmsThreshold: float = ...) -> tuple[_typing.Sequence[int], _typing.Sequence[float], _typing.Sequence[cv2.typing.Rect]]: ...
|
||||
|
||||
|
||||
class TextRecognitionModel(Model):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, network: Net) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, model: str, config: str = ...) -> None: ...
|
||||
|
||||
def setDecodeType(self, decodeType: str) -> TextRecognitionModel: ...
|
||||
|
||||
def getDecodeType(self) -> str: ...
|
||||
|
||||
def setDecodeOptsCTCPrefixBeamSearch(self, beamSize: int, vocPruneSize: int = ...) -> TextRecognitionModel: ...
|
||||
|
||||
def setVocabulary(self, vocabulary: _typing.Sequence[str]) -> TextRecognitionModel: ...
|
||||
|
||||
def getVocabulary(self) -> _typing.Sequence[str]: ...
|
||||
|
||||
@_typing.overload
|
||||
def recognize(self, frame: cv2.typing.MatLike) -> str: ...
|
||||
@_typing.overload
|
||||
def recognize(self, frame: cv2.UMat) -> str: ...
|
||||
@_typing.overload
|
||||
def recognize(self, frame: cv2.typing.MatLike, roiRects: _typing.Sequence[cv2.typing.MatLike]) -> _typing.Sequence[str]: ...
|
||||
@_typing.overload
|
||||
def recognize(self, frame: cv2.UMat, roiRects: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[str]: ...
|
||||
|
||||
|
||||
class TextDetectionModel(Model):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def detect(self, frame: cv2.typing.MatLike) -> tuple[_typing.Sequence[_typing.Sequence[cv2.typing.Point]], _typing.Sequence[float]]: ...
|
||||
@_typing.overload
|
||||
def detect(self, frame: cv2.UMat) -> tuple[_typing.Sequence[_typing.Sequence[cv2.typing.Point]], _typing.Sequence[float]]: ...
|
||||
@_typing.overload
|
||||
def detect(self, frame: cv2.typing.MatLike) -> _typing.Sequence[_typing.Sequence[cv2.typing.Point]]: ...
|
||||
@_typing.overload
|
||||
def detect(self, frame: cv2.UMat) -> _typing.Sequence[_typing.Sequence[cv2.typing.Point]]: ...
|
||||
|
||||
@_typing.overload
|
||||
def detectTextRectangles(self, frame: cv2.typing.MatLike) -> tuple[_typing.Sequence[cv2.typing.RotatedRect], _typing.Sequence[float]]: ...
|
||||
@_typing.overload
|
||||
def detectTextRectangles(self, frame: cv2.UMat) -> tuple[_typing.Sequence[cv2.typing.RotatedRect], _typing.Sequence[float]]: ...
|
||||
@_typing.overload
|
||||
def detectTextRectangles(self, frame: cv2.typing.MatLike) -> _typing.Sequence[cv2.typing.RotatedRect]: ...
|
||||
@_typing.overload
|
||||
def detectTextRectangles(self, frame: cv2.UMat) -> _typing.Sequence[cv2.typing.RotatedRect]: ...
|
||||
|
||||
|
||||
class TextDetectionModel_EAST(TextDetectionModel):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, network: Net) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, model: str, config: str = ...) -> None: ...
|
||||
|
||||
def setConfidenceThreshold(self, confThreshold: float) -> TextDetectionModel_EAST: ...
|
||||
|
||||
def getConfidenceThreshold(self) -> float: ...
|
||||
|
||||
def setNMSThreshold(self, nmsThreshold: float) -> TextDetectionModel_EAST: ...
|
||||
|
||||
def getNMSThreshold(self) -> float: ...
|
||||
|
||||
|
||||
class TextDetectionModel_DB(TextDetectionModel):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, network: Net) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, model: str, config: str = ...) -> None: ...
|
||||
|
||||
def setBinaryThreshold(self, binaryThreshold: float) -> TextDetectionModel_DB: ...
|
||||
|
||||
def getBinaryThreshold(self) -> float: ...
|
||||
|
||||
def setPolygonThreshold(self, polygonThreshold: float) -> TextDetectionModel_DB: ...
|
||||
|
||||
def getPolygonThreshold(self) -> float: ...
|
||||
|
||||
def setUnclipRatio(self, unclipRatio: float) -> TextDetectionModel_DB: ...
|
||||
|
||||
def getUnclipRatio(self) -> float: ...
|
||||
|
||||
def setMaxCandidates(self, maxCandidates: int) -> TextDetectionModel_DB: ...
|
||||
|
||||
def getMaxCandidates(self) -> int: ...
|
||||
|
||||
|
||||
class LayerProtocol(Protocol):
|
||||
# Functions
|
||||
def __init__(self, params: dict[str, DictValue], blobs: _typing.Sequence[cv2.typing.MatLike]) -> None: ...
|
||||
|
||||
def getMemoryShapes(self, inputs: _typing.Sequence[_typing.Sequence[int]]) -> _typing.Sequence[_typing.Sequence[int]]: ...
|
||||
|
||||
def forward(self, inputs: _typing.Sequence[cv2.typing.MatLike]) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
def NMSBoxes(bboxes: _typing.Sequence[cv2.typing.Rect2d], scores: _typing.Sequence[float], score_threshold: float, nms_threshold: float, eta: float = ..., top_k: int = ...) -> _typing.Sequence[int]: ...
|
||||
|
||||
def NMSBoxesBatched(bboxes: _typing.Sequence[cv2.typing.Rect2d], scores: _typing.Sequence[float], class_ids: _typing.Sequence[int], score_threshold: float, nms_threshold: float, eta: float = ..., top_k: int = ...) -> _typing.Sequence[int]: ...
|
||||
|
||||
def NMSBoxesRotated(bboxes: _typing.Sequence[cv2.typing.RotatedRect], scores: _typing.Sequence[float], score_threshold: float, nms_threshold: float, eta: float = ..., top_k: int = ...) -> _typing.Sequence[int]: ...
|
||||
|
||||
@_typing.overload
|
||||
def blobFromImage(image: cv2.typing.MatLike, scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def blobFromImage(image: cv2.UMat, scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ...) -> cv2.typing.MatLike: ...
|
||||
|
||||
@_typing.overload
|
||||
def blobFromImageWithParams(image: cv2.typing.MatLike, param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def blobFromImageWithParams(image: cv2.UMat, param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def blobFromImageWithParams(image: cv2.typing.MatLike, blob: cv2.typing.MatLike | None = ..., param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def blobFromImageWithParams(image: cv2.UMat, blob: cv2.UMat | None = ..., param: Image2BlobParams = ...) -> cv2.UMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def blobFromImages(images: _typing.Sequence[cv2.typing.MatLike], scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def blobFromImages(images: _typing.Sequence[cv2.UMat], scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ...) -> cv2.typing.MatLike: ...
|
||||
|
||||
@_typing.overload
|
||||
def blobFromImagesWithParams(images: _typing.Sequence[cv2.typing.MatLike], param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def blobFromImagesWithParams(images: _typing.Sequence[cv2.UMat], param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def blobFromImagesWithParams(images: _typing.Sequence[cv2.typing.MatLike], blob: cv2.typing.MatLike | None = ..., param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def blobFromImagesWithParams(images: _typing.Sequence[cv2.UMat], blob: cv2.UMat | None = ..., param: Image2BlobParams = ...) -> cv2.UMat: ...
|
||||
|
||||
def getAvailableTargets(be: Backend) -> _typing.Sequence[Target]: ...
|
||||
|
||||
@_typing.overload
|
||||
def imagesFromBlob(blob_: cv2.typing.MatLike, images_: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def imagesFromBlob(blob_: cv2.typing.MatLike, images_: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def readNet(model: str, config: str = ..., framework: str = ...) -> Net: ...
|
||||
@_typing.overload
|
||||
def readNet(framework: str, bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]] = ...) -> Net: ...
|
||||
|
||||
@_typing.overload
|
||||
def readNetFromCaffe(prototxt: str, caffeModel: str = ...) -> Net: ...
|
||||
@_typing.overload
|
||||
def readNetFromCaffe(bufferProto: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]] = ...) -> Net: ...
|
||||
|
||||
@_typing.overload
|
||||
def readNetFromDarknet(cfgFile: str, darknetModel: str = ...) -> Net: ...
|
||||
@_typing.overload
|
||||
def readNetFromDarknet(bufferCfg: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]] = ...) -> Net: ...
|
||||
|
||||
@_typing.overload
|
||||
def readNetFromModelOptimizer(xml: str, bin: str = ...) -> Net: ...
|
||||
@_typing.overload
|
||||
def readNetFromModelOptimizer(bufferModelConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferWeights: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]) -> Net: ...
|
||||
|
||||
@_typing.overload
|
||||
def readNetFromONNX(onnxFile: str) -> Net: ...
|
||||
@_typing.overload
|
||||
def readNetFromONNX(buffer: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]) -> Net: ...
|
||||
|
||||
@_typing.overload
|
||||
def readNetFromTFLite(model: str) -> Net: ...
|
||||
@_typing.overload
|
||||
def readNetFromTFLite(bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]) -> Net: ...
|
||||
|
||||
@_typing.overload
|
||||
def readNetFromTensorflow(model: str, config: str = ...) -> Net: ...
|
||||
@_typing.overload
|
||||
def readNetFromTensorflow(bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]] = ...) -> Net: ...
|
||||
|
||||
def readNetFromTorch(model: str, isBinary: bool = ..., evaluate: bool = ...) -> Net: ...
|
||||
|
||||
def readTensorFromONNX(path: str) -> cv2.typing.MatLike: ...
|
||||
|
||||
def readTorchBlob(filename: str, isBinary: bool = ...) -> cv2.typing.MatLike: ...
|
||||
|
||||
def shrinkCaffeModel(src: str, dst: str, layersTypes: _typing.Sequence[str] = ...) -> None: ...
|
||||
|
||||
def softNMSBoxes(bboxes: _typing.Sequence[cv2.typing.Rect], scores: _typing.Sequence[float], score_threshold: float, nms_threshold: float, top_k: int = ..., sigma: float = ..., method: SoftNMSMethod = ...) -> tuple[_typing.Sequence[float], _typing.Sequence[int]]: ...
|
||||
|
||||
def writeTextGraph(model: str, output: str) -> None: ...
|
||||
|
||||
|
||||
79
venv/lib/python3.11/site-packages/cv2/fisheye/__init__.pyi
Normal file
79
venv/lib/python3.11/site-packages/cv2/fisheye/__init__.pyi
Normal file
@@ -0,0 +1,79 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Enumerations
|
||||
CALIB_USE_INTRINSIC_GUESS: int
|
||||
CALIB_RECOMPUTE_EXTRINSIC: int
|
||||
CALIB_CHECK_COND: int
|
||||
CALIB_FIX_SKEW: int
|
||||
CALIB_FIX_K1: int
|
||||
CALIB_FIX_K2: int
|
||||
CALIB_FIX_K3: int
|
||||
CALIB_FIX_K4: int
|
||||
CALIB_FIX_INTRINSIC: int
|
||||
CALIB_FIX_PRINCIPAL_POINT: int
|
||||
CALIB_ZERO_DISPARITY: int
|
||||
CALIB_FIX_FOCAL_LENGTH: int
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def calibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints: _typing.Sequence[cv2.typing.MatLike], image_size: cv2.typing.Size, K: cv2.typing.MatLike, D: cv2.typing.MatLike, rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ...
|
||||
@_typing.overload
|
||||
def calibrate(objectPoints: _typing.Sequence[cv2.UMat], imagePoints: _typing.Sequence[cv2.UMat], image_size: cv2.typing.Size, K: cv2.UMat, D: cv2.UMat, rvecs: _typing.Sequence[cv2.UMat] | None = ..., tvecs: _typing.Sequence[cv2.UMat] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.UMat, cv2.UMat, _typing.Sequence[cv2.UMat], _typing.Sequence[cv2.UMat]]: ...
|
||||
|
||||
@_typing.overload
|
||||
def distortPoints(undistorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, distorted: cv2.typing.MatLike | None = ..., alpha: float = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def distortPoints(undistorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, distorted: cv2.UMat | None = ..., alpha: float = ...) -> cv2.UMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def estimateNewCameraMatrixForUndistortRectify(K: cv2.typing.MatLike, D: cv2.typing.MatLike, image_size: cv2.typing.Size, R: cv2.typing.MatLike, P: cv2.typing.MatLike | None = ..., balance: float = ..., new_size: cv2.typing.Size = ..., fov_scale: float = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def estimateNewCameraMatrixForUndistortRectify(K: cv2.UMat, D: cv2.UMat, image_size: cv2.typing.Size, R: cv2.UMat, P: cv2.UMat | None = ..., balance: float = ..., new_size: cv2.typing.Size = ..., fov_scale: float = ...) -> cv2.UMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def initUndistortRectifyMap(K: cv2.typing.MatLike, D: cv2.typing.MatLike, R: cv2.typing.MatLike, P: cv2.typing.MatLike, size: cv2.typing.Size, m1type: int, map1: cv2.typing.MatLike | None = ..., map2: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def initUndistortRectifyMap(K: cv2.UMat, D: cv2.UMat, R: cv2.UMat, P: cv2.UMat, size: cv2.typing.Size, m1type: int, map1: cv2.UMat | None = ..., map2: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def projectPoints(objectPoints: cv2.typing.MatLike, rvec: cv2.typing.MatLike, tvec: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike | None = ..., alpha: float = ..., jacobian: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def projectPoints(objectPoints: cv2.UMat, rvec: cv2.UMat, tvec: cv2.UMat, K: cv2.UMat, D: cv2.UMat, imagePoints: cv2.UMat | None = ..., alpha: float = ..., jacobian: cv2.UMat | None = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def solvePnP(objectPoints: cv2.typing.MatLike, imagePoints: cv2.typing.MatLike, cameraMatrix: cv2.typing.MatLike, distCoeffs: cv2.typing.MatLike, rvec: cv2.typing.MatLike | None = ..., tvec: cv2.typing.MatLike | None = ..., useExtrinsicGuess: bool = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def solvePnP(objectPoints: cv2.UMat, imagePoints: cv2.UMat, cameraMatrix: cv2.UMat, distCoeffs: cv2.UMat, rvec: cv2.UMat | None = ..., tvec: cv2.UMat | None = ..., useExtrinsicGuess: bool = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[bool, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def stereoCalibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], K1: cv2.typing.MatLike, D1: cv2.typing.MatLike, K2: cv2.typing.MatLike, D2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike | None = ..., T: cv2.typing.MatLike | None = ..., rvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., tvecs: _typing.Sequence[cv2.typing.MatLike] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, _typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ...
|
||||
@_typing.overload
|
||||
def stereoCalibrate(objectPoints: _typing.Sequence[cv2.UMat], imagePoints1: _typing.Sequence[cv2.UMat], imagePoints2: _typing.Sequence[cv2.UMat], K1: cv2.UMat, D1: cv2.UMat, K2: cv2.UMat, D2: cv2.UMat, imageSize: cv2.typing.Size, R: cv2.UMat | None = ..., T: cv2.UMat | None = ..., rvecs: _typing.Sequence[cv2.UMat] | None = ..., tvecs: _typing.Sequence[cv2.UMat] | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, _typing.Sequence[cv2.UMat], _typing.Sequence[cv2.UMat]]: ...
|
||||
@_typing.overload
|
||||
def stereoCalibrate(objectPoints: _typing.Sequence[cv2.typing.MatLike], imagePoints1: _typing.Sequence[cv2.typing.MatLike], imagePoints2: _typing.Sequence[cv2.typing.MatLike], K1: cv2.typing.MatLike, D1: cv2.typing.MatLike, K2: cv2.typing.MatLike, D2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike | None = ..., T: cv2.typing.MatLike | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def stereoCalibrate(objectPoints: _typing.Sequence[cv2.UMat], imagePoints1: _typing.Sequence[cv2.UMat], imagePoints2: _typing.Sequence[cv2.UMat], K1: cv2.UMat, D1: cv2.UMat, K2: cv2.UMat, D2: cv2.UMat, imageSize: cv2.typing.Size, R: cv2.UMat | None = ..., T: cv2.UMat | None = ..., flags: int = ..., criteria: cv2.typing.TermCriteria = ...) -> tuple[float, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def stereoRectify(K1: cv2.typing.MatLike, D1: cv2.typing.MatLike, K2: cv2.typing.MatLike, D2: cv2.typing.MatLike, imageSize: cv2.typing.Size, R: cv2.typing.MatLike, tvec: cv2.typing.MatLike, flags: int, R1: cv2.typing.MatLike | None = ..., R2: cv2.typing.MatLike | None = ..., P1: cv2.typing.MatLike | None = ..., P2: cv2.typing.MatLike | None = ..., Q: cv2.typing.MatLike | None = ..., newImageSize: cv2.typing.Size = ..., balance: float = ..., fov_scale: float = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def stereoRectify(K1: cv2.UMat, D1: cv2.UMat, K2: cv2.UMat, D2: cv2.UMat, imageSize: cv2.typing.Size, R: cv2.UMat, tvec: cv2.UMat, flags: int, R1: cv2.UMat | None = ..., R2: cv2.UMat | None = ..., P1: cv2.UMat | None = ..., P2: cv2.UMat | None = ..., Q: cv2.UMat | None = ..., newImageSize: cv2.typing.Size = ..., balance: float = ..., fov_scale: float = ...) -> tuple[cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def undistortImage(distorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, undistorted: cv2.typing.MatLike | None = ..., Knew: cv2.typing.MatLike | None = ..., new_size: cv2.typing.Size = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def undistortImage(distorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, undistorted: cv2.UMat | None = ..., Knew: cv2.UMat | None = ..., new_size: cv2.typing.Size = ...) -> cv2.UMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def undistortPoints(distorted: cv2.typing.MatLike, K: cv2.typing.MatLike, D: cv2.typing.MatLike, undistorted: cv2.typing.MatLike | None = ..., R: cv2.typing.MatLike | None = ..., P: cv2.typing.MatLike | None = ..., criteria: cv2.typing.TermCriteria = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def undistortPoints(distorted: cv2.UMat, K: cv2.UMat, D: cv2.UMat, undistorted: cv2.UMat | None = ..., R: cv2.UMat | None = ..., P: cv2.UMat | None = ..., criteria: cv2.typing.TermCriteria = ...) -> cv2.UMat: ...
|
||||
|
||||
|
||||
64
venv/lib/python3.11/site-packages/cv2/flann/__init__.pyi
Normal file
64
venv/lib/python3.11/site-packages/cv2/flann/__init__.pyi
Normal file
@@ -0,0 +1,64 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Enumerations
|
||||
FLANN_INDEX_TYPE_8U: int
|
||||
FLANN_INDEX_TYPE_8S: int
|
||||
FLANN_INDEX_TYPE_16U: int
|
||||
FLANN_INDEX_TYPE_16S: int
|
||||
FLANN_INDEX_TYPE_32S: int
|
||||
FLANN_INDEX_TYPE_32F: int
|
||||
FLANN_INDEX_TYPE_64F: int
|
||||
FLANN_INDEX_TYPE_STRING: int
|
||||
FLANN_INDEX_TYPE_BOOL: int
|
||||
FLANN_INDEX_TYPE_ALGORITHM: int
|
||||
LAST_VALUE_FLANN_INDEX_TYPE: int
|
||||
FlannIndexType = int
|
||||
"""One of [FLANN_INDEX_TYPE_8U, FLANN_INDEX_TYPE_8S, FLANN_INDEX_TYPE_16U, FLANN_INDEX_TYPE_16S, FLANN_INDEX_TYPE_32S, FLANN_INDEX_TYPE_32F, FLANN_INDEX_TYPE_64F, FLANN_INDEX_TYPE_STRING, FLANN_INDEX_TYPE_BOOL, FLANN_INDEX_TYPE_ALGORITHM, LAST_VALUE_FLANN_INDEX_TYPE]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class Index:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, features: cv2.typing.MatLike, params: cv2.typing.IndexParams, distType: int = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, features: cv2.UMat, params: cv2.typing.IndexParams, distType: int = ...) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def build(self, features: cv2.typing.MatLike, params: cv2.typing.IndexParams, distType: int = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def build(self, features: cv2.UMat, params: cv2.typing.IndexParams, distType: int = ...) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def knnSearch(self, query: cv2.typing.MatLike, knn: int, indices: cv2.typing.MatLike | None = ..., dists: cv2.typing.MatLike | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def knnSearch(self, query: cv2.UMat, knn: int, indices: cv2.UMat | None = ..., dists: cv2.UMat | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def radiusSearch(self, query: cv2.typing.MatLike, radius: float, maxResults: int, indices: cv2.typing.MatLike | None = ..., dists: cv2.typing.MatLike | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[int, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def radiusSearch(self, query: cv2.UMat, radius: float, maxResults: int, indices: cv2.UMat | None = ..., dists: cv2.UMat | None = ..., params: cv2.typing.SearchParams = ...) -> tuple[int, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
def save(self, filename: str) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def load(self, features: cv2.typing.MatLike, filename: str) -> bool: ...
|
||||
@_typing.overload
|
||||
def load(self, features: cv2.UMat, filename: str) -> bool: ...
|
||||
|
||||
def release(self) -> None: ...
|
||||
|
||||
def getDistance(self) -> int: ...
|
||||
|
||||
def getAlgorithm(self) -> int: ...
|
||||
|
||||
|
||||
|
||||
323
venv/lib/python3.11/site-packages/cv2/gapi/__init__.py
Normal file
323
venv/lib/python3.11/site-packages/cv2/gapi/__init__.py
Normal file
@@ -0,0 +1,323 @@
|
||||
__all__ = ['op', 'kernel']
|
||||
|
||||
import sys
|
||||
import cv2 as cv
|
||||
|
||||
# NB: Register function in specific module
|
||||
def register(mname):
|
||||
def parameterized(func):
|
||||
sys.modules[mname].__dict__[func.__name__] = func
|
||||
return func
|
||||
return parameterized
|
||||
|
||||
|
||||
@register('cv2.gapi')
|
||||
def networks(*args):
|
||||
return cv.gapi_GNetPackage(list(map(cv.detail.strip, args)))
|
||||
|
||||
|
||||
@register('cv2.gapi')
|
||||
def compile_args(*args):
|
||||
return list(map(cv.GCompileArg, args))
|
||||
|
||||
|
||||
@register('cv2')
|
||||
def GIn(*args):
|
||||
return [*args]
|
||||
|
||||
|
||||
@register('cv2')
|
||||
def GOut(*args):
|
||||
return [*args]
|
||||
|
||||
|
||||
@register('cv2')
|
||||
def gin(*args):
|
||||
return [*args]
|
||||
|
||||
|
||||
@register('cv2.gapi')
|
||||
def descr_of(*args):
|
||||
return [*args]
|
||||
|
||||
|
||||
@register('cv2')
|
||||
class GOpaque():
|
||||
# NB: Inheritance from c++ class cause segfault.
|
||||
# So just aggregate cv.GOpaqueT instead of inheritance
|
||||
def __new__(cls, argtype):
|
||||
return cv.GOpaqueT(argtype)
|
||||
|
||||
class Bool():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_BOOL)
|
||||
|
||||
class Int():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_INT)
|
||||
|
||||
class Int64():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_INT64)
|
||||
|
||||
class UInt64():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_UINT64)
|
||||
|
||||
class Double():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_DOUBLE)
|
||||
|
||||
class Float():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_FLOAT)
|
||||
|
||||
class String():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_STRING)
|
||||
|
||||
class Point():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_POINT)
|
||||
|
||||
class Point2f():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_POINT2F)
|
||||
|
||||
class Point3f():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_POINT3F)
|
||||
|
||||
class Size():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_SIZE)
|
||||
|
||||
class Rect():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_RECT)
|
||||
|
||||
class Prim():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_DRAW_PRIM)
|
||||
|
||||
class Any():
|
||||
def __new__(self):
|
||||
return cv.GOpaqueT(cv.gapi.CV_ANY)
|
||||
|
||||
@register('cv2')
|
||||
class GArray():
|
||||
# NB: Inheritance from c++ class cause segfault.
|
||||
# So just aggregate cv.GArrayT instead of inheritance
|
||||
def __new__(cls, argtype):
|
||||
return cv.GArrayT(argtype)
|
||||
|
||||
class Bool():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_BOOL)
|
||||
|
||||
class Int():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_INT)
|
||||
|
||||
class Int64():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_INT64)
|
||||
|
||||
class UInt64():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_UINT64)
|
||||
|
||||
class Double():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_DOUBLE)
|
||||
|
||||
class Float():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_FLOAT)
|
||||
|
||||
class String():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_STRING)
|
||||
|
||||
class Point():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_POINT)
|
||||
|
||||
class Point2f():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_POINT2F)
|
||||
|
||||
class Point3f():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_POINT3F)
|
||||
|
||||
class Size():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_SIZE)
|
||||
|
||||
class Rect():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_RECT)
|
||||
|
||||
class Scalar():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_SCALAR)
|
||||
|
||||
class Mat():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_MAT)
|
||||
|
||||
class GMat():
|
||||
def __new__(self):
|
||||
return cv.GArrayT(cv.gapi.CV_GMAT)
|
||||
|
||||
class Prim():
|
||||
def __new__(self):
|
||||
return cv.GArray(cv.gapi.CV_DRAW_PRIM)
|
||||
|
||||
class Any():
|
||||
def __new__(self):
|
||||
return cv.GArray(cv.gapi.CV_ANY)
|
||||
|
||||
|
||||
# NB: Top lvl decorator takes arguments
|
||||
def op(op_id, in_types, out_types):
|
||||
|
||||
garray_types= {
|
||||
cv.GArray.Bool: cv.gapi.CV_BOOL,
|
||||
cv.GArray.Int: cv.gapi.CV_INT,
|
||||
cv.GArray.Int64: cv.gapi.CV_INT64,
|
||||
cv.GArray.UInt64: cv.gapi.CV_UINT64,
|
||||
cv.GArray.Double: cv.gapi.CV_DOUBLE,
|
||||
cv.GArray.Float: cv.gapi.CV_FLOAT,
|
||||
cv.GArray.String: cv.gapi.CV_STRING,
|
||||
cv.GArray.Point: cv.gapi.CV_POINT,
|
||||
cv.GArray.Point2f: cv.gapi.CV_POINT2F,
|
||||
cv.GArray.Point3f: cv.gapi.CV_POINT3F,
|
||||
cv.GArray.Size: cv.gapi.CV_SIZE,
|
||||
cv.GArray.Rect: cv.gapi.CV_RECT,
|
||||
cv.GArray.Scalar: cv.gapi.CV_SCALAR,
|
||||
cv.GArray.Mat: cv.gapi.CV_MAT,
|
||||
cv.GArray.GMat: cv.gapi.CV_GMAT,
|
||||
cv.GArray.Prim: cv.gapi.CV_DRAW_PRIM,
|
||||
cv.GArray.Any: cv.gapi.CV_ANY
|
||||
}
|
||||
|
||||
gopaque_types= {
|
||||
cv.GOpaque.Size: cv.gapi.CV_SIZE,
|
||||
cv.GOpaque.Rect: cv.gapi.CV_RECT,
|
||||
cv.GOpaque.Bool: cv.gapi.CV_BOOL,
|
||||
cv.GOpaque.Int: cv.gapi.CV_INT,
|
||||
cv.GOpaque.Int64: cv.gapi.CV_INT64,
|
||||
cv.GOpaque.UInt64: cv.gapi.CV_UINT64,
|
||||
cv.GOpaque.Double: cv.gapi.CV_DOUBLE,
|
||||
cv.GOpaque.Float: cv.gapi.CV_FLOAT,
|
||||
cv.GOpaque.String: cv.gapi.CV_STRING,
|
||||
cv.GOpaque.Point: cv.gapi.CV_POINT,
|
||||
cv.GOpaque.Point2f: cv.gapi.CV_POINT2F,
|
||||
cv.GOpaque.Point3f: cv.gapi.CV_POINT3F,
|
||||
cv.GOpaque.Size: cv.gapi.CV_SIZE,
|
||||
cv.GOpaque.Rect: cv.gapi.CV_RECT,
|
||||
cv.GOpaque.Prim: cv.gapi.CV_DRAW_PRIM,
|
||||
cv.GOpaque.Any: cv.gapi.CV_ANY
|
||||
}
|
||||
|
||||
type2str = {
|
||||
cv.gapi.CV_BOOL: 'cv.gapi.CV_BOOL' ,
|
||||
cv.gapi.CV_INT: 'cv.gapi.CV_INT' ,
|
||||
cv.gapi.CV_INT64: 'cv.gapi.CV_INT64' ,
|
||||
cv.gapi.CV_UINT64: 'cv.gapi.CV_UINT64' ,
|
||||
cv.gapi.CV_DOUBLE: 'cv.gapi.CV_DOUBLE' ,
|
||||
cv.gapi.CV_FLOAT: 'cv.gapi.CV_FLOAT' ,
|
||||
cv.gapi.CV_STRING: 'cv.gapi.CV_STRING' ,
|
||||
cv.gapi.CV_POINT: 'cv.gapi.CV_POINT' ,
|
||||
cv.gapi.CV_POINT2F: 'cv.gapi.CV_POINT2F' ,
|
||||
cv.gapi.CV_POINT3F: 'cv.gapi.CV_POINT3F' ,
|
||||
cv.gapi.CV_SIZE: 'cv.gapi.CV_SIZE',
|
||||
cv.gapi.CV_RECT: 'cv.gapi.CV_RECT',
|
||||
cv.gapi.CV_SCALAR: 'cv.gapi.CV_SCALAR',
|
||||
cv.gapi.CV_MAT: 'cv.gapi.CV_MAT',
|
||||
cv.gapi.CV_GMAT: 'cv.gapi.CV_GMAT',
|
||||
cv.gapi.CV_DRAW_PRIM: 'cv.gapi.CV_DRAW_PRIM'
|
||||
}
|
||||
|
||||
# NB: Second lvl decorator takes class to decorate
|
||||
def op_with_params(cls):
|
||||
if not in_types:
|
||||
raise Exception('{} operation should have at least one input!'.format(cls.__name__))
|
||||
|
||||
if not out_types:
|
||||
raise Exception('{} operation should have at least one output!'.format(cls.__name__))
|
||||
|
||||
for i, t in enumerate(out_types):
|
||||
if t not in [cv.GMat, cv.GScalar, *garray_types, *gopaque_types]:
|
||||
raise Exception('{} unsupported output type: {} in position: {}'
|
||||
.format(cls.__name__, t.__name__, i))
|
||||
|
||||
def on(*args):
|
||||
if len(in_types) != len(args):
|
||||
raise Exception('Invalid number of input elements!\nExpected: {}, Actual: {}'
|
||||
.format(len(in_types), len(args)))
|
||||
|
||||
for i, (t, a) in enumerate(zip(in_types, args)):
|
||||
if t in garray_types:
|
||||
if not isinstance(a, cv.GArrayT):
|
||||
raise Exception("{} invalid type for argument {}.\nExpected: {}, Actual: {}"
|
||||
.format(cls.__name__, i, cv.GArrayT.__name__, type(a).__name__))
|
||||
|
||||
elif a.type() != garray_types[t]:
|
||||
raise Exception("{} invalid GArrayT type for argument {}.\nExpected: {}, Actual: {}"
|
||||
.format(cls.__name__, i, type2str[garray_types[t]], type2str[a.type()]))
|
||||
|
||||
elif t in gopaque_types:
|
||||
if not isinstance(a, cv.GOpaqueT):
|
||||
raise Exception("{} invalid type for argument {}.\nExpected: {}, Actual: {}"
|
||||
.format(cls.__name__, i, cv.GOpaqueT.__name__, type(a).__name__))
|
||||
|
||||
elif a.type() != gopaque_types[t]:
|
||||
raise Exception("{} invalid GOpaque type for argument {}.\nExpected: {}, Actual: {}"
|
||||
.format(cls.__name__, i, type2str[gopaque_types[t]], type2str[a.type()]))
|
||||
|
||||
else:
|
||||
if t != type(a):
|
||||
raise Exception('{} invalid input type for argument {}.\nExpected: {}, Actual: {}'
|
||||
.format(cls.__name__, i, t.__name__, type(a).__name__))
|
||||
|
||||
op = cv.gapi.__op(op_id, cls.outMeta, *args)
|
||||
|
||||
out_protos = []
|
||||
for i, out_type in enumerate(out_types):
|
||||
if out_type == cv.GMat:
|
||||
out_protos.append(op.getGMat())
|
||||
elif out_type == cv.GScalar:
|
||||
out_protos.append(op.getGScalar())
|
||||
elif out_type in gopaque_types:
|
||||
out_protos.append(op.getGOpaque(gopaque_types[out_type]))
|
||||
elif out_type in garray_types:
|
||||
out_protos.append(op.getGArray(garray_types[out_type]))
|
||||
else:
|
||||
raise Exception("""In {}: G-API operation can't produce the output with type: {} in position: {}"""
|
||||
.format(cls.__name__, out_type.__name__, i))
|
||||
|
||||
return tuple(out_protos) if len(out_protos) != 1 else out_protos[0]
|
||||
|
||||
# NB: Extend operation class
|
||||
cls.id = op_id
|
||||
cls.on = staticmethod(on)
|
||||
return cls
|
||||
|
||||
return op_with_params
|
||||
|
||||
|
||||
def kernel(op_cls):
|
||||
# NB: Second lvl decorator takes class to decorate
|
||||
def kernel_with_params(cls):
|
||||
# NB: Add new members to kernel class
|
||||
cls.id = op_cls.id
|
||||
cls.outMeta = op_cls.outMeta
|
||||
return cls
|
||||
|
||||
return kernel_with_params
|
||||
|
||||
|
||||
cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
|
||||
349
venv/lib/python3.11/site-packages/cv2/gapi/__init__.pyi
Normal file
349
venv/lib/python3.11/site-packages/cv2/gapi/__init__.pyi
Normal file
@@ -0,0 +1,349 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi import core as core
|
||||
from cv2.gapi import ie as ie
|
||||
from cv2.gapi import imgproc as imgproc
|
||||
from cv2.gapi import oak as oak
|
||||
from cv2.gapi import onnx as onnx
|
||||
from cv2.gapi import ot as ot
|
||||
from cv2.gapi import ov as ov
|
||||
from cv2.gapi import own as own
|
||||
from cv2.gapi import render as render
|
||||
from cv2.gapi import streaming as streaming
|
||||
from cv2.gapi import video as video
|
||||
from cv2.gapi import wip as wip
|
||||
|
||||
|
||||
# Enumerations
|
||||
StereoOutputFormat_DEPTH_FLOAT16: int
|
||||
STEREO_OUTPUT_FORMAT_DEPTH_FLOAT16: int
|
||||
StereoOutputFormat_DEPTH_FLOAT32: int
|
||||
STEREO_OUTPUT_FORMAT_DEPTH_FLOAT32: int
|
||||
StereoOutputFormat_DISPARITY_FIXED16_11_5: int
|
||||
STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_11_5: int
|
||||
StereoOutputFormat_DISPARITY_FIXED16_12_4: int
|
||||
STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_12_4: int
|
||||
StereoOutputFormat_DEPTH_16F: int
|
||||
STEREO_OUTPUT_FORMAT_DEPTH_16F: int
|
||||
StereoOutputFormat_DEPTH_32F: int
|
||||
STEREO_OUTPUT_FORMAT_DEPTH_32F: int
|
||||
StereoOutputFormat_DISPARITY_16Q_10_5: int
|
||||
STEREO_OUTPUT_FORMAT_DISPARITY_16Q_10_5: int
|
||||
StereoOutputFormat_DISPARITY_16Q_11_4: int
|
||||
STEREO_OUTPUT_FORMAT_DISPARITY_16Q_11_4: int
|
||||
StereoOutputFormat = int
|
||||
"""One of [StereoOutputFormat_DEPTH_FLOAT16, STEREO_OUTPUT_FORMAT_DEPTH_FLOAT16, StereoOutputFormat_DEPTH_FLOAT32, STEREO_OUTPUT_FORMAT_DEPTH_FLOAT32, StereoOutputFormat_DISPARITY_FIXED16_11_5, STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_11_5, StereoOutputFormat_DISPARITY_FIXED16_12_4, STEREO_OUTPUT_FORMAT_DISPARITY_FIXED16_12_4, StereoOutputFormat_DEPTH_16F, STEREO_OUTPUT_FORMAT_DEPTH_16F, StereoOutputFormat_DEPTH_32F, STEREO_OUTPUT_FORMAT_DEPTH_32F, StereoOutputFormat_DISPARITY_16Q_10_5, STEREO_OUTPUT_FORMAT_DISPARITY_16Q_10_5, StereoOutputFormat_DISPARITY_16Q_11_4, STEREO_OUTPUT_FORMAT_DISPARITY_16Q_11_4]"""
|
||||
|
||||
CV_BOOL: int
|
||||
CV_INT: int
|
||||
CV_INT64: int
|
||||
CV_UINT64: int
|
||||
CV_DOUBLE: int
|
||||
CV_FLOAT: int
|
||||
CV_STRING: int
|
||||
CV_POINT: int
|
||||
CV_POINT2F: int
|
||||
CV_POINT3F: int
|
||||
CV_SIZE: int
|
||||
CV_RECT: int
|
||||
CV_SCALAR: int
|
||||
CV_MAT: int
|
||||
CV_GMAT: int
|
||||
CV_DRAW_PRIM: int
|
||||
CV_ANY: int
|
||||
ArgType = int
|
||||
"""One of [CV_BOOL, CV_INT, CV_INT64, CV_UINT64, CV_DOUBLE, CV_FLOAT, CV_STRING, CV_POINT, CV_POINT2F, CV_POINT3F, CV_SIZE, CV_RECT, CV_SCALAR, CV_MAT, CV_GMAT, CV_DRAW_PRIM, CV_ANY]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class GNetParam:
|
||||
...
|
||||
|
||||
class GNetPackage:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, nets: _typing.Sequence[GNetParam]) -> None: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
def BGR2Gray(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def BGR2I420(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def BGR2LUV(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def BGR2RGB(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def BGR2YUV(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def BayerGR2RGB(src_gr: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def Canny(image: cv2.GMat, threshold1: float, threshold2: float, apertureSize: int = ..., L2gradient: bool = ...) -> cv2.GMat: ...
|
||||
|
||||
def I4202BGR(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def I4202RGB(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def LUT(src: cv2.GMat, lut: cv2.typing.MatLike) -> cv2.GMat: ...
|
||||
|
||||
def LUV2BGR(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def Laplacian(src: cv2.GMat, ddepth: int, ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def NV12toBGR(src_y: cv2.GMat, src_uv: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def NV12toGray(src_y: cv2.GMat, src_uv: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def NV12toRGB(src_y: cv2.GMat, src_uv: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def RGB2Gray(src: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def RGB2Gray(src: cv2.GMat, rY: float, gY: float, bY: float) -> cv2.GMat: ...
|
||||
|
||||
def RGB2HSV(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def RGB2I420(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def RGB2Lab(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def RGB2YUV(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def RGB2YUV422(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def Sobel(src: cv2.GMat, ddepth: int, dx: int, dy: int, ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def SobelXY(src: cv2.GMat, ddepth: int, order: int, ksize: int = ..., scale: float = ..., delta: float = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> tuple[cv2.GMat, cv2.GMat]: ...
|
||||
|
||||
def YUV2BGR(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def YUV2RGB(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def absDiff(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def absDiffC(src: cv2.GMat, c: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
def add(src1: cv2.GMat, src2: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def addC(src1: cv2.GMat, c: cv2.GScalar, ddepth: int = ...) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def addC(c: cv2.GScalar, src1: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def addWeighted(src1: cv2.GMat, alpha: float, src2: cv2.GMat, beta: float, gamma: float, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def bilateralFilter(src: cv2.GMat, d: int, sigmaColor: float, sigmaSpace: float, borderType: int = ...) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def bitwise_and(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def bitwise_and(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
def bitwise_not(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def bitwise_or(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def bitwise_or(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def bitwise_xor(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def bitwise_xor(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
def blur(src: cv2.GMat, ksize: cv2.typing.Size, anchor: cv2.typing.Point = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def boundingRect(src: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
@_typing.overload
|
||||
def boundingRect(src: cv2.GArrayT) -> cv2.GOpaqueT: ...
|
||||
@_typing.overload
|
||||
def boundingRect(src: cv2.GArrayT) -> cv2.GOpaqueT: ...
|
||||
|
||||
def boxFilter(src: cv2.GMat, dtype: int, ksize: cv2.typing.Size, anchor: cv2.typing.Point = ..., normalize: bool = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def cartToPolar(x: cv2.GMat, y: cv2.GMat, angleInDegrees: bool = ...) -> tuple[cv2.GMat, cv2.GMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def cmpEQ(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def cmpEQ(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def cmpGE(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def cmpGE(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def cmpGT(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def cmpGT(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def cmpLE(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def cmpLE(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def cmpLT(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def cmpLT(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def cmpNE(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def cmpNE(src1: cv2.GMat, src2: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
def combine(lhs: cv2.GKernelPackage, rhs: cv2.GKernelPackage) -> cv2.GKernelPackage: ...
|
||||
|
||||
@_typing.overload
|
||||
def concatHor(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def concatHor(v: _typing.Sequence[cv2.GMat]) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def concatVert(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def concatVert(v: _typing.Sequence[cv2.GMat]) -> cv2.GMat: ...
|
||||
|
||||
def convertTo(src: cv2.GMat, rdepth: int, alpha: float = ..., beta: float = ...) -> cv2.GMat: ...
|
||||
|
||||
def copy(in_: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def countNonZero(src: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
|
||||
def crop(src: cv2.GMat, rect: cv2.typing.Rect) -> cv2.GMat: ...
|
||||
|
||||
def dilate(src: cv2.GMat, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def dilate3x3(src: cv2.GMat, iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def div(src1: cv2.GMat, src2: cv2.GMat, scale: float, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def divC(src: cv2.GMat, divisor: cv2.GScalar, scale: float, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def divRC(divident: cv2.GScalar, src: cv2.GMat, scale: float, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def equalizeHist(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def erode(src: cv2.GMat, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def erode3x3(src: cv2.GMat, iterations: int = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def filter2D(src: cv2.GMat, ddepth: int, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., delta: cv2.typing.Scalar = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def flip(src: cv2.GMat, flipCode: int) -> cv2.GMat: ...
|
||||
|
||||
def gaussianBlur(src: cv2.GMat, ksize: cv2.typing.Size, sigmaX: float, sigmaY: float = ..., borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def goodFeaturesToTrack(image: cv2.GMat, maxCorners: int, qualityLevel: float, minDistance: float, mask: cv2.typing.MatLike | None = ..., blockSize: int = ..., useHarrisDetector: bool = ..., k: float = ...) -> cv2.GArrayT: ...
|
||||
|
||||
def inRange(src: cv2.GMat, threshLow: cv2.GScalar, threshUp: cv2.GScalar) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def infer(name: str, inputs: cv2.GInferInputs) -> cv2.GInferOutputs: ...
|
||||
@_typing.overload
|
||||
def infer(name: str, roi: cv2.GOpaqueT, inputs: cv2.GInferInputs) -> cv2.GInferOutputs: ...
|
||||
@_typing.overload
|
||||
def infer(name: str, rois: cv2.GArrayT, inputs: cv2.GInferInputs) -> cv2.GInferListOutputs: ...
|
||||
|
||||
def infer2(name: str, in_: cv2.GMat, inputs: cv2.GInferListInputs) -> cv2.GInferListOutputs: ...
|
||||
|
||||
def integral(src: cv2.GMat, sdepth: int = ..., sqdepth: int = ...) -> tuple[cv2.GMat, cv2.GMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def kmeans(data: cv2.GMat, K: int, bestLabels: cv2.GMat, criteria: cv2.typing.TermCriteria, attempts: int, flags: cv2.KmeansFlags) -> tuple[cv2.GOpaqueT, cv2.GMat, cv2.GMat]: ...
|
||||
@_typing.overload
|
||||
def kmeans(data: cv2.GMat, K: int, criteria: cv2.typing.TermCriteria, attempts: int, flags: cv2.KmeansFlags) -> tuple[cv2.GOpaqueT, cv2.GMat, cv2.GMat]: ...
|
||||
@_typing.overload
|
||||
def kmeans(data: cv2.GArrayT, K: int, bestLabels: cv2.GArrayT, criteria: cv2.typing.TermCriteria, attempts: int, flags: cv2.KmeansFlags) -> tuple[cv2.GOpaqueT, cv2.GArrayT, cv2.GArrayT]: ...
|
||||
@_typing.overload
|
||||
def kmeans(data: cv2.GArrayT, K: int, bestLabels: cv2.GArrayT, criteria: cv2.typing.TermCriteria, attempts: int, flags: cv2.KmeansFlags) -> tuple[cv2.GOpaqueT, cv2.GArrayT, cv2.GArrayT]: ...
|
||||
|
||||
def mask(src: cv2.GMat, mask: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def max(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def mean(src: cv2.GMat) -> cv2.GScalar: ...
|
||||
|
||||
def medianBlur(src: cv2.GMat, ksize: int) -> cv2.GMat: ...
|
||||
|
||||
def merge3(src1: cv2.GMat, src2: cv2.GMat, src3: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def merge4(src1: cv2.GMat, src2: cv2.GMat, src3: cv2.GMat, src4: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def min(src1: cv2.GMat, src2: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def morphologyEx(src: cv2.GMat, op: cv2.MorphTypes, kernel: cv2.typing.MatLike, anchor: cv2.typing.Point = ..., iterations: int = ..., borderType: cv2.BorderTypes = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def mul(src1: cv2.GMat, src2: cv2.GMat, scale: float = ..., ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def mulC(src: cv2.GMat, multiplier: float, ddepth: int = ...) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def mulC(src: cv2.GMat, multiplier: cv2.GScalar, ddepth: int = ...) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def mulC(multiplier: cv2.GScalar, src: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def normInf(src: cv2.GMat) -> cv2.GScalar: ...
|
||||
|
||||
def normL1(src: cv2.GMat) -> cv2.GScalar: ...
|
||||
|
||||
def normL2(src: cv2.GMat) -> cv2.GScalar: ...
|
||||
|
||||
def normalize(src: cv2.GMat, alpha: float, beta: float, norm_type: int, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
@_typing.overload
|
||||
def parseSSD(in_: cv2.GMat, inSz: cv2.GOpaqueT, confidenceThreshold: float = ..., filterLabel: int = ...) -> tuple[cv2.GArrayT, cv2.GArrayT]: ...
|
||||
@_typing.overload
|
||||
def parseSSD(in_: cv2.GMat, inSz: cv2.GOpaqueT, confidenceThreshold: float, alignmentToSquare: bool, filterOutOfBounds: bool) -> cv2.GArrayT: ...
|
||||
|
||||
def parseYolo(in_: cv2.GMat, inSz: cv2.GOpaqueT, confidenceThreshold: float = ..., nmsThreshold: float = ..., anchors: _typing.Sequence[float] = ...) -> tuple[cv2.GArrayT, cv2.GArrayT]: ...
|
||||
|
||||
def phase(x: cv2.GMat, y: cv2.GMat, angleInDegrees: bool = ...) -> cv2.GMat: ...
|
||||
|
||||
def polarToCart(magnitude: cv2.GMat, angle: cv2.GMat, angleInDegrees: bool = ...) -> tuple[cv2.GMat, cv2.GMat]: ...
|
||||
|
||||
def remap(src: cv2.GMat, map1: cv2.typing.MatLike, map2: cv2.typing.MatLike, interpolation: int, borderMode: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def resize(src: cv2.GMat, dsize: cv2.typing.Size, fx: float = ..., fy: float = ..., interpolation: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def select(src1: cv2.GMat, src2: cv2.GMat, mask: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def sepFilter(src: cv2.GMat, ddepth: int, kernelX: cv2.typing.MatLike, kernelY: cv2.typing.MatLike, anchor: cv2.typing.Point, delta: cv2.typing.Scalar, borderType: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def split3(src: cv2.GMat) -> tuple[cv2.GMat, cv2.GMat, cv2.GMat]: ...
|
||||
|
||||
def split4(src: cv2.GMat) -> tuple[cv2.GMat, cv2.GMat, cv2.GMat, cv2.GMat]: ...
|
||||
|
||||
def sqrt(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def sub(src1: cv2.GMat, src2: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def subC(src: cv2.GMat, c: cv2.GScalar, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def subRC(c: cv2.GScalar, src: cv2.GMat, ddepth: int = ...) -> cv2.GMat: ...
|
||||
|
||||
def sum(src: cv2.GMat) -> cv2.GScalar: ...
|
||||
|
||||
@_typing.overload
|
||||
def threshold(src: cv2.GMat, thresh: cv2.GScalar, maxval: cv2.GScalar, type: int) -> cv2.GMat: ...
|
||||
@_typing.overload
|
||||
def threshold(src: cv2.GMat, maxval: cv2.GScalar, type: int) -> tuple[cv2.GMat, cv2.GScalar]: ...
|
||||
|
||||
def transpose(src: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def warpAffine(src: cv2.GMat, M: cv2.typing.MatLike, dsize: cv2.typing.Size, flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
def warpPerspective(src: cv2.GMat, M: cv2.typing.MatLike, dsize: cv2.typing.Size, flags: int = ..., borderMode: int = ..., borderValue: cv2.typing.Scalar = ...) -> cv2.GMat: ...
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
from cv2.gapi.core import cpu as cpu
|
||||
from cv2.gapi.core import fluid as fluid
|
||||
from cv2.gapi.core import ocl as ocl
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
51
venv/lib/python3.11/site-packages/cv2/gapi/ie/__init__.pyi
Normal file
51
venv/lib/python3.11/site-packages/cv2/gapi/ie/__init__.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi.ie import detail as detail
|
||||
|
||||
|
||||
# Enumerations
|
||||
TraitAs_TENSOR: int
|
||||
TRAIT_AS_TENSOR: int
|
||||
TraitAs_IMAGE: int
|
||||
TRAIT_AS_IMAGE: int
|
||||
TraitAs = int
|
||||
"""One of [TraitAs_TENSOR, TRAIT_AS_TENSOR, TraitAs_IMAGE, TRAIT_AS_IMAGE]"""
|
||||
|
||||
Sync: int
|
||||
SYNC: int
|
||||
Async: int
|
||||
ASYNC: int
|
||||
InferMode = int
|
||||
"""One of [Sync, SYNC, Async, ASYNC]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class PyParams:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, model: str, weights: str, device: str) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, model: str, device: str) -> None: ...
|
||||
|
||||
def constInput(self, layer_name: str, data: cv2.typing.MatLike, hint: TraitAs = ...) -> PyParams: ...
|
||||
|
||||
def cfgNumRequests(self, nireq: int) -> PyParams: ...
|
||||
|
||||
def cfgBatchSize(self, size: int) -> PyParams: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def params(tag: str, model: str, weights: str, device: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def params(tag: str, model: str, device: str) -> PyParams: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
ParamDesc_Kind_Load: int
|
||||
PARAM_DESC_KIND_LOAD: int
|
||||
ParamDesc_Kind_Import: int
|
||||
PARAM_DESC_KIND_IMPORT: int
|
||||
ParamDesc_Kind = int
|
||||
"""One of [ParamDesc_Kind_Load, PARAM_DESC_KIND_LOAD, ParamDesc_Kind_Import, PARAM_DESC_KIND_IMPORT]"""
|
||||
|
||||
|
||||
# Classes
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
from cv2.gapi.imgproc import fluid as fluid
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
37
venv/lib/python3.11/site-packages/cv2/gapi/oak/__init__.pyi
Normal file
37
venv/lib/python3.11/site-packages/cv2/gapi/oak/__init__.pyi
Normal file
@@ -0,0 +1,37 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
EncoderConfig_RateControlMode_CBR: int
|
||||
ENCODER_CONFIG_RATE_CONTROL_MODE_CBR: int
|
||||
EncoderConfig_RateControlMode_VBR: int
|
||||
ENCODER_CONFIG_RATE_CONTROL_MODE_VBR: int
|
||||
EncoderConfig_RateControlMode = int
|
||||
"""One of [EncoderConfig_RateControlMode_CBR, ENCODER_CONFIG_RATE_CONTROL_MODE_CBR, EncoderConfig_RateControlMode_VBR, ENCODER_CONFIG_RATE_CONTROL_MODE_VBR]"""
|
||||
|
||||
EncoderConfig_Profile_H264_BASELINE: int
|
||||
ENCODER_CONFIG_PROFILE_H264_BASELINE: int
|
||||
EncoderConfig_Profile_H264_HIGH: int
|
||||
ENCODER_CONFIG_PROFILE_H264_HIGH: int
|
||||
EncoderConfig_Profile_H264_MAIN: int
|
||||
ENCODER_CONFIG_PROFILE_H264_MAIN: int
|
||||
EncoderConfig_Profile_H265_MAIN: int
|
||||
ENCODER_CONFIG_PROFILE_H265_MAIN: int
|
||||
EncoderConfig_Profile_MJPEG: int
|
||||
ENCODER_CONFIG_PROFILE_MJPEG: int
|
||||
EncoderConfig_Profile = int
|
||||
"""One of [EncoderConfig_Profile_H264_BASELINE, ENCODER_CONFIG_PROFILE_H264_BASELINE, EncoderConfig_Profile_H264_HIGH, ENCODER_CONFIG_PROFILE_H264_HIGH, EncoderConfig_Profile_H264_MAIN, ENCODER_CONFIG_PROFILE_H264_MAIN, EncoderConfig_Profile_H265_MAIN, ENCODER_CONFIG_PROFILE_H265_MAIN, EncoderConfig_Profile_MJPEG, ENCODER_CONFIG_PROFILE_MJPEG]"""
|
||||
|
||||
ColorCameraParams_BoardSocket_RGB: int
|
||||
COLOR_CAMERA_PARAMS_BOARD_SOCKET_RGB: int
|
||||
ColorCameraParams_BoardSocket_BGR: int
|
||||
COLOR_CAMERA_PARAMS_BOARD_SOCKET_BGR: int
|
||||
ColorCameraParams_BoardSocket = int
|
||||
"""One of [ColorCameraParams_BoardSocket_RGB, COLOR_CAMERA_PARAMS_BOARD_SOCKET_RGB, ColorCameraParams_BoardSocket_BGR, COLOR_CAMERA_PARAMS_BOARD_SOCKET_BGR]"""
|
||||
|
||||
ColorCameraParams_Resolution_THE_1080_P: int
|
||||
COLOR_CAMERA_PARAMS_RESOLUTION_THE_1080_P: int
|
||||
ColorCameraParams_Resolution = int
|
||||
"""One of [ColorCameraParams_Resolution_THE_1080_P, COLOR_CAMERA_PARAMS_RESOLUTION_THE_1080_P]"""
|
||||
|
||||
|
||||
# Classes
|
||||
|
||||
51
venv/lib/python3.11/site-packages/cv2/gapi/onnx/__init__.pyi
Normal file
51
venv/lib/python3.11/site-packages/cv2/gapi/onnx/__init__.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2.gapi.onnx.ep
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi.onnx import ep as ep
|
||||
|
||||
|
||||
# Enumerations
|
||||
TraitAs_TENSOR: int
|
||||
TRAIT_AS_TENSOR: int
|
||||
TraitAs_IMAGE: int
|
||||
TRAIT_AS_IMAGE: int
|
||||
TraitAs = int
|
||||
"""One of [TraitAs_TENSOR, TRAIT_AS_TENSOR, TraitAs_IMAGE, TRAIT_AS_IMAGE]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class PyParams:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, model_path: str) -> None: ...
|
||||
|
||||
def cfgMeanStd(self, layer_name: str, m: cv2.typing.Scalar, s: cv2.typing.Scalar) -> PyParams: ...
|
||||
|
||||
def cfgNormalize(self, layer_name: str, flag: bool) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.OpenVINO) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.DirectML) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.CoreML) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.CUDA) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgAddExecutionProvider(self, ep: cv2.gapi.onnx.ep.TensorRT) -> PyParams: ...
|
||||
|
||||
def cfgDisableMemPattern(self) -> PyParams: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
def params(tag: str, model_path: str) -> PyParams: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Classes
|
||||
class CoreML:
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
def cfgUseCPUOnly(self) -> CoreML: ...
|
||||
|
||||
def cfgEnableOnSubgraph(self) -> CoreML: ...
|
||||
|
||||
def cfgEnableOnlyNeuralEngine(self) -> CoreML: ...
|
||||
|
||||
|
||||
class CUDA:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, dev_id: int) -> None: ...
|
||||
|
||||
|
||||
class TensorRT:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, dev_id: int) -> None: ...
|
||||
|
||||
|
||||
class OpenVINO:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, dev_type: str) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, params: cv2.typing.map_string_and_string) -> None: ...
|
||||
|
||||
def cfgCacheDir(self, dir: str) -> OpenVINO: ...
|
||||
|
||||
def cfgNumThreads(self, nthreads: int) -> OpenVINO: ...
|
||||
|
||||
def cfgEnableOpenCLThrottling(self) -> OpenVINO: ...
|
||||
|
||||
def cfgEnableDynamicShapes(self) -> OpenVINO: ...
|
||||
|
||||
|
||||
class DirectML:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, device_id: int) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, adapter_name: str) -> None: ...
|
||||
|
||||
|
||||
|
||||
32
venv/lib/python3.11/site-packages/cv2/gapi/ot/__init__.pyi
Normal file
32
venv/lib/python3.11/site-packages/cv2/gapi/ot/__init__.pyi
Normal file
@@ -0,0 +1,32 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi.ot import cpu as cpu
|
||||
|
||||
|
||||
# Enumerations
|
||||
NEW: int
|
||||
TRACKED: int
|
||||
LOST: int
|
||||
TrackingStatus = int
|
||||
"""One of [NEW, TRACKED, LOST]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class ObjectTrackerParams:
|
||||
max_num_objects: int
|
||||
input_image_format: int
|
||||
tracking_per_class: bool
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def track(mat: cv2.GMat, detected_rects: cv2.GArrayT, detected_class_labels: cv2.GArrayT, delta: float) -> tuple[cv2.GArrayT, cv2.GArrayT, cv2.GArrayT, cv2.GArrayT]: ...
|
||||
@_typing.overload
|
||||
def track(frame: cv2.GFrame, detected_rects: cv2.GArrayT, detected_class_labels: cv2.GArrayT, delta: float) -> tuple[cv2.GArrayT, cv2.GArrayT, cv2.GArrayT, cv2.GArrayT]: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
74
venv/lib/python3.11/site-packages/cv2/gapi/ov/__init__.pyi
Normal file
74
venv/lib/python3.11/site-packages/cv2/gapi/ov/__init__.pyi
Normal file
@@ -0,0 +1,74 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Classes
|
||||
class PyParams:
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, model_path: str, bin_path: str, device: str) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, tag: str, blob_path: str, device: str) -> None: ...
|
||||
|
||||
def cfgPluginConfig(self, config: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgInputTensorLayout(self, tensor_layout: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgInputTensorLayout(self, layout_map: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgInputModelLayout(self, tensor_layout: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgInputModelLayout(self, layout_map: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgOutputTensorLayout(self, tensor_layout: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgOutputTensorLayout(self, layout_map: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgOutputModelLayout(self, tensor_layout: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgOutputModelLayout(self, layout_map: cv2.typing.map_string_and_string) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgOutputTensorPrecision(self, precision: int) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgOutputTensorPrecision(self, precision_map: cv2.typing.map_string_and_int) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgReshape(self, new_shape: _typing.Sequence[int]) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgReshape(self, new_shape_map: cv2.typing.map_string_and_vector_size_t) -> PyParams: ...
|
||||
|
||||
def cfgNumRequests(self, nireq: int) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgMean(self, mean_values: _typing.Sequence[float]) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgMean(self, mean_map: cv2.typing.map_string_and_vector_float) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgScale(self, scale_values: _typing.Sequence[float]) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgScale(self, scale_map: cv2.typing.map_string_and_vector_float) -> PyParams: ...
|
||||
|
||||
@_typing.overload
|
||||
def cfgResize(self, interpolation: int) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def cfgResize(self, interpolation: cv2.typing.map_string_and_int) -> PyParams: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def params(tag: str, model_path: str, weights: str, device: str) -> PyParams: ...
|
||||
@_typing.overload
|
||||
def params(tag: str, bin_path: str, device: str) -> PyParams: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
from cv2.gapi.own import detail as detail
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
MatHeader_AUTO_STEP: int
|
||||
MAT_HEADER_AUTO_STEP: int
|
||||
MatHeader_TYPE_MASK: int
|
||||
MAT_HEADER_TYPE_MASK: int
|
||||
|
||||
|
||||
# Classes
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
from cv2.gapi.render import ocv as ocv
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
|
||||
|
||||
# Functions
|
||||
def kernels() -> cv2.GKernelPackage: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Enumerations
|
||||
sync_policy_dont_sync: int
|
||||
SYNC_POLICY_DONT_SYNC: int
|
||||
sync_policy_drop: int
|
||||
SYNC_POLICY_DROP: int
|
||||
sync_policy = int
|
||||
"""One of [sync_policy_dont_sync, SYNC_POLICY_DONT_SYNC, sync_policy_drop, SYNC_POLICY_DROP]"""
|
||||
|
||||
|
||||
|
||||
# Classes
|
||||
class queue_capacity:
|
||||
capacity: int
|
||||
|
||||
# Functions
|
||||
def __init__(self, cap: int = ...) -> None: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
def desync(g: cv2.GMat) -> cv2.GMat: ...
|
||||
|
||||
def seqNo(arg1: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
|
||||
def seq_id(arg1: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
|
||||
@_typing.overload
|
||||
def size(src: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
@_typing.overload
|
||||
def size(r: cv2.GOpaqueT) -> cv2.GOpaqueT: ...
|
||||
@_typing.overload
|
||||
def size(src: cv2.GFrame) -> cv2.GOpaqueT: ...
|
||||
|
||||
def timestamp(arg1: cv2.GMat) -> cv2.GOpaqueT: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
# Enumerations
|
||||
TYPE_BS_MOG2: int
|
||||
TYPE_BS_KNN: int
|
||||
BackgroundSubtractorType = int
|
||||
"""One of [TYPE_BS_MOG2, TYPE_BS_KNN]"""
|
||||
|
||||
|
||||
|
||||
41
venv/lib/python3.11/site-packages/cv2/gapi/wip/__init__.pyi
Normal file
41
venv/lib/python3.11/site-packages/cv2/gapi/wip/__init__.pyi
Normal file
@@ -0,0 +1,41 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.gapi
|
||||
import cv2.gapi.wip.gst
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
from cv2.gapi.wip import draw as draw
|
||||
from cv2.gapi.wip import gst as gst
|
||||
from cv2.gapi.wip import onevpl as onevpl
|
||||
|
||||
|
||||
# Classes
|
||||
class GOutputs:
|
||||
# Functions
|
||||
def getGMat(self) -> cv2.GMat: ...
|
||||
|
||||
def getGScalar(self) -> cv2.GScalar: ...
|
||||
|
||||
def getGArray(self, type: cv2.gapi.ArgType) -> cv2.GArrayT: ...
|
||||
|
||||
def getGOpaque(self, type: cv2.gapi.ArgType) -> cv2.GOpaqueT: ...
|
||||
|
||||
|
||||
class IStreamSource:
|
||||
...
|
||||
|
||||
|
||||
# Functions
|
||||
def get_streaming_source(pipeline: cv2.gapi.wip.gst.GStreamerPipeline, appsinkName: str, outputType: cv2.gapi.wip.gst.GStreamerSource_OutputType = ...) -> IStreamSource: ...
|
||||
|
||||
@_typing.overload
|
||||
def make_capture_src(path: str, properties: cv2.typing.map_int_and_double = ...) -> IStreamSource: ...
|
||||
@_typing.overload
|
||||
def make_capture_src(id: int, properties: cv2.typing.map_int_and_double = ...) -> IStreamSource: ...
|
||||
|
||||
def make_gst_src(pipeline: str, outputType: cv2.gapi.wip.gst.GStreamerSource_OutputType = ...) -> IStreamSource: ...
|
||||
|
||||
|
||||
119
venv/lib/python3.11/site-packages/cv2/gapi/wip/draw/__init__.pyi
Normal file
119
venv/lib/python3.11/site-packages/cv2/gapi/wip/draw/__init__.pyi
Normal file
@@ -0,0 +1,119 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Classes
|
||||
class Text:
|
||||
text: str
|
||||
org: cv2.typing.Point
|
||||
ff: int
|
||||
fs: float
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
bottom_left_origin: bool
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, text_: str, org_: cv2.typing.Point, ff_: int, fs_: float, color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., bottom_left_origin_: bool = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class Rect:
|
||||
rect: cv2.typing.Rect
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
shift: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, rect_: cv2.typing.Rect2i, color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., shift_: int = ...) -> None: ...
|
||||
|
||||
|
||||
class Circle:
|
||||
center: cv2.typing.Point
|
||||
radius: int
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
shift: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, center_: cv2.typing.Point, radius_: int, color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., shift_: int = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class Line:
|
||||
pt1: cv2.typing.Point
|
||||
pt2: cv2.typing.Point
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
shift: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, pt1_: cv2.typing.Point, pt2_: cv2.typing.Point, color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., shift_: int = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class Mosaic:
|
||||
mos: cv2.typing.Rect
|
||||
cellSz: int
|
||||
decim: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self, mos_: cv2.typing.Rect2i, cellSz_: int, decim_: int) -> None: ...
|
||||
|
||||
|
||||
class Image:
|
||||
org: cv2.typing.Point
|
||||
img: cv2.typing.MatLike
|
||||
alpha: cv2.typing.MatLike
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, org_: cv2.typing.Point, img_: cv2.typing.MatLike, alpha_: cv2.typing.MatLike) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
class Poly:
|
||||
points: _typing.Sequence[cv2.typing.Point]
|
||||
color: cv2.typing.Scalar
|
||||
thick: int
|
||||
lt: int
|
||||
shift: int
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def __init__(self, points_: _typing.Sequence[cv2.typing.Point], color_: cv2.typing.Scalar, thick_: int = ..., lt_: int = ..., shift_: int = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
|
||||
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def render(bgr: cv2.typing.MatLike, prims: _typing.Sequence[cv2.typing.Prim], args: _typing.Sequence[cv2.GCompileArg] = ...) -> None: ...
|
||||
@_typing.overload
|
||||
def render(y_plane: cv2.typing.MatLike, uv_plane: cv2.typing.MatLike, prims: _typing.Sequence[cv2.typing.Prim], args: _typing.Sequence[cv2.GCompileArg] = ...) -> None: ...
|
||||
|
||||
def render3ch(src: cv2.GMat, prims: cv2.GArrayT) -> cv2.GMat: ...
|
||||
|
||||
def renderNV12(y: cv2.GMat, uv: cv2.GMat, prims: cv2.GArrayT) -> tuple[cv2.GMat, cv2.GMat]: ...
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
GStreamerSource_OutputType_FRAME: int
|
||||
GSTREAMER_SOURCE_OUTPUT_TYPE_FRAME: int
|
||||
GStreamerSource_OutputType_MAT: int
|
||||
GSTREAMER_SOURCE_OUTPUT_TYPE_MAT: int
|
||||
GStreamerSource_OutputType = int
|
||||
"""One of [GStreamerSource_OutputType_FRAME, GSTREAMER_SOURCE_OUTPUT_TYPE_FRAME, GStreamerSource_OutputType_MAT, GSTREAMER_SOURCE_OUTPUT_TYPE_MAT]"""
|
||||
|
||||
|
||||
# Classes
|
||||
class GStreamerPipeline:
|
||||
# Functions
|
||||
def __init__(self, pipeline: str) -> None: ...
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
# Enumerations
|
||||
AccelType_HOST: int
|
||||
ACCEL_TYPE_HOST: int
|
||||
AccelType_DX11: int
|
||||
ACCEL_TYPE_DX11: int
|
||||
AccelType_VAAPI: int
|
||||
ACCEL_TYPE_VAAPI: int
|
||||
AccelType_LAST_VALUE: int
|
||||
ACCEL_TYPE_LAST_VALUE: int
|
||||
AccelType = int
|
||||
"""One of [AccelType_HOST, ACCEL_TYPE_HOST, AccelType_DX11, ACCEL_TYPE_DX11, AccelType_VAAPI, ACCEL_TYPE_VAAPI, AccelType_LAST_VALUE, ACCEL_TYPE_LAST_VALUE]"""
|
||||
|
||||
|
||||
|
||||
14
venv/lib/python3.11/site-packages/cv2/ipp/__init__.pyi
Normal file
14
venv/lib/python3.11/site-packages/cv2/ipp/__init__.pyi
Normal file
@@ -0,0 +1,14 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
# Functions
|
||||
def getIppVersion() -> str: ...
|
||||
|
||||
def setUseIPP(flag: bool) -> None: ...
|
||||
|
||||
def setUseIPP_NotExact(flag: bool) -> None: ...
|
||||
|
||||
def useIPP() -> bool: ...
|
||||
|
||||
def useIPP_NotExact() -> bool: ...
|
||||
|
||||
|
||||
6
venv/lib/python3.11/site-packages/cv2/load_config_py2.py
Normal file
6
venv/lib/python3.11/site-packages/cv2/load_config_py2.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# flake8: noqa
|
||||
import sys
|
||||
|
||||
if sys.version_info[:2] < (3, 0):
|
||||
def exec_file_wrapper(fpath, g_vars, l_vars):
|
||||
execfile(fpath, g_vars, l_vars)
|
||||
9
venv/lib/python3.11/site-packages/cv2/load_config_py3.py
Normal file
9
venv/lib/python3.11/site-packages/cv2/load_config_py3.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# flake8: noqa
|
||||
import os
|
||||
import sys
|
||||
|
||||
if sys.version_info[:2] >= (3, 0):
|
||||
def exec_file_wrapper(fpath, g_vars, l_vars):
|
||||
with open(fpath) as f:
|
||||
code = compile(f.read(), os.path.basename(fpath), 'exec')
|
||||
exec(code, g_vars, l_vars)
|
||||
@@ -0,0 +1,40 @@
|
||||
__all__ = []
|
||||
|
||||
import numpy as np
|
||||
import cv2 as cv
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
# Same as cv2.typing.NumPyArrayNumeric, but avoids circular dependencies
|
||||
if TYPE_CHECKING:
|
||||
_NumPyArrayNumeric = np.ndarray[Any, np.dtype[np.integer[Any] | np.floating[Any]]]
|
||||
else:
|
||||
_NumPyArrayNumeric = np.ndarray
|
||||
|
||||
# NumPy documentation: https://numpy.org/doc/stable/user/basics.subclassing.html
|
||||
|
||||
|
||||
class Mat(_NumPyArrayNumeric):
|
||||
'''
|
||||
cv.Mat wrapper for numpy array.
|
||||
|
||||
Stores extra metadata information how to interpret and process of numpy array for underlying C++ code.
|
||||
'''
|
||||
|
||||
def __new__(cls, arr, **kwargs):
|
||||
obj = arr.view(Mat)
|
||||
return obj
|
||||
|
||||
def __init__(self, arr, **kwargs):
|
||||
self.wrap_channels = kwargs.pop('wrap_channels', getattr(arr, 'wrap_channels', False))
|
||||
if len(kwargs) > 0:
|
||||
raise TypeError('Unknown parameters: {}'.format(repr(kwargs)))
|
||||
|
||||
def __array_finalize__(self, obj):
|
||||
if obj is None:
|
||||
return
|
||||
self.wrap_channels = getattr(obj, 'wrap_channels', None)
|
||||
|
||||
|
||||
Mat.__module__ = cv.__name__
|
||||
cv.Mat = Mat
|
||||
cv._registerMatType(Mat)
|
||||
Binary file not shown.
1
venv/lib/python3.11/site-packages/cv2/misc/__init__.py
Normal file
1
venv/lib/python3.11/site-packages/cv2/misc/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .version import get_ocv_version
|
||||
Binary file not shown.
Binary file not shown.
5
venv/lib/python3.11/site-packages/cv2/misc/version.py
Normal file
5
venv/lib/python3.11/site-packages/cv2/misc/version.py
Normal file
@@ -0,0 +1,5 @@
|
||||
import cv2
|
||||
|
||||
|
||||
def get_ocv_version():
|
||||
return getattr(cv2, "__version__", "unavailable")
|
||||
695
venv/lib/python3.11/site-packages/cv2/ml/__init__.pyi
Normal file
695
venv/lib/python3.11/site-packages/cv2/ml/__init__.pyi
Normal file
@@ -0,0 +1,695 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
import cv2
|
||||
import cv2.typing
|
||||
import typing as _typing
|
||||
|
||||
|
||||
# Enumerations
|
||||
VAR_NUMERICAL: int
|
||||
VAR_ORDERED: int
|
||||
VAR_CATEGORICAL: int
|
||||
VariableTypes = int
|
||||
"""One of [VAR_NUMERICAL, VAR_ORDERED, VAR_CATEGORICAL]"""
|
||||
|
||||
TEST_ERROR: int
|
||||
TRAIN_ERROR: int
|
||||
ErrorTypes = int
|
||||
"""One of [TEST_ERROR, TRAIN_ERROR]"""
|
||||
|
||||
ROW_SAMPLE: int
|
||||
COL_SAMPLE: int
|
||||
SampleTypes = int
|
||||
"""One of [ROW_SAMPLE, COL_SAMPLE]"""
|
||||
|
||||
|
||||
StatModel_UPDATE_MODEL: int
|
||||
STAT_MODEL_UPDATE_MODEL: int
|
||||
StatModel_RAW_OUTPUT: int
|
||||
STAT_MODEL_RAW_OUTPUT: int
|
||||
StatModel_COMPRESSED_INPUT: int
|
||||
STAT_MODEL_COMPRESSED_INPUT: int
|
||||
StatModel_PREPROCESSED_INPUT: int
|
||||
STAT_MODEL_PREPROCESSED_INPUT: int
|
||||
StatModel_Flags = int
|
||||
"""One of [StatModel_UPDATE_MODEL, STAT_MODEL_UPDATE_MODEL, StatModel_RAW_OUTPUT, STAT_MODEL_RAW_OUTPUT, StatModel_COMPRESSED_INPUT, STAT_MODEL_COMPRESSED_INPUT, StatModel_PREPROCESSED_INPUT, STAT_MODEL_PREPROCESSED_INPUT]"""
|
||||
|
||||
KNearest_BRUTE_FORCE: int
|
||||
KNEAREST_BRUTE_FORCE: int
|
||||
KNearest_KDTREE: int
|
||||
KNEAREST_KDTREE: int
|
||||
KNearest_Types = int
|
||||
"""One of [KNearest_BRUTE_FORCE, KNEAREST_BRUTE_FORCE, KNearest_KDTREE, KNEAREST_KDTREE]"""
|
||||
|
||||
SVM_C_SVC: int
|
||||
SVM_NU_SVC: int
|
||||
SVM_ONE_CLASS: int
|
||||
SVM_EPS_SVR: int
|
||||
SVM_NU_SVR: int
|
||||
SVM_Types = int
|
||||
"""One of [SVM_C_SVC, SVM_NU_SVC, SVM_ONE_CLASS, SVM_EPS_SVR, SVM_NU_SVR]"""
|
||||
|
||||
SVM_CUSTOM: int
|
||||
SVM_LINEAR: int
|
||||
SVM_POLY: int
|
||||
SVM_RBF: int
|
||||
SVM_SIGMOID: int
|
||||
SVM_CHI2: int
|
||||
SVM_INTER: int
|
||||
SVM_KernelTypes = int
|
||||
"""One of [SVM_CUSTOM, SVM_LINEAR, SVM_POLY, SVM_RBF, SVM_SIGMOID, SVM_CHI2, SVM_INTER]"""
|
||||
|
||||
SVM_C: int
|
||||
SVM_GAMMA: int
|
||||
SVM_P: int
|
||||
SVM_NU: int
|
||||
SVM_COEF: int
|
||||
SVM_DEGREE: int
|
||||
SVM_ParamTypes = int
|
||||
"""One of [SVM_C, SVM_GAMMA, SVM_P, SVM_NU, SVM_COEF, SVM_DEGREE]"""
|
||||
|
||||
EM_COV_MAT_SPHERICAL: int
|
||||
EM_COV_MAT_DIAGONAL: int
|
||||
EM_COV_MAT_GENERIC: int
|
||||
EM_COV_MAT_DEFAULT: int
|
||||
EM_Types = int
|
||||
"""One of [EM_COV_MAT_SPHERICAL, EM_COV_MAT_DIAGONAL, EM_COV_MAT_GENERIC, EM_COV_MAT_DEFAULT]"""
|
||||
|
||||
EM_DEFAULT_NCLUSTERS: int
|
||||
EM_DEFAULT_MAX_ITERS: int
|
||||
EM_START_E_STEP: int
|
||||
EM_START_M_STEP: int
|
||||
EM_START_AUTO_STEP: int
|
||||
|
||||
DTrees_PREDICT_AUTO: int
|
||||
DTREES_PREDICT_AUTO: int
|
||||
DTrees_PREDICT_SUM: int
|
||||
DTREES_PREDICT_SUM: int
|
||||
DTrees_PREDICT_MAX_VOTE: int
|
||||
DTREES_PREDICT_MAX_VOTE: int
|
||||
DTrees_PREDICT_MASK: int
|
||||
DTREES_PREDICT_MASK: int
|
||||
DTrees_Flags = int
|
||||
"""One of [DTrees_PREDICT_AUTO, DTREES_PREDICT_AUTO, DTrees_PREDICT_SUM, DTREES_PREDICT_SUM, DTrees_PREDICT_MAX_VOTE, DTREES_PREDICT_MAX_VOTE, DTrees_PREDICT_MASK, DTREES_PREDICT_MASK]"""
|
||||
|
||||
Boost_DISCRETE: int
|
||||
BOOST_DISCRETE: int
|
||||
Boost_REAL: int
|
||||
BOOST_REAL: int
|
||||
Boost_LOGIT: int
|
||||
BOOST_LOGIT: int
|
||||
Boost_GENTLE: int
|
||||
BOOST_GENTLE: int
|
||||
Boost_Types = int
|
||||
"""One of [Boost_DISCRETE, BOOST_DISCRETE, Boost_REAL, BOOST_REAL, Boost_LOGIT, BOOST_LOGIT, Boost_GENTLE, BOOST_GENTLE]"""
|
||||
|
||||
ANN_MLP_BACKPROP: int
|
||||
ANN_MLP_RPROP: int
|
||||
ANN_MLP_ANNEAL: int
|
||||
ANN_MLP_TrainingMethods = int
|
||||
"""One of [ANN_MLP_BACKPROP, ANN_MLP_RPROP, ANN_MLP_ANNEAL]"""
|
||||
|
||||
ANN_MLP_IDENTITY: int
|
||||
ANN_MLP_SIGMOID_SYM: int
|
||||
ANN_MLP_GAUSSIAN: int
|
||||
ANN_MLP_RELU: int
|
||||
ANN_MLP_LEAKYRELU: int
|
||||
ANN_MLP_ActivationFunctions = int
|
||||
"""One of [ANN_MLP_IDENTITY, ANN_MLP_SIGMOID_SYM, ANN_MLP_GAUSSIAN, ANN_MLP_RELU, ANN_MLP_LEAKYRELU]"""
|
||||
|
||||
ANN_MLP_UPDATE_WEIGHTS: int
|
||||
ANN_MLP_NO_INPUT_SCALE: int
|
||||
ANN_MLP_NO_OUTPUT_SCALE: int
|
||||
ANN_MLP_TrainFlags = int
|
||||
"""One of [ANN_MLP_UPDATE_WEIGHTS, ANN_MLP_NO_INPUT_SCALE, ANN_MLP_NO_OUTPUT_SCALE]"""
|
||||
|
||||
LogisticRegression_REG_DISABLE: int
|
||||
LOGISTIC_REGRESSION_REG_DISABLE: int
|
||||
LogisticRegression_REG_L1: int
|
||||
LOGISTIC_REGRESSION_REG_L1: int
|
||||
LogisticRegression_REG_L2: int
|
||||
LOGISTIC_REGRESSION_REG_L2: int
|
||||
LogisticRegression_RegKinds = int
|
||||
"""One of [LogisticRegression_REG_DISABLE, LOGISTIC_REGRESSION_REG_DISABLE, LogisticRegression_REG_L1, LOGISTIC_REGRESSION_REG_L1, LogisticRegression_REG_L2, LOGISTIC_REGRESSION_REG_L2]"""
|
||||
|
||||
LogisticRegression_BATCH: int
|
||||
LOGISTIC_REGRESSION_BATCH: int
|
||||
LogisticRegression_MINI_BATCH: int
|
||||
LOGISTIC_REGRESSION_MINI_BATCH: int
|
||||
LogisticRegression_Methods = int
|
||||
"""One of [LogisticRegression_BATCH, LOGISTIC_REGRESSION_BATCH, LogisticRegression_MINI_BATCH, LOGISTIC_REGRESSION_MINI_BATCH]"""
|
||||
|
||||
SVMSGD_SGD: int
|
||||
SVMSGD_ASGD: int
|
||||
SVMSGD_SvmsgdType = int
|
||||
"""One of [SVMSGD_SGD, SVMSGD_ASGD]"""
|
||||
|
||||
SVMSGD_SOFT_MARGIN: int
|
||||
SVMSGD_HARD_MARGIN: int
|
||||
SVMSGD_MarginType = int
|
||||
"""One of [SVMSGD_SOFT_MARGIN, SVMSGD_HARD_MARGIN]"""
|
||||
|
||||
|
||||
# Classes
|
||||
class ParamGrid:
|
||||
minVal: float
|
||||
maxVal: float
|
||||
logStep: float
|
||||
|
||||
# Functions
|
||||
@classmethod
|
||||
def create(cls, minVal: float = ..., maxVal: float = ..., logstep: float = ...) -> ParamGrid: ...
|
||||
|
||||
|
||||
class TrainData:
|
||||
# Functions
|
||||
def getLayout(self) -> int: ...
|
||||
|
||||
def getNTrainSamples(self) -> int: ...
|
||||
|
||||
def getNTestSamples(self) -> int: ...
|
||||
|
||||
def getNSamples(self) -> int: ...
|
||||
|
||||
def getNVars(self) -> int: ...
|
||||
|
||||
def getNAllVars(self) -> int: ...
|
||||
|
||||
@_typing.overload
|
||||
def getSample(self, varIdx: cv2.typing.MatLike, sidx: int, buf: float) -> None: ...
|
||||
@_typing.overload
|
||||
def getSample(self, varIdx: cv2.UMat, sidx: int, buf: float) -> None: ...
|
||||
|
||||
def getSamples(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getMissing(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getTrainSamples(self, layout: int = ..., compressSamples: bool = ..., compressVars: bool = ...) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getTrainResponses(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getTrainNormCatResponses(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getTestResponses(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getTestNormCatResponses(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getResponses(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getNormCatResponses(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getSampleWeights(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getTrainSampleWeights(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getTestSampleWeights(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getVarIdx(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getVarType(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getVarSymbolFlags(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getResponseType(self) -> int: ...
|
||||
|
||||
def getTrainSampleIdx(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getTestSampleIdx(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
@_typing.overload
|
||||
def getValues(self, vi: int, sidx: cv2.typing.MatLike, values: float) -> None: ...
|
||||
@_typing.overload
|
||||
def getValues(self, vi: int, sidx: cv2.UMat, values: float) -> None: ...
|
||||
|
||||
def getDefaultSubstValues(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getCatCount(self, vi: int) -> int: ...
|
||||
|
||||
def getClassLabels(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getCatOfs(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getCatMap(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def setTrainTestSplit(self, count: int, shuffle: bool = ...) -> None: ...
|
||||
|
||||
def setTrainTestSplitRatio(self, ratio: float, shuffle: bool = ...) -> None: ...
|
||||
|
||||
def shuffleTrainTest(self) -> None: ...
|
||||
|
||||
def getTestSamples(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getNames(self, names: _typing.Sequence[str]) -> None: ...
|
||||
|
||||
@staticmethod
|
||||
def getSubVector(vec: cv2.typing.MatLike, idx: cv2.typing.MatLike) -> cv2.typing.MatLike: ...
|
||||
|
||||
@staticmethod
|
||||
def getSubMatrix(matrix: cv2.typing.MatLike, idx: cv2.typing.MatLike, layout: int) -> cv2.typing.MatLike: ...
|
||||
|
||||
@classmethod
|
||||
@_typing.overload
|
||||
def create(cls, samples: cv2.typing.MatLike, layout: int, responses: cv2.typing.MatLike, varIdx: cv2.typing.MatLike | None = ..., sampleIdx: cv2.typing.MatLike | None = ..., sampleWeights: cv2.typing.MatLike | None = ..., varType: cv2.typing.MatLike | None = ...) -> TrainData: ...
|
||||
@classmethod
|
||||
@_typing.overload
|
||||
def create(cls, samples: cv2.UMat, layout: int, responses: cv2.UMat, varIdx: cv2.UMat | None = ..., sampleIdx: cv2.UMat | None = ..., sampleWeights: cv2.UMat | None = ..., varType: cv2.UMat | None = ...) -> TrainData: ...
|
||||
|
||||
|
||||
class StatModel(cv2.Algorithm):
|
||||
# Functions
|
||||
def getVarCount(self) -> int: ...
|
||||
|
||||
def empty(self) -> bool: ...
|
||||
|
||||
def isTrained(self) -> bool: ...
|
||||
|
||||
def isClassifier(self) -> bool: ...
|
||||
|
||||
@_typing.overload
|
||||
def train(self, trainData: TrainData, flags: int = ...) -> bool: ...
|
||||
@_typing.overload
|
||||
def train(self, samples: cv2.typing.MatLike, layout: int, responses: cv2.typing.MatLike) -> bool: ...
|
||||
@_typing.overload
|
||||
def train(self, samples: cv2.UMat, layout: int, responses: cv2.UMat) -> bool: ...
|
||||
|
||||
@_typing.overload
|
||||
def calcError(self, data: TrainData, test: bool, resp: cv2.typing.MatLike | None = ...) -> tuple[float, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def calcError(self, data: TrainData, test: bool, resp: cv2.UMat | None = ...) -> tuple[float, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def predict(self, samples: cv2.typing.MatLike, results: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[float, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def predict(self, samples: cv2.UMat, results: cv2.UMat | None = ..., flags: int = ...) -> tuple[float, cv2.UMat]: ...
|
||||
|
||||
|
||||
class NormalBayesClassifier(StatModel):
|
||||
# Functions
|
||||
@_typing.overload
|
||||
def predictProb(self, inputs: cv2.typing.MatLike, outputs: cv2.typing.MatLike | None = ..., outputProbs: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def predictProb(self, inputs: cv2.UMat, outputs: cv2.UMat | None = ..., outputProbs: cv2.UMat | None = ..., flags: int = ...) -> tuple[float, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> NormalBayesClassifier: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str, nodeName: str = ...) -> NormalBayesClassifier: ...
|
||||
|
||||
|
||||
class KNearest(StatModel):
|
||||
# Functions
|
||||
def getDefaultK(self) -> int: ...
|
||||
|
||||
def setDefaultK(self, val: int) -> None: ...
|
||||
|
||||
def getIsClassifier(self) -> bool: ...
|
||||
|
||||
def setIsClassifier(self, val: bool) -> None: ...
|
||||
|
||||
def getEmax(self) -> int: ...
|
||||
|
||||
def setEmax(self, val: int) -> None: ...
|
||||
|
||||
def getAlgorithmType(self) -> int: ...
|
||||
|
||||
def setAlgorithmType(self, val: int) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def findNearest(self, samples: cv2.typing.MatLike, k: int, results: cv2.typing.MatLike | None = ..., neighborResponses: cv2.typing.MatLike | None = ..., dist: cv2.typing.MatLike | None = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def findNearest(self, samples: cv2.UMat, k: int, results: cv2.UMat | None = ..., neighborResponses: cv2.UMat | None = ..., dist: cv2.UMat | None = ...) -> tuple[float, cv2.UMat, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> KNearest: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str) -> KNearest: ...
|
||||
|
||||
|
||||
class SVM(StatModel):
|
||||
# Functions
|
||||
def getType(self) -> int: ...
|
||||
|
||||
def setType(self, val: int) -> None: ...
|
||||
|
||||
def getGamma(self) -> float: ...
|
||||
|
||||
def setGamma(self, val: float) -> None: ...
|
||||
|
||||
def getCoef0(self) -> float: ...
|
||||
|
||||
def setCoef0(self, val: float) -> None: ...
|
||||
|
||||
def getDegree(self) -> float: ...
|
||||
|
||||
def setDegree(self, val: float) -> None: ...
|
||||
|
||||
def getC(self) -> float: ...
|
||||
|
||||
def setC(self, val: float) -> None: ...
|
||||
|
||||
def getNu(self) -> float: ...
|
||||
|
||||
def setNu(self, val: float) -> None: ...
|
||||
|
||||
def getP(self) -> float: ...
|
||||
|
||||
def setP(self, val: float) -> None: ...
|
||||
|
||||
def getClassWeights(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def setClassWeights(self, val: cv2.typing.MatLike) -> None: ...
|
||||
|
||||
def getTermCriteria(self) -> cv2.typing.TermCriteria: ...
|
||||
|
||||
def setTermCriteria(self, val: cv2.typing.TermCriteria) -> None: ...
|
||||
|
||||
def getKernelType(self) -> int: ...
|
||||
|
||||
def setKernel(self, kernelType: int) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def trainAuto(self, samples: cv2.typing.MatLike, layout: int, responses: cv2.typing.MatLike, kFold: int = ..., Cgrid: ParamGrid = ..., gammaGrid: ParamGrid = ..., pGrid: ParamGrid = ..., nuGrid: ParamGrid = ..., coeffGrid: ParamGrid = ..., degreeGrid: ParamGrid = ..., balanced: bool = ...) -> bool: ...
|
||||
@_typing.overload
|
||||
def trainAuto(self, samples: cv2.UMat, layout: int, responses: cv2.UMat, kFold: int = ..., Cgrid: ParamGrid = ..., gammaGrid: ParamGrid = ..., pGrid: ParamGrid = ..., nuGrid: ParamGrid = ..., coeffGrid: ParamGrid = ..., degreeGrid: ParamGrid = ..., balanced: bool = ...) -> bool: ...
|
||||
|
||||
def getSupportVectors(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getUncompressedSupportVectors(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
@_typing.overload
|
||||
def getDecisionFunction(self, i: int, alpha: cv2.typing.MatLike | None = ..., svidx: cv2.typing.MatLike | None = ...) -> tuple[float, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def getDecisionFunction(self, i: int, alpha: cv2.UMat | None = ..., svidx: cv2.UMat | None = ...) -> tuple[float, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@staticmethod
|
||||
def getDefaultGridPtr(param_id: int) -> ParamGrid: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> SVM: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str) -> SVM: ...
|
||||
|
||||
|
||||
class EM(StatModel):
|
||||
# Functions
|
||||
def getClustersNumber(self) -> int: ...
|
||||
|
||||
def setClustersNumber(self, val: int) -> None: ...
|
||||
|
||||
def getCovarianceMatrixType(self) -> int: ...
|
||||
|
||||
def setCovarianceMatrixType(self, val: int) -> None: ...
|
||||
|
||||
def getTermCriteria(self) -> cv2.typing.TermCriteria: ...
|
||||
|
||||
def setTermCriteria(self, val: cv2.typing.TermCriteria) -> None: ...
|
||||
|
||||
def getWeights(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getMeans(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getCovs(self, covs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
||||
|
||||
@_typing.overload
|
||||
def predict(self, samples: cv2.typing.MatLike, results: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[float, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def predict(self, samples: cv2.UMat, results: cv2.UMat | None = ..., flags: int = ...) -> tuple[float, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def predict2(self, sample: cv2.typing.MatLike, probs: cv2.typing.MatLike | None = ...) -> tuple[cv2.typing.Vec2d, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def predict2(self, sample: cv2.UMat, probs: cv2.UMat | None = ...) -> tuple[cv2.typing.Vec2d, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def trainEM(self, samples: cv2.typing.MatLike, logLikelihoods: cv2.typing.MatLike | None = ..., labels: cv2.typing.MatLike | None = ..., probs: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def trainEM(self, samples: cv2.UMat, logLikelihoods: cv2.UMat | None = ..., labels: cv2.UMat | None = ..., probs: cv2.UMat | None = ...) -> tuple[bool, cv2.UMat, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def trainE(self, samples: cv2.typing.MatLike, means0: cv2.typing.MatLike, covs0: cv2.typing.MatLike | None = ..., weights0: cv2.typing.MatLike | None = ..., logLikelihoods: cv2.typing.MatLike | None = ..., labels: cv2.typing.MatLike | None = ..., probs: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def trainE(self, samples: cv2.UMat, means0: cv2.UMat, covs0: cv2.UMat | None = ..., weights0: cv2.UMat | None = ..., logLikelihoods: cv2.UMat | None = ..., labels: cv2.UMat | None = ..., probs: cv2.UMat | None = ...) -> tuple[bool, cv2.UMat, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@_typing.overload
|
||||
def trainM(self, samples: cv2.typing.MatLike, probs0: cv2.typing.MatLike, logLikelihoods: cv2.typing.MatLike | None = ..., labels: cv2.typing.MatLike | None = ..., probs: cv2.typing.MatLike | None = ...) -> tuple[bool, cv2.typing.MatLike, cv2.typing.MatLike, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def trainM(self, samples: cv2.UMat, probs0: cv2.UMat, logLikelihoods: cv2.UMat | None = ..., labels: cv2.UMat | None = ..., probs: cv2.UMat | None = ...) -> tuple[bool, cv2.UMat, cv2.UMat, cv2.UMat]: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> EM: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str, nodeName: str = ...) -> EM: ...
|
||||
|
||||
|
||||
class DTrees(StatModel):
|
||||
# Functions
|
||||
def getMaxCategories(self) -> int: ...
|
||||
|
||||
def setMaxCategories(self, val: int) -> None: ...
|
||||
|
||||
def getMaxDepth(self) -> int: ...
|
||||
|
||||
def setMaxDepth(self, val: int) -> None: ...
|
||||
|
||||
def getMinSampleCount(self) -> int: ...
|
||||
|
||||
def setMinSampleCount(self, val: int) -> None: ...
|
||||
|
||||
def getCVFolds(self) -> int: ...
|
||||
|
||||
def setCVFolds(self, val: int) -> None: ...
|
||||
|
||||
def getUseSurrogates(self) -> bool: ...
|
||||
|
||||
def setUseSurrogates(self, val: bool) -> None: ...
|
||||
|
||||
def getUse1SERule(self) -> bool: ...
|
||||
|
||||
def setUse1SERule(self, val: bool) -> None: ...
|
||||
|
||||
def getTruncatePrunedTree(self) -> bool: ...
|
||||
|
||||
def setTruncatePrunedTree(self, val: bool) -> None: ...
|
||||
|
||||
def getRegressionAccuracy(self) -> float: ...
|
||||
|
||||
def setRegressionAccuracy(self, val: float) -> None: ...
|
||||
|
||||
def getPriors(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def setPriors(self, val: cv2.typing.MatLike) -> None: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> DTrees: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str, nodeName: str = ...) -> DTrees: ...
|
||||
|
||||
|
||||
class RTrees(DTrees):
|
||||
# Functions
|
||||
def getCalculateVarImportance(self) -> bool: ...
|
||||
|
||||
def setCalculateVarImportance(self, val: bool) -> None: ...
|
||||
|
||||
def getActiveVarCount(self) -> int: ...
|
||||
|
||||
def setActiveVarCount(self, val: int) -> None: ...
|
||||
|
||||
def getTermCriteria(self) -> cv2.typing.TermCriteria: ...
|
||||
|
||||
def setTermCriteria(self, val: cv2.typing.TermCriteria) -> None: ...
|
||||
|
||||
def getVarImportance(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
@_typing.overload
|
||||
def getVotes(self, samples: cv2.typing.MatLike, flags: int, results: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
|
||||
@_typing.overload
|
||||
def getVotes(self, samples: cv2.UMat, flags: int, results: cv2.UMat | None = ...) -> cv2.UMat: ...
|
||||
|
||||
def getOOBError(self) -> float: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> RTrees: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str, nodeName: str = ...) -> RTrees: ...
|
||||
|
||||
|
||||
class Boost(DTrees):
|
||||
# Functions
|
||||
def getBoostType(self) -> int: ...
|
||||
|
||||
def setBoostType(self, val: int) -> None: ...
|
||||
|
||||
def getWeakCount(self) -> int: ...
|
||||
|
||||
def setWeakCount(self, val: int) -> None: ...
|
||||
|
||||
def getWeightTrimRate(self) -> float: ...
|
||||
|
||||
def setWeightTrimRate(self, val: float) -> None: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> Boost: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str, nodeName: str = ...) -> Boost: ...
|
||||
|
||||
|
||||
class ANN_MLP(StatModel):
|
||||
# Functions
|
||||
def setTrainMethod(self, method: int, param1: float = ..., param2: float = ...) -> None: ...
|
||||
|
||||
def getTrainMethod(self) -> int: ...
|
||||
|
||||
def setActivationFunction(self, type: int, param1: float = ..., param2: float = ...) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def setLayerSizes(self, _layer_sizes: cv2.typing.MatLike) -> None: ...
|
||||
@_typing.overload
|
||||
def setLayerSizes(self, _layer_sizes: cv2.UMat) -> None: ...
|
||||
|
||||
def getLayerSizes(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getTermCriteria(self) -> cv2.typing.TermCriteria: ...
|
||||
|
||||
def setTermCriteria(self, val: cv2.typing.TermCriteria) -> None: ...
|
||||
|
||||
def getBackpropWeightScale(self) -> float: ...
|
||||
|
||||
def setBackpropWeightScale(self, val: float) -> None: ...
|
||||
|
||||
def getBackpropMomentumScale(self) -> float: ...
|
||||
|
||||
def setBackpropMomentumScale(self, val: float) -> None: ...
|
||||
|
||||
def getRpropDW0(self) -> float: ...
|
||||
|
||||
def setRpropDW0(self, val: float) -> None: ...
|
||||
|
||||
def getRpropDWPlus(self) -> float: ...
|
||||
|
||||
def setRpropDWPlus(self, val: float) -> None: ...
|
||||
|
||||
def getRpropDWMinus(self) -> float: ...
|
||||
|
||||
def setRpropDWMinus(self, val: float) -> None: ...
|
||||
|
||||
def getRpropDWMin(self) -> float: ...
|
||||
|
||||
def setRpropDWMin(self, val: float) -> None: ...
|
||||
|
||||
def getRpropDWMax(self) -> float: ...
|
||||
|
||||
def setRpropDWMax(self, val: float) -> None: ...
|
||||
|
||||
def getAnnealInitialT(self) -> float: ...
|
||||
|
||||
def setAnnealInitialT(self, val: float) -> None: ...
|
||||
|
||||
def getAnnealFinalT(self) -> float: ...
|
||||
|
||||
def setAnnealFinalT(self, val: float) -> None: ...
|
||||
|
||||
def getAnnealCoolingRatio(self) -> float: ...
|
||||
|
||||
def setAnnealCoolingRatio(self, val: float) -> None: ...
|
||||
|
||||
def getAnnealItePerStep(self) -> int: ...
|
||||
|
||||
def setAnnealItePerStep(self, val: int) -> None: ...
|
||||
|
||||
def getWeights(self, layerIdx: int) -> cv2.typing.MatLike: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> ANN_MLP: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str) -> ANN_MLP: ...
|
||||
|
||||
|
||||
class LogisticRegression(StatModel):
|
||||
# Functions
|
||||
def getLearningRate(self) -> float: ...
|
||||
|
||||
def setLearningRate(self, val: float) -> None: ...
|
||||
|
||||
def getIterations(self) -> int: ...
|
||||
|
||||
def setIterations(self, val: int) -> None: ...
|
||||
|
||||
def getRegularization(self) -> int: ...
|
||||
|
||||
def setRegularization(self, val: int) -> None: ...
|
||||
|
||||
def getTrainMethod(self) -> int: ...
|
||||
|
||||
def setTrainMethod(self, val: int) -> None: ...
|
||||
|
||||
def getMiniBatchSize(self) -> int: ...
|
||||
|
||||
def setMiniBatchSize(self, val: int) -> None: ...
|
||||
|
||||
def getTermCriteria(self) -> cv2.typing.TermCriteria: ...
|
||||
|
||||
def setTermCriteria(self, val: cv2.typing.TermCriteria) -> None: ...
|
||||
|
||||
@_typing.overload
|
||||
def predict(self, samples: cv2.typing.MatLike, results: cv2.typing.MatLike | None = ..., flags: int = ...) -> tuple[float, cv2.typing.MatLike]: ...
|
||||
@_typing.overload
|
||||
def predict(self, samples: cv2.UMat, results: cv2.UMat | None = ..., flags: int = ...) -> tuple[float, cv2.UMat]: ...
|
||||
|
||||
def get_learnt_thetas(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> LogisticRegression: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str, nodeName: str = ...) -> LogisticRegression: ...
|
||||
|
||||
|
||||
class SVMSGD(StatModel):
|
||||
# Functions
|
||||
def getWeights(self) -> cv2.typing.MatLike: ...
|
||||
|
||||
def getShift(self) -> float: ...
|
||||
|
||||
@classmethod
|
||||
def create(cls) -> SVMSGD: ...
|
||||
|
||||
@classmethod
|
||||
def load(cls, filepath: str, nodeName: str = ...) -> SVMSGD: ...
|
||||
|
||||
def setOptimalParameters(self, svmsgdType: int = ..., marginType: int = ...) -> None: ...
|
||||
|
||||
def getSvmsgdType(self) -> int: ...
|
||||
|
||||
def setSvmsgdType(self, svmsgdType: int) -> None: ...
|
||||
|
||||
def getMarginType(self) -> int: ...
|
||||
|
||||
def setMarginType(self, marginType: int) -> None: ...
|
||||
|
||||
def getMarginRegularization(self) -> float: ...
|
||||
|
||||
def setMarginRegularization(self, marginRegularization: float) -> None: ...
|
||||
|
||||
def getInitialStepSize(self) -> float: ...
|
||||
|
||||
def setInitialStepSize(self, InitialStepSize: float) -> None: ...
|
||||
|
||||
def getStepDecreasingPower(self) -> float: ...
|
||||
|
||||
def setStepDecreasingPower(self, stepDecreasingPower: float) -> None: ...
|
||||
|
||||
def getTermCriteria(self) -> cv2.typing.TermCriteria: ...
|
||||
|
||||
def setTermCriteria(self, val: cv2.typing.TermCriteria) -> None: ...
|
||||
|
||||
|
||||
|
||||
252
venv/lib/python3.11/site-packages/cv2/ocl/__init__.pyi
Normal file
252
venv/lib/python3.11/site-packages/cv2/ocl/__init__.pyi
Normal file
@@ -0,0 +1,252 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
# Enumerations
|
||||
OCL_VECTOR_OWN: int
|
||||
OCL_VECTOR_MAX: int
|
||||
OCL_VECTOR_DEFAULT: int
|
||||
OclVectorStrategy = int
|
||||
"""One of [OCL_VECTOR_OWN, OCL_VECTOR_MAX, OCL_VECTOR_DEFAULT]"""
|
||||
|
||||
|
||||
Device_TYPE_DEFAULT: int
|
||||
DEVICE_TYPE_DEFAULT: int
|
||||
Device_TYPE_CPU: int
|
||||
DEVICE_TYPE_CPU: int
|
||||
Device_TYPE_GPU: int
|
||||
DEVICE_TYPE_GPU: int
|
||||
Device_TYPE_ACCELERATOR: int
|
||||
DEVICE_TYPE_ACCELERATOR: int
|
||||
Device_TYPE_DGPU: int
|
||||
DEVICE_TYPE_DGPU: int
|
||||
Device_TYPE_IGPU: int
|
||||
DEVICE_TYPE_IGPU: int
|
||||
Device_TYPE_ALL: int
|
||||
DEVICE_TYPE_ALL: int
|
||||
Device_FP_DENORM: int
|
||||
DEVICE_FP_DENORM: int
|
||||
Device_FP_INF_NAN: int
|
||||
DEVICE_FP_INF_NAN: int
|
||||
Device_FP_ROUND_TO_NEAREST: int
|
||||
DEVICE_FP_ROUND_TO_NEAREST: int
|
||||
Device_FP_ROUND_TO_ZERO: int
|
||||
DEVICE_FP_ROUND_TO_ZERO: int
|
||||
Device_FP_ROUND_TO_INF: int
|
||||
DEVICE_FP_ROUND_TO_INF: int
|
||||
Device_FP_FMA: int
|
||||
DEVICE_FP_FMA: int
|
||||
Device_FP_SOFT_FLOAT: int
|
||||
DEVICE_FP_SOFT_FLOAT: int
|
||||
Device_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT: int
|
||||
DEVICE_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT: int
|
||||
Device_EXEC_KERNEL: int
|
||||
DEVICE_EXEC_KERNEL: int
|
||||
Device_EXEC_NATIVE_KERNEL: int
|
||||
DEVICE_EXEC_NATIVE_KERNEL: int
|
||||
Device_NO_CACHE: int
|
||||
DEVICE_NO_CACHE: int
|
||||
Device_READ_ONLY_CACHE: int
|
||||
DEVICE_READ_ONLY_CACHE: int
|
||||
Device_READ_WRITE_CACHE: int
|
||||
DEVICE_READ_WRITE_CACHE: int
|
||||
Device_NO_LOCAL_MEM: int
|
||||
DEVICE_NO_LOCAL_MEM: int
|
||||
Device_LOCAL_IS_LOCAL: int
|
||||
DEVICE_LOCAL_IS_LOCAL: int
|
||||
Device_LOCAL_IS_GLOBAL: int
|
||||
DEVICE_LOCAL_IS_GLOBAL: int
|
||||
Device_UNKNOWN_VENDOR: int
|
||||
DEVICE_UNKNOWN_VENDOR: int
|
||||
Device_VENDOR_AMD: int
|
||||
DEVICE_VENDOR_AMD: int
|
||||
Device_VENDOR_INTEL: int
|
||||
DEVICE_VENDOR_INTEL: int
|
||||
Device_VENDOR_NVIDIA: int
|
||||
DEVICE_VENDOR_NVIDIA: int
|
||||
|
||||
KernelArg_LOCAL: int
|
||||
KERNEL_ARG_LOCAL: int
|
||||
KernelArg_READ_ONLY: int
|
||||
KERNEL_ARG_READ_ONLY: int
|
||||
KernelArg_WRITE_ONLY: int
|
||||
KERNEL_ARG_WRITE_ONLY: int
|
||||
KernelArg_READ_WRITE: int
|
||||
KERNEL_ARG_READ_WRITE: int
|
||||
KernelArg_CONSTANT: int
|
||||
KERNEL_ARG_CONSTANT: int
|
||||
KernelArg_PTR_ONLY: int
|
||||
KERNEL_ARG_PTR_ONLY: int
|
||||
KernelArg_NO_SIZE: int
|
||||
KERNEL_ARG_NO_SIZE: int
|
||||
|
||||
|
||||
# Classes
|
||||
class Device:
|
||||
# Functions
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
def name(self) -> str: ...
|
||||
|
||||
def extensions(self) -> str: ...
|
||||
|
||||
def isExtensionSupported(self, extensionName: str) -> bool: ...
|
||||
|
||||
def version(self) -> str: ...
|
||||
|
||||
def vendorName(self) -> str: ...
|
||||
|
||||
def OpenCL_C_Version(self) -> str: ...
|
||||
|
||||
def OpenCLVersion(self) -> str: ...
|
||||
|
||||
def deviceVersionMajor(self) -> int: ...
|
||||
|
||||
def deviceVersionMinor(self) -> int: ...
|
||||
|
||||
def driverVersion(self) -> str: ...
|
||||
|
||||
def type(self) -> int: ...
|
||||
|
||||
def addressBits(self) -> int: ...
|
||||
|
||||
def available(self) -> bool: ...
|
||||
|
||||
def compilerAvailable(self) -> bool: ...
|
||||
|
||||
def linkerAvailable(self) -> bool: ...
|
||||
|
||||
def doubleFPConfig(self) -> int: ...
|
||||
|
||||
def singleFPConfig(self) -> int: ...
|
||||
|
||||
def halfFPConfig(self) -> int: ...
|
||||
|
||||
def hasFP64(self) -> bool: ...
|
||||
|
||||
def hasFP16(self) -> bool: ...
|
||||
|
||||
def endianLittle(self) -> bool: ...
|
||||
|
||||
def errorCorrectionSupport(self) -> bool: ...
|
||||
|
||||
def executionCapabilities(self) -> int: ...
|
||||
|
||||
def globalMemCacheSize(self) -> int: ...
|
||||
|
||||
def globalMemCacheType(self) -> int: ...
|
||||
|
||||
def globalMemCacheLineSize(self) -> int: ...
|
||||
|
||||
def globalMemSize(self) -> int: ...
|
||||
|
||||
def localMemSize(self) -> int: ...
|
||||
|
||||
def localMemType(self) -> int: ...
|
||||
|
||||
def hostUnifiedMemory(self) -> bool: ...
|
||||
|
||||
def imageSupport(self) -> bool: ...
|
||||
|
||||
def imageFromBufferSupport(self) -> bool: ...
|
||||
|
||||
def intelSubgroupsSupport(self) -> bool: ...
|
||||
|
||||
def image2DMaxWidth(self) -> int: ...
|
||||
|
||||
def image2DMaxHeight(self) -> int: ...
|
||||
|
||||
def image3DMaxWidth(self) -> int: ...
|
||||
|
||||
def image3DMaxHeight(self) -> int: ...
|
||||
|
||||
def image3DMaxDepth(self) -> int: ...
|
||||
|
||||
def imageMaxBufferSize(self) -> int: ...
|
||||
|
||||
def imageMaxArraySize(self) -> int: ...
|
||||
|
||||
def vendorID(self) -> int: ...
|
||||
|
||||
def isAMD(self) -> bool: ...
|
||||
|
||||
def isIntel(self) -> bool: ...
|
||||
|
||||
def isNVidia(self) -> bool: ...
|
||||
|
||||
def maxClockFrequency(self) -> int: ...
|
||||
|
||||
def maxComputeUnits(self) -> int: ...
|
||||
|
||||
def maxConstantArgs(self) -> int: ...
|
||||
|
||||
def maxConstantBufferSize(self) -> int: ...
|
||||
|
||||
def maxMemAllocSize(self) -> int: ...
|
||||
|
||||
def maxParameterSize(self) -> int: ...
|
||||
|
||||
def maxReadImageArgs(self) -> int: ...
|
||||
|
||||
def maxWriteImageArgs(self) -> int: ...
|
||||
|
||||
def maxSamplers(self) -> int: ...
|
||||
|
||||
def maxWorkGroupSize(self) -> int: ...
|
||||
|
||||
def maxWorkItemDims(self) -> int: ...
|
||||
|
||||
def memBaseAddrAlign(self) -> int: ...
|
||||
|
||||
def nativeVectorWidthChar(self) -> int: ...
|
||||
|
||||
def nativeVectorWidthShort(self) -> int: ...
|
||||
|
||||
def nativeVectorWidthInt(self) -> int: ...
|
||||
|
||||
def nativeVectorWidthLong(self) -> int: ...
|
||||
|
||||
def nativeVectorWidthFloat(self) -> int: ...
|
||||
|
||||
def nativeVectorWidthDouble(self) -> int: ...
|
||||
|
||||
def nativeVectorWidthHalf(self) -> int: ...
|
||||
|
||||
def preferredVectorWidthChar(self) -> int: ...
|
||||
|
||||
def preferredVectorWidthShort(self) -> int: ...
|
||||
|
||||
def preferredVectorWidthInt(self) -> int: ...
|
||||
|
||||
def preferredVectorWidthLong(self) -> int: ...
|
||||
|
||||
def preferredVectorWidthFloat(self) -> int: ...
|
||||
|
||||
def preferredVectorWidthDouble(self) -> int: ...
|
||||
|
||||
def preferredVectorWidthHalf(self) -> int: ...
|
||||
|
||||
def printfBufferSize(self) -> int: ...
|
||||
|
||||
def profilingTimerResolution(self) -> int: ...
|
||||
|
||||
@classmethod
|
||||
def getDefault(cls) -> Device: ...
|
||||
|
||||
|
||||
class OpenCLExecutionContext:
|
||||
...
|
||||
|
||||
|
||||
# Functions
|
||||
def finish() -> None: ...
|
||||
|
||||
def haveAmdBlas() -> bool: ...
|
||||
|
||||
def haveAmdFft() -> bool: ...
|
||||
|
||||
def haveOpenCL() -> bool: ...
|
||||
|
||||
def setUseOpenCL(flag: bool) -> None: ...
|
||||
|
||||
def useOpenCL() -> bool: ...
|
||||
|
||||
|
||||
51
venv/lib/python3.11/site-packages/cv2/ogl/__init__.pyi
Normal file
51
venv/lib/python3.11/site-packages/cv2/ogl/__init__.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
# Enumerations
|
||||
POINTS: int
|
||||
LINES: int
|
||||
LINE_LOOP: int
|
||||
LINE_STRIP: int
|
||||
TRIANGLES: int
|
||||
TRIANGLE_STRIP: int
|
||||
TRIANGLE_FAN: int
|
||||
QUADS: int
|
||||
QUAD_STRIP: int
|
||||
POLYGON: int
|
||||
RenderModes = int
|
||||
"""One of [POINTS, LINES, LINE_LOOP, LINE_STRIP, TRIANGLES, TRIANGLE_STRIP, TRIANGLE_FAN, QUADS, QUAD_STRIP, POLYGON]"""
|
||||
|
||||
|
||||
Buffer_ARRAY_BUFFER: int
|
||||
BUFFER_ARRAY_BUFFER: int
|
||||
Buffer_ELEMENT_ARRAY_BUFFER: int
|
||||
BUFFER_ELEMENT_ARRAY_BUFFER: int
|
||||
Buffer_PIXEL_PACK_BUFFER: int
|
||||
BUFFER_PIXEL_PACK_BUFFER: int
|
||||
Buffer_PIXEL_UNPACK_BUFFER: int
|
||||
BUFFER_PIXEL_UNPACK_BUFFER: int
|
||||
Buffer_Target = int
|
||||
"""One of [Buffer_ARRAY_BUFFER, BUFFER_ARRAY_BUFFER, Buffer_ELEMENT_ARRAY_BUFFER, BUFFER_ELEMENT_ARRAY_BUFFER, Buffer_PIXEL_PACK_BUFFER, BUFFER_PIXEL_PACK_BUFFER, Buffer_PIXEL_UNPACK_BUFFER, BUFFER_PIXEL_UNPACK_BUFFER]"""
|
||||
|
||||
Buffer_READ_ONLY: int
|
||||
BUFFER_READ_ONLY: int
|
||||
Buffer_WRITE_ONLY: int
|
||||
BUFFER_WRITE_ONLY: int
|
||||
Buffer_READ_WRITE: int
|
||||
BUFFER_READ_WRITE: int
|
||||
Buffer_Access = int
|
||||
"""One of [Buffer_READ_ONLY, BUFFER_READ_ONLY, Buffer_WRITE_ONLY, BUFFER_WRITE_ONLY, Buffer_READ_WRITE, BUFFER_READ_WRITE]"""
|
||||
|
||||
Texture2D_NONE: int
|
||||
TEXTURE2D_NONE: int
|
||||
Texture2D_DEPTH_COMPONENT: int
|
||||
TEXTURE2D_DEPTH_COMPONENT: int
|
||||
Texture2D_RGB: int
|
||||
TEXTURE2D_RGB: int
|
||||
Texture2D_RGBA: int
|
||||
TEXTURE2D_RGBA: int
|
||||
Texture2D_Format = int
|
||||
"""One of [Texture2D_NONE, TEXTURE2D_NONE, Texture2D_DEPTH_COMPONENT, TEXTURE2D_DEPTH_COMPONENT, Texture2D_RGB, TEXTURE2D_RGB, Texture2D_RGBA, TEXTURE2D_RGBA]"""
|
||||
|
||||
|
||||
# Classes
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
__all__: list[str] = []
|
||||
|
||||
# Functions
|
||||
def setParallelForBackend(backendName: str, propagateNumThreads: bool = ...) -> bool: ...
|
||||
|
||||
|
||||
0
venv/lib/python3.11/site-packages/cv2/py.typed
Normal file
0
venv/lib/python3.11/site-packages/cv2/py.typed
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user