cv2ext package

Subpackages

Module contents

Package containing helpful tools for working with opencv.

Submodules

bboxes

Submodule containing tools for working with bounding boxes in images.

cli

Submodule containing command line interface tools.

detection

Submodule containing tools for performing simple types of detection.

image

Submodule containing tools for working with images.

io

Submodule containing tools for working with video and image io.

metrics

Submodule containing tools for working with image metrics.

research

Submodule containing implementations of research papers and methods.

template

Submodule containing tools for working with templates in images.

tracking

Submodule containing tools for tracking objects in videos.

video

Submodule containing tools for working with videos.

Classes

Display

A class for displaying images using a separate thread.

Fourcc

A class for handling the codecs for video writing.

IterableVideo

A class for iterating over frames in a video, optionally with threading.

VideoWriter

A class for writing videos.

Functions

set_log_level()

Set the log level for the cv2ext package.

enable_jit()

Enable just-in-time compilation using Numba for some functions.

disable_jit()

Disable just-in-time compilation using Numba for some functions.

register_jit()

Register a function to be just-in-time compiled.

class cv2ext.Display(windowname: str, stopkey: str = 'q', nextkey: str | None = None, buffersize: int = 1, fps: int | None = None, *, show: bool | None = None)[source]

Bases: object

Class for displaying images using a separate thread.

property frame: np.ndarray

The most recent frame.

Returns:

The most recent frame.

Return type:

np.ndarray

property frameid: int

The current frame id.

Returns:

The current frame id.

Return type:

int

property stopped: bool

Whether the stop key has been pressed.

If it has been pressed, this property will be reset. Should be used for control loops on user side.

Returns:

Whether the display is stopped.

Return type:

bool

property is_alive: bool

Whether the display thread is running.

Returns:

Whether the display is running.

Return type:

bool

stop() None[source]

Stop the display.

update(frame: np.ndarray) None[source]

Update the frame being displayed.

Parameters:

frame (np.ndarray) – The frame to display.

wait(timeout: float | None = None) None[source]

Wait for the next press of nextkey if specified.

If nextkey has not been specified, will instead wait for the timeout amount. This will mimic a set framerate (although the underlying thread may still not update as fast.)

Parameters:

timeout (float, optional) – The maximum amount of time to wait.

class cv2ext.Fourcc(value)[source]

Bases: Enum

An enumeration.

AAS4 = 877871425
AASC = 1129529665
ABYR = 1381581377
ACTL = 1280590657
ADV1 = 827737153
ADVJ = 1247167553
AEIK = 1263093057
AEMI = 1229800769
AFLC = 1129072193
AFLI = 1229735489
AHDV = 1447315521
AJPG = 1196444225
AMPG = 1196444993
ANIM = 1296649793
AP41 = 825512001
AP42 = 842289217
ASLC = 1129075521
ASV1 = 827740993
ASV2 = 844518209
ASVX = 1482052417
ATM4 = 877483073
AUR2 = 844256577
AURA = 1095914817
AVC1 = 826496577
AVRN = 1314018881
BA81 = 825770306
BINK = 1263421762
BLZ0 = 811224130
BT20 = 808604738
BTCV = 1447253058
BW10 = 808539970
BYR1 = 827480386
BYR2 = 844257602
CC12 = 842089283
CDVC = 1129727043
CFCC = 1128482371
CGDI = 1229211459
CHAM = 1296123971
CJPG = 1196444227
CMYK = 1264143683
CPLA = 1095520323
CRAM = 1296126531
CSCD = 1145262915
CTRX = 1481790531
CVID = 1145656899
CWLT = 1414289219
CXY1 = 827938883
CXY2 = 844716099
CYUV = 1448433987
CYUY = 1498765635
D261 = 825635396
D263 = 859189828
DAVC = 1129726276
DCL1 = 827081540
DCL2 = 843858756
DCL3 = 860635972
DCL4 = 877413188
DCL5 = 894190404
DIV3 = 861292868
DIV4 = 878070084
DIV5 = 894847300
DIVX = 1482049860
DM4V = 1446268228
DMB1 = 826428740
DMB2 = 843205956
DMK2 = 843795780
DSVD = 1146508100
DUCK = 1262703940
DV25 = 892491332
DV50 = 808801860
DVAN = 1312904772
DVCS = 1396921924
DVE2 = 843404868
DVH1 = 826824260
DVHD = 1145591364
DVSD = 1146312260
DVSL = 1280529988
DVX1 = 827872836
DVX2 = 844650052
DVX3 = 861427268
DX50 = 808802372
DXGM = 1296521284
DXTC = 1129601092
DXTN = 1314150468
EKQ0 = 810634053
ELK0 = 810241093
EM2V = 1446137157
ES07 = 925913925
ESCP = 1346589509
ETV1 = 827741253
ETV2 = 844518469
ETVC = 1129731141
FFV1 = 827737670
FLJP = 1347046470
FMP4 = 877677894
FMVC = 1129729350
FPS1 = 827543622
FRWA = 1096241734
FRWD = 1146573382
FVF1 = 826693190
GEOX = 1481590087
GJPG = 1196444231
GLZW = 1465535559
GPEG = 1195724871
GWLT = 1414289223
H260 = 808858184
H261 = 825635400
H262 = 842412616
H263 = 859189832
H264 = 875967048
H265 = 892744264
H266 = 909521480
H267 = 926298696
H268 = 943075912
H269 = 959853128
HDYC = 1129923656
HEVC = 1129727304
HFYU = 1431914056
HMCR = 1380142408
HMRR = 1381125448
I263 = 859189833
ICLB = 1112294217
IGOR = 1380927305
IJLV = 1447840329
IJPG = 1196444233
ILVC = 1129729097
ILVR = 1381387337
IPDV = 1447317577
IPMA = 1095585865
IR21 = 825381449
IRAW = 1463898697
ISME = 1162695497
IV30 = 808670793
IV31 = 825448009
IV32 = 842225225
IV33 = 859002441
IV34 = 875779657
IV35 = 892556873
IV36 = 909334089
IV37 = 926111305
IV38 = 942888521
IV39 = 959665737
IV40 = 808736329
IV41 = 825513545
IV42 = 842290761
IV43 = 859067977
IV44 = 875845193
IV45 = 892622409
IV46 = 909399625
IV47 = 926176841
IV48 = 942954057
IV49 = 959731273
IV50 = 808801865
JBYR = 1381581386
JPEG = 1195724874
JPGL = 1279742026
KB2A = 1093812811
KB2D = 1144144459
KB2F = 1177698891
KB2G = 1194476107
KMVC = 1129729355
L261 = 825635404
L263 = 859189836
LBYR = 1381581388
LCMW = 1464681292
LCW2 = 844579660
LEAD = 1145128268
LGRY = 1498564428
LJ11 = 825313868
LJ22 = 842156620
LJ2K = 1261587020
LJ44 = 875842124
LJPG = 1196444236
LMP2 = 844123468
LMP4 = 877677900
LSVC = 1129730892
LSVM = 1297503052
LSVX = 1482052428
LZO1 = 827284044
M261 = 825635405
M263 = 859189837
M4CC = 1128477773
M4S2 = 844313677
MC12 = 842089293
MCAM = 1296122701
MJ2C = 1127369293
MJPG = 1196444237
MMES = 1397050701
MP2A = 1093816397
MP2T = 1412583501
MP2V = 1446137933
MP42 = 842289229
MP43 = 859066445
MP4A = 1093947469
MP4S = 1395937357
MP4T = 1412714573
MP4V = 1446269005
MPEG = 1195724877
MPG4 = 877088845
MPGI = 1229410381
MR16 = 909201997
MRCA = 1094931021
MRLE = 1162629709
MSVC = 1129730893
MSZH = 1213879117
MTX1 = 827872333
MTX2 = 844649549
MTX3 = 861426765
MTX4 = 878203981
MTX5 = 894981197
MTX6 = 911758413
MTX7 = 928535629
MTX8 = 945312845
MTX9 = 962090061
MVI1 = 826889805
MVI2 = 843667021
MWV1 = 827742029
NAVI = 1230389582
NDSC = 1129530446
NDSM = 1297302606
NDSP = 1347634254
NDSS = 1397965902
NDXC = 1129858126
NDXH = 1213744206
NDXP = 1347961934
NDXS = 1398293582
NHVU = 1431717966
NI24 = 875710798
NTN1 = 827216974
NTN2 = 843994190
NVDS = 1396987470
NVHS = 1397249614
NVS0 = 810767950
NVS1 = 827545166
NVS2 = 844322382
NVS3 = 861099598
NVS4 = 877876814
NVS5 = 894654030
NVT0 = 810833486
NVT1 = 827610702
NVT2 = 844387918
NVT3 = 861165134
NVT4 = 877942350
NVT5 = 894719566
PDVC = 1129727056
PGVV = 1448494928
PHMO = 1330464848
PIM1 = 827148624
PIM2 = 843925840
PIMJ = 1246579024
PIXL = 1280854352
PJPG = 1196444240
PVEZ = 1514493520
PVMM = 1296914000
PVW2 = 844584528
QPEG = 1195724881
QPEQ = 1363497041
RGBT = 1413629778
RLE4 = 876956754
RLE8 = 944065618
RMP4 = 877677906
RPZA = 1096437842
RT21 = 825381970
RV20 = 808605266
RV30 = 808670802
RV40 = 808736338
S422 = 842150995
SAN3 = 860766547
SDCC = 1128481875
SEDG = 1195656531
SFMC = 1129137747
SMK2 = 843795795
SMK4 = 877350227
SMKA = 1095454035
SMP4 = 877677907
SMSC = 1129532755
SMSD = 1146309971
SMSV = 1448299859
SP40 = 808734803
SP44 = 875843667
SP54 = 875909203
SPIG = 1195987027
SQZ2 = 844779859
STVA = 1096176723
STVB = 1112953939
STVC = 1129731155
STVX = 1482052691
STVY = 1498829907
SV10 = 808539731
SVQ1 = 827414099
SVQ3 = 860968531
TLMS = 1397574740
TLST = 1414745172
TM20 = 808602964
TM2X = 1479691604
TMIC = 1128877396
TMOT = 1414483284
TR20 = 808604244
TSCC = 1128485716
TV10 = 808539732
TVJP = 1347049044
TVMJ = 1246582356
TY0N = 1311791444
TY2C = 1127373140
TY2N = 1311922516
UCOD = 1146045269
ULTI = 1230261333
V210 = 808530518
V261 = 825635414
V655 = 892679766
VCR1 = 827474774
VCR2 = 844251990
VCR3 = 861029206
VCR4 = 877806422
VCR5 = 894583638
VCR6 = 911360854
VCR7 = 928138070
VCR8 = 944915286
VCR9 = 961692502
VDCT = 1413694550
VDOM = 1297040470
VDOW = 1464812630
VDTZ = 1515471958
VGPX = 1481656150
VIDS = 1396984150
VIFP = 1346783574
VIVO = 1331054934
VIXL = 1280854358
VLV1 = 827739222
VP30 = 808669270
VP31 = 825446486
VP40 = 808734806
VP50 = 808800342
VP60 = 808865878
VP61 = 825643094
VP62 = 842420310
VP70 = 808931414
VP80 = 808996950
VQC1 = 826495318
VQC2 = 843272534
VQJC = 1128943958
VSSV = 1448301398
VUUU = 1431655766
VX1K = 1261525078
VX2K = 1261590614
VXSP = 1347639382
VYU9 = 961894742
VYUY = 1498765654
WBVC = 1129726551
WHAM = 1296123991
WINX = 1481525591
WJPG = 1196444247
WMV1 = 827739479
WMV2 = 844516695
WMV3 = 861293911
WMVA = 1096174935
WNV1 = 827739735
WVC1 = 826496599
X263 = 859189848
X264 = 875967064
XLV0 = 810962008
XMPG = 1196445016
XVID = 1145656920
XWV0 = 810964824
XWV1 = 827742040
XWV2 = 844519256
XWV3 = 861296472
XWV4 = 878073688
XWV5 = 894850904
XWV6 = 911628120
XWV7 = 928405336
XWV8 = 945182552
XWV9 = 961959768
XXAN = 1312905304
Y411 = 825308249
Y41P = 1345401945
Y444 = 875836505
YC12 = 842089305
YUV8 = 945182041
YUV9 = 961959257
YUVP = 1347835225
YUY2 = 844715353
YUYV = 1448695129
YV12 = 842094169
YV16 = 909203033
YV92 = 842618457
ZLIB = 1112099930
ZMBV = 1447185754
ZPEG = 1195724890
ZYGO = 1330075994
ZYYY = 1499027802
aas4 = 879976801
aasc = 1668505953
abyr = 1920557665
actl = 1819566945
adv1 = 829842529
advj = 1786143841
aeik = 1802069345
aemi = 1768777057
aflc = 1668048481
afli = 1768711777
ahdv = 1986291809
ajpg = 1735420513
ampg = 1735421281
anim = 1835626081
ap41 = 825520225
ap42 = 842297441
aslc = 1668051809
asv1 = 829846369
asv2 = 846623585
asvx = 2021028705
atm4 = 879588449
aur2 = 846361953
aura = 1634891105
avc1 = 828601953
avrn = 1852995169
ba81 = 825778530
bink = 1802398050
blz0 = 813329506
bt20 = 808612962
btcv = 1986229346
bw10 = 808548194
byr1 = 829585762
byr2 = 846362978
cc12 = 842097507
cdvc = 1668703331
cfcc = 1667458659
cgdi = 1768187747
cham = 1835100259
cjpg = 1735420515
cmyk = 1803119971
cpla = 1634496611
cram = 1835102819
cscd = 1684239203
ctrx = 2020766819
cvid = 1684633187
cwlt = 1953265507
cxy1 = 830044259
cxy2 = 846821475
cyuv = 1987410275
cyuy = 2037741923
d261 = 825635428
d263 = 859189860
davc = 1668702564
dcl1 = 829186916
dcl2 = 845964132
dcl3 = 862741348
dcl4 = 879518564
dcl5 = 896295780
div3 = 863398244
div4 = 880175460
div5 = 896952676
divx = 2021026148
dm4v = 1983147364
dmb1 = 828534116
dmb2 = 845311332
dmk2 = 845901156
dsvd = 1685484388
duck = 1801680228
dv25 = 892499556
dv50 = 808810084
dvan = 1851881060
dvcs = 1935898212
dve2 = 845510244
dvh1 = 828929636
dvhd = 1684567652
dvsd = 1685288548
dvsl = 1819506276
dvx1 = 829978212
dvx2 = 846755428
dvx3 = 863532644
dx50 = 808810596
dxgm = 1835497572
dxtc = 1668577380
dxtn = 1853126756
ekq0 = 812739429
elk0 = 812346469
em2v = 1983016293
es07 = 925922149
escp = 1885565797
etv1 = 829846629
etv2 = 846623845
etvc = 1668707429
ffv1 = 829843046
fljp = 1886022758
fmp4 = 879783270
fmvc = 1668705638
fps1 = 829648998
frwa = 1635218022
frwd = 1685549670
fvf1 = 828798566
geox = 2020566375
gjpg = 1735420519
glzw = 2004511847
gpeg = 1734701159
gwlt = 1953265511
h260 = 808858216
h261 = 825635432
h262 = 842412648
h263 = 859189864
h264 = 875967080
h265 = 892744296
h266 = 909521512
h267 = 926298728
h268 = 943075944
h269 = 959853160
hdyc = 1668899944
hevc = 1668703592
hfyu = 1970890344
hmcr = 1919118696
hmrr = 1920101736
i263 = 859189865
iclb = 1651270505
igor = 1919903593
ijlv = 1986816617
ijpg = 1735420521
ilvc = 1668705385
ilvr = 1920363625
ipdv = 1986293865
ipma = 1634562153
ir21 = 825389673
iraw = 2002874985
isme = 1701671785
iv30 = 808679017
iv31 = 825456233
iv32 = 842233449
iv33 = 859010665
iv34 = 875787881
iv35 = 892565097
iv36 = 909342313
iv37 = 926119529
iv38 = 942896745
iv39 = 959673961
iv40 = 808744553
iv41 = 825521769
iv42 = 842298985
iv43 = 859076201
iv44 = 875853417
iv45 = 892630633
iv46 = 909407849
iv47 = 926185065
iv48 = 942962281
iv49 = 959739497
iv50 = 808810089
jbyr = 1920557674
jpeg = 1734701162
jpgl = 1818718314
kb2a = 1630691947
kb2d = 1681023595
kb2f = 1714578027
kb2g = 1731355243
kmvc = 1668705643
l261 = 825635436
l263 = 859189868
lbyr = 1920557676
lcmw = 2003657580
lcw2 = 846685036
lead = 1684104556
lgry = 2037540716
lj11 = 825322092
lj22 = 842164844
lj2k = 1798466156
lj44 = 875850348
ljpg = 1735420524
lmp2 = 846228844
lmp4 = 879783276
lsvc = 1668707180
lsvm = 1836479340
lsvx = 2021028716
lzo1 = 829389420
m261 = 825635437
m263 = 859189869
m4cc = 1667445869
m4s2 = 846410861
mc12 = 842097517
mcam = 1835098989
mj2c = 1664248429
mjpg = 1735420525
mmes = 1936026989
mp2a = 1630695533
mp2t = 1949462637
mp2v = 1983017069
mp42 = 842297453
mp43 = 859074669
mp4a = 1630826605
mp4s = 1932816493
mp4t = 1949593709
mp4v = 1983148141
mpeg = 1734701165
mpg4 = 879194221
mpgi = 1768386669
mr16 = 909210221
mrca = 1633907309
mrle = 1701605997
msvc = 1668707181
mszh = 1752855405
mtx1 = 829977709
mtx2 = 846754925
mtx3 = 863532141
mtx4 = 880309357
mtx5 = 897086573
mtx6 = 913863789
mtx7 = 930641005
mtx8 = 947418221
mtx9 = 964195437
mvi1 = 828995181
mvi2 = 845772397
mwv1 = 829847405
navi = 1769365870
ndsc = 1668506734
ndsm = 1836278894
ndsp = 1886610542
ndss = 1936942190
ndxc = 1668834414
ndxh = 1752720494
ndxp = 1886938222
ndxs = 1937269870
nhvu = 1970694254
ni24 = 875719022
ntn1 = 829322350
ntn2 = 846099566
nvds = 1935963758
nvhs = 1936225902
nvs0 = 812873326
nvs1 = 829650542
nvs2 = 846427758
nvs3 = 863204974
nvs4 = 879982190
nvs5 = 896759406
nvt0 = 812938862
nvt1 = 829716078
nvt2 = 846493294
nvt3 = 863270510
nvt4 = 880047726
nvt5 = 896824942
pdvc = 1668703344
pgvv = 1987471216
phmo = 1869441136
pim1 = 829254000
pim2 = 846031216
pimj = 1785555312
pixl = 1819830640
pjpg = 1735420528
pvez = 2053469808
pvmm = 1835890288
pvw2 = 846689904
qpeg = 1734701169
qpeq = 1902473329
rgbt = 1952606066
rle4 = 879062130
rle8 = 946170994
rmp4 = 879783282
rpza = 1635414130
rt21 = 825390194
rv20 = 808613490
rv30 = 808679026
rv40 = 808744562
s422 = 842151027
san3 = 862871923
sdcc = 1667458163
sedg = 1734632819
sfmc = 1668114035
smk2 = 845901171
smk4 = 879455603
smka = 1634430323
smp4 = 879783283
smsc = 1668509043
smsd = 1685286259
smsv = 1987276147
sp40 = 808743027
sp44 = 875851891
sp54 = 875917427
spig = 1734963315
sqz2 = 846885235
stva = 1635153011
stvb = 1651930227
stvc = 1668707443
stvx = 2021028979
stvy = 2037806195
sv10 = 808547955
svq1 = 829519475
svq3 = 863073907
tlms = 1936551028
tlst = 1953721460
tm20 = 808611188
tm2x = 2016570740
tmic = 1667853684
tmot = 1953459572
tr20 = 808612468
tscc = 1667462004
tv10 = 808547956
tvjp = 1886025332
tvmj = 1785558644
ty0n = 1848670580
ty2c = 1664252276
ty2n = 1848801652
ucod = 1685021557
ulti = 1769237621
v210 = 808530550
v261 = 825635446
v655 = 892679798
vcr1 = 829580150
vcr2 = 846357366
vcr3 = 863134582
vcr4 = 879911798
vcr5 = 896689014
vcr6 = 913466230
vcr7 = 930243446
vcr8 = 947020662
vcr9 = 963797878
vdct = 1952670838
vdom = 1836016758
vdow = 2003788918
vdtz = 2054448246
vgpx = 2020632438
vids = 1935960438
vifp = 1885759862
vivo = 1870031222
vixl = 1819830646
vlv1 = 829844598
vp30 = 808677494
vp31 = 825454710
vp40 = 808743030
vp50 = 808808566
vp60 = 808874102
vp61 = 825651318
vp62 = 842428534
vp70 = 808939638
vp80 = 809005174
vqc1 = 828600694
vqc2 = 845377910
vqjc = 1667920246
vssv = 1987277686
vuuu = 1970632054
vx1k = 1798404214
vx2k = 1798469750
vxsp = 1886615670
vyu9 = 964000118
vyuy = 2037741942
wbvc = 1668702839
wham = 1835100279
winx = 2020501879
wjpg = 1735420535
wmv1 = 829844855
wmv2 = 846622071
wmv3 = 863399287
wmva = 1635151223
wnv1 = 829845111
wvc1 = 828601975
x263 = 859189880
x264 = 875967096
xlv0 = 813067384
xmpg = 1735421304
xvid = 1684633208
xwv0 = 813070200
xwv1 = 829847416
xwv2 = 846624632
xwv3 = 863401848
xwv4 = 880179064
xwv5 = 896956280
xwv6 = 913733496
xwv7 = 930510712
xwv8 = 947287928
xwv9 = 964065144
xxan = 1851881592
y411 = 825308281
y41p = 1882272889
y444 = 875836537
yc12 = 842097529
yuv8 = 947287417
yuv9 = 964064633
yuvp = 1886811513
yuy2 = 846820729
yuyv = 1987671417
yv12 = 842102393
yv16 = 909211257
yv92 = 842626681
zlib = 1651076218
zmbv = 1986162042
zpeg = 1734701178
zygo = 1869052282
zyyy = 2038004090
class cv2ext.IterableVideo(filename: Path | str | int, channels: int = 3, buffersize: int = 8, *, use_thread: bool | None = None)[source]

Bases: object

property frame: ndarray

Get the current frame.

When using threading this value will be out of sync from the iterator.

Returns:

The current frame.

Return type:

numpy.ndarray

property frame_num: int

Get the current frame number.

When using threading this value will be out of sync from the iterator.

Returns:

The current frame number.

Return type:

int

property success: bool

Get the success of the last frame read.

When using threading this value will be out of sync from the iterator.

Returns:

True if the frame was successfully loaded.

Return type:

bool

property length: int

Get the length of the video.

Returns:

The number of frames in the video.

Return type:

int

property fps: float

Get the frames per second of the video.

Returns:

The frames per second of the video.

Return type:

float

property size: tuple[int, int]

Get the size of the video.

Returns:

The width and height of the video.

Return type:

tuple

property channels: int
property width: int

Get the width of the video.

Returns:

The width of the video.

Return type:

int

property height: int

Get the height of the video.

Returns:

The height of the video.

Return type:

int

stop() None[source]

Stop the video.

read() tuple[bool, ndarray][source]

Read the next frame from the video.

Returns:

  • bool – True if the frame was successfully loaded.

  • numpy.ndarray – The current frame.

class cv2ext.VideoWriter(filename: Path | str, fourcc: Fourcc = Fourcc.mp4v, fps: float = 30.0, frame_size: tuple[int, int] | None = None, *, show: bool | None = None)[source]

Bases: object

write(frame: np.ndarray) None[source]

Write a new frame to the video.

Parameters:

frame (np.ndarray) – The frame to write.

release() None[source]

Release the video writer.

cv2ext.disable_jit() None[source]

Disable JIT compilation.

cv2ext.enable_jit() None[source]

Enable just-in-time compilation using Numba for some functions.

cv2ext.register_jit(*, fastmath: bool = False, parallel: bool = False, nogil: bool = False, cache: bool = False, inline: str = 'never') Callable[[Callable[_P, _R]], Callable[_P, _R]][source]

Register a function to be re-imported whenever JIT status changes.

Parameters:
  • func (Callable[_P, _R], optional) – The function to optionally JIT compile. If None, the decorator returns a partially applied function.

  • fastmath (bool, optional) – If True, enable fastmath during jit. Default is False.

  • parallel (bool, optional) – If True, enable parallel jit. Default is False.

  • nogil (bool, optional) – If True, disable the GIL when running jit compiled functions. Default is False.

  • cache (bool, optional) – If True, cache jit compiled functions to disk. Default is False.

  • inline (str, optional) – Whether or not to inline functions at the Numba IR level. Default is ‘never’. Options are: [‘never’, ‘always’]

Returns:

The registered and optionally JIT-compiled function.

Return type:

Callable[[Callable[_P, _R]], Callable[_P, _R]]

Examples

>>> @register_jit(fastmath=True, parallel=True)
... def my_func(x):
...     return x * x
cv2ext.set_log_level(level: str) None[source]

Set the log level for the cv2ext package.

Parameters:

level (str) – The log level to set. One of “DEBUG”, “INFO”, “WARNING”, “ERROR”, “CRITICAL”.

Raises:

ValueError – If the level is not one of the allowed values.